Skip to main content

Class: CollateralOfferOperation

Defined in: packages/overcast-core/src/operation.ts:123

A maker delegating make_collateral_offer. The payload is the collateral offer's content-address bytes — the exact bytes hashed into its offer_id — so signing the operation authorizes that specific offer.

Extends

Constructors

Constructor

new CollateralOfferOperation(offer, params?): CollateralOfferOperation;

Defined in: packages/overcast-core/src/operation.ts:126

Parameters

ParameterType
offerCollateralOffer
params?OperationParams

Returns

CollateralOfferOperation

Overrides

Operation.constructor

Properties

actionByte

readonly actionByte: number = ACTIONS.CollateralOffer;

Defined in: packages/overcast-core/src/operation.ts:124

The action's distinct discriminant byte (see ACTIONS).

Overrides

Operation.actionByte


offer

readonly offer: CollateralOffer;

Defined in: packages/overcast-core/src/operation.ts:127


params

readonly params: OperationParams;

Defined in: packages/overcast-core/src/operation.ts:86

Inherited from

Operation.params

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

Operation.digest


payloadBytes()

payloadBytes(): Uint8Array;

Defined in: packages/overcast-core/src/operation.ts:133

Serializes the action payload into its explicit ToBytes byte layout.

Returns

Uint8Array

Overrides

Operation.payloadBytes