-
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 Improvements #155
SIP-29 Improvements #155
Conversation
I wasn't sure whether to use |
I wonder if this API couldn't be versatile enough that we could add the support for NFT down the road rather than having multiple endpoints. It should just be a return type change |
I would strongly prefer this as well. |
SIPS/sip-29.md
Outdated
```typescript | ||
import { OnAssetDescriptionHandler } from "@metamask/snaps-sdk"; | ||
|
||
export const onAssetDescription: OnAssetDescriptionHandler = async ({ |
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.
I'm guessing this will be covered in another doc, but I'm curious how data is added to this list provided by the caller. How are assets discovered originally?
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.
This is covered by the kering API with the listAccountAssets
method IIRC @danroc can provide more details about it
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.
Then the snap uses any API that provides asset metadata to create its token description
SIPS/sip-29.md
Outdated
{ | ||
"initialPermissions": { | ||
"endowment:assets": { | ||
"chains": [ |
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.
Should we allow namespaces as well? And we should probably name it scopes
to be aligned with SIP-26, CAIP-25/27.
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.
What's your thinking for allowing namespaces ? I would prefer this to be granular and to have to define reference supported rather than defining namespaces that would probably introduce calls for reference that are not supported
Me too :) What we did in the |
This PR tries to add a permission and handlers definition to the
SIP-29
(#154). It also propose to useasset
rather than thetoken
denomination.