[SEP-6][SEP-31] Deprecating fields and adding funding_method#1567
Conversation
JakeUrban
left a comment
There was a problem hiding this comment.
Overall I think this change looks good but I think we need a better explanation for why we're introducing funding_method and deprecating type, because their parameter descriptions in the deposit and withdrawal are almost identical.
My understanding is that we're deprecating GET /info's types object, because we don't want KYC sent in transaction initiation requests. However, it is still necessary to indicate what your funding/delivery method is, so the anchor can request necessary info via SEP-12, so we're introducing a new field that serves the same purpose as the original type parameter but removing the connection to the related object in GET info.
Another thing I think is missing is the connection to SEP-38. We should make it clear that the funding_methods defined in SEP-6 should match the delivery methods defined in SEP-38, if SEP-38 is supported.
I'd also argue that we should reuse the delivery_methods name in order to stay consistent with SEP-38.
|
Regarding
I would argue that it's actually the other way around: the |
|
I think its more important to be consistent rather than accurate with our naming. Its confusing that SEP-38's "delivery methods" are the same thing as SEP-6 "funding methods". It also doesn't matter which SEP is the authoritative source because they should always match. If they don't, its a bug, and wallets should report it to the anchor rather than assume one is correct and the other isn't. Can we have SEP-6/24/31 reference SEP-38 and have SEP-38 reference SEP-6/24/31? |
|
I think it would be good if we also rename SEP-38 to |
|
How about we also make change to SEP-38 so they are consistent? |
|
I don't think its worth making a breaking change or supporting both parameters in SEP-38 because "funding" is more clear than "delivery". I recognize the parameter name could be better, but I think we need to prioritize the developer's experience in this situation.
|
### Description - Add `funding_methods` to `/info` response. This field is mandatory for the anchor. - Add `funding_method` to `POST /transaction` param. This field is mandatory for wallet. ### Context SEP-31 changes scoped in stellar/stellar-protocol#1567 ### Testing - `./gradlew test` ### Next The SEP-6 change will be handled in a separate PR.
### Description - In `/info` response, replace `fields`(in deposit) and `types`(in withdraw) with `funding_methods` - In all 4 transaction creation request, replace `type` with `funding_method`, and this param will be mandatory ### Context SEP-31 changes scoped in stellar/stellar-protocol#1567 ### Testing - `./gradlew test`
What's Changed
info: Addfunding_methodsto each assetdepositanddeposit-exchange: deprecatetype, add required paramfunding_methodto replacewithdrawanddeposit-exchange: deprecatetype, add required paramfunding_methodto replaceinfo: Clean up deprecatedfieldsandsep12in the code example, addingfunding_methodsto each assettransaction: add required paramfunding_methodinfo: Add note thatbuy_delivery_methodsandsell_delivery_methodsshould be in line with thefunding_methodsin the protocol where the quote will be appliedContext
SEP-31 and SEP-6 have both delegate KYC to SEP-12, there’s no need for these SEPs to include KYC-specific details that are not directly related to transaction creation in their info responses.
The only exception is the
funding_methodwhich may be needed to decide what KYC info required.Also change the name from
offchain_delivery_methodtofunding_method, as withdrawals may not necessarily involve cash.More details:
https://docs.google.com/document/d/15FJ4p1Iw6Gkv-6vuRor49ENKlImGwbgeGY74tHjeQyk/edit?usp=sharing