Wallet

Used to manage a wallet

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

+ new Wallet(params: Params, context: Context): Wallet

Defined in src/entities/Wallet.ts:71

Create a wallet entity

Parameters:

Name

Type

params

context

Returns: Wallet

Properties

address

address: string

Defined in src/entities/Wallet.ts:69

wallet address

Protected context

context: Context

Defined in src/entities/Wallet.ts:71

uid

uid: string

Overrides Entity.uid

Defined in src/entities/Wallet.ts:64

unique generated wallet id

Methods

_refresh

_refresh(params: Partial‹Params›): void

Overrides Entity._refresh

Defined in src/entities/Wallet.ts:103

Hydrate the entity

Parameters:

Name

Type

params

Partial‹Params

Returns: void

getErc20Balance

getErc20Balance(args: object): Promise‹BigNumber›

Defined in src/entities/Wallet.ts:132

Retrieve the ERC20 balance of this particular wallet address

Parameters:

args: object

Name

Type

tokenAddress

string

Returns: Promise‹BigNumber›

getEthBalance

getEthBalance(): Promise‹BigNumber›

Defined in src/entities/Wallet.ts:122

Retrieve the ETH balance of this particular wallet address

Returns: Promise‹BigNumber›

getPolyBalance

getPolyBalance(): Promise‹BigNumber›

Defined in src/entities/Wallet.ts:114

Retrieve the POLY balance of this particular wallet address

Returns: Promise‹BigNumber›

toPojo

toPojo(): object

Overrides Entity.toPojo

Defined in src/entities/Wallet.ts:91

Convert entity to a POJO (Plain Old Javascript Object)

Returns: object

  • address: string

  • uid: string

Static generateId

generateId(__namedParameters: object): string

Defined in src/entities/Wallet.ts:37

Generate the Wallet's UUID from its identifying properties

Parameters:

__namedParameters: object

Name

Type

address

string

Returns: string

Static unserialize

unserialize(serialized: string): UniqueIdentifiers

Defined in src/entities/Wallet.ts:48

Unserialize a serialized entity

Parameters:

Name

Type

Description

serialized

string

string with entity information

Returns: UniqueIdentifiers

Last updated