@coin-voyage/shared 2.2.0-beta.0 → 2.2.0-beta.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.
|
@@ -1,47 +1,46 @@
|
|
|
1
1
|
import { Hex } from "../../types/crypto";
|
|
2
2
|
import { ChainId } from "../chains";
|
|
3
|
+
import { PaymentData } from "./types";
|
|
4
|
+
import { PayOrderMetadata } from "./validation";
|
|
3
5
|
export type PayOrderCreationErrorEvent = {
|
|
4
6
|
type: "payorder_creation_error";
|
|
5
7
|
errorMessage: string;
|
|
6
8
|
};
|
|
7
|
-
|
|
8
|
-
type: "payorder_created";
|
|
9
|
+
type EventBase = {
|
|
9
10
|
payorder_id: string;
|
|
11
|
+
metadata?: PayOrderMetadata;
|
|
12
|
+
};
|
|
13
|
+
export type PayOrderCreatedEvent = EventBase & {
|
|
14
|
+
type: "payorder_created";
|
|
10
15
|
};
|
|
11
|
-
export type PayOrderStartedEvent = {
|
|
16
|
+
export type PayOrderStartedEvent = EventBase & {
|
|
12
17
|
type: "payorder_started";
|
|
13
|
-
|
|
14
|
-
chain_id: ChainId;
|
|
15
|
-
chain: string;
|
|
18
|
+
payment_data: PaymentData;
|
|
16
19
|
};
|
|
17
|
-
export type PayOrderConfirmingEvent = {
|
|
20
|
+
export type PayOrderConfirmingEvent = EventBase & {
|
|
18
21
|
type: "payorder_confirming";
|
|
19
|
-
payorder_id: string;
|
|
20
22
|
chain_id: ChainId;
|
|
21
23
|
chain: string;
|
|
22
|
-
|
|
24
|
+
source_tx_hash: Hex | string;
|
|
23
25
|
};
|
|
24
|
-
export type PayOrderExecutingEvent = {
|
|
26
|
+
export type PayOrderExecutingEvent = EventBase & {
|
|
25
27
|
type: "payorder_executing";
|
|
26
|
-
payorder_id: string;
|
|
27
28
|
};
|
|
28
|
-
export type PayOrderCompletedEvent = {
|
|
29
|
+
export type PayOrderCompletedEvent = EventBase & {
|
|
29
30
|
type: "payorder_completed";
|
|
30
|
-
payorder_id: string;
|
|
31
31
|
chain_id: ChainId;
|
|
32
32
|
chain: string;
|
|
33
33
|
destination_tx_hash: Hex | string;
|
|
34
34
|
};
|
|
35
|
-
export type PayOrderErrorEvent = {
|
|
35
|
+
export type PayOrderErrorEvent = EventBase & {
|
|
36
36
|
type: "payorder_error";
|
|
37
|
-
payorder_id: string;
|
|
38
37
|
message: string;
|
|
39
38
|
status: string;
|
|
40
39
|
};
|
|
41
|
-
export type PayOrderRefundedEvent = {
|
|
40
|
+
export type PayOrderRefundedEvent = EventBase & {
|
|
42
41
|
type: "payorder_refunded";
|
|
43
|
-
payorder_id: string;
|
|
44
42
|
refund_tx_hash: Hex | string;
|
|
45
43
|
refund_address: string;
|
|
46
44
|
};
|
|
47
45
|
export type PayOrderEvent = PayOrderCreationErrorEvent | PayOrderCreatedEvent | PayOrderStartedEvent | PayOrderConfirmingEvent | PayOrderExecutingEvent | PayOrderCompletedEvent | PayOrderErrorEvent | PayOrderRefundedEvent;
|
|
46
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coin-voyage/shared",
|
|
3
3
|
"description": "Shared utilities for Coin Voyage",
|
|
4
|
-
"version": "2.2.0-beta.
|
|
4
|
+
"version": "2.2.0-beta.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"release:build": "pnpm clean && pnpm build",
|
|
32
32
|
"pre:release": "pnpm version prerelease --preid=beta",
|
|
33
33
|
"pre:publish": "pnpm publish --access public --tag beta --no-git-checks",
|
|
34
|
+
"release": "pnpm publish --access public --no-git-checks",
|
|
34
35
|
"type-check": "tsc --noEmit",
|
|
35
36
|
"test": "vitest run"
|
|
36
37
|
}
|