Node module
Example
import Node from '@aeternity/aepp-sdk/es/node'- @aeternity/aepp-sdk/es/node
- Node([options]) ⇒
Object⏏- static
- async
- .getNetworkId() ⇒
String
- .getNetworkId() ⇒
- async
- inner
- ~loader(options) ⇒
function - ~getConsensusProtocolVersion(protocols, height) ⇒
Number - async
- ~remoteSwag(url, axiosConfig) ⇒
Object
- ~remoteSwag(url, axiosConfig) ⇒
- ~loader(options) ⇒
- static
- Node([options]) ⇒
Swagger based Node remote API Stamp
Kind: Exported function
Returns: Object - Node client
rtype: Stamp
| Param | Type | Default | Description |
|---|---|---|---|
| [options] | Object |
{} |
Options |
| options.url | String |
Base URL for Node | |
| options.internalUrl | String |
Base URL for internal requests | |
| options.axiosConfig | String |
Object with axios configuration. Example { config: {}, errorHandler: (err) => throw err } |
Example
Node({url: 'https://sdk-testnet.aepps.com'})Obtain networkId from account or node
Kind: static method of Node
Returns: String - NetworkId
Category: async
rtype: () => networkId: String
Node specific loader for urlFor
Kind: inner method of Node
Returns: function - Implementation for urlFor
rtype: ({url: String, internalUrl?: String}) => (path: String, definition: Object) => tx: String
| Param | Type | Description |
|---|---|---|
| options | Object |
|
| options.url | String |
Base URL for Node |
| options.internalUrl | String |
Base URL for internal requests |
get consensus protocol version
Kind: inner method of Node
Returns: Number - version Protocol version
| Param | Type | Description |
|---|---|---|
| protocols | Array |
Array of protocols |
| height | Number |
Height |
Obtain Swagger configuration from Node node
Kind: inner method of Node
Returns: Object - Swagger configuration
Category: async
rtype: (url: String) => swagger: Object
| Param | Type | Description |
|---|---|---|
| url | String |
Node base URL |
| axiosConfig | Object |
Axios configuration object |