hyle
TypeScript icon, indicating that this package has built-in type declarations

0.2.5 • Public • Published

Hyle js SDK

Usage

import { Blob, blob_builder, BlobTransaction } from "hyle";

const transfer: Blob = blob_builder.token.transfer(
 "alice.mmid",
 "usdc",
 4,
 null,
);

const blobs = [transfer];

const { nonce, signature, account } = signBlobs(blobs); // Function defined in you project

const verifyIdentity: Blob = blob_builder.metamask.verifyIdentity(
  nonce,
  signature,
);

const blobTx: BlobTransaction = {
  identity: account,
  blobs: [verifyIdentity, ...blobs],
};

You have a usage example of the http clients in test.ts you can run with

bun test.ts

Build

bun run build

Development

To build whenever you make a change:

bun run watch

To use you local copy of the repo in another project, run here:

bun link 

And in your project run:

bun link hyle

Readme

Keywords

none

Package Sidebar

Install

npm i hyle

Weekly Downloads

176

Version

0.2.5

License

MIT

Unpacked Size

34.3 kB

Total Files

29

Last publish

Collaborators

  • bertranddrbn