The @scintilla/ts-sdk
provides a comprehensive suite of TypeScript primitives and utilities designed for building and interacting with the Scintilla blockchain. This SDK simplifies the development process by offering well-defined structures for assets, governance, transactions, and more, alongside essential utilities for hashing and variable-length integer handling.
To install the SDK in your project, run:
npm install @scintilla/ts-sdk
or if you are using yarn:
yarn add @scintilla/ts-sdk
The SDK includes a variety of primitives, each tailored for specific use cases within the Scintilla ecosystem:
- Asset
- DAO
- DriveData
- GovernanceProposal
- GovernanceVote
- HashProof
- Identity
- ModuleBlock
- Transaction
- Transfer
- Transition
- Messages
The SDK also includes primitives for message handling:
For technical operations, the SDK provides utility functions and data structures:
Some technical utilities are designed for specific data handling and management scenarios:
These data structures are exported separately to emphasize their utility nature and potential broader applicability outside the direct blockchain interaction scenarios.
To use a primitive or utility from the SDK, import it into your TypeScript file as follows:
import { Asset, Transfer, sha256 } from '@scintilla/ts-sdk';
// Example usage
const asset = new Asset({/* initial properties */});
const transfer = new Transfer({/* initial properties */});
const hash = sha256('your data here');
Refer to the individual documentation for each primitive and utility for detailed usage instructions.
<script type="importmap">
{
"imports": {
"@scintilla-network/sdk": "./dist/index.js"
}
}
</script>
<script type="module">
import {Asset} from "@scintilla-network/sdk";
console.log(new Asset('test'));
</script>
We welcome contributions to the @scintilla/ts-sdk
! Please read our Contributing Guide for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the MIT License - see the LICENSE file for details.