Constructor
new ShelfNetwork(optsopt)
Make a new ShelfNetwork SDK instance.
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object
|
<optional> |
|
Members
clockDiff :Number
Clock difference with the backend.
- Source:
Type:
-
Number
Methods
(async, static) create(optsopt) → {Promise.<ShelfNetwork>}
Make a new ShelfNetwork SDK instance. Deprecated. Use constructor instead.
- Deprecated:
- Yes
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object
|
<optional> |
|
Returns:
- Type:
-
Promise.<ShelfNetwork>
(async) fetchNetworkDetails() → {Promise}
Fetch network details. Use it if you are going to use wallets or manually sign transactions.
- Source:
Returns:
- Type:
-
Promise
useToken(token)
Use user's token to authenticate requests.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
token |
Token
|
User's token. |
useWallet(wallet)
Use a wallet to sign transactions.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
wallet |
Wallet
|
User's wallet. |