Unified Trust Stack SDK.
npm install @truststack/sdkA unified SDK for interacting with the Trust Stack platform.
``bash`
npm install @truststack/sdkor
yarn add @truststack/sdkor
pnpm add @truststack/sdk
The Trust Stack CLI allows you to manage your Trust Stack configuration.
Create a new configuration file in your project:
`bash`
npx truststack init
This will create a default truststack.config.json file in your current directory along with a JSON schema file for editor intellisense.
Apply your configuration to the Trust Stack API:
`bash`
npx truststack apply
By default, this will look for a truststack.config.json file in your current directory. To specify a different configuration file:
`bash`
npx truststack apply --config path/to/config.json
To specify the target environment:
`bash`
npx truststack apply --env productionor
npx truststack apply --env sandbox
The configuration file uses JSON format and can be validated against the included JSON schema.
For the best development experience, include the schema reference in your configuration file:
`json``
{
"eventTags": [
{
"code": "HARVEST_EVENT",
"name": "Harvest Event",
"description": "A grain harvest event."
}
]
}
Modern code editors like VS Code, WebStorm, and others will automatically provide validation and autocompletion based on the JSON schema.
The SDK also provides programmatic access to the Trust Stack API. See the API documentation for details.