Home > @3rdweb/sdk > TokenModule > allowanceOf
Get Token Allowance
Signature:
allowanceOf(owner: string, spender: string): Promise<BigNumber>;
Parameter | Type | Description |
---|---|---|
owner | string | |
spender | string |
Returns:
Promise<BigNumber>
The allowance of one wallet over anothers funds.
Get the allowance of one wallet over another’s funds - the allowance of a different address for a token is the amount of tokens that the wallet is allowed to spend on behalf of the connected wallet.
// Address of the wallet who owns the funds
const address = "";
// Address of the wallet to check token allowance
const otherAddress = "0x...";
const allowance = await module.allowanceOf(address, otherAddress);
console.log(allowance);