-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SEP-6][SEP-31] Deprecating fields
and adding funding_method
#1567
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SEP-6 doc is missing version update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
### 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_methods
to each assetdeposit
anddeposit-exchange
: deprecatetype
, add required paramfunding_method
to replacewithdraw
anddeposit-exchange
: deprecatetype
, add required paramfunding_method
to replaceinfo
: Clean up deprecatedfields
andsep12
in the code example, addingfunding_methods
to each assettransaction
: add required paramfunding_method
info
: Add note thatbuy_delivery_methods
andsell_delivery_methods
should be in line with thefunding_methods
in 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_method
which may be needed to decide what KYC info required.Also change the name from
offchain_delivery_method
tofunding_method
, as withdrawals may not necessarily involve cash.More details:
https://docs.google.com/document/d/15FJ4p1Iw6Gkv-6vuRor49ENKlImGwbgeGY74tHjeQyk/edit?usp=sharing