Skip to content
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-43: add the 'addToken' method to the interface #1559

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions ecosystem/sep-0043.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Authors: Piyal Basu <[email protected]>, Leigh McCulloch <@leighmcculloch>, Geor
Track: Standard
Status: Draft
Created: 2024-04-11
Version: 1.2.1
Version: 1.3.0
Discussion: https://github.com/stellar/stellar-protocol/discussions/1467
```

Expand Down Expand Up @@ -92,7 +92,14 @@ interface Error {
Promise<{
network: string,
networkPassphrase: string
} & error?: Error>
} & error?: Error>,

addToken: (
tokenAddress: string,
opts?: {
networkPassphrase?: string
}) =>
Promise<{} & error?: Error>,
}
```

Expand Down Expand Up @@ -198,6 +205,13 @@ If a wallet holds numerous addresses, it can use this param to ensure it is sign
`getNetwork` provides details about the network that the wallet is currently configured to. This allows a dapp to
confirm that they are building a transaction for the correct network.

### addToken

`addToken` enables requesters to prompt the user to add a token compatible with [SEP-41][sep41] to their wallet. This
improves the user's exeperience when interacting with a token for the first time, allowing them to review and approve
the addition of a token to their wallet, rather than having to initiate the addition of the token to their wallet
themselves.

### Errors

Error messaging provides clear errors to the requester. The `message` field provides an informative, human readable
Expand All @@ -210,6 +224,9 @@ useful for their users.

## Changelog

- [`v1.3.0`](https://github.com/stellar/stellar-protocol/pull/1559)
- [`v1.2.0`](https://github.com/stellar/stellar-protocol/pull/1478/commits/445f96ad78afa0c7a83a573a1d887dee27a894ee)
- [`v1.1.0`](https://github.com/stellar/stellar-protocol/pull/1478/commits/790ee6730296eeae0b619a82abfb43a2db3202eb)
- [`v1.0.0`](https://github.com/stellar/stellar-protocol/blob/fe1abbd181fb8a69213a7d711d19f4b31fd9b853/ecosystem/sep-0043.md)

[sep41]: sep-0041.md
Loading