@settlemint/sdk-utils
Advanced tools
Comparing version 0.8.6-prc2be80e8 to 0.8.6-prc8cefb34
{ | ||
"name": "@settlemint/sdk-utils", | ||
"description": "SettleMint SDK, integrate SettleMint into your application with ease.", | ||
"version": "0.8.6-prc2be80e8", | ||
"version": "0.8.6-prc8cefb34", | ||
"type": "module", | ||
@@ -58,4 +58,3 @@ "private": false, | ||
"typecheck": "tsc --noEmit", | ||
"publish-npm": "bun publish --tag ${TAG} --access public || exit 0", | ||
"prepack": "cp ../../LICENSE ." | ||
"publish-npm": "bun publish --tag ${TAG} --access public || exit 0" | ||
}, | ||
@@ -62,0 +61,0 @@ "devDependencies": { |
130
README.md
@@ -13,4 +13,4 @@ <p align="center"> | ||
<a href="https://github.com/settlemint/sdk/actions?query=branch%3Amain"><img src="https://github.com/settlemint/sdk/actions/workflows/build.yml/badge.svg?event=push&branch=main" alt="CI status" /></a> | ||
<a href="https://fsl.software" rel="nofollow"><img src="https://img.shields.io/npm/l/@settlemint/sdk-utils" alt="License"></a> | ||
<a href="https://www.npmjs.com/package/@settlemint/sdk-utils" rel="nofollow"><img src="https://img.shields.io/npm/dw/@settlemint/sdk-utils" alt="npm"></a> | ||
<a href="https://fsl.software" rel="nofollow"><img src="https://img.shields.io/npm/l/@settlemint/sdk-js" alt="License"></a> | ||
<a href="https://www.npmjs.com/package/@settlemint/sdk-js" rel="nofollow"><img src="https://img.shields.io/npm/dw/@settlemint/sdk-js" alt="npm"></a> | ||
<a href="https://github.com/settlemint/sdk" rel="nofollow"><img src="https://img.shields.io/github/stars/settlemint/sdk" alt="stars"></a> | ||
@@ -24,3 +24,3 @@ </p> | ||
<span> • </span> | ||
<a href="https://www.npmjs.com/package/@settlemint/sdk-utils">NPM</a> | ||
<a href="https://www.npmjs.com/package/@settlemint/sdk-js">NPM</a> | ||
<span> • </span> | ||
@@ -33,15 +33,129 @@ <a href="https://github.com/settlemint/sdk/issues">Issues</a> | ||
- [About](#about) | ||
- [Installation](#installation) | ||
- [Usage](#usage) | ||
- [API Reference](#api-reference) | ||
- [Examples](#examples) | ||
- [Contributing](#contributing) | ||
- [License](#license) | ||
## About | ||
## Installation | ||
The SettleMint Utils SDK provides a collection of shared utilities and helper functions used across the SettleMint SDK packages. It includes common functionality for configuration management, error handling, validation, and type definitions that ensure consistency and reliability across the SDK ecosystem. | ||
To install the SettleMint SDK, you can use one of the following package managers: | ||
```bash | ||
# Using npm | ||
npm install @settlemint/sdk | ||
# Using yarn | ||
yarn add @settlemint/sdk | ||
# Using pnpm | ||
pnpm add @settlemint/sdk | ||
# Using Bun | ||
bun add @settlemint/sdk | ||
``` | ||
We recommend using Bun for faster installation and better performance. | ||
## Usage | ||
To use the SettleMint SDK in your Node.js application, follow these steps: | ||
1. Import the SDK: | ||
```javascript | ||
import { createSettleMintClient } from '@settlemint/sdk'; | ||
``` | ||
2. Create a client instance: | ||
```javascript | ||
const client = createSettleMintClient({ | ||
accessToken: 'your_access_token', | ||
instance: 'https://console.settlemint.com' | ||
}); | ||
``` | ||
3. Use the client to interact with SettleMint resources: | ||
```javascript | ||
// Example: List workspaces | ||
const workspaces = await client.workspace.list(); | ||
console.log(workspaces); | ||
``` | ||
## API Reference | ||
TODO | ||
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 | ||
```javascript | ||
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 | ||
```javascript | ||
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 | ||
@@ -61,2 +175,2 @@ | ||
The SettleMint SDK is released under the [FSL Software License](https://fsl.software). See the [LICENSE](LICENSE) file for more details. | ||
The SettleMint SDK is released under the [FSL Software License](https://fsl.software). See the [LICENSE](LICENSE) file for more details. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
397626
172