Class NativeTransferBuilder

Builder for creating Native Transfer transactions. Enables transferring CSPR tokens from one account to another on the Casper network.

Example

const transaction = new NativeTransferBuilder()
.from(senderPublicKey)
.target(recipientPublicKey)
.amount('2500000000') // 2.5 CSPR in motes
.id(Date.now())
.chainName('casper-test')
.payment(100_000_000)
.build();

Hierarchy

Constructors

Properties

_amount: CLValue = ...
_amountRow: string | BigNumber = '0'
_chainName: string
_contractHash: string
_idTransfer?: number
_initiatorAddr: InitiatorAddr
_invocationTarget: TransactionTarget
_pricingMode: PricingMode
_publicKey: PublicKey
_runtimeArgs: Args
_scheduling: TransactionScheduling = ...
_target: CLValue
_timestamp: Timestamp = ...
_ttl: Duration = ...

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

  • 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 NativeTransferBuilder

Generated using TypeDoc