Skip to content

Commit

Permalink
Merge pull request #62 from torusresearch/feat/wasm-lib
Browse files Browse the repository at this point in the history
Separate WASM lib
  • Loading branch information
himanshuchawla009 authored May 16, 2024
2 parents b1156cc + a5023c1 commit d789ca4
Show file tree
Hide file tree
Showing 44 changed files with 6,167 additions and 17,055 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
dist
webpack
pkg/
scripts/
scripts/
packages/tss-lib/
31 changes: 31 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test
on:
push:
branches:
- master
- alpha
pull_request:
branches:
- "**"

jobs:
test:
strategy:
matrix:
node: ["20.x"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build packages
run: npm run build
- name: Run tests
run: npm run test:devnet
51 changes: 10 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
# TSS-Client-SDk
# DKLS Client Library

Client Side SDK for tss signature verification.
Client-side library for DKLS threshold signing.

### Installation and setup
## Installation and setup

<br />
```
npm install
```
<br />

### Running local test
## Running local test

<br />
```
npm run clean
npm run build
npm run serve:local
```
<br />

### Updating DKLS19
## Updating DKLS19

#### Step 1
### Step 1

Build [DLKS19](https://github.com/torusresearch/dkls) with

Expand All @@ -31,37 +27,10 @@ cd dkls
wasm-pack build --release --target web
```

#### Step 2
### Step 2

From the `pkg` subfolder in `dkls`:
Copy the files from `dkls/pkg/` to `packages/tss-lib/src/pkg/`.

Copy the following files:
### Step 3

```
dkls.d.ts
dkls_bg.wasm.d.ts
```

into this repositories' path `packages/tss-lib`.

#### Step 3

Copy contents of `dkls.js` into `packages/tss-lib/browser.js`.

#### Step 4

Revert any changes to the following functions and exports in `browser.js`:

```
function initSync(module)
async function init(input)
export { initSync, finalizeInit, getImports }
```

#### Step 5

Copy and rename `dkls_bg.wasm` to `client.wasm` and overwrite `packages/tss-lib/wasm/client.wasm` with it.

#### Step 6

Publish changes to nmp for packages tss-lib and tss-client.
Copy `dkls.d.ts` to `packages/tss-client/src/`.
Loading

0 comments on commit d789ca4

Please sign in to comment.