Skip to content
docs

ApprovalsProtocol

Defined in: protocols/approvals.ts:132

Base class for approvals modules.

TConfig extends object = Record<string, never>

new ApprovalsProtocol<TConfig>(account, config?): ApprovalsProtocol<TConfig>

Defined in: protocols/approvals.ts:136

IWalletAccountReadOnly | IWalletAccount

TConfig = ...

ApprovalsProtocol<TConfig>

ProtocolBase.constructor

protected readonly _account: IWalletAccountReadOnly | IWalletAccount

Defined in: protocols/base.ts:8

ProtocolBase._account


protected readonly _config: TConfig

Defined in: protocols/base.ts:9

ProtocolBase._config

describeActivity(_tx, _ctx): ActivityItem | null

Defined in: protocols/base.ts:24

Recognize one of this protocol’s own transactions in an address’s history and describe it for the wallet’s activity feed (“Supplied 100 USDC · Aave v3”). Return null when the transaction is not this protocol’s: the kit then asks the next module and finally falls back to send / receive / approve / contract call. Must be pure and synchronous: no network, no account state. The conformance suite feeds every module its recorded fixtures through this method.

ChainTx

DescribeActivityContext

ActivityItem | null

ProtocolBase.describeActivity


getApprovals(_o?): Promise<ApprovalsResult>

Defined in: protocols/approvals.ts:140

Live approvals of the account, with risks and scan coverage.

GetApprovalsOptions

Promise<ApprovalsResult>

IApprovalsProtocol.getApprovals


getSupportedStandards(): Promise<ApprovalStandard[]>

Defined in: protocols/approvals.ts:139

Approval kinds this module can find and revoke.

Promise<ApprovalStandard[]>

IApprovalsProtocol.getSupportedStandards


quoteRevoke(_a): Promise<{ fee: bigint; }>

Defined in: protocols/approvals.ts:141

Network fee of revoking one approval.

Approval

Promise<{ fee: bigint; }>

IApprovalsProtocol.quoteRevoke


protected requireSigningAccount(methodName): IWalletAccount

Defined in: protocols/base.ts:29

The account, narrowed to a signing one, or a ReadOnlyAccountError naming the caller.

string

IWalletAccount

ProtocolBase.requireSigningAccount


revoke(_a): Promise<RevokeResult>

Defined in: protocols/approvals.ts:142

Revoke one approval.

Approval

Promise<RevokeResult>

IApprovalsProtocol.revoke


revokeAll(_a): Promise<RevokeResult[]>

Defined in: protocols/approvals.ts:143

Revoke several, batching where the standard allows. Continues past failures; each result carries its own error.

Approval[]

Promise<RevokeResult[]>

IApprovalsProtocol.revokeAll