@luxfi/core 10.0.6 → 10.0.7
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/dist/cjs/asset.d.ts +24 -0
- package/dist/cjs/asset.d.ts.map +1 -0
- package/dist/cjs/asset.js +2 -0
- package/dist/cjs/contract.d.ts +9 -0
- package/dist/cjs/contract.d.ts.map +1 -0
- package/dist/cjs/contract.js +2 -0
- package/dist/cjs/deposit-address.d.ts +6 -0
- package/dist/cjs/deposit-address.d.ts.map +1 -0
- package/dist/cjs/deposit-address.js +2 -0
- package/dist/cjs/exchange.d.ts +20 -0
- package/dist/cjs/exchange.d.ts.map +1 -0
- package/dist/cjs/exchange.js +2 -0
- package/dist/cjs/index.d.ts +10 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +10 -0
- package/dist/cjs/network-type.d.ts +3 -0
- package/dist/cjs/network-type.d.ts.map +1 -0
- package/dist/cjs/network-type.js +2 -0
- package/dist/cjs/network.d.ts +50 -0
- package/dist/cjs/network.d.ts.map +1 -0
- package/dist/cjs/network.js +2 -0
- package/dist/cjs/swap-status.d.ts +37 -0
- package/dist/cjs/swap-status.d.ts.map +1 -0
- package/dist/cjs/swap-status.js +61 -0
- package/dist/cjs/transaction-type.d.ts +6 -0
- package/dist/cjs/transaction-type.d.ts.map +1 -0
- package/dist/cjs/transaction-type.js +9 -0
- package/dist/cjs/utila.d.ts +35 -0
- package/dist/cjs/utila.d.ts.map +1 -0
- package/dist/cjs/utila.js +2 -0
- package/dist/esm/asset.d.ts +24 -0
- package/dist/esm/asset.d.ts.map +1 -0
- package/dist/esm/asset.js +1 -0
- package/dist/esm/contract.d.ts +9 -0
- package/dist/esm/contract.d.ts.map +1 -0
- package/dist/esm/contract.js +1 -0
- package/dist/esm/deposit-address.d.ts +6 -0
- package/dist/esm/deposit-address.d.ts.map +1 -0
- package/dist/esm/deposit-address.js +1 -0
- package/dist/esm/exchange.d.ts +20 -0
- package/dist/esm/exchange.d.ts.map +1 -0
- package/dist/esm/exchange.js +1 -0
- package/dist/esm/index.d.ts +10 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/network-type.d.ts +3 -0
- package/dist/esm/network-type.d.ts.map +1 -0
- package/dist/esm/network-type.js +1 -0
- package/dist/esm/network.d.ts +50 -0
- package/dist/esm/network.d.ts.map +1 -0
- package/dist/esm/network.js +1 -0
- package/dist/esm/swap-status.d.ts +37 -0
- package/dist/esm/swap-status.d.ts.map +1 -0
- package/dist/esm/swap-status.js +58 -0
- package/dist/esm/transaction-type.d.ts +6 -0
- package/dist/esm/transaction-type.d.ts.map +1 -0
- package/dist/esm/transaction-type.js +6 -0
- package/dist/esm/utila.d.ts +35 -0
- package/dist/esm/utila.d.ts.map +1 -0
- package/dist/esm/utila.js +1 -0
- package/package.json +7 -3
- package/tsconfig.cjs.json +0 -7
- package/tsconfig.json +0 -19
- package/types/asset.ts +0 -26
- package/types/contract.ts +0 -13
- package/types/deposit-address.ts +0 -9
- package/types/exchange.ts +0 -25
- package/types/index.ts +0 -21
- package/types/network-type.ts +0 -18
- package/types/network.ts +0 -58
- package/types/swap-status.ts +0 -58
- package/types/transaction-type.ts +0 -5
- package/types/utila.ts +0 -36
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface Asset {
|
|
2
|
+
name: string;
|
|
3
|
+
asset: string;
|
|
4
|
+
logo: string;
|
|
5
|
+
contract_address: string | null;
|
|
6
|
+
decimals: number;
|
|
7
|
+
status: string;
|
|
8
|
+
is_deposit_enabled: boolean;
|
|
9
|
+
is_withdrawal_enabled: boolean;
|
|
10
|
+
is_refuel_enabled: boolean;
|
|
11
|
+
max_withdrawal_amount: number;
|
|
12
|
+
deposit_fee: number;
|
|
13
|
+
withdrawal_fee: number;
|
|
14
|
+
source_base_fee: number;
|
|
15
|
+
destination_base_fee: number;
|
|
16
|
+
id?: number;
|
|
17
|
+
price_in_usd?: number | null;
|
|
18
|
+
precision?: number | null;
|
|
19
|
+
listing_date?: Date;
|
|
20
|
+
network_id?: number;
|
|
21
|
+
mint?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export { type Asset as default };
|
|
24
|
+
//# sourceMappingURL=asset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../types/asset.ts"],"names":[],"mappings":"AAAA,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,kBAAkB,EAAE,OAAO,CAAA;IAC3B,qBAAqB,EAAE,OAAO,CAAA;IAC9B,iBAAiB,EAAE,OAAO,CAAA;IAC1B,qBAAqB,EAAE,MAAM,CAAA;IAC7B,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,MAAM,CAAA;IACvB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,OAAO,EACL,KAAK,KAAK,IAAI,OAAO,EACtB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../types/contract.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,KAAK,MAAM,EAAE,GAAG,EAAE,CAAA;IAC9B,KAAK,EAAE,KAAK,MAAM,EAAE,GAAG,EAAE,CAAA;CAC1B;AAED,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAC,QAAQ,CAAE,CAAA;AAEzC,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,SAAS,EACf,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deposit-address.d.ts","sourceRoot":"","sources":["../../types/deposit-address.ts"],"names":[],"mappings":"AAAA,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,OAAO,EACL,KAAK,cAAc,IAAI,OAAO,EAC/B,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type Status = 'active' | 'inactive';
|
|
2
|
+
interface ExchangeAsset {
|
|
3
|
+
asset: string;
|
|
4
|
+
is_default: boolean;
|
|
5
|
+
network: string;
|
|
6
|
+
status: Status;
|
|
7
|
+
}
|
|
8
|
+
interface Exchange {
|
|
9
|
+
display_name: string;
|
|
10
|
+
internal_name: string;
|
|
11
|
+
is_featured: boolean;
|
|
12
|
+
type: "cex" | "fiat";
|
|
13
|
+
status: Status;
|
|
14
|
+
created_date: string;
|
|
15
|
+
currencies: ExchangeAsset[];
|
|
16
|
+
metadata?: {} | null;
|
|
17
|
+
img_url?: string;
|
|
18
|
+
}
|
|
19
|
+
export { type Exchange as default };
|
|
20
|
+
//# sourceMappingURL=exchange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exchange.d.ts","sourceRoot":"","sources":["../../types/exchange.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAA;AAEnC,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,OAAO,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf;AAED,UAAU,QAAQ;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,OAAO,CAAA;IACpB,IAAI,EAAE,KAAK,GAAG,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,aAAa,EAAG,CAAA;IAC5B,QAAQ,CAAC,EAAE,EAAE,GAAG,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,OAAO,EACL,KAAK,QAAQ,IAAI,OAAO,EACzB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { type default as Asset } from './asset';
|
|
2
|
+
export type { Contract, Contracts } from './contract';
|
|
3
|
+
export { type default as DepositAddress } from './deposit-address';
|
|
4
|
+
export { type default as Exchange } from './exchange';
|
|
5
|
+
export { type default as NetworkType } from './network-type';
|
|
6
|
+
export { type default as Network } from './network';
|
|
7
|
+
export { TransactionType } from './transaction-type';
|
|
8
|
+
export { SwapStatus, swapStatusByIndex, UtilaTransactionStatus, utilaTransactionStatusByIndex } from './swap-status';
|
|
9
|
+
export type { UTILA_NETWORK, UTILA_TRANSACTION_CREATED, UTILA_TRANSACTION_STATE_UPDATED } from './utila';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/C,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,KAAK,OAAO,IAAI,cAAc,EAAC,MAAM,mBAAmB,CAAA;AACjE,OAAO,EAAE,KAAK,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,KAAK,OAAO,IAAI,WAAW,EAAC,MAAO,gBAAgB,CAAA;AAC5D,OAAO,EAAE,KAAK,OAAO,IAAI,OAAO,EAAC,MAAO,WAAW,CAAA;AACnD,OAAO,EAAE,eAAe,EAAC,MAAO,oBAAoB,CAAA;AACpD,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,sBAAsB,EACtB,6BAA6B,EAC9B,MAAM,eAAe,CAAA;AAEtB,YAAY,EACV,aAAa,EACb,yBAAyB,EACzB,+BAA+B,EAChC,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.utilaTransactionStatusByIndex = exports.UtilaTransactionStatus = exports.swapStatusByIndex = exports.SwapStatus = exports.TransactionType = void 0;
|
|
4
|
+
var transaction_type_1 = require("./transaction-type");
|
|
5
|
+
Object.defineProperty(exports, "TransactionType", { enumerable: true, get: function () { return transaction_type_1.TransactionType; } });
|
|
6
|
+
var swap_status_1 = require("./swap-status");
|
|
7
|
+
Object.defineProperty(exports, "SwapStatus", { enumerable: true, get: function () { return swap_status_1.SwapStatus; } });
|
|
8
|
+
Object.defineProperty(exports, "swapStatusByIndex", { enumerable: true, get: function () { return swap_status_1.swapStatusByIndex; } });
|
|
9
|
+
Object.defineProperty(exports, "UtilaTransactionStatus", { enumerable: true, get: function () { return swap_status_1.UtilaTransactionStatus; } });
|
|
10
|
+
Object.defineProperty(exports, "utilaTransactionStatusByIndex", { enumerable: true, get: function () { return swap_status_1.utilaTransactionStatusByIndex; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network-type.d.ts","sourceRoot":"","sources":["../../types/network-type.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,GACd,KAAK,GACH,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,cAAc,GACd,KAAK,GACL,KAAK,GACL,KAAK,GACL,SAAS,GACT,WAAW,CAAA;AAGf,OAAO,EACL,KAAK,WAAW,IAAI,OAAO,EAC5B,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type Asset from './asset';
|
|
2
|
+
import type DepositAddress from './deposit-address';
|
|
3
|
+
import type NetworkType from './network-type';
|
|
4
|
+
type NetworkNode = {
|
|
5
|
+
url: string;
|
|
6
|
+
} | string;
|
|
7
|
+
interface NetworkMetadata {
|
|
8
|
+
multicall3?: {
|
|
9
|
+
address: `0x${string}`;
|
|
10
|
+
blockCreated: number;
|
|
11
|
+
};
|
|
12
|
+
ensRegistry?: {
|
|
13
|
+
address: `0x${string}`;
|
|
14
|
+
};
|
|
15
|
+
ensUniversalResolver?: {
|
|
16
|
+
address: `0x${string}`;
|
|
17
|
+
};
|
|
18
|
+
WatchdogContractAddress?: `0x${string}`;
|
|
19
|
+
L1Network?: string;
|
|
20
|
+
}
|
|
21
|
+
interface _ManagedAccount {
|
|
22
|
+
address: `0x${string}`;
|
|
23
|
+
}
|
|
24
|
+
type ManagedAccount = _ManagedAccount | string;
|
|
25
|
+
interface Network {
|
|
26
|
+
display_name: string;
|
|
27
|
+
internal_name: string;
|
|
28
|
+
transaction_explorer_template: string;
|
|
29
|
+
account_explorer_template: string;
|
|
30
|
+
currencies: Asset[];
|
|
31
|
+
refuel_amount_in_usd?: number;
|
|
32
|
+
chain_id: string | null;
|
|
33
|
+
type: NetworkType;
|
|
34
|
+
created_date?: string;
|
|
35
|
+
is_featured: boolean;
|
|
36
|
+
nodes: NetworkNode[];
|
|
37
|
+
managed_accounts: ManagedAccount[];
|
|
38
|
+
metadata: NetworkMetadata | null | undefined;
|
|
39
|
+
img_url?: string;
|
|
40
|
+
id?: number;
|
|
41
|
+
native_currency: string | null;
|
|
42
|
+
is_testnet: boolean | null;
|
|
43
|
+
logo: string | null;
|
|
44
|
+
average_completion_time: string | null;
|
|
45
|
+
listing_date?: Date | null;
|
|
46
|
+
status: string;
|
|
47
|
+
deposit_address?: DepositAddress;
|
|
48
|
+
}
|
|
49
|
+
export { type Network as default };
|
|
50
|
+
//# sourceMappingURL=network.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../types/network.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAA;AAE7C,KAAK,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAA;AAE3C,UAAU,eAAe;IACvB,UAAU,CAAC,EAAE;QACT,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;QACtB,YAAY,EAAE,MAAM,CAAA;KACvB,CAAA;IACD,WAAW,CAAC,EAAE;QACV,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;KACzB,CAAA;IACD,oBAAoB,CAAC,EAAE;QACnB,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;KACzB,CAAA;IACD,uBAAuB,CAAC,EAAE,KAAK,MAAM,EAAE,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;CACvB;AAED,KAAK,cAAc,GAAG,eAAe,GAAG,MAAM,CAAA;AAE9C,UAAU,OAAO;IAEf,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,6BAA6B,EAAE,MAAM,CAAA;IACrC,yBAAyB,EAAE,MAAM,CAAA;IACjC,UAAU,EAAE,KAAK,EAAE,CAAA;IACnB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,IAAI,EAAE,WAAW,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,OAAO,CAAA;IACpB,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,gBAAgB,EAAE,cAAc,EAAE,CAAA;IAClC,QAAQ,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,CAAA;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,UAAU,EAAE,OAAO,GAAG,IAAI,CAAA;IAC1B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAA;IACtC,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAE1B,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,CAAC,EAAE,cAAc,CAAA;CACjC;AAED,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACxB,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare enum SwapStatus {
|
|
2
|
+
Created = "created",
|
|
3
|
+
UserTransferPending = "user_transfer_pending",
|
|
4
|
+
UserTransferDelayed = "user_transfer_delayed",
|
|
5
|
+
UserDepositPending = "user_deposit_pending",
|
|
6
|
+
BridgeTransferPending = "bridge_transfer_pending",
|
|
7
|
+
Completed = "completed",
|
|
8
|
+
Failed = "failed",
|
|
9
|
+
Expired = "expired",
|
|
10
|
+
Cancelled = "cancelled",
|
|
11
|
+
TeleportProcessPending = "teleport_processing_pending",
|
|
12
|
+
UserPayoutPending = "user_payout_pending",
|
|
13
|
+
PayoutSuccess = "payout_success"
|
|
14
|
+
}
|
|
15
|
+
export declare const swapStatusByIndex: {
|
|
16
|
+
[key: number]: SwapStatus;
|
|
17
|
+
};
|
|
18
|
+
export declare enum UtilaTransactionStatus {
|
|
19
|
+
AWAITING_APPROVAL = "AWAITING_APPROVAL",
|
|
20
|
+
AWAITING_POLICY_CHECK = "AWAITING_POLICY_CHECK",
|
|
21
|
+
AWAITING_SIGNATURE = "AWAITING_SIGNATURE",
|
|
22
|
+
SIGNED = "SIGNED",
|
|
23
|
+
AWAITING_PUBLISH = "AWAITING_PUBLISH",
|
|
24
|
+
PUBLISHED = "PUBLISHED",
|
|
25
|
+
MINED = "MINED",
|
|
26
|
+
FAILED = "FAILED",
|
|
27
|
+
DECLINED = "DECLINED",
|
|
28
|
+
REPLACED = "REPLACED",
|
|
29
|
+
CANCELED = "CANCELED",
|
|
30
|
+
DROPPED = "DROPPED",
|
|
31
|
+
CONFIRMED = "CONFIRMED",
|
|
32
|
+
EXPIRED = "EXPIRED"
|
|
33
|
+
}
|
|
34
|
+
export declare const utilaTransactionStatusByIndex: {
|
|
35
|
+
[key: number]: UtilaTransactionStatus;
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=swap-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swap-status.d.ts","sourceRoot":"","sources":["../../types/swap-status.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,mBAAmB,0BAA0B;IAC7C,mBAAmB,0BAA0B;IAC7C,kBAAkB,yBAAyB;IAC3C,qBAAqB,4BAA4B;IACjD,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,sBAAsB,gCAAgC;IACtD,iBAAiB,wBAAwB;IACzC,aAAa,mBAAmB;CACjC;AACD,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAS1D,CAAC;AAEF,oBAAY,sBAAsB;IAChC,iBAAiB,sBAAsB;IACvC,qBAAqB,0BAA0B;IAC/C,kBAAkB,uBAAuB;IACzC,MAAM,WAAW;IACjB,gBAAgB,qBAAqB;IACrC,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,6BAA6B,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,sBAAsB,CAAA;CAelF,CAAA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.utilaTransactionStatusByIndex = exports.UtilaTransactionStatus = exports.swapStatusByIndex = exports.SwapStatus = void 0;
|
|
4
|
+
var SwapStatus;
|
|
5
|
+
(function (SwapStatus) {
|
|
6
|
+
SwapStatus["Created"] = "created";
|
|
7
|
+
SwapStatus["UserTransferPending"] = "user_transfer_pending";
|
|
8
|
+
SwapStatus["UserTransferDelayed"] = "user_transfer_delayed";
|
|
9
|
+
SwapStatus["UserDepositPending"] = "user_deposit_pending";
|
|
10
|
+
SwapStatus["BridgeTransferPending"] = "bridge_transfer_pending";
|
|
11
|
+
SwapStatus["Completed"] = "completed";
|
|
12
|
+
SwapStatus["Failed"] = "failed";
|
|
13
|
+
SwapStatus["Expired"] = "expired";
|
|
14
|
+
SwapStatus["Cancelled"] = "cancelled";
|
|
15
|
+
SwapStatus["TeleportProcessPending"] = "teleport_processing_pending";
|
|
16
|
+
SwapStatus["UserPayoutPending"] = "user_payout_pending";
|
|
17
|
+
SwapStatus["PayoutSuccess"] = "payout_success";
|
|
18
|
+
})(SwapStatus || (exports.SwapStatus = SwapStatus = {}));
|
|
19
|
+
exports.swapStatusByIndex = {
|
|
20
|
+
"0": SwapStatus.Created,
|
|
21
|
+
"1": SwapStatus.UserTransferPending,
|
|
22
|
+
"2": SwapStatus.UserTransferDelayed,
|
|
23
|
+
"3": SwapStatus.BridgeTransferPending,
|
|
24
|
+
"4": SwapStatus.Completed,
|
|
25
|
+
"5": SwapStatus.Failed,
|
|
26
|
+
"6": SwapStatus.Expired,
|
|
27
|
+
"7": SwapStatus.Cancelled,
|
|
28
|
+
};
|
|
29
|
+
var UtilaTransactionStatus;
|
|
30
|
+
(function (UtilaTransactionStatus) {
|
|
31
|
+
UtilaTransactionStatus["AWAITING_APPROVAL"] = "AWAITING_APPROVAL";
|
|
32
|
+
UtilaTransactionStatus["AWAITING_POLICY_CHECK"] = "AWAITING_POLICY_CHECK";
|
|
33
|
+
UtilaTransactionStatus["AWAITING_SIGNATURE"] = "AWAITING_SIGNATURE";
|
|
34
|
+
UtilaTransactionStatus["SIGNED"] = "SIGNED";
|
|
35
|
+
UtilaTransactionStatus["AWAITING_PUBLISH"] = "AWAITING_PUBLISH";
|
|
36
|
+
UtilaTransactionStatus["PUBLISHED"] = "PUBLISHED";
|
|
37
|
+
UtilaTransactionStatus["MINED"] = "MINED";
|
|
38
|
+
UtilaTransactionStatus["FAILED"] = "FAILED";
|
|
39
|
+
UtilaTransactionStatus["DECLINED"] = "DECLINED";
|
|
40
|
+
UtilaTransactionStatus["REPLACED"] = "REPLACED";
|
|
41
|
+
UtilaTransactionStatus["CANCELED"] = "CANCELED";
|
|
42
|
+
UtilaTransactionStatus["DROPPED"] = "DROPPED";
|
|
43
|
+
UtilaTransactionStatus["CONFIRMED"] = "CONFIRMED";
|
|
44
|
+
UtilaTransactionStatus["EXPIRED"] = "EXPIRED";
|
|
45
|
+
})(UtilaTransactionStatus || (exports.UtilaTransactionStatus = UtilaTransactionStatus = {}));
|
|
46
|
+
exports.utilaTransactionStatusByIndex = {
|
|
47
|
+
"1": UtilaTransactionStatus.AWAITING_APPROVAL,
|
|
48
|
+
"2": UtilaTransactionStatus.AWAITING_POLICY_CHECK,
|
|
49
|
+
"3": UtilaTransactionStatus.AWAITING_SIGNATURE,
|
|
50
|
+
"4": UtilaTransactionStatus.SIGNED,
|
|
51
|
+
"5": UtilaTransactionStatus.AWAITING_PUBLISH,
|
|
52
|
+
"6": UtilaTransactionStatus.PUBLISHED,
|
|
53
|
+
"7": UtilaTransactionStatus.MINED,
|
|
54
|
+
"8": UtilaTransactionStatus.FAILED,
|
|
55
|
+
"9": UtilaTransactionStatus.DECLINED,
|
|
56
|
+
"10": UtilaTransactionStatus.REPLACED,
|
|
57
|
+
"11": UtilaTransactionStatus.CANCELED,
|
|
58
|
+
"12": UtilaTransactionStatus.DROPPED,
|
|
59
|
+
"13": UtilaTransactionStatus.CONFIRMED,
|
|
60
|
+
"14": UtilaTransactionStatus.EXPIRED
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-type.d.ts","sourceRoot":"","sources":["../../types/transaction-type.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionType = void 0;
|
|
4
|
+
var TransactionType;
|
|
5
|
+
(function (TransactionType) {
|
|
6
|
+
TransactionType["Input"] = "input";
|
|
7
|
+
TransactionType["Output"] = "output";
|
|
8
|
+
TransactionType["Refuel"] = "refuel";
|
|
9
|
+
})(TransactionType || (exports.TransactionType = TransactionType = {}));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type UTILA_NETWORK = {
|
|
2
|
+
$typeName: string;
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
testnet: boolean;
|
|
6
|
+
nativeAsset: string;
|
|
7
|
+
custom: boolean;
|
|
8
|
+
caipDetails: {
|
|
9
|
+
$typeName: string;
|
|
10
|
+
chainId: string;
|
|
11
|
+
namespace: string;
|
|
12
|
+
reference: string;
|
|
13
|
+
};
|
|
14
|
+
assets: Record<string, string>;
|
|
15
|
+
};
|
|
16
|
+
export type UTILA_TRANSACTION_CREATED = {
|
|
17
|
+
id: string;
|
|
18
|
+
vault: string;
|
|
19
|
+
type: string;
|
|
20
|
+
resourceType: string;
|
|
21
|
+
resource: string;
|
|
22
|
+
};
|
|
23
|
+
export type UTILA_TRANSACTION_STATE_UPDATED = {
|
|
24
|
+
id: string;
|
|
25
|
+
vault: string;
|
|
26
|
+
type: string;
|
|
27
|
+
details: {
|
|
28
|
+
transactionStateUpdated: {
|
|
29
|
+
newState: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
resourceType: string;
|
|
33
|
+
resource: string;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=utila.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utila.d.ts","sourceRoot":"","sources":["../../types/utila.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE;QACX,SAAS,EAAE,MAAM,CAAA;QACjB,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;QACjB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QACP,uBAAuB,EAAE;YACvB,QAAQ,EAAE,MAAM,CAAA;SACjB,CAAA;KACF,CAAC;IACF,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface Asset {
|
|
2
|
+
name: string;
|
|
3
|
+
asset: string;
|
|
4
|
+
logo: string;
|
|
5
|
+
contract_address: string | null;
|
|
6
|
+
decimals: number;
|
|
7
|
+
status: string;
|
|
8
|
+
is_deposit_enabled: boolean;
|
|
9
|
+
is_withdrawal_enabled: boolean;
|
|
10
|
+
is_refuel_enabled: boolean;
|
|
11
|
+
max_withdrawal_amount: number;
|
|
12
|
+
deposit_fee: number;
|
|
13
|
+
withdrawal_fee: number;
|
|
14
|
+
source_base_fee: number;
|
|
15
|
+
destination_base_fee: number;
|
|
16
|
+
id?: number;
|
|
17
|
+
price_in_usd?: number | null;
|
|
18
|
+
precision?: number | null;
|
|
19
|
+
listing_date?: Date;
|
|
20
|
+
network_id?: number;
|
|
21
|
+
mint?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export { type Asset as default };
|
|
24
|
+
//# sourceMappingURL=asset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../types/asset.ts"],"names":[],"mappings":"AAAA,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,kBAAkB,EAAE,OAAO,CAAA;IAC3B,qBAAqB,EAAE,OAAO,CAAA;IAC9B,iBAAiB,EAAE,OAAO,CAAA;IAC1B,qBAAqB,EAAE,MAAM,CAAA;IAC7B,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,MAAM,CAAA;IACvB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,OAAO,EACL,KAAK,KAAK,IAAI,OAAO,EACtB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../types/contract.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,KAAK,MAAM,EAAE,GAAG,EAAE,CAAA;IAC9B,KAAK,EAAE,KAAK,MAAM,EAAE,GAAG,EAAE,CAAA;CAC1B;AAED,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAC,QAAQ,CAAE,CAAA;AAEzC,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,SAAS,EACf,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deposit-address.d.ts","sourceRoot":"","sources":["../../types/deposit-address.ts"],"names":[],"mappings":"AAAA,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,OAAO,EACL,KAAK,cAAc,IAAI,OAAO,EAC/B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type Status = 'active' | 'inactive';
|
|
2
|
+
interface ExchangeAsset {
|
|
3
|
+
asset: string;
|
|
4
|
+
is_default: boolean;
|
|
5
|
+
network: string;
|
|
6
|
+
status: Status;
|
|
7
|
+
}
|
|
8
|
+
interface Exchange {
|
|
9
|
+
display_name: string;
|
|
10
|
+
internal_name: string;
|
|
11
|
+
is_featured: boolean;
|
|
12
|
+
type: "cex" | "fiat";
|
|
13
|
+
status: Status;
|
|
14
|
+
created_date: string;
|
|
15
|
+
currencies: ExchangeAsset[];
|
|
16
|
+
metadata?: {} | null;
|
|
17
|
+
img_url?: string;
|
|
18
|
+
}
|
|
19
|
+
export { type Exchange as default };
|
|
20
|
+
//# sourceMappingURL=exchange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exchange.d.ts","sourceRoot":"","sources":["../../types/exchange.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAA;AAEnC,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,OAAO,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf;AAED,UAAU,QAAQ;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,OAAO,CAAA;IACpB,IAAI,EAAE,KAAK,GAAG,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,aAAa,EAAG,CAAA;IAC5B,QAAQ,CAAC,EAAE,EAAE,GAAG,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,OAAO,EACL,KAAK,QAAQ,IAAI,OAAO,EACzB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { type default as Asset } from './asset';
|
|
2
|
+
export type { Contract, Contracts } from './contract';
|
|
3
|
+
export { type default as DepositAddress } from './deposit-address';
|
|
4
|
+
export { type default as Exchange } from './exchange';
|
|
5
|
+
export { type default as NetworkType } from './network-type';
|
|
6
|
+
export { type default as Network } from './network';
|
|
7
|
+
export { TransactionType } from './transaction-type';
|
|
8
|
+
export { SwapStatus, swapStatusByIndex, UtilaTransactionStatus, utilaTransactionStatusByIndex } from './swap-status';
|
|
9
|
+
export type { UTILA_NETWORK, UTILA_TRANSACTION_CREATED, UTILA_TRANSACTION_STATE_UPDATED } from './utila';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/C,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,KAAK,OAAO,IAAI,cAAc,EAAC,MAAM,mBAAmB,CAAA;AACjE,OAAO,EAAE,KAAK,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,KAAK,OAAO,IAAI,WAAW,EAAC,MAAO,gBAAgB,CAAA;AAC5D,OAAO,EAAE,KAAK,OAAO,IAAI,OAAO,EAAC,MAAO,WAAW,CAAA;AACnD,OAAO,EAAE,eAAe,EAAC,MAAO,oBAAoB,CAAA;AACpD,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,sBAAsB,EACtB,6BAA6B,EAC9B,MAAM,eAAe,CAAA;AAEtB,YAAY,EACV,aAAa,EACb,yBAAyB,EACzB,+BAA+B,EAChC,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network-type.d.ts","sourceRoot":"","sources":["../../types/network-type.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,GACd,KAAK,GACH,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,cAAc,GACd,KAAK,GACL,KAAK,GACL,KAAK,GACL,SAAS,GACT,WAAW,CAAA;AAGf,OAAO,EACL,KAAK,WAAW,IAAI,OAAO,EAC5B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type Asset from './asset';
|
|
2
|
+
import type DepositAddress from './deposit-address';
|
|
3
|
+
import type NetworkType from './network-type';
|
|
4
|
+
type NetworkNode = {
|
|
5
|
+
url: string;
|
|
6
|
+
} | string;
|
|
7
|
+
interface NetworkMetadata {
|
|
8
|
+
multicall3?: {
|
|
9
|
+
address: `0x${string}`;
|
|
10
|
+
blockCreated: number;
|
|
11
|
+
};
|
|
12
|
+
ensRegistry?: {
|
|
13
|
+
address: `0x${string}`;
|
|
14
|
+
};
|
|
15
|
+
ensUniversalResolver?: {
|
|
16
|
+
address: `0x${string}`;
|
|
17
|
+
};
|
|
18
|
+
WatchdogContractAddress?: `0x${string}`;
|
|
19
|
+
L1Network?: string;
|
|
20
|
+
}
|
|
21
|
+
interface _ManagedAccount {
|
|
22
|
+
address: `0x${string}`;
|
|
23
|
+
}
|
|
24
|
+
type ManagedAccount = _ManagedAccount | string;
|
|
25
|
+
interface Network {
|
|
26
|
+
display_name: string;
|
|
27
|
+
internal_name: string;
|
|
28
|
+
transaction_explorer_template: string;
|
|
29
|
+
account_explorer_template: string;
|
|
30
|
+
currencies: Asset[];
|
|
31
|
+
refuel_amount_in_usd?: number;
|
|
32
|
+
chain_id: string | null;
|
|
33
|
+
type: NetworkType;
|
|
34
|
+
created_date?: string;
|
|
35
|
+
is_featured: boolean;
|
|
36
|
+
nodes: NetworkNode[];
|
|
37
|
+
managed_accounts: ManagedAccount[];
|
|
38
|
+
metadata: NetworkMetadata | null | undefined;
|
|
39
|
+
img_url?: string;
|
|
40
|
+
id?: number;
|
|
41
|
+
native_currency: string | null;
|
|
42
|
+
is_testnet: boolean | null;
|
|
43
|
+
logo: string | null;
|
|
44
|
+
average_completion_time: string | null;
|
|
45
|
+
listing_date?: Date | null;
|
|
46
|
+
status: string;
|
|
47
|
+
deposit_address?: DepositAddress;
|
|
48
|
+
}
|
|
49
|
+
export { type Network as default };
|
|
50
|
+
//# sourceMappingURL=network.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../types/network.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAA;AAE7C,KAAK,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAA;AAE3C,UAAU,eAAe;IACvB,UAAU,CAAC,EAAE;QACT,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;QACtB,YAAY,EAAE,MAAM,CAAA;KACvB,CAAA;IACD,WAAW,CAAC,EAAE;QACV,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;KACzB,CAAA;IACD,oBAAoB,CAAC,EAAE;QACnB,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;KACzB,CAAA;IACD,uBAAuB,CAAC,EAAE,KAAK,MAAM,EAAE,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;CACvB;AAED,KAAK,cAAc,GAAG,eAAe,GAAG,MAAM,CAAA;AAE9C,UAAU,OAAO;IAEf,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,6BAA6B,EAAE,MAAM,CAAA;IACrC,yBAAyB,EAAE,MAAM,CAAA;IACjC,UAAU,EAAE,KAAK,EAAE,CAAA;IACnB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,IAAI,EAAE,WAAW,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,OAAO,CAAA;IACpB,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,gBAAgB,EAAE,cAAc,EAAE,CAAA;IAClC,QAAQ,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,CAAA;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,UAAU,EAAE,OAAO,GAAG,IAAI,CAAA;IAC1B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAA;IACtC,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAE1B,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,CAAC,EAAE,cAAc,CAAA;CACjC;AAED,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACxB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare enum SwapStatus {
|
|
2
|
+
Created = "created",
|
|
3
|
+
UserTransferPending = "user_transfer_pending",
|
|
4
|
+
UserTransferDelayed = "user_transfer_delayed",
|
|
5
|
+
UserDepositPending = "user_deposit_pending",
|
|
6
|
+
BridgeTransferPending = "bridge_transfer_pending",
|
|
7
|
+
Completed = "completed",
|
|
8
|
+
Failed = "failed",
|
|
9
|
+
Expired = "expired",
|
|
10
|
+
Cancelled = "cancelled",
|
|
11
|
+
TeleportProcessPending = "teleport_processing_pending",
|
|
12
|
+
UserPayoutPending = "user_payout_pending",
|
|
13
|
+
PayoutSuccess = "payout_success"
|
|
14
|
+
}
|
|
15
|
+
export declare const swapStatusByIndex: {
|
|
16
|
+
[key: number]: SwapStatus;
|
|
17
|
+
};
|
|
18
|
+
export declare enum UtilaTransactionStatus {
|
|
19
|
+
AWAITING_APPROVAL = "AWAITING_APPROVAL",
|
|
20
|
+
AWAITING_POLICY_CHECK = "AWAITING_POLICY_CHECK",
|
|
21
|
+
AWAITING_SIGNATURE = "AWAITING_SIGNATURE",
|
|
22
|
+
SIGNED = "SIGNED",
|
|
23
|
+
AWAITING_PUBLISH = "AWAITING_PUBLISH",
|
|
24
|
+
PUBLISHED = "PUBLISHED",
|
|
25
|
+
MINED = "MINED",
|
|
26
|
+
FAILED = "FAILED",
|
|
27
|
+
DECLINED = "DECLINED",
|
|
28
|
+
REPLACED = "REPLACED",
|
|
29
|
+
CANCELED = "CANCELED",
|
|
30
|
+
DROPPED = "DROPPED",
|
|
31
|
+
CONFIRMED = "CONFIRMED",
|
|
32
|
+
EXPIRED = "EXPIRED"
|
|
33
|
+
}
|
|
34
|
+
export declare const utilaTransactionStatusByIndex: {
|
|
35
|
+
[key: number]: UtilaTransactionStatus;
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=swap-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swap-status.d.ts","sourceRoot":"","sources":["../../types/swap-status.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,mBAAmB,0BAA0B;IAC7C,mBAAmB,0BAA0B;IAC7C,kBAAkB,yBAAyB;IAC3C,qBAAqB,4BAA4B;IACjD,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,sBAAsB,gCAAgC;IACtD,iBAAiB,wBAAwB;IACzC,aAAa,mBAAmB;CACjC;AACD,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAS1D,CAAC;AAEF,oBAAY,sBAAsB;IAChC,iBAAiB,sBAAsB;IACvC,qBAAqB,0BAA0B;IAC/C,kBAAkB,uBAAuB;IACzC,MAAM,WAAW;IACjB,gBAAgB,qBAAqB;IACrC,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,6BAA6B,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,sBAAsB,CAAA;CAelF,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export var SwapStatus;
|
|
2
|
+
(function (SwapStatus) {
|
|
3
|
+
SwapStatus["Created"] = "created";
|
|
4
|
+
SwapStatus["UserTransferPending"] = "user_transfer_pending";
|
|
5
|
+
SwapStatus["UserTransferDelayed"] = "user_transfer_delayed";
|
|
6
|
+
SwapStatus["UserDepositPending"] = "user_deposit_pending";
|
|
7
|
+
SwapStatus["BridgeTransferPending"] = "bridge_transfer_pending";
|
|
8
|
+
SwapStatus["Completed"] = "completed";
|
|
9
|
+
SwapStatus["Failed"] = "failed";
|
|
10
|
+
SwapStatus["Expired"] = "expired";
|
|
11
|
+
SwapStatus["Cancelled"] = "cancelled";
|
|
12
|
+
SwapStatus["TeleportProcessPending"] = "teleport_processing_pending";
|
|
13
|
+
SwapStatus["UserPayoutPending"] = "user_payout_pending";
|
|
14
|
+
SwapStatus["PayoutSuccess"] = "payout_success";
|
|
15
|
+
})(SwapStatus || (SwapStatus = {}));
|
|
16
|
+
export const swapStatusByIndex = {
|
|
17
|
+
"0": SwapStatus.Created,
|
|
18
|
+
"1": SwapStatus.UserTransferPending,
|
|
19
|
+
"2": SwapStatus.UserTransferDelayed,
|
|
20
|
+
"3": SwapStatus.BridgeTransferPending,
|
|
21
|
+
"4": SwapStatus.Completed,
|
|
22
|
+
"5": SwapStatus.Failed,
|
|
23
|
+
"6": SwapStatus.Expired,
|
|
24
|
+
"7": SwapStatus.Cancelled,
|
|
25
|
+
};
|
|
26
|
+
export var UtilaTransactionStatus;
|
|
27
|
+
(function (UtilaTransactionStatus) {
|
|
28
|
+
UtilaTransactionStatus["AWAITING_APPROVAL"] = "AWAITING_APPROVAL";
|
|
29
|
+
UtilaTransactionStatus["AWAITING_POLICY_CHECK"] = "AWAITING_POLICY_CHECK";
|
|
30
|
+
UtilaTransactionStatus["AWAITING_SIGNATURE"] = "AWAITING_SIGNATURE";
|
|
31
|
+
UtilaTransactionStatus["SIGNED"] = "SIGNED";
|
|
32
|
+
UtilaTransactionStatus["AWAITING_PUBLISH"] = "AWAITING_PUBLISH";
|
|
33
|
+
UtilaTransactionStatus["PUBLISHED"] = "PUBLISHED";
|
|
34
|
+
UtilaTransactionStatus["MINED"] = "MINED";
|
|
35
|
+
UtilaTransactionStatus["FAILED"] = "FAILED";
|
|
36
|
+
UtilaTransactionStatus["DECLINED"] = "DECLINED";
|
|
37
|
+
UtilaTransactionStatus["REPLACED"] = "REPLACED";
|
|
38
|
+
UtilaTransactionStatus["CANCELED"] = "CANCELED";
|
|
39
|
+
UtilaTransactionStatus["DROPPED"] = "DROPPED";
|
|
40
|
+
UtilaTransactionStatus["CONFIRMED"] = "CONFIRMED";
|
|
41
|
+
UtilaTransactionStatus["EXPIRED"] = "EXPIRED";
|
|
42
|
+
})(UtilaTransactionStatus || (UtilaTransactionStatus = {}));
|
|
43
|
+
export const utilaTransactionStatusByIndex = {
|
|
44
|
+
"1": UtilaTransactionStatus.AWAITING_APPROVAL,
|
|
45
|
+
"2": UtilaTransactionStatus.AWAITING_POLICY_CHECK,
|
|
46
|
+
"3": UtilaTransactionStatus.AWAITING_SIGNATURE,
|
|
47
|
+
"4": UtilaTransactionStatus.SIGNED,
|
|
48
|
+
"5": UtilaTransactionStatus.AWAITING_PUBLISH,
|
|
49
|
+
"6": UtilaTransactionStatus.PUBLISHED,
|
|
50
|
+
"7": UtilaTransactionStatus.MINED,
|
|
51
|
+
"8": UtilaTransactionStatus.FAILED,
|
|
52
|
+
"9": UtilaTransactionStatus.DECLINED,
|
|
53
|
+
"10": UtilaTransactionStatus.REPLACED,
|
|
54
|
+
"11": UtilaTransactionStatus.CANCELED,
|
|
55
|
+
"12": UtilaTransactionStatus.DROPPED,
|
|
56
|
+
"13": UtilaTransactionStatus.CONFIRMED,
|
|
57
|
+
"14": UtilaTransactionStatus.EXPIRED
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-type.d.ts","sourceRoot":"","sources":["../../types/transaction-type.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type UTILA_NETWORK = {
|
|
2
|
+
$typeName: string;
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
testnet: boolean;
|
|
6
|
+
nativeAsset: string;
|
|
7
|
+
custom: boolean;
|
|
8
|
+
caipDetails: {
|
|
9
|
+
$typeName: string;
|
|
10
|
+
chainId: string;
|
|
11
|
+
namespace: string;
|
|
12
|
+
reference: string;
|
|
13
|
+
};
|
|
14
|
+
assets: Record<string, string>;
|
|
15
|
+
};
|
|
16
|
+
export type UTILA_TRANSACTION_CREATED = {
|
|
17
|
+
id: string;
|
|
18
|
+
vault: string;
|
|
19
|
+
type: string;
|
|
20
|
+
resourceType: string;
|
|
21
|
+
resource: string;
|
|
22
|
+
};
|
|
23
|
+
export type UTILA_TRANSACTION_STATE_UPDATED = {
|
|
24
|
+
id: string;
|
|
25
|
+
vault: string;
|
|
26
|
+
type: string;
|
|
27
|
+
details: {
|
|
28
|
+
transactionStateUpdated: {
|
|
29
|
+
newState: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
resourceType: string;
|
|
33
|
+
resource: string;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=utila.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utila.d.ts","sourceRoot":"","sources":["../../types/utila.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE;QACX,SAAS,EAAE,MAAM,CAAA;QACjB,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;QACjB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QACP,uBAAuB,EAAE;YACvB,QAAQ,EAAE,MAAM,CAAA;SACjB,CAAA;KACF,CAAC;IACF,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxfi/core",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.7",
|
|
4
4
|
"description": "Core types and shared utilities related to blockchain",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -26,12 +26,16 @@
|
|
|
26
26
|
},
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
29
|
+
"types": "./dist/esm/index.d.ts",
|
|
29
30
|
"import": "./dist/esm/index.js",
|
|
30
31
|
"require": "./dist/cjs/index.js"
|
|
31
32
|
}
|
|
32
33
|
},
|
|
33
|
-
"types": "./dist/index.d.ts",
|
|
34
|
+
"types": "./dist/esm/index.d.ts",
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"typescript": "^6.0.3"
|
|
36
|
-
}
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist"
|
|
40
|
+
]
|
|
37
41
|
}
|
package/tsconfig.cjs.json
DELETED
package/tsconfig.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022", // Use modern JavaScript features
|
|
4
|
-
"module": "ESNext", // Generate ES modules
|
|
5
|
-
"moduleResolution": "bundler", // Resolve Node.js modules
|
|
6
|
-
"ignoreDeprecations": "6.0", // Silence TS7 node10 moduleResolution deprecation (build parity)
|
|
7
|
-
"strict": true, // Enable strict type-checking
|
|
8
|
-
"esModuleInterop": true, // Interop for CommonJS modules
|
|
9
|
-
"allowSyntheticDefaultImports": true, // Support default imports
|
|
10
|
-
"skipLibCheck": true, // Skip type checks for dependencies
|
|
11
|
-
"resolveJsonModule": true, // Allow importing JSON files
|
|
12
|
-
"declaration": true, // Generate .d.ts files for types
|
|
13
|
-
"declarationMap": true, // Include source maps for declarations
|
|
14
|
-
"outDir": "dist/esm", // Output directory for ESM
|
|
15
|
-
"rootDir": "types" // Specify the source directory
|
|
16
|
-
},
|
|
17
|
-
"include": ["types/**/*.ts"], // Include TypeScript files
|
|
18
|
-
"exclude": ["node_modules"]
|
|
19
|
-
}
|
package/types/asset.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
interface Asset {
|
|
2
|
-
name: string
|
|
3
|
-
asset: string
|
|
4
|
-
logo: string
|
|
5
|
-
contract_address: string | null
|
|
6
|
-
decimals: number
|
|
7
|
-
status: string
|
|
8
|
-
is_deposit_enabled: boolean
|
|
9
|
-
is_withdrawal_enabled: boolean
|
|
10
|
-
is_refuel_enabled: boolean
|
|
11
|
-
max_withdrawal_amount: number
|
|
12
|
-
deposit_fee: number
|
|
13
|
-
withdrawal_fee: number
|
|
14
|
-
source_base_fee: number
|
|
15
|
-
destination_base_fee: number
|
|
16
|
-
id?: number,
|
|
17
|
-
price_in_usd?: number | null,
|
|
18
|
-
precision?: number | null,
|
|
19
|
-
listing_date?: Date,
|
|
20
|
-
network_id?: number
|
|
21
|
-
mint?: boolean
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export {
|
|
25
|
-
type Asset as default
|
|
26
|
-
}
|
package/types/contract.ts
DELETED
package/types/deposit-address.ts
DELETED
package/types/exchange.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
type Status = 'active' | 'inactive'
|
|
2
|
-
|
|
3
|
-
interface ExchangeAsset {
|
|
4
|
-
asset: string
|
|
5
|
-
is_default: boolean
|
|
6
|
-
network: string
|
|
7
|
-
status: Status
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface Exchange {
|
|
11
|
-
display_name: string
|
|
12
|
-
internal_name: string
|
|
13
|
-
is_featured: boolean
|
|
14
|
-
type: "cex" | "fiat"
|
|
15
|
-
status: Status
|
|
16
|
-
created_date: string
|
|
17
|
-
currencies: ExchangeAsset []
|
|
18
|
-
metadata?: {} | null
|
|
19
|
-
img_url?: string
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
type Exchange as default
|
|
24
|
-
}
|
|
25
|
-
|
package/types/index.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export { type default as Asset } from './asset'
|
|
3
|
-
export type { Contract, Contracts } from './contract'
|
|
4
|
-
export { type default as DepositAddress} from './deposit-address'
|
|
5
|
-
export { type default as Exchange } from './exchange'
|
|
6
|
-
export { type default as NetworkType} from './network-type'
|
|
7
|
-
export { type default as Network} from './network'
|
|
8
|
-
export { TransactionType} from './transaction-type'
|
|
9
|
-
export {
|
|
10
|
-
SwapStatus,
|
|
11
|
-
swapStatusByIndex,
|
|
12
|
-
UtilaTransactionStatus,
|
|
13
|
-
utilaTransactionStatusByIndex
|
|
14
|
-
} from './swap-status'
|
|
15
|
-
|
|
16
|
-
export type {
|
|
17
|
-
UTILA_NETWORK,
|
|
18
|
-
UTILA_TRANSACTION_CREATED,
|
|
19
|
-
UTILA_TRANSACTION_STATE_UPDATED
|
|
20
|
-
} from './utila'
|
|
21
|
-
|
package/types/network-type.ts
DELETED
package/types/network.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type Asset from './asset'
|
|
2
|
-
import type DepositAddress from './deposit-address'
|
|
3
|
-
import type NetworkType from './network-type'
|
|
4
|
-
|
|
5
|
-
type NetworkNode = { url: string } | string
|
|
6
|
-
|
|
7
|
-
interface NetworkMetadata {
|
|
8
|
-
multicall3?: {
|
|
9
|
-
address: `0x${string}`
|
|
10
|
-
blockCreated: number
|
|
11
|
-
}
|
|
12
|
-
ensRegistry?: {
|
|
13
|
-
address: `0x${string}`
|
|
14
|
-
}
|
|
15
|
-
ensUniversalResolver?: {
|
|
16
|
-
address: `0x${string}`
|
|
17
|
-
}
|
|
18
|
-
WatchdogContractAddress?: `0x${string}`
|
|
19
|
-
L1Network?: string
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
interface _ManagedAccount {
|
|
23
|
-
address: `0x${string}`
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
type ManagedAccount = _ManagedAccount | string
|
|
27
|
-
|
|
28
|
-
interface Network {
|
|
29
|
-
|
|
30
|
-
display_name: string
|
|
31
|
-
internal_name: string
|
|
32
|
-
transaction_explorer_template: string
|
|
33
|
-
account_explorer_template: string
|
|
34
|
-
currencies: Asset[]
|
|
35
|
-
refuel_amount_in_usd?: number
|
|
36
|
-
chain_id: string | null
|
|
37
|
-
type: NetworkType
|
|
38
|
-
created_date?: string
|
|
39
|
-
is_featured: boolean
|
|
40
|
-
nodes: NetworkNode[]
|
|
41
|
-
managed_accounts: ManagedAccount[]
|
|
42
|
-
metadata: NetworkMetadata | null | undefined
|
|
43
|
-
img_url?: string
|
|
44
|
-
|
|
45
|
-
id?: number,
|
|
46
|
-
native_currency: string | null
|
|
47
|
-
is_testnet: boolean | null
|
|
48
|
-
logo: string | null
|
|
49
|
-
average_completion_time: string | null
|
|
50
|
-
listing_date?: Date | null
|
|
51
|
-
|
|
52
|
-
status: string
|
|
53
|
-
deposit_address?: DepositAddress
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export {
|
|
57
|
-
type Network as default
|
|
58
|
-
}
|
package/types/swap-status.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export enum SwapStatus {
|
|
2
|
-
Created = "created",
|
|
3
|
-
UserTransferPending = "user_transfer_pending",
|
|
4
|
-
UserTransferDelayed = "user_transfer_delayed",
|
|
5
|
-
UserDepositPending = "user_deposit_pending",
|
|
6
|
-
BridgeTransferPending = "bridge_transfer_pending",
|
|
7
|
-
Completed = "completed",
|
|
8
|
-
Failed = "failed",
|
|
9
|
-
Expired = "expired",
|
|
10
|
-
Cancelled = "cancelled",
|
|
11
|
-
TeleportProcessPending = "teleport_processing_pending",
|
|
12
|
-
UserPayoutPending = "user_payout_pending",
|
|
13
|
-
PayoutSuccess = "payout_success"
|
|
14
|
-
}
|
|
15
|
-
export const swapStatusByIndex: { [key: number]: SwapStatus } = {
|
|
16
|
-
"0": SwapStatus.Created,
|
|
17
|
-
"1": SwapStatus.UserTransferPending,
|
|
18
|
-
"2": SwapStatus.UserTransferDelayed,
|
|
19
|
-
"3": SwapStatus.BridgeTransferPending,
|
|
20
|
-
"4": SwapStatus.Completed,
|
|
21
|
-
"5": SwapStatus.Failed,
|
|
22
|
-
"6": SwapStatus.Expired,
|
|
23
|
-
"7": SwapStatus.Cancelled,
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export enum UtilaTransactionStatus {
|
|
27
|
-
AWAITING_APPROVAL = "AWAITING_APPROVAL",
|
|
28
|
-
AWAITING_POLICY_CHECK = "AWAITING_POLICY_CHECK",
|
|
29
|
-
AWAITING_SIGNATURE = "AWAITING_SIGNATURE",
|
|
30
|
-
SIGNED = "SIGNED",
|
|
31
|
-
AWAITING_PUBLISH = "AWAITING_PUBLISH",
|
|
32
|
-
PUBLISHED = "PUBLISHED",
|
|
33
|
-
MINED = "MINED",
|
|
34
|
-
FAILED = "FAILED",
|
|
35
|
-
DECLINED = "DECLINED",
|
|
36
|
-
REPLACED = "REPLACED",
|
|
37
|
-
CANCELED = "CANCELED",
|
|
38
|
-
DROPPED = "DROPPED",
|
|
39
|
-
CONFIRMED = "CONFIRMED",
|
|
40
|
-
EXPIRED = "EXPIRED"
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export const utilaTransactionStatusByIndex: { [key: number]: UtilaTransactionStatus } = {
|
|
44
|
-
"1": UtilaTransactionStatus.AWAITING_APPROVAL,
|
|
45
|
-
"2": UtilaTransactionStatus.AWAITING_POLICY_CHECK,
|
|
46
|
-
"3": UtilaTransactionStatus.AWAITING_SIGNATURE,
|
|
47
|
-
"4": UtilaTransactionStatus.SIGNED,
|
|
48
|
-
"5": UtilaTransactionStatus.AWAITING_PUBLISH,
|
|
49
|
-
"6": UtilaTransactionStatus.PUBLISHED,
|
|
50
|
-
"7": UtilaTransactionStatus.MINED,
|
|
51
|
-
"8": UtilaTransactionStatus.FAILED,
|
|
52
|
-
"9": UtilaTransactionStatus.DECLINED,
|
|
53
|
-
"10": UtilaTransactionStatus.REPLACED,
|
|
54
|
-
"11": UtilaTransactionStatus.CANCELED,
|
|
55
|
-
"12": UtilaTransactionStatus.DROPPED,
|
|
56
|
-
"13": UtilaTransactionStatus.CONFIRMED,
|
|
57
|
-
"14": UtilaTransactionStatus.EXPIRED
|
|
58
|
-
}
|
package/types/utila.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export type UTILA_NETWORK = {
|
|
2
|
-
$typeName: string
|
|
3
|
-
name: string
|
|
4
|
-
displayName: string
|
|
5
|
-
testnet: boolean
|
|
6
|
-
nativeAsset: string
|
|
7
|
-
custom: boolean
|
|
8
|
-
caipDetails: {
|
|
9
|
-
$typeName: string
|
|
10
|
-
chainId: string
|
|
11
|
-
namespace: string
|
|
12
|
-
reference: string
|
|
13
|
-
},
|
|
14
|
-
assets: Record<string, string>
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type UTILA_TRANSACTION_CREATED = {
|
|
18
|
-
id: string,
|
|
19
|
-
vault: string,
|
|
20
|
-
type: string,
|
|
21
|
-
resourceType: string,
|
|
22
|
-
resource: string,
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export type UTILA_TRANSACTION_STATE_UPDATED = {
|
|
26
|
-
id: string,
|
|
27
|
-
vault: string,
|
|
28
|
-
type: string,
|
|
29
|
-
details: {
|
|
30
|
-
transactionStateUpdated: {
|
|
31
|
-
newState: string
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
resourceType: string,
|
|
35
|
-
resource: string,
|
|
36
|
-
}
|