@signumjs/core
Version:
Principal package with functions and models for building Signum Network applications.
50 lines (49 loc) • 1.47 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Api = void 0;
/**
* The API structure returned by {@link LedgerClientFactory} (or older style {@link composeApi})
*
* The programming interface uses a _builder pattern_ to mount an API.
*
* @example Using recommended LedgerClientFactory
*
* ```ts
* const api = LedgerClientFactory.createClient({
* nodeHost: 'https://europe.signum.network', // one of the mainnet nodes
* })
* ```
* @example Using older composeApi style
*
* ```ts
* const api = composeApi({
* nodeHost: 'https://europe.signum.network', // one of the mainnet nodes
* })
* ```
*
* ### Customize API
*
* While this is a straightforward way to have access to _all_ API functionality, this methods
* has the disadvantage of including all needed dependencies, thus leading to a bigger bundle, for those
* who use bundlers like [webpack](https://webpack.js.org/). To reduce the bundle size, one may mount a subset of the API
* conforming their needs using the {@link ApiComposer} class.
*
* @category api
*/
class Api {
/**
* This leaks the underlying {@link ChainService } instance to interact with the chain nodes API directly, e.g. to use an API method that
* is not supported by SignumJS yet.
*/
service;
asset;
block;
network;
transaction;
message;
account;
alias;
contract;
}
exports.Api = Api;
//# sourceMappingURL=index.js.map