Skip to content

hyli-org/hyli-js

Repository files navigation

Hyli js SDK

Usage

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

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 hyli

About

Frontend library to work with Hylé

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •