Practical overview
When it fits
Use Secret.js when an application needs JavaScript or TypeScript code to read Secret Network data or submit signed transactions, rather than a standalone consumer-facing interface.
Who it is for
- JavaScript and TypeScript developers building Secret Network dApps.
- Teams adding network queries or transaction submission to a web or server application.
- Developers integrating supported wallets into Secret Network software.
Documented uses
- Query bank balances and contract data through a Secret Network LCD endpoint.
- Construct and broadcast network messages using a signer wallet.
- Add wallet integrations such as MetaMask, Keplr, Fina or Leap Cosmos Wallet.
- Handle input and output encryption and decryption for Secret Contracts.
Requirements & limits
The repository is public and lists an MIT license. The README provides npm, yarn and direct-browser installation paths.
- The documented read-only client needs an LCD endpoint and chain ID; transaction broadcasting also requires a wallet and wallet address.
- The README describes the SDK as beta and cautions that APIs may break.
- React Native setup includes an additional react-native-get-random-values step.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up Secret.js for a JavaScript project
Add the SDK to a JavaScript or TypeScript project before building Secret Network queries or transaction flows.
Before you start
- A JavaScript or TypeScript project using npm or yarn.
- For React Native, the documented react-native-get-random-values package setup.
Steps
Install the package with npm install secretjs or yarn add secretjs.
For a browser-only setup, load the documented browser bundle and access SecretNetworkClient from window.secretjs.
For React Native, follow the react-native-get-random-values package instructions.
Expected outcome
The project has the secretjs package available, or the browser bundle exposes SecretNetworkClient.
Guide limitations
- These steps cover installation only, not connecting to a network or executing a query or transaction.
- The README identifies the library as beta and warns that APIs may break.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 13 October 2026
- Original website title
- scrtlabs/secret.js · Official homepage title · retained in its source language

