Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Here all interaction SDKs are listed that are maintained for the Secret Network
A Kotlin multiplatform Encryption and REST client for Secret Network utilizing gRPC gateway endpoints.
Supported Features:
Contract Queries
Simulate Contract Execution To Estimate Gas
Contract Execution (MsgExecuteContract)
Contract Code Upload (MsgStoreCode)
Contract Instantiate (MsgInstantiateContract)
Contract Migrate (MsgMigrateContract)
Contract Update Admin (MsgUpdateAdmin)
Contract Clear Admin (MsgClearAdmin)
Bank Send (MsgSend)
Web: Delegate signing transactions to Kepler or Metamask browser wallets
Supported Targets:
JVM
js
iOS
macOS
TODO: linux
An experimental swift pacakge for use with iOS and macOS is available as well.
See the full documentation, code and usage examples here For help and questions please ask Luca Spinazzola from Eqoty Labs.
The Secret Software Development Kit (SDK) in Python is a simple library toolkit for building software that can interact with the Secret blockchain and provides simple abstractions over core data structures, serialization, key management, and API request generation.
Written in Python offering extensive support libraries
Versatile support for key management solutions
Exposes the Secret Rest API through LCD/REST client
See the full documentation, code and usage examples here: https://github.com/secretanalytics/secret-sdk-python
In this section we will provide examples to common usage patterns of Secret.NET
A toolkit very similar to CosmJs that allows people to create and sign contract executions, integrate wallets and more.
Documentation for Secret.Js is separately hosted under: https://secretjs.scrt.network/
Secret.NET (full port of the secret.js Client) is a .NET SDK for writing applications that interact with the Secret Network blockchain.
Written in C# / .NET 6 including MAUI Support.
Can be used in MAUI Apps on Android, iOS, Windows and Mac.
Provides simple abstractions over core data structures.
Supports every possible message and transaction type.
Exposes every possible query type.
Handles input/output encryption/decryption for Secret Contracts.
The SDK has a wallet built in and does not currently require / support external wallets.
Custom APIs / clients for specific smart contracts can be easily created and the additional packages for tokens / SNIP20 or NFT / SNIP721 (see below) can serve as an example for this.
You can find the source code and full version of the docs at https://github.com/0xxCodemonkey/SecretNET/
In addition the following complementary packages are available, which act as a layer on top of the Secret.NET:
SecretNET.Token supports all methods of the reference implementation of the SNIP20 contract.
SecretNET.NFT supports all methods of the reference implementation of the SNIP721 contract.
All packages are available via NuGet and can be easily installed nuget.exe
-CLI:
.NET Multi-platform App UI (.NET MAUI) is a cross-platform framework for creating native mobile and desktop apps with C# and XAML.
Using .NET MAUI, you can develop apps that can run on Android, iOS, macOS, and Windows from a single shared code-base.
.NET MAUI is open-source and is the evolution of Xamarin.Forms, extended from mobile to desktop scenarios, with UI controls rebuilt from the ground up for performance and extensibility.
Using .NET MAUI, you can create multi-platform apps using a single project, but you can add platform-specific source code and resources if necessary. One of the key aims of .NET MAUI is to enable you to implement as much of your app logic and UI layout as possible in a single code-base.
.NET MAUI is for developers who want to:
Write cross-platform apps in XAML and C#, from a single shared code-base in Visual Studio.
Share UI layout and design across platforms.
Share code, tests, and business logic across platforms.
Secret.NET unfortunately cannot be connected to localsecret (Docker) yet, as the docker image currently does not provide an encrypted connection on gRPC-web port 9091. As far as I know, .NET cannot be connected to an unencrypted port via gRPC-web unless it offers HTTP/2 exclusively, which is not the case with localsecret (it also runs HTTP 1.1 on port 9091). See here and here.
SecretNET.Token is a layer on top of the Secret.NET which supports all methods of the reference implementation of the SNIP20 contract.
nuget install SecretNET.Token
SecretNET.NFT is a layer on top of the Secret.NET which supports all methods of the reference implementation of the SNIP721 contract.
nuget install SecretNET.NFT
This is a group of tools that help you develop Smart contracts by skipping on boilerplate code.
Shade protocol made their own JavaScript SDK to help people interact with specifically their Contracts. It serves as a great example for Contract Interaction or can be forked to make a similar SDK for your own application. https://github.com/securesecrets/shadejs
This Rust package is a collection of sub-packages that contain common tools used in development of Secret Contracts running on the Secret Network.
While the packages in this repository are designed with Secret Network's runtime in mind, some of them may work well with the vanilla CosmWasm libraries and runtimes as well, or only require minimal modifications to be compatible with them.
See usage and docs at: https://github.com/scrtlabs/secret-toolkit
A local, instant, zero-config Secret Network blockchain.
LocalSecret is a complete Secret Network testnet and ecosystem containerized with Docker. It simplifies the way secret contract developers test their contracts in a sandbox before they deploy them on a testnet or mainnet.
LocalSecret comes preconfigured with opinionated, sensible defaults for standard testing environments. If other projects mention testing on LocalSecret, they are referring to the settings defined in this repo.
Easily modifiable world states
Quick to reset for rapid iterations
Simple simulations of different scenarios
Controllable validator behavior
Supported known architectures: x86_64, amd64
Unfortunately, even LocalSecret inside a docker cannot be run on an M1 Mac. This is due to requiring SGX which can only work on x86 processors. As a workaround, we recommend using a LocalSecret instance in a Gitpod environment.
This environment is set up in such a way that can be accessed remotely as well.
To get started, simply click here.
To connect, prepend the port number with the Gitpod URL. e.g., if my workspace is at https://scrtlabs-gitpoddevenv-shqyv12iyrv.ws-eu54.gitpod.io
then I would be able to connect to the RPC service at https://26657-scrtlabs-gitpoddevenv-shqyv12iyrv.ws-eu54.gitpod.io
In order to follow the guide, simply replace the localhost
endpoint with your own.
e.g., Instead of http://localhost:26657
you will be using https://26657-scrtlabs-gitpoddevenv-shqyv12iyrv.ws-eu54.gitpod.io
In addition, the chain-id for this LocalSecret instance will be secret-testnet-1
and not secretdev-1
You've now officially created a local Secret Network testnet with chain-id secretdev-1
. 🎉
Your environment now contains:
RPC
http://localhost:26657
secretcli
, Keplr, cosmjs
gRPC-web
http://localhost:9091
secretjs@v1.4
(deprecated)
SCRT Faucet
http://localhost:5000
To get SCRT
LCD
http://localhost:1317
secretjs
, Keplr, secretjs@v0.17.5
(deprecated)
You can also use docker run --rm
to launch LocalSecret. This will delete the container once you exit the terminal, but it also means that you can't edit the node's config as stopping the container automatically deletes it.
Here are some examples of how to use LocalSecret with secretcli
, secret.js
, and Keplr
.
To access secretcli
from inside the docker container:
To configure & test your local secretcli binary:
The environment variable SGX_MODE=SW
must be applied when using a local secretcli
binary.
To send some SCRT to the example secret address secret1e6mqxtwgaps7vz3qfa3fcekhh7a02hvfjvtqpt
we have to options:
The faucet drips 1000 SCRT at a time.
Inside the docker container there are accounts a
, b
, c
& d
that are pre-seeded with SCRT and can be used to send some to your address.
Connect to the chain through LocalSecret's LCD endpoint.
npm i secretjs
or yarn add secretjs
, then:
To add a custom chain to Keplr, use this code:
Different instances of LocalSecret need to be re-added to Keplr, so you need to first delete the old LocalSecret from Keplr and then re-run this^ code to add the current LocalSecret.
You can modify the node configuration of your validator in the ~/.secretd/config/config.toml
and ~/.secretd/config/app.toml
files inside the container.
To enter the docker container to access them, run:
You can then use commands like sed
& perl
to edit these files, or install text editors like vim
& nano
using apt install -y vim nano
.
To apply changes that are made to the config file, restart LocalSecret by running:
LocalSecret is often used alongside a script written with the secret.js as a convenient way to do integration tests. You can greatly improve the experience by speeding up the block time.
To decrease block times, run LocalSecret with the FAST_BLOCKS=true
environment varibale:
To complement this, when testing with secret.js you can lower broadcastCheckIntervalMs
to 100
from the default of 6000
(example).
LocalSecret is pre-configured with one validator and 4 accounts with SCRT balances. You can import them into your own testing environment for easier prototyping.
a
secret1ap26qrlp8mcq2pg6r47w43l0y8zkqm8a450s03
grant rice replace explain federal release fix clever romance raise often wild taxi quarter soccer fiber love must tape steak together observe swap guitar
b
secret1fc3fzy78ttp0lwuujw7e52rhspxn8uj52zfyne
jelly shadow frog dirt dragon use armed praise universe win jungle close inmate rain oil canvas beauty pioneer chef soccer icon dizzy thunder meadow
c
secret1ajz54hz8azwuy34qwy9fkjnfcrvf0dzswy0lqq
chair love bleak wonder skirt permit say assist aunt credit roast size obtain minute throw sand usual age smart exact enough room shadow charge
d
secret1ldjxljw7v4vk6zhyduywh04hpj0jdwxsmrlatf
word twist toast cloth movie predict advance crumble escape whale sail such angry muffin balcony keen move employ cook valve hurt glimpse breeze brick
This is a collection of specification and contracts designed for use on real networks. They are designed not just as examples, but to solve real-world use cases, and to provide a reusable basis to build many custom contracts.
Version by SCRT labs: https://github.com/scrtlabs/cw-plus
Version by Secure Secrets: https://github.com/securesecrets/cw-plus
Rebranded version by Secure Secrets: https://github.com/securesecrets/secret-plus-utils
Warning: Compatibility of with Secret Contracts may be limited due to the missing iterator function
Polar is development framework for building secret contracts. The aim of the project is to make Secret contracts development process simple, efficient and scalable. User can focus on logic of secret contract and not much about further steps in development. It facilitates features such as initiating project repo from contract templates, easy compilation of contracts, deployment and contract testing framework.
For the full docs see: https://docs.arufaresearch.com/getting-started/
Fadroma (built by hack.bg) introduces core workflows for smart contract development and deployment on Cosmos-based platforms, specifically Secret Network! Fadroma helps developers avoid platform specific boilerplate code - automating the repetitive workflow steps by providing essential smart contract building blocks that empower developers to both maintain high development velocity and deliver a reliable product.
Fadroma is currently being developed as an in-house framework facilitating the Sienna Network project. In order to bring Fadroma to a larger developer audience, development hours are being dedicated to improving test coverage, documentation, stabilizing APIs, and ensuring compatibility with a wide range of use cases and underlying platforms.
Get started with Fadroma here: https://github.com/hackbg/fadroma/blob/stable/guide/basic-project-setup.md
The following is the list of some of the important initial feature of Fadroma - creating a unique and fluid development experience.
Fadroma Prelude - reexport of platform libraries, with added types for frequently used building blocks:
ContractLink
, a data type that contains a contract address and code hash
Humanize
and Canonize
- traits to convert structures that contain HumanAddr
to their CanonicalAddr
equivalent and vice versa
ViewingKey
and Permit
viewing key and permit with custom permissions
Uint256
- 256-bit equivalents of the CosmWasm numeric types, etc.
Fadroma Derive: a derive macro that generates boilerplate code like message definitions and dispatch init/handle/query functions, as well as wasm32 entry points - empowering contract creation out of separate subsystems.
Fadroma Components - implementations of frequently used smart contract functionality:
Fadroma Admin: TX sender-based admin auth
Fadroma VK: viewing key-based auth
Fadroma Permit: query permit-based auth
Fadroma Killswitch: pause or permanently disable contracts
Fadroma Token: A SNIP-20 implementation forked from the reference implementation and rebuilt as a trait.
This allows individual token contract functions to be overriden without having to copy the entire codebase.
Furthermore, it enables token functionality to be added to service contracts, obviating the need for a separate contract to represent the service token.
Fadroma Ensemble: fast integration testing of multiple smart contracts in Rust by mocking the CosmWasm API - useful for testing application logic when it is distributed among several contracts.and having them run instantaneously during development.
Fadroma Ops: Node.js-based operations framework for managing the smart contract lifecycle. Provides a rich vocabulary of classes for modeling your smart contract deployment workflow.
Fadroma Build: compile smart contracts from the working tree or a past point in Git history.
Fadroma Localnet: run a localnet for development,
Fadroma Receipts: keep track of uploads and instantiations. It is possible to update an existing deployment by specifying its id from the receipts and adding additional instances or executing messages all from code.
Fadroma Schema: generate TypeScript definitions from the JSON Schema exported by contracts.
Fadroma Bundle: Execute multiple messages in a single transaction or generate an unsigned transaction for manual multi-signing.
100% test coverage
Docker Compose integration for a portable development environment based on familiar tools.
Fadroma CLI: Command-line entrypoint for creating new projects and running default and custom management commands.
(init) Start a project
(add) Add contracts to it
(compile) Compile them
The following section will detail useful tools for developing Secret Contracts
Quick breakdown of additional tools to use for development
There are many tools created by various ecosystem contributors. These tools can be incredibly useful in different situations.
If you have a tool that you think could be added here, let us know on GitHub or Discord!
Collection of awesome things related to CosmWasm smart contracts.
https://github.com/scrtlabs/CosmWasm-Simulator - Simulator for CosmWasm transactions. Helpful when trying to debug on-chain behavior
Browser interface for smart contracts by btn.group
Monitor a validator on the Secret Network with an active telegram bot, email or phone call through Twilio
Tool to verify the WASM public binary of any contract against its source code. Make sure live contracts do what the Git repo says they do.
The Secret IDE is an all-inclusive environment for developing and deploying smart contracts on Secret Network. It's the best tool to get started with and the best tool to use, even if you're already a pro.
Currently, the Secret IDE is in public beta testing, and you can find all the information you need to get started with it here: https://github.com/digiline-io/Secret-IDE-Plugin