Abstract
Protected
constructorCreate a new VeChainPrivateKeySigner. A signer can be initialized using a private key.
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
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
Abstract
connectReturns a new instance of this Signer connected to //provider// or detached from any Provider if undefined.
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
Abstract
getGets 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
Abstract
sendSends %%transactionToSend%% to the Network. The signer.populateTransaction(transactionToSend)
is called first to ensure all necessary properties for the
transaction to be valid have been populated first.
The transaction to send
The transaction response
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.
Abstract
signAbstract
signSigns %%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.
Abstract VeChain signer. This abstract class avoids people every time implementing standard signer methods. By implementing this abstract class, it will be easier to create new signers