Version: 0.13.7

Class: Web3Signer

"signers/Web3Signer".Web3Signer

The Web3Signer class contains functions for signing transactions with a web3 provider.

Hierarchy#

  • Web3Signer

Implements#

Constructors#

constructor#

+ new Web3Signer(web3Provider: Web3Provider): Web3Signer

Defined in src/signers/Web3Signer.ts:23

Parameters:#

NameType
web3ProviderWeb3Provider

Returns: Web3Signer

Methods#

confirm#

confirm(rawTx: RawTxObject): Promise<string>

Implementation of TLSigner

Defined in src/signers/Web3Signer.ts:59

Signs a transaction and returns Promise with transaction hash.

Parameters:#

NameTypeDescription
rawTxRawTxObjectRaw transaction object.

Returns: Promise<string>


getAddress#

getAddress(): Promise<string>

Implementation of TLSigner

Defined in src/signers/Web3Signer.ts:33

Returns Promise with address of signer.

Returns: Promise<string>


getBalance#

getBalance(): Promise<Amount>

Implementation of TLSigner

Defined in src/signers/Web3Signer.ts:43

Returns Promise with balance of signer.

Returns: Promise<Amount>


getMetaTxFees#

getMetaTxFees(rawTx: RawTxObject): Promise<MetaTransactionFees>

Implementation of TLSigner

Defined in src/signers/Web3Signer.ts:172

Parameters:#

NameType
rawTxRawTxObject

Returns: Promise<MetaTransactionFees>


getTxInfos#

getTxInfos(userAddress: string): Promise<TxInfos>

Defined in src/signers/Web3Signer.ts:125

Parameters:#

NameType
userAddressstring

Returns: Promise<TxInfos>


getTxStatus#

getTxStatus(tx: string | RawTxObject): Promise<TransactionStatusObject>

Implementation of TLSigner

Defined in src/signers/Web3Signer.ts:166

Parameters:#

NameType
txstring | RawTxObject

Returns: Promise<TransactionStatusObject>


hashTx#

hashTx(rawTx: RawTxObject): Promise<string>

Implementation of TLSigner

Defined in src/signers/Web3Signer.ts:121

Returns the hash of the signed transaction for given rawTx with loaded user

Parameters:#

NameTypeDescription
rawTxRawTxObject

Returns: Promise<string>


prepareTransaction#

prepareTransaction(rawTx: RawTxObject): Promise<TxObjectRaw>

Implementation of TLSigner

Defined in src/signers/Web3Signer.ts:144

Parameters:#

NameType
rawTxRawTxObject

Returns: Promise<TxObjectRaw>


signMessage#

signMessage(message: string | ArrayLike<number>): Promise<Signature>

Implementation of TLSigner

Defined in src/signers/Web3Signer.ts:88

Signs the given message and returns Promise with signature.

Parameters:#

NameTypeDescription
messagestring | ArrayLike<number>Message to sign.

Returns: Promise<Signature>


signMsgHash#

signMsgHash(msgHash: string): Promise<Signature>

Implementation of TLSigner

Defined in src/signers/Web3Signer.ts:106

Signs the given message hash and return Promise with signature.

Parameters:#

NameTypeDescription
msgHashstringHash of message to sign.

Returns: Promise<Signature>