-
Notifications
You must be signed in to change notification settings - Fork 305
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-31] Add methods
to info response and update fields
desc
#1560
base: master
Are you sure you want to change the base?
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.
SEP-6 uses the fields
object provided in GET /info
responses to inform clients what the supported values are for the type
request parameter in GET /deposit-exchange
and GET /withdraw-exchange
.
There is no type
parameter in SEP-31's POST /transactions
endpoint, so the fields
object currently doesn't serve a purpose. I think in order for this to be valuable, we need to add a type
parameter to this endpoint.
Can we use the fields object just for display purposes? Even without a I remember that |
Clients can already use SEP-38 to see what an anchor's supported buy and sell methods are, so providing that information in the SEPs |
I think we need the client to provide the |
@@ -376,7 +383,7 @@ the corresponding off-chain asset, after fees have been applied. | |||
| `fee_percent` | number | (optional) A percentage fee in percentage points. Leave blank if there is no fee or fee calculation cannot be modeled using a fixed and percentage fee. | | |||
| `sender_sep12_type` | string | (**deprecated**, optional) The value of the `type` parameter the Sending Anchor should use for a `SEP-12 GET /customer` request. This field can be omitted if no KYC is necessary. Use a value from `sep12.sender.types` instead if any are present. | | |||
| `receiver_sep12_type` | string | (**deprecated**, optional) The value of the `type` parameter the Sending Anchor should use for a `SEP-12 GET /customer` request. This field can be omitted if no KYC is necessary. Use a values from `sep12.receiver.types` instead if any are present. | | |||
| `fields` | object | (**deprecated**, optional) An object containing the per-transaction parameters required in `POST /transactions` requests. Pass [SEP-9] fields via [SEP-12 PUT /customer](sep-0012.md#customer-put) instead. | | |||
| `fields` | object | (**deprecated**, optional) An object that contains multiple key-value pairs, where each key represents a field related to the transaction, and the value is an `transaction` object describing the field's details. | |
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.
Since we are adding type
to fields
, I think we should remove deprecated
.
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.
Neither of these descriptions quite make sense. The original version of the fields
object schema looked like this:
{
"fields": {
"transaction": {}
}
}
We deprecated fields
because its only purpose was for transaction
to specify request parameters required to be sent in POST /transactions
requests.
Now that we're adding type
, I think we have a couple options:
- Deprecate
fields.transaction
specifically, and un-deprecatedfields
. This way we can add thetype
key to thefields
object:
{
"fields": {
"type": {
"description": "",
"choices": [],
"optional"
}
}
}
- Un-deprecate both
fields
andfield.transaction
, and addtype
as a subfield offield.transactions
:
{
"fields": {
"transaction": {
"type": {
"description": "",
"choices": [],
"optional"
}
}
}
}
This is part of the ticket https://stellarorg.atlassian.net/browse/ANCHOR-809, where
methods
were introduced to assets config to represents the deposit methods supported by anchor. To align the config and info response across SEPs, addingmethods
to SEP-31 info responseAlso adjust the desc of
fields
to reflect the change.Minor fix of broken
pending-transaction-info-update
reference