Operator approvals
How to approve another address to act on your confidential tokens.
Steps
1. Approve an operator
const token = sdk.createToken("0xEncryptedERC20");
// Approve with the default 1-hour duration
await token.setOperator("0xOperator");2. Approve with a custom expiry
// Approve until a specific timestamp (e.g. 24 hours from now)
const expiry = Math.floor(Date.now() / 1000) + 86400;
await token.setOperator("0xOperator", expiry);3. Check operator status
4. Use operator transfer
5. React: use the operator hooks
6. Finalize-unwrap operator approval
Next steps
Last updated