Create Delegated Key
Create a delegated key for your smart wallet
Adding a delegated key to your smart wallet allows you to give a third party the possibility to transact on your wallet, while you maintain control over what that key can do. This guide will walk you through the process of creating a delegated key and explain the available permissions.
For a more detailed explanation of how to work with delegated keys, see the Delegated Keys guide.
Step-by-Step Guide
-
Create a New Key: We need to create a new key for the third party. This key will be associated with the delegated signer’s permissions.
-
Generate a Delegated Key: The creator of the key sends a POST request to the following endpoint:
requestReplace
{walletLocator}
with your actual wallet locator. -
Request Body: The request body should include the permissions you want to grant to the delegated key and the
expiresAt
property.
expiresAt
The expiresAt
property specifies the expiration date and time for the delegated key. It is defined as a timestamp in milliseconds since the Unix epoch. Once the delegated key reaches the expiration date and time, it will no longer be valid and cannot be used to perform any actions.
Available Permissions
-
Native Token Transfers:
- Type:
native-token-transfer
- Description: Allows the transfer of native blockchain tokens like ETH.
- Data:
allowance
: The maximum amount of native tokens that can be transferred, specified in a decimal string.
- Type:
-
ERC20 Token Transfers:
- Type:
erc20-token-transfer
- Description: Permits the transfer of ERC20 tokens, which are fungible tokens on the Ethereum blockchain.
- Data:
address
: The contract address of the ERC20 token.allowance
: The maximum amount of ERC20 tokens that can be transferred, specified in a decimal string.
- Type:
-
ERC721 Token Transfers:
- Type:
erc721-token-transfer
- Description: Enables the transfer of ERC721 tokens, which are non-fungible tokens (NFTs) on the Ethereum blockchain.
- Data:
address
: The contract address of the ERC721 token.tokenId
: The specific token ID to be transferred.
- Type:
-
ERC1155 Token Transfers:
- Type:
erc1155-token-transfer
- Description: Allows the transfer of ERC1155 tokens, which can be both fungible and non-fungible.
- Data:
address
: The contract address of the ERC1155 token.tokenId
: The specific token ID to be transferred.amount
: The amount of tokens to be transferred.
- Type:
-
Gas Limit Controls:
- Type:
gas-limit
- Description: Sets a cap on the gas that can be used for transactions, helping to manage transaction costs.
- Data:
limit
: The maximum gas limit for transactions, specified in a decimal string.
- Type:
-
Total Call Limits:
- Type:
call-limit
- Description: Restricts the number of calls that can be made, providing control over transaction frequency.
- Data:
count
: The maximum number of calls that can be made.
- Type:
-
Rate Limiting:
- Type:
rate-limit
- Description: Controls the rate of transactions by limiting the number of calls within a specified time frame.
- Data:
count
: The number of calls allowed.interval
: The time window in seconds.
- Type: