@luxfi/core 10.0.5 → 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/network-type.d.ts +1 -1
- package/dist/cjs/network-type.d.ts.map +1 -1
- package/dist/esm/network-type.d.ts +1 -1
- package/dist/esm/network-type.d.ts.map +1 -1
- package/package.json +41 -39
- package/tsconfig.cjs.json +0 -7
- package/tsconfig.json +0 -18
- 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 -17
- 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
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
type NetworkType = "evm" | "starknet" | "solana" | "cosmos" | "stark_ex" | "zk_sync_lite" | "ton" | "btc" | "cardano" | "
|
|
1
|
+
type NetworkType = "evm" | "starknet" | "solana" | "cosmos" | "stark_ex" | "zk_sync_lite" | "ton" | "btc" | "xrp" | "cardano" | "substrate";
|
|
2
2
|
export { type NetworkType as default };
|
|
3
3
|
//# sourceMappingURL=network-type.d.ts.map
|
|
@@ -1 +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,SAAS,GACT,
|
|
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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
type NetworkType = "evm" | "starknet" | "solana" | "cosmos" | "stark_ex" | "zk_sync_lite" | "ton" | "btc" | "cardano" | "
|
|
1
|
+
type NetworkType = "evm" | "starknet" | "solana" | "cosmos" | "stark_ex" | "zk_sync_lite" | "ton" | "btc" | "xrp" | "cardano" | "substrate";
|
|
2
2
|
export { type NetworkType as default };
|
|
3
3
|
//# sourceMappingURL=network-type.d.ts.map
|
|
@@ -1 +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,SAAS,GACT,
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,39 +1,41 @@
|
|
|
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
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@luxfi/core",
|
|
3
|
+
"version": "10.0.7",
|
|
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
|
+
"types": "./dist/esm/index.d.ts",
|
|
30
|
+
"import": "./dist/esm/index.js",
|
|
31
|
+
"require": "./dist/cjs/index.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"types": "./dist/esm/index.d.ts",
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"typescript": "^6.0.3"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist"
|
|
40
|
+
]
|
|
41
|
+
}
|
package/tsconfig.cjs.json
DELETED
package/tsconfig.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022", // Use modern JavaScript features
|
|
4
|
-
"module": "ESNext", // Generate ES modules
|
|
5
|
-
"moduleResolution": "Node", // Resolve Node.js modules
|
|
6
|
-
"strict": true, // Enable strict type-checking
|
|
7
|
-
"esModuleInterop": true, // Interop for CommonJS modules
|
|
8
|
-
"allowSyntheticDefaultImports": true, // Support default imports
|
|
9
|
-
"skipLibCheck": true, // Skip type checks for dependencies
|
|
10
|
-
"resolveJsonModule": true, // Allow importing JSON files
|
|
11
|
-
"declaration": true, // Generate .d.ts files for types
|
|
12
|
-
"declarationMap": true, // Include source maps for declarations
|
|
13
|
-
"outDir": "dist/esm", // Output directory for ESM
|
|
14
|
-
"rootDir": "types" // Specify the source directory
|
|
15
|
-
},
|
|
16
|
-
"include": ["types/**/*.ts"], // Include TypeScript files
|
|
17
|
-
"exclude": ["node_modules"]
|
|
18
|
-
}
|
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
|
-
}
|