sign-in-with-stacks 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +11 -11
  2. package/package.json +10 -4
package/README.md CHANGED
@@ -13,17 +13,17 @@ npm install sign-in-with-stacks
13
13
  On the client create a message and sign it with the user's wallet.
14
14
 
15
15
  ```ts
16
- import { createSiwsMessage, generateSiwsNonce } from 'sign-in-with-stacks'
17
- import { STACKS_MAINNET } from '@stacks/network';
18
- import { openSignatureRequestPopup } from '@stacks/connect';
16
+ import { createSiwsMessage, generateSiwsNonce } from "sign-in-with-stacks";
17
+ import { STACKS_MAINNET } from "@stacks/network";
18
+ import { openSignatureRequestPopup } from "@stacks/connect";
19
19
 
20
20
  const message = createSiwsMessage({
21
- address: 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM',
21
+ address: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM",
22
22
  chainId: STACKS_MAINNET.chainId,
23
- domain: 'example.com',
23
+ domain: "example.com",
24
24
  nonce: generateSiwsNonce(),
25
- uri: 'https://example.com/path',
26
- version: '1',
25
+ uri: "https://example.com/path",
26
+ version: "1",
27
27
  });
28
28
 
29
29
  await openSignatureRequestPopup({
@@ -37,14 +37,14 @@ await openSignatureRequestPopup({
37
37
  On the backend verify the signature, can be used with any framework, next-auth, better-auth, express, etc.
38
38
 
39
39
  ```ts
40
- import { verifySiwsMessage } from 'sign-in-with-stacks'
41
- import { STACKS_MAINNET } from '@stacks/network';
40
+ import { verifySiwsMessage } from "sign-in-with-stacks";
41
+ import { STACKS_MAINNET } from "@stacks/network";
42
42
 
43
43
  const valid = verifySiwsMessage({
44
44
  message,
45
45
  signature,
46
- nonce: 'your-nonce',
47
- })
46
+ nonce: "your-nonce",
47
+ });
48
48
  ```
49
49
 
50
50
  ## Credits
package/package.json CHANGED
@@ -1,7 +1,13 @@
1
1
  {
2
2
  "name": "sign-in-with-stacks",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "license": "MIT",
5
+ "description": "Sign-in with Stacks is a library for creating and verifying Sign-In with Stacks messages",
6
+ "keywords": [
7
+ "stacks",
8
+ "siws",
9
+ "sign-in-with-stacks"
10
+ ],
5
11
  "repository": "pradel/sign-in-with-stacks",
6
12
  "funding": "https://github.com/sponsors/pradel",
7
13
  "type": "module",
@@ -44,9 +50,9 @@
44
50
  },
45
51
  "scripts": {
46
52
  "build": "tsdown",
47
- "test": "vitest",
48
53
  "check-types": "tsc --noEmit",
49
- "version": "changeset version",
50
- "release": "changeset publish"
54
+ "dev": "tsdown --watch",
55
+ "lint": "oxlint .",
56
+ "test": "vitest"
51
57
  }
52
58
  }