Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hazae41 committed Sep 4, 2023
1 parent 8b2fcec commit 885904c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@ npm i @hazae41/cubane

## Setup

### Symbol.dispose

You may need to polyfill `Symbol.dispose`

```tsx
import "@hazae41/symbol-dispose-polyfill"
```

You must choose an implementation for some algorithms
See https://github.com/hazae41/symbol-dispose-polyfill for more

### Algorithms

You must bring your own implementation for some algorithms

### Base16
#### Base16

Alocer includes a fast WebAssembly port of Base16

Expand All @@ -40,10 +46,12 @@ import { Alocer } from "@hazae41/alocer";
import { Base16 } from "@hazae41/base16";

await Alocer.initBundledOnce()
Base16.set(Base16.fromAlocer(Alocer))
Base16.set(Base16.fromBufferOrAlocer(Alocer))
```

### Keccak256
See https://github.com/hazae41/base16 for more

#### Keccak256

Morax includes a fast WebAssembly port of Keccak256

Expand All @@ -55,6 +63,8 @@ await Morax.initBundledOnce()
Keccak256.set(Keccak256.fromMorax(Morax))
```

See https://github.com/hazae41/keccak256 for more

## Usage

### Abi to Hex (runtime)
Expand Down
2 changes: 1 addition & 1 deletion src/index.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import * as viem from "viem";
// import * as web3 from "web3";

await Alocer.initBundledOnce()
Base16.set(Base16.fromAlocer(Alocer))
Base16.set(Base16.fromBufferOrAlocer(Alocer))

await Morax.initBundledOnce()
Keccak256.set(Keccak256.fromMorax(Morax))
Expand Down

0 comments on commit 885904c

Please sign in to comment.