scrypt-ts-lib
TypeScript icon, indicating that this package has built-in type declarations

0.1.28 • Public • Published

CI-Test Build Status

scrypt-ts-lib

A collection of contracts and libraries for writing smart contracts with scrypt-ts.

Installation

You can install scrypt-ts-lib to your project with this command:

npm install scrypt-ts-lib

Usage

You can use the contracts or libraries by importing them like this:

import { Mimc7 } from "scrypt-ts-lib";

or

import { Mimc7 } from "scrypt-ts-lib/dist/hash/mimc7";

Then use them in your contract like:

class MyContract extends SmartContract {
  @method
  public unlock(x: bigint, k: bigint, h: bigint) {
    // call imported library method
    assert(Mimc7.hash(x, k) == h);
  }
}

Contributing

Pull requests are welcome.

Learn More

You can learn more about how to write smart contracts with scrypt-ts from here.

Readme

Keywords

Package Sidebar

Install

npm i scrypt-ts-lib

Weekly Downloads

60

Version

0.1.28

License

MIT

Unpacked Size

683 kB

Total Files

58

Last publish

Collaborators

  • zhfnjust
  • msinkec
  • aaron67