Create a new VeChainPrivateKeySigner. A signer can be initialized using a private key.
The private key of the signer
Optional
provider: AvailableVeChainProvidersThe provider to connect to
Protected
Readonly
MESSAGE_Optional
providerThe provider attached to this Signer (if any).
Protected
_buildBuild the transaction clauses form a transaction given as input
The transaction to sign
The transaction clauses
Signs a transaction internal method
The transaction to sign
The gasPayer to use
The ThorClient instance
The fully signed transaction
Evaluates the //tx// by running it against the current Blockchain state. This cannot change state and has no cost, as it is effectively simulating execution.
This can be used to have the Blockchain perform computations based on its state (e.g. running a Contract's getters) or to simulate the effect of a transaction before actually performing an operation.
The transaction to evaluate
Optional
revision: stringThe block number or block ID of which the transaction simulation is based on
the result of the evaluation
Returns a new instance of this Signer connected to //provider// or detached from any Provider if null.
The provider to connect to
a new instance of this Signer connected to //provider// or detached
Estimates the gas required to execute //tx// on the Blockchain. This will be the expected amount a transaction will need to successfully run all the necessary computations and store the changed state that the transaction intends.
The transaction to estimate gas for
the total estimated gas required
Gets the next nonce required for this Signer to send a transaction.
Optional
blockTag: stringThe blocktag to base the transaction count on, keep in mind
many nodes do not honour this value and silently ignore it [default: "latest"
]
@NOTE: This method generates a random number as nonce. It is because the nonce in VeChain is a 6-byte number.
Prepares a TransactionRequestInput for calling:
to
and from
addressesfrom
is specified, check that it matches this Signer@note: Here the base support of multi-clause transaction is added. So, if clauses are provided in the transaction, it will be used as it is. Otherwise, standard transaction will be prepared.
The call to prepare
the prepared call transaction
Prepares a TransactionRequestInput for sending to the network by populating any missing properties:
to
and from
addressesfrom
is specified , check that it matches this Signernonce
via signer.getNonce("pending")
signer.estimateGas(tx)
The call to prepare
the prepared transaction
Sends a transaction to the blockchain.
The transaction object to be sent.
This includes all the necessary details such as to
, value
, data
, gasLimit
, etc.
A promise that resolves to the transaction hash as a string once the transaction is successfully sent.
Signs an [[link-eip-191]] prefixed a personal message.
The message to be signed.
If the %%message%% is a string, it is signed as UTF-8 encoded bytes.
It is not interpreted as a [[BytesLike]];
so the string "0x1234"
is signed as six characters, not two bytes.
Signs %%transactionToSign%%, returning the fully signed transaction. This does not populate any additional properties with eth_getTransactionCount: RPC_METHODS, p0: (string | undefined)[], args: EIP1193RequestArguments*
The transaction to sign
The fully signed transaction
Signs the [[link-eip-712]] typed data.
The domain parameters used for signing.
The types used for signing.
The message data to be signed.
Optional
primaryType: stringThe primary type used for signing.
Basic VeChain signer with the private key. This signer can be initialized using a private key.