default
Defined in: protocol-approvals-evm/src/approvals-protocol-evm.ts:86
Token approvals for evm accounts: discover what the account has granted, flag the risky grants, revoke them.
Discovery: approval-shaped events with the owner in topic1 (ERC-20 /
ERC-721 Approval, ApprovalForAll, Permit2 Approval / Permit /
Lockdown) give candidate pairs; the current state (allowance,
isApprovedForAll, getApproved, Permit2 allowance, the account’s
code for EIP-7702) is what gets reported. Revokes reuse the account’s own
methods — approve({amount: 0}), sendTransaction, revokeDelegation —
so on a policy-governed account (the kit’s Wallet.getAccount(...)) they
pass the same policies as any other write.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new default(
account,config?):ApprovalsProtocolEvm
Defined in: protocol-approvals-evm/src/approvals-protocol-evm.ts:95
Parameters
Section titled “Parameters”account
Section titled “account”ReadOnlyAccountLike | AccountLike
A @anywalletkit/wallet-evm account (or a read-only one for discovery).
config?
Section titled “config?”ApprovalsProtocolEvmConfig = {}
Returns
Section titled “Returns”ApprovalsProtocolEvm
Overrides
Section titled “Overrides”ApprovalsProtocol<ApprovalsProtocolEvmConfig>.constructor
Properties
Section titled “Properties”_account
Section titled “_account”
readonly_account:ReadOnlyAccountLike|AccountLike
Defined in: protocol-approvals-evm/src/approvals-protocol.ts:94
Inherited from
Section titled “Inherited from”ApprovalsProtocol._account
_config
Section titled “_config”
readonly_config:ApprovalsProtocolEvmConfig
Defined in: protocol-approvals-evm/src/approvals-protocol.ts:95
Inherited from
Section titled “Inherited from”ApprovalsProtocol._config
Methods
Section titled “Methods”buildRevokeTransaction()
Section titled “buildRevokeTransaction()”buildRevokeTransaction(
approval):RevokeTransaction
Defined in: protocol-approvals-evm/src/approvals-protocol-evm.ts:205
The raw transaction that revokes an approval (no account needed). Useful for hosts that build their own batches or policy conditions.
Parameters
Section titled “Parameters”approval
Section titled “approval”Several Permit2 approvals fold into one lockdown.
Returns
Section titled “Returns”describeActivity()
Section titled “describeActivity()”describeActivity(
tx,ctx):ActivityItem|null
Defined in: protocol-approvals-evm/src/approvals-protocol-evm.ts:348
Recognize approvals and revokes offline on any EVM chain: ERC-20 / ERC-721
approve (amount 0 → revoke), setApprovalForAll, Permit2 approve / lockdown.
See activity.ts for the rule.
Parameters
Section titled “Parameters”ChainTx
DescribeActivityContext
Returns
Section titled “Returns”ActivityItem | null
Overrides
Section titled “Overrides”ApprovalsProtocol.describeActivity
getApprovals()
Section titled “getApprovals()”getApprovals(
options?):Promise<ApprovalsResult>
Defined in: protocol-approvals-evm/src/approvals-protocol-evm.ts:151
Parameters
Section titled “Parameters”options?
Section titled “options?”GetApprovalsOptions = {}
Returns
Section titled “Returns”Promise<ApprovalsResult>
Overrides
Section titled “Overrides”ApprovalsProtocol.getApprovals
getSupportedStandards()
Section titled “getSupportedStandards()”getSupportedStandards():
Promise<ApprovalStandard[]>
Defined in: protocol-approvals-evm/src/approvals-protocol-evm.ts:147
Returns
Section titled “Returns”Promise<ApprovalStandard[]>
Overrides
Section titled “Overrides”ApprovalsProtocol.getSupportedStandards
quoteRevoke()
Section titled “quoteRevoke()”quoteRevoke(
approval):Promise<{fee:bigint; }>
Defined in: protocol-approvals-evm/src/approvals-protocol-evm.ts:231
Parameters
Section titled “Parameters”approval
Section titled “approval”Returns
Section titled “Returns”Promise<{ fee: bigint; }>
Overrides
Section titled “Overrides”ApprovalsProtocol.quoteRevoke
revoke()
Section titled “revoke()”revoke(
approval):Promise<{fee:bigint;hash:string; }>
Defined in: protocol-approvals-evm/src/approvals-protocol-evm.ts:251
Parameters
Section titled “Parameters”approval
Section titled “approval”Returns
Section titled “Returns”Promise<{ fee: bigint; hash: string; }>
Overrides
Section titled “Overrides”ApprovalsProtocol.revoke
revokeAll()
Section titled “revokeAll()”revokeAll(
approvals):Promise<RevokeResult[]>
Defined in: protocol-approvals-evm/src/approvals-protocol-evm.ts:290
Parameters
Section titled “Parameters”approvals
Section titled “approvals”Approval[]
Returns
Section titled “Returns”Promise<RevokeResult[]>
Overrides
Section titled “Overrides”ApprovalsProtocol.revokeAll