Class NativeRedelegateBuilder

Builder for creating Native Redelegate transactions. Allows accounts to move their delegated stake from one validator to another without waiting for the undelegation period.

Example

const transaction = new NativeRedelegateBuilder()
.from(delegatorPublicKey)
.validator(oldValidatorPublicKey)
.newValidator(newValidatorPublicKey)
.amount('500000000000') // 500 CSPR
.chainName('casper')
.payment(2_500_000_000)
.build();

Hierarchy

Constructors

Properties

_amount: CLValue = ...
_chainName: string
_contractHash: string
_initiatorAddr: InitiatorAddr
_invocationTarget: TransactionTarget
_newValidator: CLValue
_pricingMode: PricingMode
_runtimeArgs: Args
_scheduling: TransactionScheduling = ...
_timestamp: Timestamp = ...
_ttl: Duration = ...
_validator: CLValue

Methods

  • Protected

    Creates a default deploy header with the configured transaction settings.

    Returns

    A deploy header with account, chain name, timestamp, TTL, and gas price

    Returns DeployHeader

  • Builds and returns the Redelegate transaction for Casper 2.0+.

    Returns

    A complete Transaction object ready to be signed and submitted

    Throws

    If initiator address is not specified

    Returns Transaction

  • Builds and returns the Redelegate transaction for Casper 1.5. Uses the auction manager contract for backward compatibility.

    Returns

    A Transaction object compatible with Casper 1.5

    Throws

    If initiator address or contract hash is not specified

    Returns Transaction

  • Sets the payment amount for the transaction using a limited payment mode.

    Returns

    The builder instance for method chaining

    Parameters

    • paymentAmount: number

      The payment amount in motes

    • gasPriceTolerance: number = 1

      Gas price tolerance multiplier (default: 1)

    Returns NativeRedelegateBuilder

Generated using TypeDoc