@ton-pay/api 0.3.0 → 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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- 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/dist/index.js
CHANGED
|
@@ -6626,7 +6626,7 @@ var require_crypto_js = __commonJS({
|
|
|
6626
6626
|
|
|
6627
6627
|
// src/common/const.ts
|
|
6628
6628
|
var BASE_URL = "https://pay.ton.org";
|
|
6629
|
-
var TESTNET_BASE_URL = "https://
|
|
6629
|
+
var TESTNET_BASE_URL = "https://testnet.pay.ton.org";
|
|
6630
6630
|
|
|
6631
6631
|
// src/common/get-base-url.ts
|
|
6632
6632
|
var getBaseUrl = (chain) => {
|