Package Exports
- @settlemint/sdk-thegraph
- @settlemint/sdk-thegraph/package.json
Readme
  
  
SettleMint SDK
    ✨ https://settlemint.com ✨
    
    Integrate SettleMint into your application with ease.
  
Table of Contents
Installation
To install the SettleMint SDK, you can use one of the following package managers:
# Using npm
npm install @settlemint/sdk
# Using yarn
yarn add @settlemint/sdk
# Using pnpm
pnpm add @settlemint/sdk
# Using Bun
bun add @settlemint/sdkWe recommend using Bun for faster installation and better performance.
Usage
To use the SettleMint SDK in your Node.js application, follow these steps:
- Import the SDK:
import { createSettleMintClient } from '@settlemint/sdk';- Create a client instance:
const client = createSettleMintClient({
  accessToken: 'your_access_token',
  instance: 'https://console.settlemint.com'
});- Use the client to interact with SettleMint resources:
// Example: List workspaces
const workspaces = await client.workspace.list();
console.log(workspaces);API Reference
The SettleMint SDK provides access to various resources. Here's an overview of the available methods:
Workspace
- workspace.list(): List all workspaces and their applications
- workspace.read(workspaceId): Read a specific workspace and its applications
Blockchain Network
- blockchainNetwork.list(applicationId): List blockchain networks for a given application
- blockchainNetwork.read(blockchainNetworkId): Read a specific blockchain network
Blockchain Node
- blockchainNode.list(applicationId): List blockchain nodes for a given application
- blockchainNode.read(blockchainNodeId): Read a specific blockchain node
Middleware
- middleware.list(applicationId): List middlewares for a given application
- middleware.read(middlewareId): Read a specific middleware
Integration Tool
- integrationTool.list(applicationId): List integration tools for a given application
- integrationTool.read(integrationId): Read a specific integration tool
Storage
- storage.list(applicationId): List storage items for a given application
- storage.read(storageId): Read a specific storage item
Private Key
- privateKey.list(applicationId): List private keys for a given application
- privateKey.read(privateKeyId): Read a specific private key
Insights
- insights.list(applicationId): List insights for a given application
- insights.read(insightsId): Read a specific insight
Examples
Here are some examples of how to use the SettleMint 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);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.