New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@blockless/sdk-ts

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockless/sdk-ts

This sdk is designed to work with Javascript/Typescript and compile for the BLESS Javy WASM Engine. As such this engine does not have full support for Node / Web APIs, but a majority of pure JavaScript will work, including some of those from the `npm` eco

1.0.5
latest
npm
Version published
Weekly downloads
45
87.5%
Maintainers
0
Weekly downloads
 
Created
Source

@blockless/sdk-ts

This sdk is designed to work with Javascript/Typescript and compile for the BLESS Javy WASM Engine. As such this engine does not have full support for Node / Web APIs, but a majority of pure JavaScript will work, including some of those from the npm ecosystem.

You don't need to use this SDK directly, it works as a module add on to your current npm project, or you can use blessnet CLI to initialize a project that uses this SDK.

npx blessnet init

The SDK natively supports

  • json
  • http
  • crypto

Install this SDK

$ yarn add @blockless/sdk-ts
# or using npm
$ npm i @blockless/sdk-ts

Example of using this SDK.

import { InputProps, entryMain } from '@blockless/sdk-ts'
import { AbiCoder } from 'ethers'

interface Arguments {
	n: number
	v: string
}

entryMain(async (input: InputProps<Arguments>) => {
	console.log('\n Example: Stdin')

	if (Object.keys(input.args).length === 0) {
		console.log('Missing args.')
		return {}
	}

	const coder = AbiCoder.defaultAbiCoder()
	const coded = coder.encode(['string'], [input.args.v])

	return { nonce: input.args.n, value: coded }
})

How to build

bls-sdk-ts build ./index.ts -o <outDirectory> -f <outFile>

FAQs

Package last updated on 15 Feb 2025

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