@luxfi/core 10.0.5 → 10.0.6
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/package.json +37 -39
- package/tsconfig.cjs.json +7 -7
- package/tsconfig.json +19 -18
- package/types/asset.ts +25 -25
- package/types/contract.ts +12 -12
- package/types/deposit-address.ts +9 -9
- package/types/exchange.ts +25 -25
- package/types/index.ts +21 -21
- package/types/network-type.ts +18 -17
- package/types/network.ts +58 -58
- package/types/swap-status.ts +58 -58
- package/types/transaction-type.ts +5 -5
- package/types/utila.ts +35 -35
- package/dist/cjs/asset.d.ts +0 -24
- package/dist/cjs/asset.d.ts.map +0 -1
- package/dist/cjs/asset.js +0 -2
- package/dist/cjs/contract.d.ts +0 -9
- package/dist/cjs/contract.d.ts.map +0 -1
- package/dist/cjs/contract.js +0 -2
- package/dist/cjs/deposit-address.d.ts +0 -6
- package/dist/cjs/deposit-address.d.ts.map +0 -1
- package/dist/cjs/deposit-address.js +0 -2
- package/dist/cjs/exchange.d.ts +0 -20
- package/dist/cjs/exchange.d.ts.map +0 -1
- package/dist/cjs/exchange.js +0 -2
- package/dist/cjs/index.d.ts +0 -10
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/index.js +0 -10
- package/dist/cjs/network-type.d.ts +0 -3
- package/dist/cjs/network-type.d.ts.map +0 -1
- package/dist/cjs/network-type.js +0 -2
- package/dist/cjs/network.d.ts +0 -50
- package/dist/cjs/network.d.ts.map +0 -1
- package/dist/cjs/network.js +0 -2
- package/dist/cjs/swap-status.d.ts +0 -37
- package/dist/cjs/swap-status.d.ts.map +0 -1
- package/dist/cjs/swap-status.js +0 -61
- package/dist/cjs/transaction-type.d.ts +0 -6
- package/dist/cjs/transaction-type.d.ts.map +0 -1
- package/dist/cjs/transaction-type.js +0 -9
- package/dist/cjs/utila.d.ts +0 -35
- package/dist/cjs/utila.d.ts.map +0 -1
- package/dist/cjs/utila.js +0 -2
- package/dist/esm/asset.d.ts +0 -24
- package/dist/esm/asset.d.ts.map +0 -1
- package/dist/esm/asset.js +0 -1
- package/dist/esm/contract.d.ts +0 -9
- package/dist/esm/contract.d.ts.map +0 -1
- package/dist/esm/contract.js +0 -1
- package/dist/esm/deposit-address.d.ts +0 -6
- package/dist/esm/deposit-address.d.ts.map +0 -1
- package/dist/esm/deposit-address.js +0 -1
- package/dist/esm/exchange.d.ts +0 -20
- package/dist/esm/exchange.d.ts.map +0 -1
- package/dist/esm/exchange.js +0 -1
- package/dist/esm/index.d.ts +0 -10
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js +0 -2
- package/dist/esm/network-type.d.ts +0 -3
- package/dist/esm/network-type.d.ts.map +0 -1
- package/dist/esm/network-type.js +0 -1
- package/dist/esm/network.d.ts +0 -50
- package/dist/esm/network.d.ts.map +0 -1
- package/dist/esm/network.js +0 -1
- package/dist/esm/swap-status.d.ts +0 -37
- package/dist/esm/swap-status.d.ts.map +0 -1
- package/dist/esm/swap-status.js +0 -58
- package/dist/esm/transaction-type.d.ts +0 -6
- package/dist/esm/transaction-type.d.ts.map +0 -1
- package/dist/esm/transaction-type.js +0 -6
- package/dist/esm/utila.d.ts +0 -35
- package/dist/esm/utila.d.ts.map +0 -1
- package/dist/esm/utila.js +0 -1
package/package.json
CHANGED
|
@@ -1,39 +1,37 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@luxfi/core",
|
|
3
|
-
"version": "10.0.
|
|
4
|
-
"description": "Core types and shared utilities related to blockchain",
|
|
5
|
-
"publishConfig": {
|
|
6
|
-
"registry": "https://registry.npmjs.org/",
|
|
7
|
-
"access": "public",
|
|
8
|
-
"scope": "@luxfi"
|
|
9
|
-
},
|
|
10
|
-
"author": "Hanzo AI, Inc.",
|
|
11
|
-
"license": "BSD-3-Clause",
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "git+https://github.com/luxfi/bridge.git",
|
|
15
|
-
"directory": "pkg/
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"hanzo",
|
|
19
|
-
"luxdefi"
|
|
20
|
-
],
|
|
21
|
-
"scripts": {
|
|
22
|
-
"lat": "npm show @luxfi/core version",
|
|
23
|
-
"pub": "npm publish",
|
|
24
|
-
"build": "tsc --project tsconfig.json && tsc --project tsconfig.cjs.json",
|
|
25
|
-
"prepublishOnly": "npm run build"
|
|
26
|
-
},
|
|
27
|
-
"exports": {
|
|
28
|
-
".": {
|
|
29
|
-
"import": "./dist/esm/index.js",
|
|
30
|
-
"require": "./dist/cjs/index.js"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"types": "./dist/index.d.ts",
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@luxfi/core",
|
|
3
|
+
"version": "10.0.6",
|
|
4
|
+
"description": "Core types and shared utilities related to blockchain",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"registry": "https://registry.npmjs.org/",
|
|
7
|
+
"access": "public",
|
|
8
|
+
"scope": "@luxfi"
|
|
9
|
+
},
|
|
10
|
+
"author": "Hanzo AI, Inc.",
|
|
11
|
+
"license": "BSD-3-Clause",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/luxfi/bridge.git",
|
|
15
|
+
"directory": "pkg/core"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"hanzo",
|
|
19
|
+
"luxdefi"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"lat": "npm show @luxfi/core version",
|
|
23
|
+
"pub": "npm publish",
|
|
24
|
+
"build": "tsc --project tsconfig.json && tsc --project tsconfig.cjs.json",
|
|
25
|
+
"prepublishOnly": "npm run build"
|
|
26
|
+
},
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"import": "./dist/esm/index.js",
|
|
30
|
+
"require": "./dist/cjs/index.js"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"typescript": "^6.0.3"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/tsconfig.cjs.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json", // Extend the ESM config
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"module": "CommonJS", // Generate CommonJS modules
|
|
5
|
-
"outDir": "dist/cjs" // Output directory for CJS
|
|
6
|
-
}
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json", // Extend the ESM config
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "CommonJS", // Generate CommonJS modules
|
|
5
|
+
"outDir": "dist/cjs" // Output directory for CJS
|
|
6
|
+
}
|
|
7
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022", // Use modern JavaScript features
|
|
4
|
-
"module": "ESNext", // Generate ES modules
|
|
5
|
-
"moduleResolution": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
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
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
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
|
|
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
26
|
}
|
package/types/contract.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
interface Contract {
|
|
2
|
-
name?: string
|
|
3
|
-
chain_id: number,
|
|
4
|
-
teleporter: `0x${string}` | ''
|
|
5
|
-
vault: `0x${string}` | ''
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
type Contracts = Record<number,Contract >
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
type Contract,
|
|
12
|
-
type Contracts
|
|
1
|
+
interface Contract {
|
|
2
|
+
name?: string
|
|
3
|
+
chain_id: number,
|
|
4
|
+
teleporter: `0x${string}` | ''
|
|
5
|
+
vault: `0x${string}` | ''
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type Contracts = Record<number,Contract >
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
type Contract,
|
|
12
|
+
type Contracts
|
|
13
13
|
}
|
package/types/deposit-address.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
interface DepositAddress {
|
|
2
|
-
address: string
|
|
3
|
-
memo?: string
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
type DepositAddress as default
|
|
8
|
-
}
|
|
9
|
-
|
|
1
|
+
interface DepositAddress {
|
|
2
|
+
address: string
|
|
3
|
+
memo?: string
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export {
|
|
7
|
+
type DepositAddress as default
|
|
8
|
+
}
|
|
9
|
+
|
package/types/exchange.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
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
|
-
|
|
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
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
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
|
-
|
|
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
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
type NetworkType =
|
|
2
|
-
"evm"
|
|
3
|
-
| "starknet"
|
|
4
|
-
| "solana"
|
|
5
|
-
| "cosmos"
|
|
6
|
-
| "stark_ex"
|
|
7
|
-
| "zk_sync_lite"
|
|
8
|
-
| "ton"
|
|
9
|
-
| "btc"
|
|
10
|
-
| "
|
|
11
|
-
| "
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
type NetworkType =
|
|
2
|
+
"evm"
|
|
3
|
+
| "starknet"
|
|
4
|
+
| "solana"
|
|
5
|
+
| "cosmos"
|
|
6
|
+
| "stark_ex"
|
|
7
|
+
| "zk_sync_lite"
|
|
8
|
+
| "ton"
|
|
9
|
+
| "btc"
|
|
10
|
+
| "xrp"
|
|
11
|
+
| "cardano"
|
|
12
|
+
| "substrate"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
type NetworkType as default
|
|
17
|
+
}
|
|
18
|
+
|
package/types/network.ts
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
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
|
-
}
|
|
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
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
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
|
-
}
|
|
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
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export enum TransactionType {
|
|
2
|
-
Input = "input",
|
|
3
|
-
Output = "output",
|
|
4
|
-
Refuel = "refuel",
|
|
5
|
-
}
|
|
1
|
+
export enum TransactionType {
|
|
2
|
+
Input = "input",
|
|
3
|
+
Output = "output",
|
|
4
|
+
Refuel = "refuel",
|
|
5
|
+
}
|