Permissions
Wallets mediate interactions between untrusted applications and users’ keys by requesting and getting user permissions.
Permission Type
interface Caveat {
type: string;
value: unknown;
}
interface Permission {
invoker: string;
parentCapability: string;
caveats: Caveat[];
}
Properties
- The
invokeris a URI used to identify the source of the current dapp (e.g.https://your-site.com/). - The term
parentCapabilityrefers to the method that is being permitted (e.g.xpll_accounts). - The caveats array represents the specific restrictions applied to the permitted method.
- The type of a
Caveatis a string, and thevalueis an arbitrary JSON value. - The value of a
Caveatis only meaningful in the context of the type of theCaveat.
Request Permission
Request permission to access the user's accounts.
Check out the API documentation Request Permissions for details.
Get Permissions
Return all permissions that have been granted to the wallet.
Check out the API documentation for Get Permissions for details.