Package Exports
- @settlemint/sdk-js
- @settlemint/sdk-js/package.json
Readme
SettleMint SDK
✨ https://settlemint.com ✨
Integrate SettleMint into your application with ease.
Table of Contents
About
The SettleMint JavaScript SDK provides a type-safe wrapper around the SettleMint platform's GraphQL API. It enables you to interact with the platform's services in a fully typed manner, providing compile-time safety and autocompletion support.
Usage
Here are some examples of how to use the SettleMint JavaScript SDK:
List Workspaces
const client = createSettleMintClient({
accessToken: 'your_access_token',
instance: 'https://console.settlemint.com'
});
const workspaces = await client.workspace.list();
console.log(workspaces);
Read a Specific Blockchain Network
const client = createSettleMintClient({
accessToken: 'your_access_token',
instance: 'https://console.settlemint.com'
});
const networkId = 'your_network_id';
const network = await client.blockchainNetwork.read(networkId);
console.log(network);
API Reference
The SettleMint JavaScript SDK provides access to various resources. Here's an overview of the available methods:
Workspace
workspace.list()
: List all workspaces and their applicationsworkspace.read(workspaceId)
: Read a specific workspace and its applications
Blockchain Network
blockchainNetwork.list(applicationId)
: List blockchain networks for a given applicationblockchainNetwork.read(blockchainNetworkId)
: Read a specific blockchain network
Blockchain Node
blockchainNode.list(applicationId)
: List blockchain nodes for a given applicationblockchainNode.read(blockchainNodeId)
: Read a specific blockchain node
Middleware
middleware.list(applicationId)
: List middlewares for a given applicationmiddleware.read(middlewareId)
: Read a specific middleware
Integration Tool
integrationTool.list(applicationId)
: List integration tools for a given applicationintegrationTool.read(integrationId)
: Read a specific integration tool
Storage
storage.list(applicationId)
: List storage items for a given applicationstorage.read(storageId)
: Read a specific storage item
Private Key
privateKey.list(applicationId)
: List private keys for a given applicationprivateKey.read(privateKeyId)
: Read a specific private key
Insights
insights.list(applicationId)
: List insights for a given applicationinsights.read(insightsId)
: Read a specific insight
Contributing
We welcome contributions to the SettleMint SDK! If you'd like to contribute, please follow these steps:
- Fork the repository
- Create a new branch for your feature or bug fix
- Make your changes and commit them with a clear commit message
- Push your changes to your fork
- Create a pull request to the main repository
Please ensure that your code follows the existing style and includes appropriate tests and documentation.
License
The SettleMint SDK is released under the FSL Software License. See the LICENSE file for more details.