Give third parties the possibility to transact with your wallet.
Always maintain control over what that key can do with tight permissions and being able to revoke them at any time.
Prerequisites
Ensure you have a wallet created.
API Key : Ensure you have an API key with the scopes: wallets:signatures.create
and wallets:transactions.create
.
Adding a delegated signer
React Node.js React Native Swift import { useWallet } from '@crossmint/client-sdk-react-ui' ;
const { wallet } = useWallet ();
await wallet . addDelegatedSigner ({
signer: externalSigner ,
});
Parameters The locator of the signer to add.
Returns The wallet with the new delegated signer.
import { useWallet } from '@crossmint/client-sdk-react-ui' ;
const { wallet } = useWallet ();
await wallet . addDelegatedSigner ({
signer: externalSigner ,
});
Parameters The locator of the signer to add.
Returns The wallet with the new delegated signer.
const wallet = await crossmintWallets . getWallet ( walletLocator );
await wallet . addDelegatedSigner ({
signer: externalSigner ,
});
Parameters The locator of the signer to add.
Returns The wallet with the new delegated signer.
import { useWallet } from '@crossmint/client-sdk-react-native-ui' ;
const { wallet } = useWallet ();
await wallet . addDelegatedSigner ({
signer: externalSigner ,
});
Parameters The locator of the signer to add.
Returns The wallet with the new delegated signer.
let wallet = try await crossmintWallets. getWallet (walletLocator)
try await wallet. addDelegatedSigner ( signer : externalSigner)
Parameters The locator of the signer to add.
Returns The wallet with the new delegated signer.
Getting all delegated signers
React Node.js React Native Swift import { useWallet } from '@crossmint/client-sdk-react-ui' ;
const { wallet } = useWallet ();
const signers = await wallet . delegatedSigners ();
Returns import { useWallet } from '@crossmint/client-sdk-react-ui' ;
const { wallet } = useWallet ();
const signers = await wallet . delegatedSigners ();
Returns const wallet = await crossmintWallets . getWallet ( walletLocator );
const signers = await wallet . delegatedSigners ();
Returns import { useWallet } from '@crossmint/client-sdk-react-native-ui' ;
const { wallet } = useWallet ();
const signers = await wallet . delegatedSigners ();
Returns let wallet = try await crossmintWallets. getWallet (walletLocator)
let signers = try await wallet. delegatedSigners ()
Returns
Adding delegated signers with expiration date
React Node.js React Native Swift import { useWallet } from '@crossmint/client-sdk-react-ui' ;
const { wallet } = useWallet ();
await wallet . addDelegatedSigner ({
signer: externalSigner ,
expiresAt: new Date ( Date . now () + 1000 * 60 * 60 * 24 * 30 ). getTime (),
});
Parameters The locator of the signer to add.
The expiration date of the delegated signer.
import { useWallet } from '@crossmint/client-sdk-react-ui' ;
const { wallet } = useWallet ();
await wallet . addDelegatedSigner ({
signer: externalSigner ,
expiresAt: new Date ( Date . now () + 1000 * 60 * 60 * 24 * 30 ). getTime (),
});
Parameters The locator of the signer to add.
The expiration date of the delegated signer.
const wallet = await crossmintWallets . getWallet ( walletLocator );
await wallet . addDelegatedSigner ({
signer: externalSigner ,
expiresAt: new Date ( Date . now () + 1000 * 60 * 60 * 24 * 30 ). getTime (),
});
Parameters The locator of the signer to add.
The expiration date of the delegated signer.
import { useWallet } from '@crossmint/client-sdk-react-native-ui' ;
const { wallet } = useWallet ();
await wallet . addDelegatedSigner ({
signer: externalSigner ,
expiresAt: new Date ( Date . now () + 1000 * 60 * 60 * 24 * 30 ). getTime (),
});
Parameters The locator of the signer to add.
The expiration date of the delegated signer.
let wallet = try await crossmintWallets. getWallet (walletLocator)
try await wallet. addDelegatedSigner ( signer : externalSigner, expiresAt : Date (Date. now () + 1000 * 60 * 60 * 24 * 30 ). timeIntervalSince1970 )
Parameters The locator of the signer to add.
The expiration date of the delegated signer.
Permissions
Permissions are available under private access. Contact us if you need
access
React Node.js React Native Swift import { useWallet } from '@crossmint/client-sdk-react-ui' ;
const { wallet } = useWallet ();
await wallet . addDelegatedSigner ({
signer: externalSigner ,
permissions: permissions ,
});
Parameters The locator of the signer to add.
import { useWallet } from '@crossmint/client-sdk-react-ui' ;
const { wallet } = useWallet ();
await wallet . addDelegatedSigner ({
signer: externalSigner ,
permissions: permissions ,
});
Parameters The locator of the signer to add.
const wallet = await crossmintWallets . getWallet ( walletLocator );
await wallet . addDelegatedSigner ({
signer: externalSigner ,
permissions: permissions ,
});
Parameters The locator of the signer to add.
import { useWallet } from '@crossmint/client-sdk-react-native-ui' ;
const { wallet } = useWallet ();
await wallet . addDelegatedSigner ({
signer: externalSigner ,
permissions: permissions ,
});
Parameters The locator of the signer to add.
let wallet = try await crossmintWallets. getWallet (walletLocator)
try await wallet. addDelegatedSigner ( signer : externalSigner, permissions : permissions)
Parameters The locator of the signer to add.
Available Permissions
Token Transfers
const permissions = [
{
type: "token-transfer" ,
data: {
allowance: allowance ,
token: tokenLocator ,
},
},
];
Gas Limit
const permissions = [
{
type: "gas-limit" ,
data: {
limit: limit , // Maximum gas in decimal string
},
},
];
Call Limit
const permissions = [
{
type: "call-limit" ,
data: {
count: count , // Maximum number of calls
},
},
];