Skip to content

Commit

Permalink
Merge branch 'master' into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr authored Oct 25, 2024
2 parents e3556fc + 22d10b9 commit 7d58ecf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@
[![build](https://github.com/sandwichfarm/notemine-js/actions/workflows/build.yaml/badge.svg)]( https://github.com/sandwichfarm/notemine-js/actions/workflows/build.yaml )
[![test](https://github.com/sandwichfarm/notemine-js/actions/workflows/test.yaml/badge.svg)]( https://github.com/sandwichfarm/notemine-js/actions/workflows/test.yaml )

`notemine` is a typescript module that wraps [notemine](https://github.com/sandwichfarm/notemine) `wasm-bindgen` interfaces. More convenient and has added observables for more consistent use throughout modern web stacks.
`@notemine/wrapper` is a typescript module that wraps [notemine](https://github.com/sandwichfarm/notemine) `wasm-bindgen` interfaces. More convenient and has added observables for more consistent use throughout modern web stacks.

## install
package name: `notemine`
package name: `@notemine/wrapper`

**npm**
```bash
npm install notemine
npm install @notemine/wrapper
```

<details>
<summary>pnpm</summary>

```bash
pnpm install notemine
pnpm install @notemine/wrapper
```
</details>

<details>
<summary>yarn</summary>

```bash
yarn install notemine
yarn install @notemine/wrapper
```
</details>

## usage
_untested_

```typescript
import Notemine from "notemine"
import Notemine from "@notemine/wrapper"

//prepare meta for event
const content = "hello world."
Expand Down Expand Up @@ -76,8 +76,9 @@ notemine.success$
```svelte
<script lang="ts">
import { onMount } from 'svelte';
import { type Writable, writable } from 'svelte/store'
import { type ProgressEvent, Notemine } from 'notemine';
import { type Writable, writable } from 'svelte/store';
import { type ProgressEvent, Notemine } from '@notemine/wrapper';
const numberOfMiners = 8
let notemine: Notemine;
Expand Down Expand Up @@ -137,7 +138,7 @@ notemine.success$

```reactjs
import React, { useEffect } from 'react';
import { Notemine } from 'notemine';
import { Notemine } from '@notemine/wrapper';
const MyComponent = () => {
const notemine = new Notemine({ content: 'Hello, Nostr!' });
Expand Down Expand Up @@ -177,7 +178,7 @@ notemine.success$
<script lang="ts">
import { defineComponent, onMounted, onUnmounted } from 'vue';
import { Notemine } from 'notemine';
import { Notemine } from '@notemine/wrapper';
export default defineComponent({
name: 'MinerComponent',
Expand Down Expand Up @@ -210,7 +211,7 @@ export default defineComponent({

```javascript
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Notemine } from 'notemine';
import { Notemine } from '@notemine/wrapper';
import { Subscription } from 'rxjs';

@Component({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@notemine/wrapper",
"version": "0.0.4",
"author": "[email protected]",
"description": "Nostr note miner wrapper for notemine WASM",
"description": "Nostr note miner wrapper for notemine wasm-bindgen",
"repository": "https://github.com/sandwichfarm/notemine-js",
"license": "MIT",
"type": "module",
Expand Down

0 comments on commit 7d58ecf

Please sign in to comment.