Class: ExerciseOperation
Defined in: packages/overcast-core/src/operation.ts:220
A taker delegating exercise_option. Unlike the offer operations this is not
a content-addressed struct: the taker commits to the two offer ids, the
exercise amount, and the opaque settlement metadata.
Payload byte layout (ExerciseOperationPayload::to_bytes):
collateral_offer (32B) | settlement_offer (32B) | amount (8B LE) |
metadata_len (4B LE) | metadata (N B)
Extends
Constructors
Constructor
new ExerciseOperation(
collateralOffer,
settlementOffer,
amount,
metadata,
params?): ExerciseOperation;
Defined in: packages/overcast-core/src/operation.ts:223
Parameters
| Parameter | Type | Description |
|---|---|---|
collateralOffer | string | The exercised option's collateral offer id. |
settlementOffer | string | The exercised option's settlement offer id. |
amount | bigint | Exercised amount, in the collateral asset's native units. |
metadata | Metadata | Opaque settlement-layer metadata (empty for the physical layer). |
params? | OperationParams | - |
Returns
ExerciseOperation
Overrides
Properties
actionByte
readonly actionByte: number = ACTIONS.Exercise;
Defined in: packages/overcast-core/src/operation.ts:221
The action's distinct discriminant byte (see ACTIONS).
Overrides
amount
readonly amount: bigint;
Defined in: packages/overcast-core/src/operation.ts:229
Exercised amount, in the collateral asset's native units.
collateralOffer
readonly collateralOffer: string;
Defined in: packages/overcast-core/src/operation.ts:225
The exercised option's collateral offer id.
metadata
readonly metadata: Metadata;
Defined in: packages/overcast-core/src/operation.ts:231
Opaque settlement-layer metadata (empty for the physical layer).
params
readonly params: OperationParams;
Defined in: packages/overcast-core/src/operation.ts:86
Inherited from
settlementOffer
readonly settlementOffer: string;
Defined in: packages/overcast-core/src/operation.ts:227
The exercised option's settlement offer id.
Methods
digest()
digest(): string;
Defined in: packages/overcast-core/src/operation.ts:105
Build the canonical 32-byte message the signer commits to, returned as a
base58 Id (the same encoding getId uses for content ids).
Preimage layout (SHA-256 hashed), mirroring Operation::digest:
"overcast_intent" (15B) | version=1 (1B) | action (1B) |
expiry LE (8B, i64) | nonce (32B) | payload_bytes (variable)
Returns
string
Inherited from
payloadBytes()
payloadBytes(): Uint8Array;
Defined in: packages/overcast-core/src/operation.ts:253
Serializes the action payload into its explicit ToBytes byte layout.
Returns
Uint8Array
Overrides
forOption()
static forOption(
option,
amount,
metadata,
params?): ExerciseOperation;
Defined in: packages/overcast-core/src/operation.ts:238
Build directly from a MarketOption and the exercise arguments.
Parameters
| Parameter | Type |
|---|---|
option | MarketOption |
amount | bigint |
metadata | Metadata |
params? | OperationParams |
Returns
ExerciseOperation