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:Name | Type |
---|---|
web3Provider | Web3Provider |
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:Name | Type | Description |
---|---|---|
rawTx | RawTxObject | Raw 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:Name | Type |
---|---|
rawTx | RawTxObject |
Returns: Promise<MetaTransactionFees>
#
getTxInfosâ–¸ getTxInfos(userAddress
: string): Promise<TxInfos>
Defined in src/signers/Web3Signer.ts:125
#
Parameters:Name | Type |
---|---|
userAddress | string |
Returns: Promise<TxInfos>
#
getTxStatusâ–¸ getTxStatus(tx
: string | RawTxObject): Promise<TransactionStatusObject>
Implementation of TLSigner
Defined in src/signers/Web3Signer.ts:166
#
Parameters:Name | Type |
---|---|
tx | string | 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:Name | Type | Description |
---|---|---|
rawTx | RawTxObject |
Returns: Promise<string>
#
prepareTransactionâ–¸ prepareTransaction(rawTx
: RawTxObject): Promise<TxObjectRaw>
Implementation of TLSigner
Defined in src/signers/Web3Signer.ts:144
#
Parameters:Name | Type |
---|---|
rawTx | RawTxObject |
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:Name | Type | Description |
---|---|---|
message | string | 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:Name | Type | Description |
---|---|---|
msgHash | string | Hash of message to sign. |
Returns: Promise<Signature>