Skip to content

Commit

Permalink
Merge pull request #36 from getAlby/chore/package-rename
Browse files Browse the repository at this point in the history
chore: rename alby js sdk package
  • Loading branch information
bumi authored Aug 7, 2023
2 parents aa67c8a + 17be09c commit 1f3fccd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This JavaScript SDK for the Alby OAuth2 Wallet API and the Nostr Wallet Connect
## Installing

```
npm install alby-js-sdk
npm install @getalby/sdk
```

**This library relies on a global fetch() function which will work in browsers and node v18.x or newer.** (In older versions you have to use a polyfill.)
Expand Down Expand Up @@ -41,7 +41,7 @@ The `NostrWebLNProvider` exposes the [WebLN](webln.guide/) sendPayment interface
### Quick start example

```js
import { webln } from "alby-js-sdk";
import { webln } from "@getalby/sdk";
const nwc = new webln.NostrWebLNProvider({ nostrWalletConnectUrl: loadNWCUrl() }); // loadNWCUrl is some function to get the NWC URL from some (encrypted) storage
// or use the short version
const nwc = new webln.NWC({ nostrWalletConnectUrl: loadNWCUrl });
Expand Down Expand Up @@ -140,7 +140,7 @@ globalThis.crypto = crypto as any;
#### Defaults
```js
import { NostrWebLNProvider } from 'alby-js-sdk';
import { NostrWebLNProvider } from '@getalby/sdk';

const webln = new NostrWebLNProvider(); // use defaults (connects to Alby's relay, will use window.nostr to sign the request)
await webln.enable(); // connect to the relay
Expand All @@ -152,7 +152,7 @@ webln.close(); // close the websocket connection
#### Use a custom, user provided Nostr Wallet Connect URL
```js
import { NostrWebLNProvider } from 'alby-js-sdk';
import { NostrWebLNProvider } from '@getalby/sdk';

const webln = new NostrWebLNProvider({ nostrWalletConnectUrl: 'nostrwalletconnect://69effe7b49a6dd5cf525bd0905917a5005ffe480b58eeb8e861418cf3ae760d9?relay=wss://nostr.bitcoiner.social&secret=c60320b3ecb6c15557510d1518ef41194e9f9337c82621ddef3f979f668bfebd'); // use defaults
await webln.enable(); // connect to the relay
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "alby-js-sdk",
"name": "@getalby/sdk",
"version": "2.1.2",
"description": "The SDK to integrate with Nostr Wallet Connect and the Alby API",
"repository": "https://github.com/getAlby/alby-js-sdk.git",
Expand Down

0 comments on commit 1f3fccd

Please sign in to comment.