Class TransactionComputer
Methods
applyGuardian
- applyGuardian(transaction, guardian): void
Returns void
applyOptionsForHashSigning
- applyOptionsForHashSigning(transaction): void
Returns void
computeBytesForSigning
- computeBytesForSigning(transaction): Uint8Array
Returns Uint8Array
computeBytesForVerifying
- computeBytesForVerifying(transaction): Uint8Array
Returns Uint8Array
computeHashForSigning
- computeHashForSigning(transaction): Uint8Array
Returns Uint8Array
computeTransactionFee
- computeTransactionFee(transaction, networkConfig): bigint
Parameters
- transaction: {
data: Uint8Array;
gasLimit: bigint;
gasPrice: bigint;
}data: Uint8Array
gasLimit: bigint
gasPrice: bigint
- networkConfig: INetworkConfig
Returns bigint
computeTransactionHash
- computeTransactionHash(transaction): Uint8Array
Returns Uint8Array
Private
ensureValidTransactionFields
- ensureValidTransactionFields(transaction): void
Returns void
hasOptionsSetForGuardedTransaction
- hasOptionsSetForGuardedTransaction(transaction): boolean
Returns boolean
hasOptionsSetForHashSigning
- hasOptionsSetForHashSigning(transaction): boolean
Returns boolean
Private
toBase64OrUndefined
- toBase64OrUndefined(value?): undefined | string
Parameters
Optional
value: string | Uint8Array
Returns undefined | string
Private
toPlainObjectForSigning
- toPlainObjectForSigning(transaction): {
chainID: string;
data: undefined | string;
gasLimit: number;
gasPrice: number;
guardian: undefined | string;
nonce: number;
options: undefined | number;
receiver: string;
receiverUsername: undefined | string;
sender: string;
senderUsername: undefined | string;
value: string;
version: number;
} Returns {
chainID: string;
data: undefined | string;
gasLimit: number;
gasPrice: number;
guardian: undefined | string;
nonce: number;
options: undefined | number;
receiver: string;
receiverUsername: undefined | string;
sender: string;
senderUsername: undefined | string;
value: string;
version: number;
}
chainID: string
data: undefined | string
gasLimit: number
gasPrice: number
guardian: undefined | string
nonce: number
options: undefined | number
receiver: string
receiverUsername: undefined | string
sender: string
senderUsername: undefined | string
value: string
version: number
An utilitary class meant to work together with the Transaction class.