The @scintilla-network/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-network/sdk
or if you are using yarn:
yarn add @scintilla-network/sdk
The SDK includes a variety of primitives, each tailored for specific use cases within the Scintilla ecosystem:
- Asset - An asset is a specific asset in the Scintilla network.
- Authorization - An authorization is a message that is used to authorize a specific action.
- BigDecimal - A big decimal is a decimal number that is used to represent a large number.
- ModuleBlock - A module block is a block representation in a specific module.
- Transaction - A transaction is a message that is used to perform a specific action.
- Messages - Messages are the fundamental units of communication in the Scintilla network.
- ClusterBlock - A cluster block is a block representation in a specific cluster.
- DriveData - A drive data is a data that is stored in drive.
- GovernanceProposal - A governance proposal is a proposal to the DAO.
- GovernanceVote - A governance vote is a vote on a governance proposal.
- HashProof - A hash proof is a POW block in a cluster
- Identity - An identity is a unique entity with a moniker, address, and associated records.
- Instruction - An instruction is a message that is used to perform a specific action.
- RelayBlock - A relay block is a specific block that happen between relayers.
- StateActionData - A state action data is a message that is used to store a list of state actions.
- Transfer - A transfer is a message that is used to transfer assets.
- Transition - A transition is a message that is used to transition the state of the system.
- Voucher - A digital voucher for transferring assets.
- Peer - A peer is a part of the network.
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-network/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="module">
import {Asset} from "@scintilla-network/sdk";
console.log(new Asset('test'));
</script>
We welcome contributions to the @scintilla-network/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.