Skip to content

Commit

Permalink
fix wf
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed Jan 19, 2025
1 parent 41b3a43 commit 4f4eab5
Show file tree
Hide file tree
Showing 25 changed files with 148 additions and 108 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
env:
DEPS_AUTO_DENY: "true"
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm -r build

- name: Check Artifact Size
run: du -sh packages/**/dist
Expand Down
9 changes: 9 additions & 0 deletions demos/svelte-demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# @notemine/svelte-demo

## 0.1.1

### Patch Changes

- Updated dependencies
- @notemine/core@0.4.0
- @notemine/wrapper@1.0.0
1 change: 0 additions & 1 deletion demos/svelte-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "0.1.1",
"type": "module",
"scripts": {
"prepare": "pnpm build",
"build": "rollup -c",
"dev": "rollup -c -w",
"start": "sirv public --no-clear"
Expand Down
8 changes: 8 additions & 0 deletions demos/vanilla-js-demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @notemine/vanilla-js-demo

## 0.1.1

### Patch Changes

- Updated dependencies
- @notemine/core@0.4.0
1 change: 0 additions & 1 deletion demos/vanilla-js-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"license": "MIT",
"scripts": {
"dev": "sirv public --port 1372",
"prepare": "pnpm build",
"build": "./scripts/copy-notemine.sh"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/api/wrapper/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
**@notemine/wrapper API v0.0.7**
**@notemine/wrapper API v0.1.0**

***

# @notemine/wrapper API v0.0.7
# @notemine/wrapper API v0.1.0

## Classes

Expand Down
60 changes: 30 additions & 30 deletions docs/docs/api/wrapper/classes/Notemine.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[**@notemine/wrapper API v0.0.7**](../README.md)
[**@notemine/wrapper API v0.1.0**](../README.md)

***

# Class: Notemine

Defined in: [index.ts:76](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L76)
Defined in: [index.ts:76](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L76)

Class representing a miner for Notemine events

Expand All @@ -14,7 +14,7 @@ Class representing a miner for Notemine events

> **new Notemine**(`options`?): [`Notemine`](Notemine.md)
Defined in: [index.ts:121](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L121)
Defined in: [index.ts:121](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L121)

Creates a new Notemine miner instance

Expand All @@ -36,7 +36,7 @@ Configuration options for the miner

> **cancelled$**: `BehaviorSubject`\<`boolean`\>
Defined in: [index.ts:93](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L93)
Defined in: [index.ts:93](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L93)

Observable indicating if mining was cancelled

Expand All @@ -46,7 +46,7 @@ Observable indicating if mining was cancelled

> **cancelledEvent$**: `Observable`\<[`CancelledEvent`](../interfaces/CancelledEvent.md)\>
Defined in: [index.ts:113](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L113)
Defined in: [index.ts:113](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L113)

Observable for mining cancellations

Expand All @@ -56,7 +56,7 @@ Observable for mining cancellations

> **error$**: `Observable`\<[`ErrorEvent`](../interfaces/ErrorEvent.md)\>
Defined in: [index.ts:111](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L111)
Defined in: [index.ts:111](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L111)

Observable for errors encountered during mining

Expand All @@ -66,7 +66,7 @@ Observable for errors encountered during mining

> **highestPow$**: `BehaviorSubject`\<`null` \| [`WorkerPow`](../interfaces/WorkerPow.md)\>
Defined in: [index.ts:101](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L101)
Defined in: [index.ts:101](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L101)

Observable for the worker that found the best proof-of-work

Expand All @@ -76,7 +76,7 @@ Observable for the worker that found the best proof-of-work

> **mining$**: `BehaviorSubject`\<`boolean`\>
Defined in: [index.ts:91](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L91)
Defined in: [index.ts:91](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L91)

Observable indicating whether mining is currently active

Expand All @@ -86,7 +86,7 @@ Observable indicating whether mining is currently active

> **progress$**: `Observable`\<[`ProgressEvent`](../interfaces/ProgressEvent.md)\>
Defined in: [index.ts:109](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L109)
Defined in: [index.ts:109](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L109)

Observable for mining progress updates

Expand All @@ -96,7 +96,7 @@ Observable for mining progress updates

> **result$**: `BehaviorSubject`\<`null` \| [`MinedResult`](../interfaces/MinedResult.md)\>
Defined in: [index.ts:95](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L95)
Defined in: [index.ts:95](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L95)

Observable for the result of the mining operation

Expand All @@ -106,7 +106,7 @@ Observable for the result of the mining operation

> **success$**: `Observable`\<[`SuccessEvent`](../interfaces/SuccessEvent.md)\>
Defined in: [index.ts:115](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L115)
Defined in: [index.ts:115](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L115)

Observable for successful mining results

Expand All @@ -116,7 +116,7 @@ Observable for successful mining results

> **workers$**: `BehaviorSubject`\<`Worker`[]\>
Defined in: [index.ts:97](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L97)
Defined in: [index.ts:97](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L97)

Observable for the list of active workers

Expand All @@ -126,7 +126,7 @@ Observable for the list of active workers

> **workersPow$**: `BehaviorSubject`\<`Record`\<`number`, [`BestPowData`](../interfaces/BestPowData.md)\>\>
Defined in: [index.ts:99](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L99)
Defined in: [index.ts:99](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L99)

Observable tracking the proof-of-work data for each worker

Expand All @@ -136,7 +136,7 @@ Observable tracking the proof-of-work data for each worker

> `static` **\_defaultTags**: `string`[][]
Defined in: [index.ts:88](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L88)
Defined in: [index.ts:88](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L88)

## Accessors

Expand All @@ -146,7 +146,7 @@ Defined in: [index.ts:88](https://github.com/sandwichfarm/minnote-wasm/blob/c53e

> **get** **content**(): `string`
Defined in: [index.ts:135](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L135)
Defined in: [index.ts:135](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L135)

Gets the current mining content

Expand All @@ -158,7 +158,7 @@ Gets the current mining content

> **set** **content**(`content`): `void`
Defined in: [index.ts:130](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L130)
Defined in: [index.ts:130](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L130)

Sets the content to be used in the mining event

Expand All @@ -180,7 +180,7 @@ Sets the content to be used in the mining event

> **get** **difficulty**(): `number`
Defined in: [index.ts:165](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L165)
Defined in: [index.ts:165](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L165)

Gets the current mining difficulty

Expand All @@ -192,7 +192,7 @@ Gets the current mining difficulty

> **set** **difficulty**(`difficulty`): `void`
Defined in: [index.ts:160](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L160)
Defined in: [index.ts:160](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L160)

Sets the mining difficulty

Expand All @@ -214,7 +214,7 @@ Sets the mining difficulty

> **get** **lastRefresh**(): `number`
Defined in: [index.ts:185](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L185)
Defined in: [index.ts:185](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L185)

Gets the last refresh interval

Expand All @@ -226,7 +226,7 @@ Gets the last refresh interval

> **set** **lastRefresh**(`interval`): `void`
Defined in: [index.ts:180](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L180)
Defined in: [index.ts:180](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L180)

Sets the last refresh interval

Expand All @@ -248,7 +248,7 @@ Sets the last refresh interval

> **get** **numberOfWorkers**(): `number`
Defined in: [index.ts:175](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L175)
Defined in: [index.ts:175](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L175)

Gets the number of workers currently being used

Expand All @@ -260,7 +260,7 @@ Gets the number of workers currently being used

> **set** **numberOfWorkers**(`numberOfWorkers`): `void`
Defined in: [index.ts:170](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L170)
Defined in: [index.ts:170](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L170)

Sets the number of workers for mining

Expand All @@ -282,7 +282,7 @@ Sets the number of workers for mining

> **get** **pubkey**(): `string`
Defined in: [index.ts:155](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L155)
Defined in: [index.ts:155](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L155)

Gets the current public key

Expand All @@ -294,7 +294,7 @@ Gets the current public key

> **set** **pubkey**(`pubkey`): `void`
Defined in: [index.ts:150](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L150)
Defined in: [index.ts:150](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L150)

Sets the public key for the event

Expand All @@ -316,7 +316,7 @@ Sets the public key for the event

> **get** **tags**(): `string`[][]
Defined in: [index.ts:145](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L145)
Defined in: [index.ts:145](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L145)

Gets the current tags

Expand All @@ -328,7 +328,7 @@ Gets the current tags

> **set** **tags**(`tags`): `void`
Defined in: [index.ts:140](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L140)
Defined in: [index.ts:140](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L140)

Sets the tags to be used in the mining event

Expand All @@ -350,7 +350,7 @@ Sets the tags to be used in the mining event

> **get** **totalHashRate**(): `number`
Defined in: [index.ts:190](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L190)
Defined in: [index.ts:190](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L190)

Gets the total hash rate achieved

Expand All @@ -364,7 +364,7 @@ Gets the total hash rate achieved

> **cancel**(): `void`
Defined in: [index.ts:226](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L226)
Defined in: [index.ts:226](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L226)

Cancels the mining process

Expand All @@ -378,7 +378,7 @@ Cancels the mining process

> **mine**(): `Promise`\<`void`\>
Defined in: [index.ts:197](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L197)
Defined in: [index.ts:197](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L197)

Starts the mining process. Throws an error if pubkey or content is not set.

Expand All @@ -392,7 +392,7 @@ Starts the mining process. Throws an error if pubkey or content is not set.

> **stop**(): `void`
Defined in: [index.ts:221](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L221)
Defined in: [index.ts:221](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L221)

Stops the mining process

Expand Down
10 changes: 5 additions & 5 deletions docs/docs/api/wrapper/interfaces/BestPowData.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[**@notemine/wrapper API v0.0.7**](../README.md)
[**@notemine/wrapper API v0.1.0**](../README.md)

***

# Interface: BestPowData

Defined in: [index.ts:50](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L50)
Defined in: [index.ts:50](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L50)

Best proof-of-work data found so far

Expand All @@ -18,7 +18,7 @@ Best proof-of-work data found so far

> **bestPow**: `number`
Defined in: [index.ts:52](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L52)
Defined in: [index.ts:52](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L52)

Best proof-of-work value

Expand All @@ -28,7 +28,7 @@ Best proof-of-work value

> **hash**: `string`
Defined in: [index.ts:56](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L56)
Defined in: [index.ts:56](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L56)

Hash that met the proof-of-work requirements

Expand All @@ -38,6 +38,6 @@ Hash that met the proof-of-work requirements

> **nonce**: `string`
Defined in: [index.ts:54](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L54)
Defined in: [index.ts:54](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L54)

Nonce used to achieve the proof-of-work
6 changes: 3 additions & 3 deletions docs/docs/api/wrapper/interfaces/CancelledEvent.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[**@notemine/wrapper API v0.0.7**](../README.md)
[**@notemine/wrapper API v0.1.0**](../README.md)

***

# Interface: CancelledEvent

Defined in: [index.ts:38](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L38)
Defined in: [index.ts:38](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L38)

Data structure for reporting a cancelled mining event

Expand All @@ -14,6 +14,6 @@ Data structure for reporting a cancelled mining event

> `optional` **reason**: `string`
Defined in: [index.ts:40](https://github.com/sandwichfarm/minnote-wasm/blob/c53ea6e3fe1020d36f0ea791d4601bdf2a247981/packages/wrapper/src/index.ts#L40)
Defined in: [index.ts:40](https://github.com/sandwichfarm/minnote-wasm/blob/41b3a43b3f031ef371ed1ca6da826ba1065c7889/packages/wrapper/src/index.ts#L40)

Reason for the cancellation
Loading

0 comments on commit 4f4eab5

Please sign in to comment.