0.2.1 • Published 4 months ago

hyle v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

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
0.2.1

4 months ago

0.1.1

4 months ago