Version: 0.13.7

Class: IdentityWallet

"wallets/IdentityWallet".IdentityWallet

Hierarchy#

  • IdentityWallet

Implements#

Constructors#

constructor#

+ new IdentityWallet(provider: TLProvider, chainId: number, identityFactoryAddress: string, identityImplementationAddress: string, nonceMechanism: NonceMechanism): IdentityWallet

Defined in src/wallets/IdentityWallet.ts:53

Parameters:#

NameType
providerTLProvider
chainIdnumber
identityFactoryAddressstring
identityImplementationAddressstring
nonceMechanismNonceMechanism

Returns: IdentityWallet

Properties#

provider#

provider: TLProvider

Defined in src/wallets/IdentityWallet.ts:45

Accessors#

address#

• get address(): string

Defined in src/wallets/IdentityWallet.ts:70

Returns: string

Methods#

buildMetaTransaction#

buildMetaTransaction(rawTx: RawTxObject): MetaTransaction

Defined in src/wallets/IdentityWallet.ts:427

Parameters:#

NameType
rawTxRawTxObject

Returns: MetaTransaction


confirm#

confirm(rawTx: RawTxObject): Promise<string>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:280

Takes a raw transaction object, turns it into a meta-transaction signed by the loaded user and relays the transaction.

Parameters:#

NameTypeDescription
rawTxRawTxObjectRaw transaction object.

Returns: Promise<string>

the hash of the meta-transaction


create#

create(): Promise<IdentityWalletData>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:101

Creates wallet data of type identity.

Returns: Promise<IdentityWalletData>


decrypt#

decrypt(encMsg: any, theirPubKey: string): Promise<any>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:262

Parameters:#

NameType
encMsgany
theirPubKeystring

Returns: Promise<any>


deployIdentity#

deployIdentity(): Promise<string>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:113

Deploys a new identity contract on the chain

Returns: Promise<string>


encrypt#

encrypt(msg: string, theirPubKey: string): Promise<any>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:258

Parameters:#

NameType
msgstring
theirPubKeystring

Returns: Promise<any>


encryptToSerializedKeystore#

encryptToSerializedKeystore(walletData: IdentityWalletData, password: string, progressCallback?: (progress: number) => any): Promise<string>

Defined in src/wallets/IdentityWallet.ts:414

Returns a serialized encrypted ethereum JSON keystore v3.

Parameters:#

NameTypeDescription
walletDataIdentityWalletDataWallet data of type identity.
passwordstringPassword to encrypt wallet data.
progressCallback?(progress: number) => anyOptional encryption progress callback.

Returns: Promise<string>


exportPrivateKey#

exportPrivateKey(): Promise<string>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:251

Returns a Promise with the private key of loaded user.

Returns: Promise<string>


getAddress#

getAddress(): Promise<string>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:77

Returns: Promise<string>


getBalance#

getBalance(): Promise<Amount>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:91

Returns: Promise<Amount>


getIdentityImplementationAddress#

getIdentityImplementationAddress(): Promise<string>

Defined in src/wallets/IdentityWallet.ts:169

Returns: Promise<string>


getMetaTxFees#

getMetaTxFees(rawTx: RawTxObject): Promise<MetaTransactionFees>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:394

Parameters:#

NameType
rawTxRawTxObject

Returns: Promise<MetaTransactionFees>


getNonce#

getNonce(): Promise<string>

Defined in src/wallets/IdentityWallet.ts:447

Returns: Promise<string>


getTxStatus#

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

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:401

Parameters:#

NameType
txstring | RawTxObject

Returns: Promise<TransactionStatusObject>


getWalletData#

getWalletData(): Promise<IdentityWalletData>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:84

Returns: Promise<IdentityWalletData>


hashMetaTransaction#

hashMetaTransaction(metaTransaction: MetaTransaction): Promise<string>

Defined in src/wallets/IdentityWallet.ts:302

Parameters:#

NameType
metaTransactionMetaTransaction

Returns: Promise<string>


hashTx#

hashTx(rawTx: RawTxObject): Promise<string>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:294

Return the meta-tx hash for given raw transaction for loaded user

Parameters:#

NameTypeDescription
rawTxRawTxObject

Returns: Promise<string>


isIdentityDeployed#

isIdentityDeployed(): Promise<boolean>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:143

Returns: Promise<boolean>


isIdentityImplementationUpToDate#

isIdentityImplementationUpToDate(): Promise<boolean>

Defined in src/wallets/IdentityWallet.ts:162

Returns: Promise<boolean>


loadFrom#

loadFrom(walletData: IdentityWalletData): Promise<void>

Defined in src/wallets/IdentityWallet.ts:177

Loads given wallet data of type identity.

Parameters:#

NameTypeDescription
walletDataIdentityWalletDataWallet data of type identity.

Returns: Promise<void>


prepareImplementationUpdate#

prepareImplementationUpdate(transaction: Transaction, options?: TxOptionsInternal): Promise<TxObjectInternal>

Defined in src/wallets/IdentityWallet.ts:463

Parameters:#

NameTypeDefault value
transactionTransaction-
optionsTxOptionsInternal{}

Returns: Promise<TxObjectInternal>


prepareTransaction#

prepareTransaction(rawTx: RawTxObject): Promise<TxObjectRaw>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:358

Parameters:#

NameType
rawTxRawTxObject

Returns: Promise<TxObjectRaw>


recoverFromEncryptedKeystore#

recoverFromEncryptedKeystore(serializedEncryptedKeystore: string, password: string, progressCallback?: (progress: number) => any): Promise<IdentityWalletData>

Defined in src/wallets/IdentityWallet.ts:192

Recovers wallet data from a serialized encrypted ethereum JSON keystore v3 (e.g. as returned by encryptToSerializedKeystore).

Parameters:#

NameTypeDescription
serializedEncryptedKeystorestringSerialized encrypted ethereum JSON keystore v3.
passwordstringPassword to decrypt serialized encrypted ethereum JSON keystore v3 with.
progressCallback?(progress: number) => anyCallback function for decryption progress.

Returns: Promise<IdentityWalletData>


recoverFromPrivateKey#

recoverFromPrivateKey(privateKey: string): Promise<IdentityWalletData>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:227

Recovers wallet data from private key. Note that mnemonic and derivation path is undefined here.

Parameters:#

NameTypeDescription
privateKeystringPrivate key to recover wallet data from.

Returns: Promise<IdentityWalletData>


recoverFromSeed#

recoverFromSeed(seed: string): Promise<IdentityWalletData>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:213

Recovers wallet data from mnemonic phrase.

Parameters:#

NameTypeDescription
seedstringMnemonic seed phrase.

Returns: Promise<IdentityWalletData>


showSeed#

showSeed(): Promise<string>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:241

Returns a Promise with the mnemonic seed phrase of loaded user.

Returns: Promise<string>


signMessage#

signMessage(message: ethersUtils.Arrayish): Promise<Signature>

Defined in src/wallets/IdentityWallet.ts:270

Parameters:#

NameType
messageethersUtils.Arrayish

Returns: Promise<Signature>


signMetaTransaction#

signMetaTransaction(metaTransaction: MetaTransaction): Promise<string>

Defined in src/wallets/IdentityWallet.ts:349

Parameters:#

NameType
metaTransactionMetaTransaction

Returns: Promise<string>


signMsgHash#

signMsgHash(msgHash: string): Promise<Signature>

Implementation of TLWallet

Defined in src/wallets/IdentityWallet.ts:266

Parameters:#

NameType
msgHashstring

Returns: Promise<Signature>