@cosmosapp/pay_sdk 2.3.0 → 2.3.1
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/CHANGELOG.md +5 -0
- package/dist/{chunk-FTHQKUE5.js → chunk-B3HT6MCO.js} +3 -3
- package/dist/{chunk-FTHQKUE5.js.map → chunk-B3HT6MCO.js.map} +1 -1
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/{intent-input-B16Lt69q.d.cts → intent-input-CP5bkBYI.d.cts} +9 -0
- package/dist/{intent-input-B16Lt69q.d.ts → intent-input-CP5bkBYI.d.ts} +9 -0
- package/dist/web/index.cjs +1 -1
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.d.cts +2 -2
- package/dist/web/index.d.ts +2 -2
- package/dist/web/index.js +2 -2
- package/llms/07-webhooks.md +19 -3
- package/llms/llms-full.txt +19 -3
- package/package.json +1 -1
|
@@ -140,16 +140,19 @@ declare const WebhookEventType: {
|
|
|
140
140
|
readonly SwapSubmitted: "SWAP_SUBMITTED";
|
|
141
141
|
readonly SwapSucceeded: "SWAP_SUCCEEDED";
|
|
142
142
|
readonly SwapFailed: "SWAP_FAILED";
|
|
143
|
+
readonly SwapExpired: "SWAP_EXPIRED";
|
|
143
144
|
readonly LiquidityCreated: "LIQUIDITY_CREATED";
|
|
144
145
|
readonly LiquiditySubmitted: "LIQUIDITY_SUBMITTED";
|
|
145
146
|
readonly LiquiditySucceeded: "LIQUIDITY_SUCCEEDED";
|
|
146
147
|
readonly LiquidityFailed: "LIQUIDITY_FAILED";
|
|
148
|
+
readonly LiquidityExpired: "LIQUIDITY_EXPIRED";
|
|
147
149
|
readonly CrossChainSwapCreated: "CROSS_CHAIN_SWAP_CREATED";
|
|
148
150
|
readonly CrossChainSwapUpdated: "CROSS_CHAIN_SWAP_UPDATED";
|
|
149
151
|
readonly CrossChainSwapSucceeded: "CROSS_CHAIN_SWAP_SUCCEEDED";
|
|
150
152
|
readonly CrossChainSwapRefunded: "CROSS_CHAIN_SWAP_REFUNDED";
|
|
151
153
|
readonly CrossChainSwapFailed: "CROSS_CHAIN_SWAP_FAILED";
|
|
152
154
|
readonly CrossChainSwapExpired: "CROSS_CHAIN_SWAP_EXPIRED";
|
|
155
|
+
readonly PrivatePaymentSucceeded: "ZK_PAYMENT_SUCCEEDED";
|
|
153
156
|
};
|
|
154
157
|
type WebhookEventType = (typeof WebhookEventType)[keyof typeof WebhookEventType];
|
|
155
158
|
/** Delivery state of a single webhook attempt. */
|
|
@@ -409,16 +412,22 @@ interface WebhookEventDataMap {
|
|
|
409
412
|
SWAP_SUBMITTED: SwapData | ChainSwapData;
|
|
410
413
|
SWAP_SUCCEEDED: SwapData | ChainSwapData;
|
|
411
414
|
SWAP_FAILED: SwapData | ChainSwapData;
|
|
415
|
+
/** A swap that expired before its transaction settled (it may still be rescued if it lands). */
|
|
416
|
+
SWAP_EXPIRED: SwapData | ChainSwapData;
|
|
412
417
|
LIQUIDITY_CREATED: LiquidityOperationData;
|
|
413
418
|
LIQUIDITY_SUBMITTED: LiquidityOperationData;
|
|
414
419
|
LIQUIDITY_SUCCEEDED: LiquidityOperationData;
|
|
415
420
|
LIQUIDITY_FAILED: LiquidityOperationData;
|
|
421
|
+
/** A liquidity operation that expired before its transaction settled (a late landing can still settle it). */
|
|
422
|
+
LIQUIDITY_EXPIRED: LiquidityOperationData;
|
|
416
423
|
CROSS_CHAIN_SWAP_CREATED: CrossChainSwapData;
|
|
417
424
|
CROSS_CHAIN_SWAP_UPDATED: CrossChainSwapData;
|
|
418
425
|
CROSS_CHAIN_SWAP_SUCCEEDED: CrossChainSwapData;
|
|
419
426
|
CROSS_CHAIN_SWAP_REFUNDED: CrossChainSwapData;
|
|
420
427
|
CROSS_CHAIN_SWAP_FAILED: CrossChainSwapData;
|
|
421
428
|
CROSS_CHAIN_SWAP_EXPIRED: CrossChainSwapData;
|
|
429
|
+
/** A private payment the network settled (client.privatePayments). */
|
|
430
|
+
ZK_PAYMENT_SUCCEEDED: PrivatePaymentData;
|
|
422
431
|
}
|
|
423
432
|
/** One webhook event of a known type, with `data` typed for it. */
|
|
424
433
|
type TypedWebhookEvent<K extends keyof WebhookEventDataMap> = Omit<WebhookEvent<WebhookEventDataMap[K]>, 'type'> & {
|
|
@@ -140,16 +140,19 @@ declare const WebhookEventType: {
|
|
|
140
140
|
readonly SwapSubmitted: "SWAP_SUBMITTED";
|
|
141
141
|
readonly SwapSucceeded: "SWAP_SUCCEEDED";
|
|
142
142
|
readonly SwapFailed: "SWAP_FAILED";
|
|
143
|
+
readonly SwapExpired: "SWAP_EXPIRED";
|
|
143
144
|
readonly LiquidityCreated: "LIQUIDITY_CREATED";
|
|
144
145
|
readonly LiquiditySubmitted: "LIQUIDITY_SUBMITTED";
|
|
145
146
|
readonly LiquiditySucceeded: "LIQUIDITY_SUCCEEDED";
|
|
146
147
|
readonly LiquidityFailed: "LIQUIDITY_FAILED";
|
|
148
|
+
readonly LiquidityExpired: "LIQUIDITY_EXPIRED";
|
|
147
149
|
readonly CrossChainSwapCreated: "CROSS_CHAIN_SWAP_CREATED";
|
|
148
150
|
readonly CrossChainSwapUpdated: "CROSS_CHAIN_SWAP_UPDATED";
|
|
149
151
|
readonly CrossChainSwapSucceeded: "CROSS_CHAIN_SWAP_SUCCEEDED";
|
|
150
152
|
readonly CrossChainSwapRefunded: "CROSS_CHAIN_SWAP_REFUNDED";
|
|
151
153
|
readonly CrossChainSwapFailed: "CROSS_CHAIN_SWAP_FAILED";
|
|
152
154
|
readonly CrossChainSwapExpired: "CROSS_CHAIN_SWAP_EXPIRED";
|
|
155
|
+
readonly PrivatePaymentSucceeded: "ZK_PAYMENT_SUCCEEDED";
|
|
153
156
|
};
|
|
154
157
|
type WebhookEventType = (typeof WebhookEventType)[keyof typeof WebhookEventType];
|
|
155
158
|
/** Delivery state of a single webhook attempt. */
|
|
@@ -409,16 +412,22 @@ interface WebhookEventDataMap {
|
|
|
409
412
|
SWAP_SUBMITTED: SwapData | ChainSwapData;
|
|
410
413
|
SWAP_SUCCEEDED: SwapData | ChainSwapData;
|
|
411
414
|
SWAP_FAILED: SwapData | ChainSwapData;
|
|
415
|
+
/** A swap that expired before its transaction settled (it may still be rescued if it lands). */
|
|
416
|
+
SWAP_EXPIRED: SwapData | ChainSwapData;
|
|
412
417
|
LIQUIDITY_CREATED: LiquidityOperationData;
|
|
413
418
|
LIQUIDITY_SUBMITTED: LiquidityOperationData;
|
|
414
419
|
LIQUIDITY_SUCCEEDED: LiquidityOperationData;
|
|
415
420
|
LIQUIDITY_FAILED: LiquidityOperationData;
|
|
421
|
+
/** A liquidity operation that expired before its transaction settled (a late landing can still settle it). */
|
|
422
|
+
LIQUIDITY_EXPIRED: LiquidityOperationData;
|
|
416
423
|
CROSS_CHAIN_SWAP_CREATED: CrossChainSwapData;
|
|
417
424
|
CROSS_CHAIN_SWAP_UPDATED: CrossChainSwapData;
|
|
418
425
|
CROSS_CHAIN_SWAP_SUCCEEDED: CrossChainSwapData;
|
|
419
426
|
CROSS_CHAIN_SWAP_REFUNDED: CrossChainSwapData;
|
|
420
427
|
CROSS_CHAIN_SWAP_FAILED: CrossChainSwapData;
|
|
421
428
|
CROSS_CHAIN_SWAP_EXPIRED: CrossChainSwapData;
|
|
429
|
+
/** A private payment the network settled (client.privatePayments). */
|
|
430
|
+
ZK_PAYMENT_SUCCEEDED: PrivatePaymentData;
|
|
422
431
|
}
|
|
423
432
|
/** One webhook event of a known type, with `data` typed for it. */
|
|
424
433
|
type TypedWebhookEvent<K extends keyof WebhookEventDataMap> = Omit<WebhookEvent<WebhookEventDataMap[K]>, 'type'> & {
|
package/dist/web/index.cjs
CHANGED
|
@@ -949,7 +949,7 @@ var CosmosPayRequestError = class _CosmosPayRequestError extends Error {
|
|
|
949
949
|
};
|
|
950
950
|
|
|
951
951
|
// src/util/Constants.ts
|
|
952
|
-
var version = "2.3.
|
|
952
|
+
var version = "2.3.1";
|
|
953
953
|
var DEFAULT_BASE_URL = "https://api.cosmospay.lat/cosmos-api";
|
|
954
954
|
|
|
955
955
|
// src/web/rest.ts
|