@ton-pay/api 0.3.1 → 0.3.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 +11 -11
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Core API functions for TON Pay SDK - create transfers, check status, and verify
|
|
|
4
4
|
|
|
5
5
|
## Documentation
|
|
6
6
|
|
|
7
|
-
Full documentation: https://docs.
|
|
7
|
+
Full documentation: [docs.ton.org/ecosystem/ton-pay](https://docs.ton.org/ecosystem/ton-pay)
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -22,28 +22,28 @@ import {
|
|
|
22
22
|
verifySignature,
|
|
23
23
|
TON,
|
|
24
24
|
USDT,
|
|
25
|
-
} from
|
|
25
|
+
} from "@ton-pay/api";
|
|
26
26
|
|
|
27
27
|
// Create a TON Pay transfer
|
|
28
28
|
const transfer = await createTonPayTransfer(
|
|
29
29
|
{
|
|
30
30
|
amount: 10.5,
|
|
31
31
|
asset: TON,
|
|
32
|
-
recipientAddr:
|
|
33
|
-
senderAddr:
|
|
34
|
-
commentToSender:
|
|
35
|
-
commentToRecipient:
|
|
32
|
+
recipientAddr: "EQC...", // Optional if API key is provided
|
|
33
|
+
senderAddr: "EQC...",
|
|
34
|
+
commentToSender: "Payment for order #123",
|
|
35
|
+
commentToRecipient: "Thank you!",
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
chain:
|
|
39
|
-
apiKey:
|
|
40
|
-
}
|
|
38
|
+
chain: "mainnet",
|
|
39
|
+
apiKey: "your-api-key",
|
|
40
|
+
}
|
|
41
41
|
);
|
|
42
42
|
|
|
43
43
|
// Get transfer status by reference
|
|
44
44
|
const transferInfo = await getTonPayTransferByReference(transfer.reference, {
|
|
45
|
-
chain:
|
|
46
|
-
apiKey:
|
|
45
|
+
chain: "mainnet",
|
|
46
|
+
apiKey: "your-api-key",
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
// Verify webhook signature
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ton-pay/api",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "API functions for TON Pay SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"url": "https://github.com/RSquad/ton-pay.git",
|
|
56
56
|
"directory": "packages/api"
|
|
57
57
|
},
|
|
58
|
-
"homepage": "https://docs.
|
|
58
|
+
"homepage": "https://docs.ton.org/ecosystem/ton-pay",
|
|
59
59
|
"bugs": {
|
|
60
60
|
"url": "https://github.com/RSquad/ton-pay/issues"
|
|
61
61
|
},
|