Skip to main content

Wallet Delegation

Wallet delegation is a feature that enables a separation of responsibilities between two wallets in a blockchain system. A cold wallet is a wallet that is kept offline for the purpose of storing digital assets securely, while a hot wallet is a wallet that is kept online and is used for the purpose of conducting transactions with those assets.

By linking a cold wallet with a hot wallet through delegation, you can authorize the hot wallet to act on behalf of the cold wallet. This means that the hot wallet can validate ownership of assets behalf of the cold wallet, without the need for the cold wallet to be online or to have its private keys exposed. This can help to increase the security of the digital assets, as the cold wallet remains offline and is less susceptible to hacking or other security threats.

Our API supports currently supports the following registries.

Usage

The process involves including a delegation parameter in the request when creating a pass.

The delegation parameter holds the information of the entity that will be delegated, including its registry name and wallet address. This entity is commonly referred to as the "vault address" or "cold wallet".

In the example provided, the wallet address 0x79c1d53f15e34895d608ff47ee56ad1f0f3f45d2 is the wallet that holds the NFT, and the user submitting the signature is acting as a delegate on behalf of this wallet.

const payload = {
signature:
"0x71147d2b97a397061e6dbd82351867a7057bdb4d9566a8ac2d618e1a3e62d43c722245fb4e6a8e9ee814348bdd5c433224c8c10f9fadf7fd154b44c17056109f1c",
signatureMessage: "Sign this message to generate a pass with ethpass.xyz",
platform: "apple",
chain: {
name: "evm",
network: 1,
},
nft: {
contractAddress: "0x79c1d53f15e34895d608ff47ee56ad1f0f3f45d3",
tokenId: "443",
},
delegation: {
registry: "delegate.cash",
vaultAddress: "0x79c1d53f15e34895d608ff47ee56ad1f0f3f45d2",
},
};

const response = await fetch(`https://api.ethpass.xyz/api/v0/passes/${data}`, {
method: "PATCH",
body: JSON.stringify(payload),
headers: new Headers({
"content-type": "application/json",
"X-API-KEY": "YOUR_SECRET_API_KEY",
}),
});