Socket
Socket
Sign inDemoInstall

@seda-protocol/dev-tools

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@seda-protocol/dev-tools

The SEDA dev tools includes a CLI to interact with the SEDA chain as well as a collection of useful functions that allow you to create scripts to test your data request binaries.


Version published
Weekly downloads
105
decreased by-57.32%
Maintainers
0
Weekly downloads
 
Created
Source

SEDA SDK dev tools

The SEDA dev tools includes a CLI to interact with the SEDA chain as well as a collection of useful functions that allow you to create scripts to test your data request binaries.

CLI

Command Line Interface (CLI) for the SEDA SDK. Allows you to upload list and show information about Data Request binaries.

This guide assumes you have already a package.json in place and a wasm binary. If not you can use our starter template, which already has all dependencies you need.

First add the SEDA SDK dev tools to your devDependencies:

npm install -D @seda-protocol/dev-tools

You can verify if the command is working by doing:

npx seda-sdk

Configuring

You can configure the CLI through arguments or environment variables. However we require the MNEMONIC to be submitted as an environment variable. The CLI reads .env files in the working directory.

The following environment variables can be provided:

# The URL to the SEDA RPC server
SEDA_RPC_ENDPOINT = "http://INSERT_COMET_RPC_URL"
# The Mnemonic that you use on the SEDA chain
SEDA_MNEMONIC = "<INSERT_YOUR_MNEMONIC>"

You can apply the following options to all CLI commands:

  • --rpc - The SEDA chain RPC to use

Oracle Program commands

Commands that allow you to interact with the Oracle Programs.

Uploading an Oracle Program

Allows you to upload an Oracle Program to the SEDA chain.

Example:

npx seda-sdk oracle-program upload <INSERT_PATH_TO_WASM> --rpc <INSERT_SEDA_CHAIN_RPC>

This will return the Oracle Program ID which you can use for Data Requests.

You can apply the following options:

  • --gas - The amount of gas to attach to the transaction. Either an integer or 'auto' to use an estimate based on a simulation. (default: auto)
  • --gas-adjustment - Used to scale the gas estimate with gas 'auto'. (default: 1.3)
  • --gas-price - Price per unit of gas in aseda. (default: 10000000000)

Oracle Program details

Shows all the details of an uploaded Oracle Program. The Oracle Program id is the hash of the WASM binary (which you receive from the upload command).

Example:

npx seda-sdk oracle-program show <INSERT_ORACLE_PROGRAM_ID> --rpc <INSERT_SEDA_CHAIN_RPC>

List Oracle Programs

Shows all the Oracle Programs to the SEDA chain.

Example:

npx seda-sdk oracle-program list --rpc <INSERT_SEDA_CHAIN_RPC>

FAQs

Package last updated on 24 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc