truf.network SDKs
Learn how to interact with the truf.network using SDKs.
The truf.network offers SDKs in Go and TypeScript/JavaScript to facilitate seamless integration with its decentralized platform for economic data streams.
What is a streamID
?
A streamID
is an identifier used in the truf.network (TN) to identify the deployed contract. It is a unique string generated from a descriptive name, such as an English name, to ensure easy reference and management of data streams.
Go SDK
The Go SDK provides tools to publish, compose, and consume economic data streams within the truf.network. It supports operations on primitive streams and composed streams.
Installation:
Ensure you have Go 1.20 or later installed. To install the SDK, run:
Example Usage:
For comprehensive examples and usage patterns, refer to the test files in the SDK repository.
TypeScript/JavaScript SDK
The TypeScript/JavaScript SDK offers similar capabilities as the Go SDK, with implementations tailored for both Node.js and browser environments.
Installation:
Ensure you have Node.js 18 or later installed. To install the SDK, run:
Example Usage:
For detailed examples and usage patterns, refer to the test files in the SDK repository.
Additional Resources
For support or questions, please open an issue in the respective SDK repository or contact our support team.