Class: WithdrawOperation
Defined in: packages/overcast-core/src/operation.ts:307
Payload byte layout: asset (32B) | accountHolder (32B) | amount (u256 LE, 32B)
Extends
Constructors
Constructor
new WithdrawOperation(
withdraw,
domain,
params?): WithdrawOperation;
Defined in: packages/overcast-core/src/operation.ts:310
Parameters
| Parameter | Type |
|---|---|
withdraw | WithdrawParams |
domain | number |
params? | OperationParams |
Returns
WithdrawOperation
Overrides
Properties
actionByte
actionByte: number = ACTIONS.Withdraw;
Defined in: packages/overcast-core/src/operation.ts:308
The action's distinct discriminant byte (see ACTIONS).
Overrides
domain
readonly domain: number;
Defined in: packages/overcast-core/src/operation.ts:140
The domain that this operation is intended for
Inherited from
params
readonly params: OperationParams;
Defined in: packages/overcast-core/src/operation.ts:141
Inherited from
withdraw
readonly withdraw: WithdrawParams;
Defined in: packages/overcast-core/src/operation.ts:311
Methods
digest()
digest(): Bytes32;
Defined in: packages/overcast-core/src/operation.ts:161
Build the canonical 32-byte message the signer commits to — the same encoding getId uses for content-addresses, and for the same reason: the preimage is cross-chain, so the digest is identical on every layer and belongs to none of them.
Preimage layout (SHA-256 hashed), mirroring Operation::digest:
"overcast_intent" (15B) | version=1 (1B) | domain (4B LE) | curve (1B) |
action (1B) | expiry LE (8B, i64) | nonce (32B) | payload_bytes (variable)
Returns
Inherited from
payloadBytes()
payloadBytes(): Uint8Array;
Defined in: packages/overcast-core/src/operation.ts:318
Serializes the action payload into its explicit ToBytes byte layout.
Returns
Uint8Array
Overrides
sign()
sign(signer): Promise<SignedOperation>;
Defined in: packages/overcast-core/src/operation.ts:175
Parameters
| Parameter | Type |
|---|---|
signer | OvercastProtocolSigner |
Returns
Promise<SignedOperation>