@atomiqlabs/base 13.4.0 → 13.4.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.
|
@@ -119,6 +119,12 @@ export interface ChainInterface<TX = any, SignedTX = any, Signer extends Abstrac
|
|
|
119
119
|
* @param txData Serialized transaction data string
|
|
120
120
|
*/
|
|
121
121
|
deserializeSignedTx(txData: string): Promise<SignedTX>;
|
|
122
|
+
/**
|
|
123
|
+
* Returns the transaction ID of the signed transaction
|
|
124
|
+
*
|
|
125
|
+
* @param signedTX Signed transaction to get the transaction ID of
|
|
126
|
+
*/
|
|
127
|
+
getTxId?(signedTX: SignedTX): Promise<string>;
|
|
122
128
|
/**
|
|
123
129
|
* Returns the status of the given serialized transaction
|
|
124
130
|
*
|
|
@@ -32,6 +32,7 @@ export declare enum SwapCommitStateType {
|
|
|
32
32
|
*/
|
|
33
33
|
export type SwapNotCommitedState = {
|
|
34
34
|
type: SwapCommitStateType.NOT_COMMITED;
|
|
35
|
+
getInitTxId?: () => Promise<string>;
|
|
35
36
|
getRefundTxId?: () => Promise<string>;
|
|
36
37
|
getTxBlock?: () => Promise<{
|
|
37
38
|
blockHeight: number;
|
|
@@ -45,6 +46,7 @@ export type SwapNotCommitedState = {
|
|
|
45
46
|
*/
|
|
46
47
|
export type SwapExpiredState = {
|
|
47
48
|
type: SwapCommitStateType.EXPIRED;
|
|
49
|
+
getInitTxId?: () => Promise<string>;
|
|
48
50
|
getRefundTxId?: () => Promise<string>;
|
|
49
51
|
getTxBlock?: () => Promise<{
|
|
50
52
|
blockHeight: number;
|
|
@@ -58,6 +60,7 @@ export type SwapExpiredState = {
|
|
|
58
60
|
*/
|
|
59
61
|
export type SwapRefundableState = {
|
|
60
62
|
type: SwapCommitStateType.REFUNDABLE;
|
|
63
|
+
getInitTxId?: () => Promise<string>;
|
|
61
64
|
};
|
|
62
65
|
/**
|
|
63
66
|
* The escrow is active on-chain and can be claimed
|
|
@@ -66,6 +69,7 @@ export type SwapRefundableState = {
|
|
|
66
69
|
*/
|
|
67
70
|
export type SwapCommitedState = {
|
|
68
71
|
type: SwapCommitStateType.COMMITED;
|
|
72
|
+
getInitTxId?: () => Promise<string>;
|
|
69
73
|
};
|
|
70
74
|
/**
|
|
71
75
|
* The escrow has been finalized and funds claimed by the claimer
|
|
@@ -74,6 +78,7 @@ export type SwapCommitedState = {
|
|
|
74
78
|
*/
|
|
75
79
|
export type SwapPaidState = {
|
|
76
80
|
type: SwapCommitStateType.PAID;
|
|
81
|
+
getInitTxId?: () => Promise<string>;
|
|
77
82
|
getClaimTxId: () => Promise<string>;
|
|
78
83
|
getClaimResult: () => Promise<string>;
|
|
79
84
|
getTxBlock: () => Promise<{
|
package/package.json
CHANGED
|
@@ -144,6 +144,13 @@ export interface ChainInterface<
|
|
|
144
144
|
*/
|
|
145
145
|
deserializeSignedTx(txData: string): Promise<SignedTX>;
|
|
146
146
|
|
|
147
|
+
/**
|
|
148
|
+
* Returns the transaction ID of the signed transaction
|
|
149
|
+
*
|
|
150
|
+
* @param signedTX Signed transaction to get the transaction ID of
|
|
151
|
+
*/
|
|
152
|
+
getTxId?(signedTX: SignedTX): Promise<string>;
|
|
153
|
+
|
|
147
154
|
/**
|
|
148
155
|
* Returns the status of the given serialized transaction
|
|
149
156
|
*
|
|
@@ -33,6 +33,7 @@ export enum SwapCommitStateType {
|
|
|
33
33
|
*/
|
|
34
34
|
export type SwapNotCommitedState = {
|
|
35
35
|
type: SwapCommitStateType.NOT_COMMITED,
|
|
36
|
+
getInitTxId?: () => Promise<string>,
|
|
36
37
|
getRefundTxId?: () => Promise<string>,
|
|
37
38
|
getTxBlock?: () => Promise<{blockHeight: number, blockTime: number}>
|
|
38
39
|
};
|
|
@@ -44,6 +45,7 @@ export type SwapNotCommitedState = {
|
|
|
44
45
|
*/
|
|
45
46
|
export type SwapExpiredState = {
|
|
46
47
|
type: SwapCommitStateType.EXPIRED,
|
|
48
|
+
getInitTxId?: () => Promise<string>,
|
|
47
49
|
getRefundTxId?: () => Promise<string>,
|
|
48
50
|
getTxBlock?: () => Promise<{blockHeight: number, blockTime: number}>
|
|
49
51
|
};
|
|
@@ -54,7 +56,8 @@ export type SwapExpiredState = {
|
|
|
54
56
|
* @category Swaps
|
|
55
57
|
*/
|
|
56
58
|
export type SwapRefundableState = {
|
|
57
|
-
type: SwapCommitStateType.REFUNDABLE
|
|
59
|
+
type: SwapCommitStateType.REFUNDABLE,
|
|
60
|
+
getInitTxId?: () => Promise<string>
|
|
58
61
|
};
|
|
59
62
|
|
|
60
63
|
/**
|
|
@@ -63,7 +66,8 @@ export type SwapRefundableState = {
|
|
|
63
66
|
* @category Swaps
|
|
64
67
|
*/
|
|
65
68
|
export type SwapCommitedState = {
|
|
66
|
-
type: SwapCommitStateType.COMMITED
|
|
69
|
+
type: SwapCommitStateType.COMMITED,
|
|
70
|
+
getInitTxId?: () => Promise<string>
|
|
67
71
|
};
|
|
68
72
|
|
|
69
73
|
/**
|
|
@@ -73,6 +77,7 @@ export type SwapCommitedState = {
|
|
|
73
77
|
*/
|
|
74
78
|
export type SwapPaidState = {
|
|
75
79
|
type: SwapCommitStateType.PAID,
|
|
80
|
+
getInitTxId?: () => Promise<string>,
|
|
76
81
|
getClaimTxId: () => Promise<string>,
|
|
77
82
|
getClaimResult: () => Promise<string>,
|
|
78
83
|
getTxBlock: () => Promise<{blockHeight: number, blockTime: number}>
|