Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@onflow/sdk

Package Overview
Dependencies
Maintainers
7
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onflow/sdk

Flow SDK

  • 0.0.14
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16K
increased by37.59%
Maintainers
7
Weekly downloads
 
Created
Source

@onflow/sdk

A collection of modules that make interacting with Flow easier.

Install

npm install --save @onflow/sdk

Usage

import * as sdk from "@onflow/sdk"
import * as t from "@onflow/types"

const ixBuilt = await sdk.build([
  sdk.script`
    pub fun main(): UFix64 {
      let a = ${p => p.a}
      let b = ${p => p.b}
      return a + b
    }
  `,
  sdk.params([sdk.param(5, t.UFix64, "a"), sdk.param(6, t.UFix64, "b")]),
])

const ixResolved = await sdk.resolve(ixBuild, [sdk.resolveParams])

const response = await sdk.send(ixResolved, {
  node: "accessNode url",
})

const result = await sdk.decodeResponse(response, {
  UFix64: v => BigInt(v),
})

console.log(result === 11n) // true

Exposes

FAQs

Package last updated on 21 Apr 2020

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