satoshi-proof-sdk 1.0.1 → 1.0.2
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.
- package/README.md +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# satoshi-proof-sdk
|
|
2
2
|
|
|
3
3
|
**Bitcoin signature verification and proof generation SDK for Starknet**
|
|
4
4
|
|
|
@@ -9,15 +9,15 @@ This SDK implements BIP-137 Bitcoin signed message verification with Poseidon ha
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npm install
|
|
12
|
+
npm install satoshi-proof-sdk
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
yarn add
|
|
16
|
+
yarn add satoshi-proof-sdk
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
pnpm add
|
|
20
|
+
pnpm add satoshi-proof-sdk
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
---
|
|
@@ -25,7 +25,7 @@ pnpm add @satoshi-proof/sdk
|
|
|
25
25
|
## Quick Start
|
|
26
26
|
|
|
27
27
|
```typescript
|
|
28
|
-
import { generateProof } from '
|
|
28
|
+
import { generateProof } from 'satoshi-proof-sdk';
|
|
29
29
|
|
|
30
30
|
// User signs a message with their Bitcoin wallet
|
|
31
31
|
const message = "I own this Bitcoin address";
|
|
@@ -201,7 +201,7 @@ import {
|
|
|
201
201
|
parseSignature,
|
|
202
202
|
recoverPublicKey,
|
|
203
203
|
pubkeyToP2PKH
|
|
204
|
-
} from '
|
|
204
|
+
} from 'satoshi-proof-sdk';
|
|
205
205
|
|
|
206
206
|
const message = "Prove I own this address";
|
|
207
207
|
const signature = "H8k3Qn..."; // From Bitcoin wallet
|
|
@@ -226,7 +226,7 @@ console.log(`Signer address: ${address}`);
|
|
|
226
226
|
### Example 2: Generate proof for Starknet contract
|
|
227
227
|
|
|
228
228
|
```typescript
|
|
229
|
-
import { generateProof } from '
|
|
229
|
+
import { generateProof } from 'satoshi-proof-sdk';
|
|
230
230
|
|
|
231
231
|
async function submitProof(message: string, signature: string, btcBalance: number) {
|
|
232
232
|
// Generate proof
|
|
@@ -254,7 +254,7 @@ async function submitProof(message: string, signature: string, btcBalance: numbe
|
|
|
254
254
|
### Example 3: Batch verify multiple signatures
|
|
255
255
|
|
|
256
256
|
```typescript
|
|
257
|
-
import { generateProof, getBracket, BRACKETS } from '
|
|
257
|
+
import { generateProof, getBracket, BRACKETS } from 'satoshi-proof-sdk';
|
|
258
258
|
|
|
259
259
|
interface User {
|
|
260
260
|
message: string;
|
|
@@ -348,7 +348,7 @@ MIT
|
|
|
348
348
|
|
|
349
349
|
## Contributing
|
|
350
350
|
|
|
351
|
-
Issues and PRs welcome at [github.com/
|
|
351
|
+
Issues and PRs welcome at [github.com/Zedit42/satoshi-proof](https://github.com/Zedit42/satoshi-proof)
|
|
352
352
|
|
|
353
353
|
---
|
|
354
354
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "satoshi-proof-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Bitcoin signature verification and proof generation SDK for Starknet - implements BIP-137 message signing with Poseidon hashing",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|