@chainflip/redis 2.1.0 → 2.1.1-beta.0
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/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/parsers.d.cts +12 -12
- package/dist/parsers.d.mts +12 -12
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -17,7 +17,7 @@ var RedisClient = class {
|
|
|
17
17
|
this.client = new ioredis.default(url);
|
|
18
18
|
}
|
|
19
19
|
async getBroadcast(chain, broadcastId) {
|
|
20
|
-
if (chain === "Solana"
|
|
20
|
+
if (chain === "Solana") return null;
|
|
21
21
|
const key = `broadcast:${chain}:${broadcastId}`;
|
|
22
22
|
const value = await this.client.get(key);
|
|
23
23
|
return value ? require_parsers.broadcastParsers[chain].parse(JSON.parse(value)) : null;
|
package/dist/index.d.cts
CHANGED
|
@@ -20,8 +20,8 @@ declare class RedisClient {
|
|
|
20
20
|
getPendingVaultSwap(chain: ChainflipChain, txId: string): Promise<{
|
|
21
21
|
amount: bigint;
|
|
22
22
|
destinationAddress: string;
|
|
23
|
-
inputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
24
|
-
outputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
23
|
+
inputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc";
|
|
24
|
+
outputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc";
|
|
25
25
|
affiliateFees: {
|
|
26
26
|
account: string;
|
|
27
27
|
commissionBps: number;
|
package/dist/index.d.mts
CHANGED
|
@@ -20,8 +20,8 @@ declare class RedisClient {
|
|
|
20
20
|
getPendingVaultSwap(chain: ChainflipChain, txId: string): Promise<{
|
|
21
21
|
amount: bigint;
|
|
22
22
|
destinationAddress: string;
|
|
23
|
-
inputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
24
|
-
outputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
23
|
+
inputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc";
|
|
24
|
+
outputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc";
|
|
25
25
|
affiliateFees: {
|
|
26
26
|
account: string;
|
|
27
27
|
commissionBps: number;
|
package/dist/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@ var RedisClient = class {
|
|
|
13
13
|
this.client = new Redis(url);
|
|
14
14
|
}
|
|
15
15
|
async getBroadcast(chain, broadcastId) {
|
|
16
|
-
if (chain === "Solana"
|
|
16
|
+
if (chain === "Solana") return null;
|
|
17
17
|
const key = `broadcast:${chain}:${broadcastId}`;
|
|
18
18
|
const value = await this.client.get(key);
|
|
19
19
|
return value ? broadcastParsers[chain].parse(JSON.parse(value)) : null;
|
package/dist/parsers.d.cts
CHANGED
|
@@ -16,7 +16,7 @@ declare const depositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknown, st
|
|
|
16
16
|
}>, AssetAndChain, {
|
|
17
17
|
asset: string;
|
|
18
18
|
chain: string;
|
|
19
|
-
}>, "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
19
|
+
}>, "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc", {
|
|
20
20
|
asset: string;
|
|
21
21
|
chain: string;
|
|
22
22
|
}>;
|
|
@@ -61,9 +61,9 @@ declare const depositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknown, st
|
|
|
61
61
|
extrinsic_index: number;
|
|
62
62
|
}>]>>;
|
|
63
63
|
}, "strip", z.ZodTypeAny, {
|
|
64
|
-
deposit_chain_block_height: number;
|
|
65
64
|
amount: bigint;
|
|
66
|
-
asset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
65
|
+
asset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc";
|
|
66
|
+
deposit_chain_block_height: number;
|
|
67
67
|
deposit_details: {
|
|
68
68
|
type: "EVM";
|
|
69
69
|
tx_hashes: `0x${string}`[];
|
|
@@ -76,12 +76,12 @@ declare const depositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknown, st
|
|
|
76
76
|
extrinsic_index: number;
|
|
77
77
|
} | null;
|
|
78
78
|
}, {
|
|
79
|
-
deposit_chain_block_height: number;
|
|
80
79
|
amount: string | number;
|
|
81
80
|
asset: {
|
|
82
81
|
asset: string;
|
|
83
82
|
chain: string;
|
|
84
83
|
};
|
|
84
|
+
deposit_chain_block_height: number;
|
|
85
85
|
deposit_details: {
|
|
86
86
|
tx_hashes: string[];
|
|
87
87
|
} | {
|
|
@@ -294,7 +294,7 @@ declare const vaultDepositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknow
|
|
|
294
294
|
}>, AssetAndChain, {
|
|
295
295
|
asset: string;
|
|
296
296
|
chain: string;
|
|
297
|
-
}>, "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
297
|
+
}>, "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc", {
|
|
298
298
|
asset: string;
|
|
299
299
|
chain: string;
|
|
300
300
|
}>;
|
|
@@ -310,7 +310,7 @@ declare const vaultDepositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknow
|
|
|
310
310
|
}>, AssetAndChain, {
|
|
311
311
|
asset: string;
|
|
312
312
|
chain: string;
|
|
313
|
-
}>, "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
313
|
+
}>, "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc", {
|
|
314
314
|
asset: string;
|
|
315
315
|
chain: string;
|
|
316
316
|
}>;
|
|
@@ -401,8 +401,8 @@ declare const vaultDepositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknow
|
|
|
401
401
|
}, "strip", z.ZodTypeAny, {
|
|
402
402
|
amount: bigint;
|
|
403
403
|
destination_address: string;
|
|
404
|
-
input_asset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
405
|
-
output_asset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
404
|
+
input_asset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc";
|
|
405
|
+
output_asset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc";
|
|
406
406
|
affiliate_fees: {
|
|
407
407
|
account: string;
|
|
408
408
|
commissionBps: number;
|
|
@@ -469,8 +469,8 @@ declare const vaultDepositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknow
|
|
|
469
469
|
}>, {
|
|
470
470
|
amount: bigint;
|
|
471
471
|
destinationAddress: string;
|
|
472
|
-
inputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
473
|
-
outputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
472
|
+
inputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc";
|
|
473
|
+
outputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc";
|
|
474
474
|
affiliateFees: {
|
|
475
475
|
account: string;
|
|
476
476
|
commissionBps: number;
|
|
@@ -535,11 +535,11 @@ declare const vaultDepositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknow
|
|
|
535
535
|
};
|
|
536
536
|
} | null | undefined;
|
|
537
537
|
}>>;
|
|
538
|
-
type ChainBroadcast<C extends Exclude<ChainflipChain, 'Solana'
|
|
538
|
+
type ChainBroadcast<C extends Exclude<ChainflipChain, 'Solana'>> = z.infer<(typeof broadcastParsers)[C]>;
|
|
539
539
|
type EthereumBroadcast = ChainBroadcast<'Ethereum'>;
|
|
540
540
|
type AssethubBroadcast = ChainBroadcast<'Assethub'>;
|
|
541
541
|
type BitcoinBroadcast = ChainBroadcast<'Bitcoin'>;
|
|
542
|
-
type Broadcast = ChainBroadcast<Exclude<ChainflipChain, 'Solana'
|
|
542
|
+
type Broadcast = ChainBroadcast<Exclude<ChainflipChain, 'Solana'>>;
|
|
543
543
|
declare const mempoolTransaction: z.ZodPipeline<z.ZodEffects<z.ZodString, unknown, string>, z.ZodObject<{
|
|
544
544
|
confirmations: z.ZodNumber;
|
|
545
545
|
value: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodEffects<z.ZodString, `0x${string}`, string>]>, bigint, string | number>;
|
package/dist/parsers.d.mts
CHANGED
|
@@ -16,7 +16,7 @@ declare const depositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknown, st
|
|
|
16
16
|
}>, AssetAndChain, {
|
|
17
17
|
asset: string;
|
|
18
18
|
chain: string;
|
|
19
|
-
}>, "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
19
|
+
}>, "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc", {
|
|
20
20
|
asset: string;
|
|
21
21
|
chain: string;
|
|
22
22
|
}>;
|
|
@@ -61,9 +61,9 @@ declare const depositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknown, st
|
|
|
61
61
|
extrinsic_index: number;
|
|
62
62
|
}>]>>;
|
|
63
63
|
}, "strip", z.ZodTypeAny, {
|
|
64
|
-
deposit_chain_block_height: number;
|
|
65
64
|
amount: bigint;
|
|
66
|
-
asset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
65
|
+
asset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc";
|
|
66
|
+
deposit_chain_block_height: number;
|
|
67
67
|
deposit_details: {
|
|
68
68
|
type: "EVM";
|
|
69
69
|
tx_hashes: `0x${string}`[];
|
|
@@ -76,12 +76,12 @@ declare const depositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknown, st
|
|
|
76
76
|
extrinsic_index: number;
|
|
77
77
|
} | null;
|
|
78
78
|
}, {
|
|
79
|
-
deposit_chain_block_height: number;
|
|
80
79
|
amount: string | number;
|
|
81
80
|
asset: {
|
|
82
81
|
asset: string;
|
|
83
82
|
chain: string;
|
|
84
83
|
};
|
|
84
|
+
deposit_chain_block_height: number;
|
|
85
85
|
deposit_details: {
|
|
86
86
|
tx_hashes: string[];
|
|
87
87
|
} | {
|
|
@@ -294,7 +294,7 @@ declare const vaultDepositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknow
|
|
|
294
294
|
}>, AssetAndChain, {
|
|
295
295
|
asset: string;
|
|
296
296
|
chain: string;
|
|
297
|
-
}>, "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
297
|
+
}>, "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc", {
|
|
298
298
|
asset: string;
|
|
299
299
|
chain: string;
|
|
300
300
|
}>;
|
|
@@ -310,7 +310,7 @@ declare const vaultDepositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknow
|
|
|
310
310
|
}>, AssetAndChain, {
|
|
311
311
|
asset: string;
|
|
312
312
|
chain: string;
|
|
313
|
-
}>, "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
313
|
+
}>, "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc", {
|
|
314
314
|
asset: string;
|
|
315
315
|
chain: string;
|
|
316
316
|
}>;
|
|
@@ -401,8 +401,8 @@ declare const vaultDepositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknow
|
|
|
401
401
|
}, "strip", z.ZodTypeAny, {
|
|
402
402
|
amount: bigint;
|
|
403
403
|
destination_address: string;
|
|
404
|
-
input_asset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
405
|
-
output_asset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
404
|
+
input_asset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc";
|
|
405
|
+
output_asset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc";
|
|
406
406
|
affiliate_fees: {
|
|
407
407
|
account: string;
|
|
408
408
|
commissionBps: number;
|
|
@@ -469,8 +469,8 @@ declare const vaultDepositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknow
|
|
|
469
469
|
}>, {
|
|
470
470
|
amount: bigint;
|
|
471
471
|
destinationAddress: string;
|
|
472
|
-
inputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
473
|
-
outputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "
|
|
472
|
+
inputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc";
|
|
473
|
+
outputAsset: "Usdc" | "Usdt" | "Wbtc" | "Flip" | "Eth" | "Btc" | "ArbUsdc" | "ArbUsdt" | "ArbEth" | "Sol" | "SolUsdc" | "SolUsdt" | "HubDot" | "HubUsdt" | "HubUsdc";
|
|
474
474
|
affiliateFees: {
|
|
475
475
|
account: string;
|
|
476
476
|
commissionBps: number;
|
|
@@ -535,11 +535,11 @@ declare const vaultDepositSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, unknow
|
|
|
535
535
|
};
|
|
536
536
|
} | null | undefined;
|
|
537
537
|
}>>;
|
|
538
|
-
type ChainBroadcast<C extends Exclude<ChainflipChain, 'Solana'
|
|
538
|
+
type ChainBroadcast<C extends Exclude<ChainflipChain, 'Solana'>> = z.infer<(typeof broadcastParsers)[C]>;
|
|
539
539
|
type EthereumBroadcast = ChainBroadcast<'Ethereum'>;
|
|
540
540
|
type AssethubBroadcast = ChainBroadcast<'Assethub'>;
|
|
541
541
|
type BitcoinBroadcast = ChainBroadcast<'Bitcoin'>;
|
|
542
|
-
type Broadcast = ChainBroadcast<Exclude<ChainflipChain, 'Solana'
|
|
542
|
+
type Broadcast = ChainBroadcast<Exclude<ChainflipChain, 'Solana'>>;
|
|
543
543
|
declare const mempoolTransaction: z.ZodPipeline<z.ZodEffects<z.ZodString, unknown, string>, z.ZodObject<{
|
|
544
544
|
confirmations: z.ZodNumber;
|
|
545
545
|
value: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodEffects<z.ZodString, `0x${string}`, string>]>, bigint, string | number>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainflip/redis",
|
|
3
|
-
"version": "2.1.0",
|
|
3
|
+
"version": "2.1.1-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": "https://github.com/chainflip-io/chainflip-product-toolkit.git",
|
|
6
6
|
"publishConfig": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@chainflip/utils": "2.1.
|
|
27
|
+
"@chainflip/utils": "2.1.2-beta.5",
|
|
28
28
|
"bignumber.js": "^9.3.1",
|
|
29
29
|
"ioredis": "^5.9.3",
|
|
30
30
|
"zod": "^3.25.75"
|