Skip to main content

Class: PreparedCreateNativeTokenTransaction

PreparedTransactionis a class that represents prepared transaction data, which is useful for offline signing. It contains the prepared transaction data and anAccount` object. It provides methods to retrieve the prepared transaction data, sign the transaction and sign+submit/send the transaction.

Hierarchy​

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new PreparedCreateNativeTokenTransaction(preparedData, account)

Parameters​

NameTypeDescription
preparedDataPreparedCreateNativeTokenTransactionDataPrepared data to create a Native Token.
accountAccountA wallet account.

Overrides​

PreparedTransaction.constructor

Properties​

_tokenId​

• Readonly _tokenId: string


_preparedData​

• Readonly _preparedData: PreparedTransactionData

Inherited from​

PreparedTransaction._preparedData


_account​

• Readonly _account: Account

Inherited from​

PreparedTransaction._account

Methods​

tokenId​

▸ tokenId(): string

The function returns the tokenId as a string.

Returns:

The token id of the CreateNativeTokenTransaction.

Returns​

string


preparedTransactionData​

▸ preparedTransactionData(): PreparedTransactionData

The function returns the prepared transaction data.

Returns:

The method preparedTransactionData() is returning an object of type PreparedTransactionData.

Returns​

PreparedTransactionData

Inherited from​

PreparedTransaction.preparedTransactionData


send​

▸ send(): Promise<Transaction>

The send function returns a promise that resolves to a Transaction object after signing and submitting the transaction. Internally just calls signAndSubmitTransaction.

Returns:

The send() method is returning a Promise that resolves to a Transaction object after it has been signed and submitted.

Returns​

Promise<Transaction>

Inherited from​

PreparedTransaction.send


sign​

▸ sign(): Promise<SignedTransactionEssence>

This function signs a prepared transaction essence using the account's private key and returns the signed transaction essence.

Returns:

A Promise that resolves to a SignedTransactionEssence object.

Returns​

Promise<SignedTransactionEssence>

Inherited from​

PreparedTransaction.sign


signAndSubmitTransaction​

▸ signAndSubmitTransaction(): Promise<Transaction>

This function signs and submits a transaction using prepared transaction data.

Returns:

A Promise that resolves to a Transaction object.

Returns​

Promise<Transaction>

Inherited from​

PreparedTransaction.signAndSubmitTransaction