Skip to content
docs

WriteIntent

Defined in: kit/src/policies.ts:152

What a policy sees before a write goes out. Amounts in base units when known.

optional amount?: bigint

Defined in: kit/src/policies.ts:180

Amount when it can be read off the call (allowance for approvals).


optional approvals?: object[]

Defined in: kit/src/policies.ts:191

Approvals: every token the write grants, one entry each (a Permit2 batch carries several). token / amount above are set only when there is exactly one.

optional amount?: bigint

optional token?: string

unlimited: boolean


optional attachedValue?: bigint

Defined in: kit/src/policies.ts:199

TON jetton transfer(): nanotons attached to the jetton-wallet call. The jetton wallet keeps the gas, forwards forwardTonAmount to the recipient and returns the rest to the response destination. Undefined when the caller did not set it (the wallet’s default applies).


chain: string

Defined in: kit/src/policies.ts:154

CAIP-2 chain id of the account that writes.


optional deadline?: bigint

Defined in: kit/src/policies.ts:193

Approvals / permits: expiry as given (unix seconds).


destinations: string[]

Defined in: kit/src/policies.ts:170

Every destination the write goes to, read per chain shape (scan F16/F17): each EVM call’s to, the NEAR receiverId (also of a base64 borsh transaction), Tron recipient / contract / resource receiver decoded from raw_data_hex (never the optional JSON copy), every TON message, the recipients and programs of decoded Solana instructions. Approvals: the spender; revokes: the contracts called; message signatures: none. The allow/block lists check all of them.


destinationUnknown: boolean

Defined in: kit/src/policies.ts:176

Part of the write could not be read (an unknown shape, undecodable bytes, a lookup-table account): destinations may be incomplete. With a blocklist for the chain and no confirm hook the write is refused; with confirm, the hook sees this flag and decides; an allowlist refuses it.


optional forwardTonAmount?: bigint

Defined in: kit/src/policies.ts:201

TON jetton transfer(): nanotons forwarded to the recipient with the transfer notification, when set.


from: string

Defined in: kit/src/policies.ts:156

Account address the write originates from.


kind: WriteKind

Defined in: kit/src/policies.ts:160

What the write does; see WriteKind.


message: boolean

Defined in: kit/src/policies.ts:212

True for kind: 'message': allow/block lists do not apply, only confirm. Typed data is judged by the lists (scan 2026-10-28 F7).


method: WriteMethod

Defined in: kit/src/policies.ts:158

The account method that was called.


raw: unknown

Defined in: kit/src/policies.ts:210

The raw argument (first argument of the call), for policies that need more.


optional revokes?: object[]

Defined in: kit/src/policies.ts:203

Revokes: what each one takes away (spender absent for a per-token NFT approval and an EIP-7702 delegation).

optional spender?: string

token: string


optional to?: string

Defined in: kit/src/policies.ts:162

Destination when it can be read off the call: recipient, called contract, or the SPENDER of an approval. Read off to / recipient as given (apps match on it); the lists use WriteIntent.destinations.


optional token?: string

Defined in: kit/src/policies.ts:178

Token identifier for token transfers and approvals; undefined = native.


optional unlimited?: boolean

Defined in: kit/src/policies.ts:186

Approvals: the allowance is unbounded — type(uint128).max or above (isUnlimitedAllowance in core), a DAI-style allowed, or an amount the policies cannot read (the worst case is shown). For a Permit2 batch: any of its entries.


optional verifyingContract?: string

Defined in: kit/src/policies.ts:208

signTypedData: the domain’s verifyingContract as given. It is not one of destinations (an allowlist names spenders and recipients, not tokens), but a blocklist refuses it.