@celo/wallet-remote"remote-wallet"RemoteWallet

Class: RemoteWallet <TSigner>

Abstract class representing a remote wallet that requires async initialization

Type parameters

TSigner: Signer

Hierarchy

  • WalletBase‹TSigner›

RemoteWallet

Implements

  • ReadOnlyWallet
  • ReadOnlyWallet

Index

Methods

Methods

computeSharedSecret

computeSharedSecret(address: Address, publicKey: string): Promise‹Buffer›

Inherited from RemoteWallet.computeSharedSecret

Defined in wallet-base/lib/wallet-base.d.ts:64

Computes the shared secret (an ECDH key exchange object) between two accounts

Parameters:

Name Type
address Address
publicKey string

Returns: Promise‹Buffer›


decrypt

decrypt(address: string, ciphertext: Buffer): Promise‹Buffer›

Inherited from RemoteWallet.decrypt

Defined in wallet-base/lib/wallet-base.d.ts:60

Parameters:

Name Type
address string
ciphertext Buffer

Returns: Promise‹Buffer›


getAccounts

getAccounts(): Address[]

Overrides void

Defined in wallet-remote/src/remote-wallet.ts:61

Get a list of accounts in the remote wallet

Returns: Address[]


hasAccount

hasAccount(address?: Address): boolean

Overrides void

Defined in wallet-remote/src/remote-wallet.ts:70

Returns true if account is in the remote wallet

Parameters:

Name Type Description
address? Address Account to check

Returns: boolean


init

init(): Promise‹void›

Defined in wallet-remote/src/remote-wallet.ts:20

Discovers wallet accounts and caches results in memory Idempotent to ensure multiple calls are benign

Returns: Promise‹void›


isSetupFinished

isSetupFinished(): boolean

Defined in wallet-remote/src/remote-wallet.ts:110

Returns: boolean


removeAccount

removeAccount(_address: string): void

Inherited from RemoteWallet.removeAccount

Defined in wallet-base/lib/wallet-base.d.ts:23

Removes the account with the given address. Needs to be implemented by subclass, otherwise throws error

Parameters:

Name Type
_address string

Returns: void


signPersonalMessage

signPersonalMessage(address: Address, data: string): Promise‹string›

Overrides void

Defined in wallet-remote/src/remote-wallet.ts:89

Parameters:

Name Type Description
address Address Address of the account to sign with
data string Hex string message to sign

Returns: Promise‹string›

Signature hex string (order: rsv)


signTransaction

signTransaction(txParams: CeloTx): Promise‹EncodedTransaction›

Overrides void

Defined in wallet-remote/src/remote-wallet.ts:79

Signs the EVM transaction using the signer pulled from the from field

Parameters:

Name Type Description
txParams CeloTx EVM transaction

Returns: Promise‹EncodedTransaction›


signTypedData

signTypedData(address: Address, typedData: EIP712TypedData): Promise‹string›

Overrides void

Defined in wallet-remote/src/remote-wallet.ts:99

Parameters:

Name Type Description
address Address Address of the account to sign with
typedData EIP712TypedData the typed data object

Returns: Promise‹string›

Signature hex string (order: rsv)