tx.txbuilder.addregisterstake
Home > @blaze-cardano/tx > TxBuilder > addRegisterStake
TxBuilder.addRegisterStake() method
Adds a certificate to register a staker.
Emits the Conway Registration { credential, deposit } certificate (cert type 7). The legacy Shelley StakeRegistration (type 0) is still accepted in Conway and removed in Dijkstra.
The ledger requires the credential's witness for a type-7 registration, as for deregistration and delegation: a key credential's signature, or a script credential's script. For a Plutus script pass redeemer to attach a cert-purpose redeemer; the caller supplies the validating script (e.g. with or as a reference input via ). A script credential without a redeemer is taken to be a native script.
Signature:
addRegisterStake(credential: Credential, redeemer?: PlutusData): this;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
credential |
Credential |
— the credential to register (key or script). |
|
redeemer |
PlutusData |
(Optional) — Plutus redeemer when the credential is a Plutus script. |
Returns:
this