ClaimRewardsTransaction
@midnight/ledger / ClaimRewardsTransaction
Class: ClaimRewardsTransaction<S>
A request to allocate rewards, authorized by the reward's recipient
Type Parameters
S
S extends Signaturish
Constructors
Constructor
new ClaimRewardsTransaction<S>(
markerS,
network_id,
value,
owner,
nonce,
signature,
kind?): ClaimRewardsTransaction<S>;
Parameters
markerS
S["instance"]
network_id
string
value
bigint
owner
string
nonce
string
signature
S
kind?
Returns
ClaimRewardsTransaction<S>
Properties
dataToSign
readonly dataToSign: Uint8Array;
The raw data any valid signature must be over to approve this transaction.
kind
readonly kind: ClaimKind;
The kind of claim being made, either a Reward or a CardanoBridge claim.
nonce
readonly nonce: string;
The rewarded coin's randomness, preventing it from colliding with other coins.
owner
readonly owner: string;
The signing key owning this coin.
signature
readonly signature: S;
The signature on this request.
value
readonly value: bigint;
The rewarded coin's value, in atomic units dependent on the currency
Bounded to be a non-negative 64-bit integer
Methods
addSignature()
addSignature(signature): ClaimRewardsTransaction<SignatureEnabled>;
Parameters
signature
string
Returns
ClaimRewardsTransaction<SignatureEnabled>
eraseSignatures()
eraseSignatures(): ClaimRewardsTransaction<SignatureErased>;
Returns
ClaimRewardsTransaction<SignatureErased>
serialize()
serialize(): Uint8Array;
Returns
Uint8Array
toString()
toString(compact?): string;
Parameters
compact?
boolean
Returns
string
deserialize()
static deserialize<S>(markerS, raw): ClaimRewardsTransaction<S>;
Type Parameters
S
S extends Signaturish
Parameters
markerS
S["instance"]
raw
Uint8Array
Returns
ClaimRewardsTransaction<S>
new()
static new(
network_id,
value,
owner,
nonce,
kind): ClaimRewardsTransaction<SignatureErased>;
Parameters
network_id
string
value
bigint
owner
string
nonce
string
kind
Returns
ClaimRewardsTransaction<SignatureErased>