Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scrypt-inc/scrypt-ts-lib
A library for building smart contracts with `scrypt-ts`.
https://github.com/scrypt-inc/scrypt-ts-lib
Last synced: 2 months ago
JSON representation
A library for building smart contracts with `scrypt-ts`.
- Host: GitHub
- URL: https://github.com/scrypt-inc/scrypt-ts-lib
- Owner: sCrypt-Inc
- Created: 2022-12-19T02:41:30.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-17T06:35:36.000Z (9 months ago)
- Last Synced: 2024-10-28T15:47:14.677Z (2 months ago)
- Language: TypeScript
- Size: 537 KB
- Stars: 12
- Watchers: 3
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![CI-Test](https://github.com/sCrypt-Inc/scrypt-ts-lib/actions/workflows/ci.yml/badge.svg)](https://github.com/sCrypt-Inc/scrypt-ts-lib/actions/workflows/ci.yml)
[![Build Status](https://app.travis-ci.com/sCrypt-Inc/scrypt-ts-lib.svg?branch=master)](https://app.travis-ci.com/sCrypt-Inc/scrypt-ts-lib)# scrypt-ts-lib
A collection of contracts and libraries for writing smart contracts with [`scrypt-ts`](https://www.npmjs.com/package/scrypt-ts).
Learn more about how to write smart contracts with `sCrypt` at https://scrypt.io.
## Installation
Install `scrypt-ts-lib` to your project with this command:
```sh
npm install scrypt-ts-lib
```## Usage
You can use the contracts or libraries by importing them like this:
```ts
import { Mimc7 } from "scrypt-ts-lib";
```or
```ts
import { Mimc7 } from "scrypt-ts-lib/dist/hash/mimc7";
```Then use them in a contract like:
```ts
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.