@chainflip/rpc 1.9.1 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common.cjs +3 -1
- package/dist/common.d.cts +594 -0
- package/dist/common.d.ts +594 -0
- package/dist/common.mjs +4 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/parsers.cjs +15 -1
- package/dist/parsers.d.cts +1187 -1
- package/dist/parsers.d.ts +1187 -1
- package/dist/parsers.mjs +14 -0
- package/dist/types.d.cts +3 -1
- package/dist/types.d.ts +3 -1
- package/package.json +1 -1
package/dist/common.d.ts
CHANGED
|
@@ -153,6 +153,7 @@ type RpcRequest = WithHash<{
|
|
|
153
153
|
quoteAsset: UncheckedAssetAndChain,
|
|
154
154
|
orders: number
|
|
155
155
|
];
|
|
156
|
+
cf_get_trading_strategies: [accountId?: Nullish<string>];
|
|
156
157
|
}> & {
|
|
157
158
|
chain_getBlockHash: [blockHeight?: number];
|
|
158
159
|
};
|
|
@@ -18274,6 +18275,599 @@ declare const rpcResult: {
|
|
|
18274
18275
|
sqrt_price: string;
|
|
18275
18276
|
}[];
|
|
18276
18277
|
}>;
|
|
18278
|
+
readonly cf_get_trading_strategies: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
18279
|
+
lp_id: z.ZodString;
|
|
18280
|
+
strategy_id: z.ZodString;
|
|
18281
|
+
strategy: z.ZodObject<{
|
|
18282
|
+
TickZeroCentered: z.ZodObject<{
|
|
18283
|
+
spread_tick: z.ZodNumber;
|
|
18284
|
+
base_asset: z.ZodUnion<[z.ZodObject<{
|
|
18285
|
+
chain: z.ZodLiteral<"Bitcoin">;
|
|
18286
|
+
asset: z.ZodLiteral<"BTC">;
|
|
18287
|
+
}, "strip", z.ZodTypeAny, {
|
|
18288
|
+
chain: "Bitcoin";
|
|
18289
|
+
asset: "BTC";
|
|
18290
|
+
}, {
|
|
18291
|
+
chain: "Bitcoin";
|
|
18292
|
+
asset: "BTC";
|
|
18293
|
+
}>, z.ZodObject<{
|
|
18294
|
+
chain: z.ZodLiteral<"Polkadot">;
|
|
18295
|
+
asset: z.ZodLiteral<"DOT">;
|
|
18296
|
+
}, "strip", z.ZodTypeAny, {
|
|
18297
|
+
chain: "Polkadot";
|
|
18298
|
+
asset: "DOT";
|
|
18299
|
+
}, {
|
|
18300
|
+
chain: "Polkadot";
|
|
18301
|
+
asset: "DOT";
|
|
18302
|
+
}>, z.ZodObject<{
|
|
18303
|
+
chain: z.ZodLiteral<"Ethereum">;
|
|
18304
|
+
asset: z.ZodLiteral<"FLIP">;
|
|
18305
|
+
}, "strip", z.ZodTypeAny, {
|
|
18306
|
+
chain: "Ethereum";
|
|
18307
|
+
asset: "FLIP";
|
|
18308
|
+
}, {
|
|
18309
|
+
chain: "Ethereum";
|
|
18310
|
+
asset: "FLIP";
|
|
18311
|
+
}>, z.ZodObject<{
|
|
18312
|
+
chain: z.ZodLiteral<"Ethereum">;
|
|
18313
|
+
asset: z.ZodLiteral<"ETH">;
|
|
18314
|
+
}, "strip", z.ZodTypeAny, {
|
|
18315
|
+
chain: "Ethereum";
|
|
18316
|
+
asset: "ETH";
|
|
18317
|
+
}, {
|
|
18318
|
+
chain: "Ethereum";
|
|
18319
|
+
asset: "ETH";
|
|
18320
|
+
}>, z.ZodObject<{
|
|
18321
|
+
chain: z.ZodLiteral<"Ethereum">;
|
|
18322
|
+
asset: z.ZodLiteral<"USDC">;
|
|
18323
|
+
}, "strip", z.ZodTypeAny, {
|
|
18324
|
+
chain: "Ethereum";
|
|
18325
|
+
asset: "USDC";
|
|
18326
|
+
}, {
|
|
18327
|
+
chain: "Ethereum";
|
|
18328
|
+
asset: "USDC";
|
|
18329
|
+
}>, z.ZodObject<{
|
|
18330
|
+
chain: z.ZodLiteral<"Ethereum">;
|
|
18331
|
+
asset: z.ZodLiteral<"USDT">;
|
|
18332
|
+
}, "strip", z.ZodTypeAny, {
|
|
18333
|
+
chain: "Ethereum";
|
|
18334
|
+
asset: "USDT";
|
|
18335
|
+
}, {
|
|
18336
|
+
chain: "Ethereum";
|
|
18337
|
+
asset: "USDT";
|
|
18338
|
+
}>, z.ZodObject<{
|
|
18339
|
+
chain: z.ZodLiteral<"Arbitrum">;
|
|
18340
|
+
asset: z.ZodLiteral<"ETH">;
|
|
18341
|
+
}, "strip", z.ZodTypeAny, {
|
|
18342
|
+
chain: "Arbitrum";
|
|
18343
|
+
asset: "ETH";
|
|
18344
|
+
}, {
|
|
18345
|
+
chain: "Arbitrum";
|
|
18346
|
+
asset: "ETH";
|
|
18347
|
+
}>, z.ZodObject<{
|
|
18348
|
+
chain: z.ZodLiteral<"Arbitrum">;
|
|
18349
|
+
asset: z.ZodLiteral<"USDC">;
|
|
18350
|
+
}, "strip", z.ZodTypeAny, {
|
|
18351
|
+
chain: "Arbitrum";
|
|
18352
|
+
asset: "USDC";
|
|
18353
|
+
}, {
|
|
18354
|
+
chain: "Arbitrum";
|
|
18355
|
+
asset: "USDC";
|
|
18356
|
+
}>, z.ZodObject<{
|
|
18357
|
+
chain: z.ZodLiteral<"Solana">;
|
|
18358
|
+
asset: z.ZodLiteral<"SOL">;
|
|
18359
|
+
}, "strip", z.ZodTypeAny, {
|
|
18360
|
+
chain: "Solana";
|
|
18361
|
+
asset: "SOL";
|
|
18362
|
+
}, {
|
|
18363
|
+
chain: "Solana";
|
|
18364
|
+
asset: "SOL";
|
|
18365
|
+
}>, z.ZodObject<{
|
|
18366
|
+
chain: z.ZodLiteral<"Solana">;
|
|
18367
|
+
asset: z.ZodLiteral<"USDC">;
|
|
18368
|
+
}, "strip", z.ZodTypeAny, {
|
|
18369
|
+
chain: "Solana";
|
|
18370
|
+
asset: "USDC";
|
|
18371
|
+
}, {
|
|
18372
|
+
chain: "Solana";
|
|
18373
|
+
asset: "USDC";
|
|
18374
|
+
}>, z.ZodObject<{
|
|
18375
|
+
chain: z.ZodLiteral<"Assethub">;
|
|
18376
|
+
asset: z.ZodLiteral<"DOT">;
|
|
18377
|
+
}, "strip", z.ZodTypeAny, {
|
|
18378
|
+
chain: "Assethub";
|
|
18379
|
+
asset: "DOT";
|
|
18380
|
+
}, {
|
|
18381
|
+
chain: "Assethub";
|
|
18382
|
+
asset: "DOT";
|
|
18383
|
+
}>, z.ZodObject<{
|
|
18384
|
+
chain: z.ZodLiteral<"Assethub">;
|
|
18385
|
+
asset: z.ZodLiteral<"USDC">;
|
|
18386
|
+
}, "strip", z.ZodTypeAny, {
|
|
18387
|
+
chain: "Assethub";
|
|
18388
|
+
asset: "USDC";
|
|
18389
|
+
}, {
|
|
18390
|
+
chain: "Assethub";
|
|
18391
|
+
asset: "USDC";
|
|
18392
|
+
}>, z.ZodObject<{
|
|
18393
|
+
chain: z.ZodLiteral<"Assethub">;
|
|
18394
|
+
asset: z.ZodLiteral<"USDT">;
|
|
18395
|
+
}, "strip", z.ZodTypeAny, {
|
|
18396
|
+
chain: "Assethub";
|
|
18397
|
+
asset: "USDT";
|
|
18398
|
+
}, {
|
|
18399
|
+
chain: "Assethub";
|
|
18400
|
+
asset: "USDT";
|
|
18401
|
+
}>]>;
|
|
18402
|
+
}, "strip", z.ZodTypeAny, {
|
|
18403
|
+
base_asset: {
|
|
18404
|
+
chain: "Bitcoin";
|
|
18405
|
+
asset: "BTC";
|
|
18406
|
+
} | {
|
|
18407
|
+
chain: "Polkadot";
|
|
18408
|
+
asset: "DOT";
|
|
18409
|
+
} | {
|
|
18410
|
+
chain: "Ethereum";
|
|
18411
|
+
asset: "FLIP";
|
|
18412
|
+
} | {
|
|
18413
|
+
chain: "Ethereum";
|
|
18414
|
+
asset: "ETH";
|
|
18415
|
+
} | {
|
|
18416
|
+
chain: "Ethereum";
|
|
18417
|
+
asset: "USDC";
|
|
18418
|
+
} | {
|
|
18419
|
+
chain: "Ethereum";
|
|
18420
|
+
asset: "USDT";
|
|
18421
|
+
} | {
|
|
18422
|
+
chain: "Arbitrum";
|
|
18423
|
+
asset: "ETH";
|
|
18424
|
+
} | {
|
|
18425
|
+
chain: "Arbitrum";
|
|
18426
|
+
asset: "USDC";
|
|
18427
|
+
} | {
|
|
18428
|
+
chain: "Solana";
|
|
18429
|
+
asset: "SOL";
|
|
18430
|
+
} | {
|
|
18431
|
+
chain: "Solana";
|
|
18432
|
+
asset: "USDC";
|
|
18433
|
+
} | {
|
|
18434
|
+
chain: "Assethub";
|
|
18435
|
+
asset: "DOT";
|
|
18436
|
+
} | {
|
|
18437
|
+
chain: "Assethub";
|
|
18438
|
+
asset: "USDC";
|
|
18439
|
+
} | {
|
|
18440
|
+
chain: "Assethub";
|
|
18441
|
+
asset: "USDT";
|
|
18442
|
+
};
|
|
18443
|
+
spread_tick: number;
|
|
18444
|
+
}, {
|
|
18445
|
+
base_asset: {
|
|
18446
|
+
chain: "Bitcoin";
|
|
18447
|
+
asset: "BTC";
|
|
18448
|
+
} | {
|
|
18449
|
+
chain: "Polkadot";
|
|
18450
|
+
asset: "DOT";
|
|
18451
|
+
} | {
|
|
18452
|
+
chain: "Ethereum";
|
|
18453
|
+
asset: "FLIP";
|
|
18454
|
+
} | {
|
|
18455
|
+
chain: "Ethereum";
|
|
18456
|
+
asset: "ETH";
|
|
18457
|
+
} | {
|
|
18458
|
+
chain: "Ethereum";
|
|
18459
|
+
asset: "USDC";
|
|
18460
|
+
} | {
|
|
18461
|
+
chain: "Ethereum";
|
|
18462
|
+
asset: "USDT";
|
|
18463
|
+
} | {
|
|
18464
|
+
chain: "Arbitrum";
|
|
18465
|
+
asset: "ETH";
|
|
18466
|
+
} | {
|
|
18467
|
+
chain: "Arbitrum";
|
|
18468
|
+
asset: "USDC";
|
|
18469
|
+
} | {
|
|
18470
|
+
chain: "Solana";
|
|
18471
|
+
asset: "SOL";
|
|
18472
|
+
} | {
|
|
18473
|
+
chain: "Solana";
|
|
18474
|
+
asset: "USDC";
|
|
18475
|
+
} | {
|
|
18476
|
+
chain: "Assethub";
|
|
18477
|
+
asset: "DOT";
|
|
18478
|
+
} | {
|
|
18479
|
+
chain: "Assethub";
|
|
18480
|
+
asset: "USDC";
|
|
18481
|
+
} | {
|
|
18482
|
+
chain: "Assethub";
|
|
18483
|
+
asset: "USDT";
|
|
18484
|
+
};
|
|
18485
|
+
spread_tick: number;
|
|
18486
|
+
}>;
|
|
18487
|
+
}, "strip", z.ZodTypeAny, {
|
|
18488
|
+
TickZeroCentered: {
|
|
18489
|
+
base_asset: {
|
|
18490
|
+
chain: "Bitcoin";
|
|
18491
|
+
asset: "BTC";
|
|
18492
|
+
} | {
|
|
18493
|
+
chain: "Polkadot";
|
|
18494
|
+
asset: "DOT";
|
|
18495
|
+
} | {
|
|
18496
|
+
chain: "Ethereum";
|
|
18497
|
+
asset: "FLIP";
|
|
18498
|
+
} | {
|
|
18499
|
+
chain: "Ethereum";
|
|
18500
|
+
asset: "ETH";
|
|
18501
|
+
} | {
|
|
18502
|
+
chain: "Ethereum";
|
|
18503
|
+
asset: "USDC";
|
|
18504
|
+
} | {
|
|
18505
|
+
chain: "Ethereum";
|
|
18506
|
+
asset: "USDT";
|
|
18507
|
+
} | {
|
|
18508
|
+
chain: "Arbitrum";
|
|
18509
|
+
asset: "ETH";
|
|
18510
|
+
} | {
|
|
18511
|
+
chain: "Arbitrum";
|
|
18512
|
+
asset: "USDC";
|
|
18513
|
+
} | {
|
|
18514
|
+
chain: "Solana";
|
|
18515
|
+
asset: "SOL";
|
|
18516
|
+
} | {
|
|
18517
|
+
chain: "Solana";
|
|
18518
|
+
asset: "USDC";
|
|
18519
|
+
} | {
|
|
18520
|
+
chain: "Assethub";
|
|
18521
|
+
asset: "DOT";
|
|
18522
|
+
} | {
|
|
18523
|
+
chain: "Assethub";
|
|
18524
|
+
asset: "USDC";
|
|
18525
|
+
} | {
|
|
18526
|
+
chain: "Assethub";
|
|
18527
|
+
asset: "USDT";
|
|
18528
|
+
};
|
|
18529
|
+
spread_tick: number;
|
|
18530
|
+
};
|
|
18531
|
+
}, {
|
|
18532
|
+
TickZeroCentered: {
|
|
18533
|
+
base_asset: {
|
|
18534
|
+
chain: "Bitcoin";
|
|
18535
|
+
asset: "BTC";
|
|
18536
|
+
} | {
|
|
18537
|
+
chain: "Polkadot";
|
|
18538
|
+
asset: "DOT";
|
|
18539
|
+
} | {
|
|
18540
|
+
chain: "Ethereum";
|
|
18541
|
+
asset: "FLIP";
|
|
18542
|
+
} | {
|
|
18543
|
+
chain: "Ethereum";
|
|
18544
|
+
asset: "ETH";
|
|
18545
|
+
} | {
|
|
18546
|
+
chain: "Ethereum";
|
|
18547
|
+
asset: "USDC";
|
|
18548
|
+
} | {
|
|
18549
|
+
chain: "Ethereum";
|
|
18550
|
+
asset: "USDT";
|
|
18551
|
+
} | {
|
|
18552
|
+
chain: "Arbitrum";
|
|
18553
|
+
asset: "ETH";
|
|
18554
|
+
} | {
|
|
18555
|
+
chain: "Arbitrum";
|
|
18556
|
+
asset: "USDC";
|
|
18557
|
+
} | {
|
|
18558
|
+
chain: "Solana";
|
|
18559
|
+
asset: "SOL";
|
|
18560
|
+
} | {
|
|
18561
|
+
chain: "Solana";
|
|
18562
|
+
asset: "USDC";
|
|
18563
|
+
} | {
|
|
18564
|
+
chain: "Assethub";
|
|
18565
|
+
asset: "DOT";
|
|
18566
|
+
} | {
|
|
18567
|
+
chain: "Assethub";
|
|
18568
|
+
asset: "USDC";
|
|
18569
|
+
} | {
|
|
18570
|
+
chain: "Assethub";
|
|
18571
|
+
asset: "USDT";
|
|
18572
|
+
};
|
|
18573
|
+
spread_tick: number;
|
|
18574
|
+
};
|
|
18575
|
+
}>;
|
|
18576
|
+
balance: z.ZodArray<z.ZodTuple<[z.ZodUnion<[z.ZodObject<{
|
|
18577
|
+
chain: z.ZodLiteral<"Bitcoin">;
|
|
18578
|
+
asset: z.ZodLiteral<"BTC">;
|
|
18579
|
+
}, "strip", z.ZodTypeAny, {
|
|
18580
|
+
chain: "Bitcoin";
|
|
18581
|
+
asset: "BTC";
|
|
18582
|
+
}, {
|
|
18583
|
+
chain: "Bitcoin";
|
|
18584
|
+
asset: "BTC";
|
|
18585
|
+
}>, z.ZodObject<{
|
|
18586
|
+
chain: z.ZodLiteral<"Polkadot">;
|
|
18587
|
+
asset: z.ZodLiteral<"DOT">;
|
|
18588
|
+
}, "strip", z.ZodTypeAny, {
|
|
18589
|
+
chain: "Polkadot";
|
|
18590
|
+
asset: "DOT";
|
|
18591
|
+
}, {
|
|
18592
|
+
chain: "Polkadot";
|
|
18593
|
+
asset: "DOT";
|
|
18594
|
+
}>, z.ZodObject<{
|
|
18595
|
+
chain: z.ZodLiteral<"Ethereum">;
|
|
18596
|
+
asset: z.ZodLiteral<"FLIP">;
|
|
18597
|
+
}, "strip", z.ZodTypeAny, {
|
|
18598
|
+
chain: "Ethereum";
|
|
18599
|
+
asset: "FLIP";
|
|
18600
|
+
}, {
|
|
18601
|
+
chain: "Ethereum";
|
|
18602
|
+
asset: "FLIP";
|
|
18603
|
+
}>, z.ZodObject<{
|
|
18604
|
+
chain: z.ZodLiteral<"Ethereum">;
|
|
18605
|
+
asset: z.ZodLiteral<"ETH">;
|
|
18606
|
+
}, "strip", z.ZodTypeAny, {
|
|
18607
|
+
chain: "Ethereum";
|
|
18608
|
+
asset: "ETH";
|
|
18609
|
+
}, {
|
|
18610
|
+
chain: "Ethereum";
|
|
18611
|
+
asset: "ETH";
|
|
18612
|
+
}>, z.ZodObject<{
|
|
18613
|
+
chain: z.ZodLiteral<"Ethereum">;
|
|
18614
|
+
asset: z.ZodLiteral<"USDC">;
|
|
18615
|
+
}, "strip", z.ZodTypeAny, {
|
|
18616
|
+
chain: "Ethereum";
|
|
18617
|
+
asset: "USDC";
|
|
18618
|
+
}, {
|
|
18619
|
+
chain: "Ethereum";
|
|
18620
|
+
asset: "USDC";
|
|
18621
|
+
}>, z.ZodObject<{
|
|
18622
|
+
chain: z.ZodLiteral<"Ethereum">;
|
|
18623
|
+
asset: z.ZodLiteral<"USDT">;
|
|
18624
|
+
}, "strip", z.ZodTypeAny, {
|
|
18625
|
+
chain: "Ethereum";
|
|
18626
|
+
asset: "USDT";
|
|
18627
|
+
}, {
|
|
18628
|
+
chain: "Ethereum";
|
|
18629
|
+
asset: "USDT";
|
|
18630
|
+
}>, z.ZodObject<{
|
|
18631
|
+
chain: z.ZodLiteral<"Arbitrum">;
|
|
18632
|
+
asset: z.ZodLiteral<"ETH">;
|
|
18633
|
+
}, "strip", z.ZodTypeAny, {
|
|
18634
|
+
chain: "Arbitrum";
|
|
18635
|
+
asset: "ETH";
|
|
18636
|
+
}, {
|
|
18637
|
+
chain: "Arbitrum";
|
|
18638
|
+
asset: "ETH";
|
|
18639
|
+
}>, z.ZodObject<{
|
|
18640
|
+
chain: z.ZodLiteral<"Arbitrum">;
|
|
18641
|
+
asset: z.ZodLiteral<"USDC">;
|
|
18642
|
+
}, "strip", z.ZodTypeAny, {
|
|
18643
|
+
chain: "Arbitrum";
|
|
18644
|
+
asset: "USDC";
|
|
18645
|
+
}, {
|
|
18646
|
+
chain: "Arbitrum";
|
|
18647
|
+
asset: "USDC";
|
|
18648
|
+
}>, z.ZodObject<{
|
|
18649
|
+
chain: z.ZodLiteral<"Solana">;
|
|
18650
|
+
asset: z.ZodLiteral<"SOL">;
|
|
18651
|
+
}, "strip", z.ZodTypeAny, {
|
|
18652
|
+
chain: "Solana";
|
|
18653
|
+
asset: "SOL";
|
|
18654
|
+
}, {
|
|
18655
|
+
chain: "Solana";
|
|
18656
|
+
asset: "SOL";
|
|
18657
|
+
}>, z.ZodObject<{
|
|
18658
|
+
chain: z.ZodLiteral<"Solana">;
|
|
18659
|
+
asset: z.ZodLiteral<"USDC">;
|
|
18660
|
+
}, "strip", z.ZodTypeAny, {
|
|
18661
|
+
chain: "Solana";
|
|
18662
|
+
asset: "USDC";
|
|
18663
|
+
}, {
|
|
18664
|
+
chain: "Solana";
|
|
18665
|
+
asset: "USDC";
|
|
18666
|
+
}>, z.ZodObject<{
|
|
18667
|
+
chain: z.ZodLiteral<"Assethub">;
|
|
18668
|
+
asset: z.ZodLiteral<"DOT">;
|
|
18669
|
+
}, "strip", z.ZodTypeAny, {
|
|
18670
|
+
chain: "Assethub";
|
|
18671
|
+
asset: "DOT";
|
|
18672
|
+
}, {
|
|
18673
|
+
chain: "Assethub";
|
|
18674
|
+
asset: "DOT";
|
|
18675
|
+
}>, z.ZodObject<{
|
|
18676
|
+
chain: z.ZodLiteral<"Assethub">;
|
|
18677
|
+
asset: z.ZodLiteral<"USDC">;
|
|
18678
|
+
}, "strip", z.ZodTypeAny, {
|
|
18679
|
+
chain: "Assethub";
|
|
18680
|
+
asset: "USDC";
|
|
18681
|
+
}, {
|
|
18682
|
+
chain: "Assethub";
|
|
18683
|
+
asset: "USDC";
|
|
18684
|
+
}>, z.ZodObject<{
|
|
18685
|
+
chain: z.ZodLiteral<"Assethub">;
|
|
18686
|
+
asset: z.ZodLiteral<"USDT">;
|
|
18687
|
+
}, "strip", z.ZodTypeAny, {
|
|
18688
|
+
chain: "Assethub";
|
|
18689
|
+
asset: "USDT";
|
|
18690
|
+
}, {
|
|
18691
|
+
chain: "Assethub";
|
|
18692
|
+
asset: "USDT";
|
|
18693
|
+
}>]>, z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>], null>, "many">;
|
|
18694
|
+
}, "strip", z.ZodTypeAny, {
|
|
18695
|
+
lp_id: string;
|
|
18696
|
+
strategy_id: string;
|
|
18697
|
+
strategy: {
|
|
18698
|
+
TickZeroCentered: {
|
|
18699
|
+
base_asset: {
|
|
18700
|
+
chain: "Bitcoin";
|
|
18701
|
+
asset: "BTC";
|
|
18702
|
+
} | {
|
|
18703
|
+
chain: "Polkadot";
|
|
18704
|
+
asset: "DOT";
|
|
18705
|
+
} | {
|
|
18706
|
+
chain: "Ethereum";
|
|
18707
|
+
asset: "FLIP";
|
|
18708
|
+
} | {
|
|
18709
|
+
chain: "Ethereum";
|
|
18710
|
+
asset: "ETH";
|
|
18711
|
+
} | {
|
|
18712
|
+
chain: "Ethereum";
|
|
18713
|
+
asset: "USDC";
|
|
18714
|
+
} | {
|
|
18715
|
+
chain: "Ethereum";
|
|
18716
|
+
asset: "USDT";
|
|
18717
|
+
} | {
|
|
18718
|
+
chain: "Arbitrum";
|
|
18719
|
+
asset: "ETH";
|
|
18720
|
+
} | {
|
|
18721
|
+
chain: "Arbitrum";
|
|
18722
|
+
asset: "USDC";
|
|
18723
|
+
} | {
|
|
18724
|
+
chain: "Solana";
|
|
18725
|
+
asset: "SOL";
|
|
18726
|
+
} | {
|
|
18727
|
+
chain: "Solana";
|
|
18728
|
+
asset: "USDC";
|
|
18729
|
+
} | {
|
|
18730
|
+
chain: "Assethub";
|
|
18731
|
+
asset: "DOT";
|
|
18732
|
+
} | {
|
|
18733
|
+
chain: "Assethub";
|
|
18734
|
+
asset: "USDC";
|
|
18735
|
+
} | {
|
|
18736
|
+
chain: "Assethub";
|
|
18737
|
+
asset: "USDT";
|
|
18738
|
+
};
|
|
18739
|
+
spread_tick: number;
|
|
18740
|
+
};
|
|
18741
|
+
};
|
|
18742
|
+
balance: [{
|
|
18743
|
+
chain: "Bitcoin";
|
|
18744
|
+
asset: "BTC";
|
|
18745
|
+
} | {
|
|
18746
|
+
chain: "Polkadot";
|
|
18747
|
+
asset: "DOT";
|
|
18748
|
+
} | {
|
|
18749
|
+
chain: "Ethereum";
|
|
18750
|
+
asset: "FLIP";
|
|
18751
|
+
} | {
|
|
18752
|
+
chain: "Ethereum";
|
|
18753
|
+
asset: "ETH";
|
|
18754
|
+
} | {
|
|
18755
|
+
chain: "Ethereum";
|
|
18756
|
+
asset: "USDC";
|
|
18757
|
+
} | {
|
|
18758
|
+
chain: "Ethereum";
|
|
18759
|
+
asset: "USDT";
|
|
18760
|
+
} | {
|
|
18761
|
+
chain: "Arbitrum";
|
|
18762
|
+
asset: "ETH";
|
|
18763
|
+
} | {
|
|
18764
|
+
chain: "Arbitrum";
|
|
18765
|
+
asset: "USDC";
|
|
18766
|
+
} | {
|
|
18767
|
+
chain: "Solana";
|
|
18768
|
+
asset: "SOL";
|
|
18769
|
+
} | {
|
|
18770
|
+
chain: "Solana";
|
|
18771
|
+
asset: "USDC";
|
|
18772
|
+
} | {
|
|
18773
|
+
chain: "Assethub";
|
|
18774
|
+
asset: "DOT";
|
|
18775
|
+
} | {
|
|
18776
|
+
chain: "Assethub";
|
|
18777
|
+
asset: "USDC";
|
|
18778
|
+
} | {
|
|
18779
|
+
chain: "Assethub";
|
|
18780
|
+
asset: "USDT";
|
|
18781
|
+
}, bigint][];
|
|
18782
|
+
}, {
|
|
18783
|
+
lp_id: string;
|
|
18784
|
+
strategy_id: string;
|
|
18785
|
+
strategy: {
|
|
18786
|
+
TickZeroCentered: {
|
|
18787
|
+
base_asset: {
|
|
18788
|
+
chain: "Bitcoin";
|
|
18789
|
+
asset: "BTC";
|
|
18790
|
+
} | {
|
|
18791
|
+
chain: "Polkadot";
|
|
18792
|
+
asset: "DOT";
|
|
18793
|
+
} | {
|
|
18794
|
+
chain: "Ethereum";
|
|
18795
|
+
asset: "FLIP";
|
|
18796
|
+
} | {
|
|
18797
|
+
chain: "Ethereum";
|
|
18798
|
+
asset: "ETH";
|
|
18799
|
+
} | {
|
|
18800
|
+
chain: "Ethereum";
|
|
18801
|
+
asset: "USDC";
|
|
18802
|
+
} | {
|
|
18803
|
+
chain: "Ethereum";
|
|
18804
|
+
asset: "USDT";
|
|
18805
|
+
} | {
|
|
18806
|
+
chain: "Arbitrum";
|
|
18807
|
+
asset: "ETH";
|
|
18808
|
+
} | {
|
|
18809
|
+
chain: "Arbitrum";
|
|
18810
|
+
asset: "USDC";
|
|
18811
|
+
} | {
|
|
18812
|
+
chain: "Solana";
|
|
18813
|
+
asset: "SOL";
|
|
18814
|
+
} | {
|
|
18815
|
+
chain: "Solana";
|
|
18816
|
+
asset: "USDC";
|
|
18817
|
+
} | {
|
|
18818
|
+
chain: "Assethub";
|
|
18819
|
+
asset: "DOT";
|
|
18820
|
+
} | {
|
|
18821
|
+
chain: "Assethub";
|
|
18822
|
+
asset: "USDC";
|
|
18823
|
+
} | {
|
|
18824
|
+
chain: "Assethub";
|
|
18825
|
+
asset: "USDT";
|
|
18826
|
+
};
|
|
18827
|
+
spread_tick: number;
|
|
18828
|
+
};
|
|
18829
|
+
};
|
|
18830
|
+
balance: [{
|
|
18831
|
+
chain: "Bitcoin";
|
|
18832
|
+
asset: "BTC";
|
|
18833
|
+
} | {
|
|
18834
|
+
chain: "Polkadot";
|
|
18835
|
+
asset: "DOT";
|
|
18836
|
+
} | {
|
|
18837
|
+
chain: "Ethereum";
|
|
18838
|
+
asset: "FLIP";
|
|
18839
|
+
} | {
|
|
18840
|
+
chain: "Ethereum";
|
|
18841
|
+
asset: "ETH";
|
|
18842
|
+
} | {
|
|
18843
|
+
chain: "Ethereum";
|
|
18844
|
+
asset: "USDC";
|
|
18845
|
+
} | {
|
|
18846
|
+
chain: "Ethereum";
|
|
18847
|
+
asset: "USDT";
|
|
18848
|
+
} | {
|
|
18849
|
+
chain: "Arbitrum";
|
|
18850
|
+
asset: "ETH";
|
|
18851
|
+
} | {
|
|
18852
|
+
chain: "Arbitrum";
|
|
18853
|
+
asset: "USDC";
|
|
18854
|
+
} | {
|
|
18855
|
+
chain: "Solana";
|
|
18856
|
+
asset: "SOL";
|
|
18857
|
+
} | {
|
|
18858
|
+
chain: "Solana";
|
|
18859
|
+
asset: "USDC";
|
|
18860
|
+
} | {
|
|
18861
|
+
chain: "Assethub";
|
|
18862
|
+
asset: "DOT";
|
|
18863
|
+
} | {
|
|
18864
|
+
chain: "Assethub";
|
|
18865
|
+
asset: "USDC";
|
|
18866
|
+
} | {
|
|
18867
|
+
chain: "Assethub";
|
|
18868
|
+
asset: "USDT";
|
|
18869
|
+
}, string | number][];
|
|
18870
|
+
}>, "many">>;
|
|
18277
18871
|
};
|
|
18278
18872
|
type RpcMethod = keyof RpcRequest;
|
|
18279
18873
|
type RpcResponse<T extends RpcMethod> = z.input<(typeof rpcResult)[T]>;
|
package/dist/common.mjs
CHANGED
|
@@ -29,7 +29,8 @@ import {
|
|
|
29
29
|
cfAuctionState,
|
|
30
30
|
cfFlipSuppy,
|
|
31
31
|
ethereumAddress,
|
|
32
|
-
cfPoolOrderbook
|
|
32
|
+
cfPoolOrderbook,
|
|
33
|
+
cfGetTradingStrategies
|
|
33
34
|
} from "./parsers.mjs";
|
|
34
35
|
import { rpcResponse } from "./parsers.mjs";
|
|
35
36
|
var rpcResult = {
|
|
@@ -65,7 +66,8 @@ var rpcResult = {
|
|
|
65
66
|
cf_flip_supply: cfFlipSuppy,
|
|
66
67
|
cf_eth_state_chain_gateway_address: ethereumAddress.nullable(),
|
|
67
68
|
cf_eth_key_manager_address: ethereumAddress.nullable(),
|
|
68
|
-
cf_pool_orderbook: cfPoolOrderbook
|
|
69
|
+
cf_pool_orderbook: cfPoolOrderbook,
|
|
70
|
+
cf_get_trading_strategies: cfGetTradingStrategies
|
|
69
71
|
};
|
|
70
72
|
export {
|
|
71
73
|
rpcResponse,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as HttpClient } from './HttpClient.cjs';
|
|
2
2
|
export { default as WsClient } from './WsClient.cjs';
|
|
3
|
-
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfLiquidityProviderAccount, CfPoolDepth, CfPoolDepthResponse, CfPoolOrderbook, CfPoolOrderbookResponse, CfPoolOrders, CfPoolOrdersResponse, CfPoolPriceV2, CfPoolPriceV2Response, CfPoolsEnvironment, CfPoolsEnvironmentResponse, CfRequestSwapParameterEncoding, CfRequestSwapParameterEncodingResponse, CfSupportedAssets, CfSupportedAssetsResponse, CfSwapRate, CfSwapRateResponse, CfSwapRateV2, CfSwapRateV2Response, CfSwapRateV3, CfSwapRateV3Response, CfSwappingEnvironment, CfSwappingEnvironmentResponse, CfUnregisteredAccount, CfValidatorAccount, LpTotalBalances, LpTotalBalancesResponse } from './types.cjs';
|
|
3
|
+
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfGetTradingStrategies, CfGetTradingStrategiesResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfLiquidityProviderAccount, CfPoolDepth, CfPoolDepthResponse, CfPoolOrderbook, CfPoolOrderbookResponse, CfPoolOrders, CfPoolOrdersResponse, CfPoolPriceV2, CfPoolPriceV2Response, CfPoolsEnvironment, CfPoolsEnvironmentResponse, CfRequestSwapParameterEncoding, CfRequestSwapParameterEncodingResponse, CfSupportedAssets, CfSupportedAssetsResponse, CfSwapRate, CfSwapRateResponse, CfSwapRateV2, CfSwapRateV2Response, CfSwapRateV3, CfSwapRateV3Response, CfSwappingEnvironment, CfSwappingEnvironmentResponse, CfUnregisteredAccount, CfValidatorAccount, LpTotalBalances, LpTotalBalancesResponse } from './types.cjs';
|
|
4
4
|
export { c as constants } from './constants-jLrn-AnI.cjs';
|
|
5
5
|
export { RpcLimitOrder, RpcRangeOrder } from './parsers.cjs';
|
|
6
6
|
export { RpcMethod, RpcRequest as RpcParams, RpcResult } from './common.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as HttpClient } from './HttpClient.js';
|
|
2
2
|
export { default as WsClient } from './WsClient.js';
|
|
3
|
-
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfLiquidityProviderAccount, CfPoolDepth, CfPoolDepthResponse, CfPoolOrderbook, CfPoolOrderbookResponse, CfPoolOrders, CfPoolOrdersResponse, CfPoolPriceV2, CfPoolPriceV2Response, CfPoolsEnvironment, CfPoolsEnvironmentResponse, CfRequestSwapParameterEncoding, CfRequestSwapParameterEncodingResponse, CfSupportedAssets, CfSupportedAssetsResponse, CfSwapRate, CfSwapRateResponse, CfSwapRateV2, CfSwapRateV2Response, CfSwapRateV3, CfSwapRateV3Response, CfSwappingEnvironment, CfSwappingEnvironmentResponse, CfUnregisteredAccount, CfValidatorAccount, LpTotalBalances, LpTotalBalancesResponse } from './types.js';
|
|
3
|
+
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfGetTradingStrategies, CfGetTradingStrategiesResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfLiquidityProviderAccount, CfPoolDepth, CfPoolDepthResponse, CfPoolOrderbook, CfPoolOrderbookResponse, CfPoolOrders, CfPoolOrdersResponse, CfPoolPriceV2, CfPoolPriceV2Response, CfPoolsEnvironment, CfPoolsEnvironmentResponse, CfRequestSwapParameterEncoding, CfRequestSwapParameterEncodingResponse, CfSupportedAssets, CfSupportedAssetsResponse, CfSwapRate, CfSwapRateResponse, CfSwapRateV2, CfSwapRateV2Response, CfSwapRateV3, CfSwapRateV3Response, CfSwappingEnvironment, CfSwappingEnvironmentResponse, CfUnregisteredAccount, CfValidatorAccount, LpTotalBalances, LpTotalBalancesResponse } from './types.js';
|
|
4
4
|
export { c as constants } from './constants-jLrn-AnI.js';
|
|
5
5
|
export { RpcLimitOrder, RpcRangeOrder } from './parsers.js';
|
|
6
6
|
export { RpcMethod, RpcRequest as RpcParams, RpcResult } from './common.js';
|
package/dist/parsers.cjs
CHANGED
|
@@ -345,6 +345,20 @@ var cfPoolOrderbook = _zod.z.object({
|
|
|
345
345
|
bids: _zod.z.array(_zod.z.object({ amount: u256, sqrt_price: u256 })),
|
|
346
346
|
asks: _zod.z.array(_zod.z.object({ amount: u256, sqrt_price: u256 }))
|
|
347
347
|
});
|
|
348
|
+
var cfTradingStrategy = _zod.z.object({
|
|
349
|
+
lp_id: _zod.z.string(),
|
|
350
|
+
strategy_id: _zod.z.string(),
|
|
351
|
+
strategy: _zod.z.object({
|
|
352
|
+
TickZeroCentered: _zod.z.object({
|
|
353
|
+
spread_tick: _zod.z.number(),
|
|
354
|
+
base_asset: rpcAssetSchema
|
|
355
|
+
})
|
|
356
|
+
}),
|
|
357
|
+
balance: _zod.z.array(_zod.z.tuple([rpcAssetSchema, numberOrHex]))
|
|
358
|
+
});
|
|
359
|
+
var cfGetTradingStrategies = _zod.z.array(cfTradingStrategy).default([]);
|
|
360
|
+
|
|
361
|
+
|
|
348
362
|
|
|
349
363
|
|
|
350
364
|
|
|
@@ -382,4 +396,4 @@ var cfPoolOrderbook = _zod.z.object({
|
|
|
382
396
|
|
|
383
397
|
|
|
384
398
|
|
|
385
|
-
exports.broker = broker; exports.brokerRequestSwapDepositAddress = brokerRequestSwapDepositAddress; exports.cfAccountInfo = cfAccountInfo; exports.cfAccounts = cfAccounts; exports.cfAuctionState = cfAuctionState; exports.cfBoostPoolDetails = cfBoostPoolDetails; exports.cfBoostPoolPendingFees = cfBoostPoolPendingFees; exports.cfBoostPoolsDepth = cfBoostPoolsDepth; exports.cfEnvironment = cfEnvironment; exports.cfFailedCallEvm = cfFailedCallEvm; exports.cfFlipSuppy = cfFlipSuppy; exports.cfFundingEnvironment = cfFundingEnvironment; exports.cfIngressEgressEnvironment = cfIngressEgressEnvironment; exports.cfPoolDepth = cfPoolDepth; exports.cfPoolOrderbook = cfPoolOrderbook; exports.cfPoolOrders = cfPoolOrders; exports.cfPoolPriceV2 = cfPoolPriceV2; exports.cfPoolsEnvironment = cfPoolsEnvironment; exports.cfSupportedAssets = cfSupportedAssets; exports.cfSwapRate = cfSwapRate; exports.cfSwapRateV2 = cfSwapRateV2; exports.cfSwapRateV3 = cfSwapRateV3; exports.cfSwappingEnvironment = cfSwappingEnvironment; exports.chainGetBlockHash = chainGetBlockHash; exports.ethereumAddress = ethereumAddress; exports.hexString = hexString; exports.liquidityProvider = liquidityProvider; exports.lpTotalBalances = lpTotalBalances; exports.numberOrHex = numberOrHex; exports.requestSwapParameterEncoding = requestSwapParameterEncoding; exports.rpcResponse = rpcResponse; exports.stateGetMetadata = stateGetMetadata; exports.stateGetRuntimeVersion = stateGetRuntimeVersion; exports.u256 = u256; exports.unregistered = unregistered; exports.validator = validator;
|
|
399
|
+
exports.broker = broker; exports.brokerRequestSwapDepositAddress = brokerRequestSwapDepositAddress; exports.cfAccountInfo = cfAccountInfo; exports.cfAccounts = cfAccounts; exports.cfAuctionState = cfAuctionState; exports.cfBoostPoolDetails = cfBoostPoolDetails; exports.cfBoostPoolPendingFees = cfBoostPoolPendingFees; exports.cfBoostPoolsDepth = cfBoostPoolsDepth; exports.cfEnvironment = cfEnvironment; exports.cfFailedCallEvm = cfFailedCallEvm; exports.cfFlipSuppy = cfFlipSuppy; exports.cfFundingEnvironment = cfFundingEnvironment; exports.cfGetTradingStrategies = cfGetTradingStrategies; exports.cfIngressEgressEnvironment = cfIngressEgressEnvironment; exports.cfPoolDepth = cfPoolDepth; exports.cfPoolOrderbook = cfPoolOrderbook; exports.cfPoolOrders = cfPoolOrders; exports.cfPoolPriceV2 = cfPoolPriceV2; exports.cfPoolsEnvironment = cfPoolsEnvironment; exports.cfSupportedAssets = cfSupportedAssets; exports.cfSwapRate = cfSwapRate; exports.cfSwapRateV2 = cfSwapRateV2; exports.cfSwapRateV3 = cfSwapRateV3; exports.cfSwappingEnvironment = cfSwappingEnvironment; exports.cfTradingStrategy = cfTradingStrategy; exports.chainGetBlockHash = chainGetBlockHash; exports.ethereumAddress = ethereumAddress; exports.hexString = hexString; exports.liquidityProvider = liquidityProvider; exports.lpTotalBalances = lpTotalBalances; exports.numberOrHex = numberOrHex; exports.requestSwapParameterEncoding = requestSwapParameterEncoding; exports.rpcResponse = rpcResponse; exports.stateGetMetadata = stateGetMetadata; exports.stateGetRuntimeVersion = stateGetRuntimeVersion; exports.u256 = u256; exports.unregistered = unregistered; exports.validator = validator;
|