-
Notifications
You must be signed in to change notification settings - Fork 15
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
SIP-29: Snap Assets API #154
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GuillaumeRx
reviewed
Dec 5, 2024
GuillaumeRx
reviewed
Dec 5, 2024
Merged
* add handlers and permission definition * update to use `snaps-sdk` * snap -> Snap * Add CAIP-19 ID reference in description and rename token to asset * Add chains caveat * fix typo * allow batching * add fungible reference to asset description * add appendix for fungible assets * fix typos * update rates handler to support batching * unify * rename `AssetUnit` to `FungibleAssetUnit`
danroc
commented
Dec 6, 2024
danroc
commented
Dec 6, 2024
danroc
commented
Dec 6, 2024
It should be closer to the terminology used by the Token API.
salimtb
reviewed
Jan 8, 2025
salimtb
reviewed
Jan 9, 2025
ccharly
reviewed
Jan 13, 2025
Co-authored-by: Charly Chevalier <[email protected]>
Co-authored-by: Charly Chevalier <[email protected]>
Co-authored-by: Charly Chevalier <[email protected]>
Co-authored-by: Charly Chevalier <[email protected]>
Co-authored-by: Charly Chevalier <[email protected]>
ccharly
reviewed
Jan 13, 2025
Co-authored-by: Frederik Bolding <[email protected]>
Co-authored-by: Frederik Bolding <[email protected]>
Mrtenz
requested changes
Jan 20, 2025
Co-authored-by: Frederik Bolding <[email protected]>
Co-authored-by: Frederik Bolding <[email protected]>
Co-authored-by: Maarten Zuidhoorn <[email protected]>
- Update the handler names to be pluralised - Describe `Caip19AssetType` - Add some text about how the rates are represented
- Allow data URI and URL for token icons - Make conversion rate expiration time optional - Add note about asset filtering if out of scope - Remove native key from asset description - Typo fixes
FrederikBolding
approved these changes
Jan 22, 2025
Mrtenz
approved these changes
Jan 22, 2025
github-merge-queue bot
pushed a commit
to MetaMask/accounts
that referenced
this pull request
Jan 23, 2025
…vents + re-publish (#154) Now that the `SnapKeyring` uses a `Messenger` to interact with some controllers (`SnapController` only for now). We can re-use this messenger to forward new events coming out from the Snap. Those events will be mainly consumed by the new `Multichain*Controller`(s). This allows to use a "pub/sub pattern" rather than relying on polling information out from the Snap. All those information can still be fetched explicitly from the Snap: - `accountBalancesUpdated` -> `Keyring.getAccountBalances` - `accountTransactionsUpdated` -> `Keyring.listAccountTransactions` - `accountAssetListUpdated` -> `OnAssetLookup` (through [SIP-29](MetaMask/SIPs#154), once available)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This SIP aims to define a new API that can be exposed by Snaps to allow clients to retrieve asset information in a chain-agnostic way.