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:
Returns: Wallet
Properties
address
• address: string
Defined in src/entities/Wallet.ts:69
wallet address
Protected
context
Protected
context• context: Context
Defined in src/entities/Wallet.ts:71
uid
• uid: string
Defined in src/entities/Wallet.ts:64
unique generated wallet id
Methods
_refresh
▸ _refresh(params
: Partial‹Params›): void
Defined in src/entities/Wallet.ts:103
Hydrate the entity
Parameters:
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
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
Defined in src/entities/Wallet.ts:91
Convert entity to a POJO (Plain Old Javascript Object)
Returns: object
address: string
uid: string
Static
generateId
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
Returns: string
Static
unserialize
Static
unserialize▸ unserialize(serialized
: string): UniqueIdentifiers
Defined in src/entities/Wallet.ts:48
Unserialize a serialized entity
Parameters:
Returns: UniqueIdentifiers
Last updated