Constructor
new WalletServer(sdk, serverUrl, opts)
Create a new wallet server instance.
- Source:
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sdk |
ShelfNetwork
|
Parent SDK instance. |
|||||||||||||||||||||||||||||||||||
serverUrl |
string
|
wallet server URL. |
|||||||||||||||||||||||||||||||||||
opts |
Object
|
|
Methods
(async) changePassword(newPassword, walletopt) → {Promise.<Wallet>}
Change user's password.
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
newPassword |
string
|
User's password. |
||
wallet |
string
|
<optional> |
null |
A wallet to be updated. |
(async) checkPassword(walletId, password, accountId)
Verify if password is matching the wallet's one.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
walletId |
string
|
User's wallet ID. |
password |
string
|
A password to be verified. |
accountId |
string
|
Account ID. |
(async) create(wallet, password) → {Promise.<Wallet>}
Create an encrypted wallet.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
wallet |
Wallet
|
User's wallet. |
password |
string
|
User's password. |
(async) get(email, password, accountIdopt, platformIdopt) → {Promise.<Wallet>}
Get user's wallet.
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
email |
string
|
User's email. |
|
password |
string
|
User's password. |
|
accountId |
string
|
<optional> |
User's account ID. Can be used instead of email. |
platformId |
string
|
<optional> |
User's platform ID. Must be used with email. |