Skip to main content

LocalCeloWallet

@node-fi/sdk-core / Exports / LocalCeloWallet

Class: LocalCeloWallet

A CeloWallet which allows for custom gas settings

Hierarchy

  • CeloWallet

    LocalCeloWallet

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new LocalCeloWallet(privateKey, provider?)

Parameters

NameType
privateKeyBytesLike | ExternallyOwnedAccount | SigningKey
provider?Provider

Inherited from

CeloWallet.constructor

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:13

Properties

_feeCurrency

Private Optional _feeCurrency: string

Defined in

packages/sdk-core/src/wallet/chainSpecificSigners/LocalCeloWallet.ts:18


_isSigner

Readonly _isSigner: boolean

Inherited from

CeloWallet._isSigner

Defined in

node_modules/@ethersproject/abstract-signer/lib/index.d.ts:29


_mnemonic

Readonly _mnemonic: () => Mnemonic

Type declaration

▸ (): Mnemonic

Returns

Mnemonic

Inherited from

CeloWallet._mnemonic

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:12


_signingKey

Readonly _signingKey: () => SigningKey

Type declaration

▸ (): SigningKey

Returns

SigningKey

Inherited from

CeloWallet._signingKey

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:11


address

Readonly address: string

Inherited from

CeloWallet.address

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:9


isLocalCeloWallet

isLocalCeloWallet: boolean = true

Defined in

packages/sdk-core/src/wallet/chainSpecificSigners/LocalCeloWallet.ts:19


provider

Readonly provider: Provider

Inherited from

CeloWallet.provider

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:10

Accessors

mnemonic

get mnemonic(): Mnemonic

Returns

Mnemonic

Inherited from

CeloWallet.mnemonic

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:14


privateKey

get privateKey(): string

Returns

string

Inherited from

CeloWallet.privateKey

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:15


publicKey

get publicKey(): string

Returns

string

Inherited from

CeloWallet.publicKey

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:16

Methods

_checkProvider

_checkProvider(operation?): void

Parameters

NameType
operation?string

Returns

void

Inherited from

CeloWallet._checkProvider

Defined in

node_modules/@ethersproject/abstract-signer/lib/index.d.ts:42


_estimateGas

Private _estimateGas(tx): Promise<{ feeCurrency: undefined | string ; gasLimit: BigNumberish ; gasPrice: BigNumberish }>

Parameters

NameTypeDescription
txCeloTransactionRequestTransaction request to estimate gas for

Returns

Promise<{ feeCurrency: undefined | string ; gasLimit: BigNumberish ; gasPrice: BigNumberish }>

gas esimation

Defined in

packages/sdk-core/src/wallet/chainSpecificSigners/LocalCeloWallet.ts:30


_signTypedData

_signTypedData(domain, types, value): Promise<string>

Parameters

NameType
domainTypedDataDomain
typesRecord<string, TypedDataField[]>
valueRecord<string, any>

Returns

Promise<string>

Inherited from

CeloWallet._signTypedData

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:21


call

call(transaction, blockTag?): Promise<string>

Parameters

NameType
transactionDeferrable<TransactionRequest>
blockTag?BlockTag

Returns

Promise<string>

Inherited from

CeloWallet.call

Defined in

node_modules/@ethersproject/abstract-signer/lib/index.d.ts:34


checkTransaction

checkTransaction(transaction): Deferrable<TransactionRequest>

Parameters

NameType
transactionDeferrable<TransactionRequest>

Returns

Deferrable<TransactionRequest>

Inherited from

CeloWallet.checkTransaction

Defined in

node_modules/@ethersproject/abstract-signer/lib/index.d.ts:40


connect

connect(provider): LocalCeloWallet

Parameters

NameType
providerCeloProvider

Returns

LocalCeloWallet

Overrides

CeloWallet.connect

Defined in

packages/sdk-core/src/wallet/chainSpecificSigners/LocalCeloWallet.ts:53


encrypt

encrypt(password, options?, progressCallback?): Promise<string>

Parameters

NameType
passwordstring | Bytes
options?any
progressCallback?ProgressCallback

Returns

Promise<string>

Inherited from

CeloWallet.encrypt

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:22


estimateGas

estimateGas(transaction): Promise<BigNumber>

Override to skip checkTransaction step which rejects Celo tx properties https://github.com/ethers-io/ethers.js/blob/master/packages/abstract-signer/src.ts/index.ts

Parameters

NameType
transactionDeferrable<CeloTransactionRequest>

Returns

Promise<BigNumber>

Inherited from

CeloWallet.estimateGas

Defined in

node_modules/@celo-tools/celo-ethers-wrapper/build/main/lib/CeloWallet.d.ts:24


getAddress

getAddress(): Promise<string>

Returns

Promise<string>

Inherited from

CeloWallet.getAddress

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:17


getBalance

getBalance(blockTag?): Promise<BigNumber>

Parameters

NameType
blockTag?BlockTag

Returns

Promise<BigNumber>

Inherited from

CeloWallet.getBalance

Defined in

node_modules/@ethersproject/abstract-signer/lib/index.d.ts:31


getChainId

getChainId(): Promise<number>

Returns

Promise<number>

Inherited from

CeloWallet.getChainId

Defined in

node_modules/@ethersproject/abstract-signer/lib/index.d.ts:36


getFeeCurrency

getFeeCurrency(): undefined | string

Returns

undefined | string

Implementation of

CustomGasWallet.getFeeCurrency

Defined in

packages/sdk-core/src/wallet/chainSpecificSigners/LocalCeloWallet.ts:21


getFeeData

getFeeData(): Promise<FeeData>

Returns

Promise<FeeData>

Inherited from

CeloWallet.getFeeData

Defined in

node_modules/@ethersproject/abstract-signer/lib/index.d.ts:38


getGasPrice

getGasPrice(feeCurrencyAddress?): Promise<BigNumber>

Override to support alternative gas currencies https://github.com/celo-tools/ethers.js/blob/master/packages/abstract-signer/src.ts/index.ts

Parameters

NameType
feeCurrencyAddress?string

Returns

Promise<BigNumber>

Inherited from

CeloWallet.getGasPrice

Defined in

node_modules/@celo-tools/celo-ethers-wrapper/build/main/lib/CeloWallet.d.ts:29


getTransactionCount

getTransactionCount(blockTag?): Promise<number>

Parameters

NameType
blockTag?BlockTag

Returns

Promise<number>

Inherited from

CeloWallet.getTransactionCount

Defined in

node_modules/@ethersproject/abstract-signer/lib/index.d.ts:32


populateTransaction

populateTransaction(transaction): Promise<any>

Override to skip checkTransaction step which rejects Celo tx properties https://github.com/ethers-io/ethers.js/blob/master/packages/abstract-signer/src.ts/index.ts

Parameters

NameType
transactionDeferrable<CeloTransactionRequest>

Returns

Promise<any>

Inherited from

CeloWallet.populateTransaction

Defined in

node_modules/@celo-tools/celo-ethers-wrapper/build/main/lib/CeloWallet.d.ts:9


resolveName

resolveName(name): Promise<string>

Parameters

NameType
namestring

Returns

Promise<string>

Inherited from

CeloWallet.resolveName

Defined in

node_modules/@ethersproject/abstract-signer/lib/index.d.ts:39


sendTransaction

sendTransaction(transaction): Promise<TransactionResponse>

Parameters

NameType
transactionCeloTransactionRequest

Returns

Promise<TransactionResponse>

Overrides

CeloWallet.sendTransaction

Defined in

packages/sdk-core/src/wallet/chainSpecificSigners/LocalCeloWallet.ts:43


setFeeCurrency

setFeeCurrency(token): string

Parameters

NameType
tokenstring

Returns

string

Implementation of

CustomGasWallet.setFeeCurrency

Defined in

packages/sdk-core/src/wallet/chainSpecificSigners/LocalCeloWallet.ts:23


signMessage

signMessage(message): Promise<string>

Parameters

NameType
messagestring | Bytes

Returns

Promise<string>

Inherited from

CeloWallet.signMessage

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:20


signTransaction

signTransaction(transaction): Promise<string>

Override to serialize transaction using custom serialize method https://github.com/ethers-io/ethers.js/blob/master/packages/wallet/src.ts/index.ts

Parameters

NameType
transactionCeloTransactionRequest

Returns

Promise<string>

Inherited from

CeloWallet.signTransaction

Defined in

node_modules/@celo-tools/celo-ethers-wrapper/build/main/lib/CeloWallet.d.ts:14


createRandom

Static createRandom(options?): Wallet

Static methods to create Wallet instances.

Parameters

NameType
options?any

Returns

Wallet

Inherited from

CeloWallet.createRandom

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:26


fromEncryptedJson

Static fromEncryptedJson(json, password, progressCallback?): Promise<Wallet>

Parameters

NameType
jsonstring
passwordstring | Bytes
progressCallback?ProgressCallback

Returns

Promise<Wallet>

Inherited from

CeloWallet.fromEncryptedJson

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:27


fromEncryptedJsonSync

Static fromEncryptedJsonSync(json, password): Wallet

Parameters

NameType
jsonstring
passwordstring | Bytes

Returns

Wallet

Inherited from

CeloWallet.fromEncryptedJsonSync

Defined in

node_modules/@ethersproject/wallet/lib/index.d.ts:28


fromMnemonic

Static fromMnemonic(mnemonic, path?, wordlist?): CeloWallet

Parameters

NameType
mnemonicstring
path?string
wordlist?Wordlist

Returns

CeloWallet

Inherited from

CeloWallet.fromMnemonic

Defined in

node_modules/@celo-tools/celo-ethers-wrapper/build/main/lib/CeloWallet.d.ts:31


isLocalCeloWallet

Static isLocalCeloWallet(other): other is LocalCeloWallet

Parameters

NameTypeDescription
otherunknownObject to check for LocalCeloWallet type

Returns

other is LocalCeloWallet

true if other is a LocalCeloWallet

Defined in

packages/sdk-core/src/wallet/chainSpecificSigners/LocalCeloWallet.ts:62


isSigner

Static isSigner(value): value is Signer

Parameters

NameType
valueany

Returns

value is Signer

Inherited from

CeloWallet.isSigner

Defined in

node_modules/@ethersproject/abstract-signer/lib/index.d.ts:43