@0xtorch/core 0.0.3 → 0.0.4

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.
@@ -41,7 +41,7 @@ export declare const normalActionAtomicArbitrageSchema: z.ZodEffects<z.ZodObject
41
41
  icon?: string | undefined;
42
42
  }>>;
43
43
  action: z.ZodLiteral<"atomic-arbitrage">;
44
- transfers: z.ZodArray<z.ZodEffects<z.ZodObject<{
44
+ transfers: z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
45
45
  price: z.ZodOptional<z.ZodObject<{
46
46
  cryptoCurrencyId: z.ZodString;
47
47
  fiatCurrencyId: z.ZodString;
@@ -315,13 +315,287 @@ export declare const normalActionAtomicArbitrageSchema: z.ZodEffects<z.ZodObject
315
315
  } | undefined;
316
316
  from?: string | undefined;
317
317
  to?: string | undefined;
318
- }>, "many">;
318
+ }>, z.ZodEffects<z.ZodObject<{
319
+ price: z.ZodOptional<z.ZodObject<{
320
+ cryptoCurrencyId: z.ZodString;
321
+ fiatCurrencyId: z.ZodString;
322
+ price: z.ZodObject<{
323
+ value: z.ZodBigInt;
324
+ decimals: z.ZodNumber;
325
+ }, "strip", z.ZodTypeAny, {
326
+ value: bigint;
327
+ decimals: number;
328
+ }, {
329
+ value: bigint;
330
+ decimals: number;
331
+ }>;
332
+ timestamp: z.ZodNumber;
333
+ }, "strip", z.ZodTypeAny, {
334
+ cryptoCurrencyId: string;
335
+ fiatCurrencyId: string;
336
+ price: {
337
+ value: bigint;
338
+ decimals: number;
339
+ };
340
+ timestamp: number;
341
+ }, {
342
+ cryptoCurrencyId: string;
343
+ fiatCurrencyId: string;
344
+ price: {
345
+ value: bigint;
346
+ decimals: number;
347
+ };
348
+ timestamp: number;
349
+ }>>;
350
+ from: z.ZodOptional<z.ZodString>;
351
+ to: z.ZodOptional<z.ZodString>;
352
+ amount: z.ZodObject<{
353
+ value: z.ZodBigInt;
354
+ decimals: z.ZodNumber;
355
+ }, "strip", z.ZodTypeAny, {
356
+ value: bigint;
357
+ decimals: number;
358
+ }, {
359
+ value: bigint;
360
+ decimals: number;
361
+ }>;
362
+ direction: z.ZodLiteral<"out">;
363
+ asset: z.ZodEffects<z.ZodObject<{
364
+ type: z.ZodLiteral<"CryptoCurrency">;
365
+ id: z.ZodString;
366
+ name: z.ZodString;
367
+ symbol: z.ZodString;
368
+ icon: z.ZodOptional<z.ZodString>;
369
+ market: z.ZodEffects<z.ZodObject<{
370
+ coingeckoId: z.ZodOptional<z.ZodString>;
371
+ marketCapUsd: z.ZodOptional<z.ZodObject<{
372
+ value: z.ZodBigInt;
373
+ decimals: z.ZodNumber;
374
+ }, "strip", z.ZodTypeAny, {
375
+ value: bigint;
376
+ decimals: number;
377
+ }, {
378
+ value: bigint;
379
+ decimals: number;
380
+ }>>;
381
+ }, "strip", z.ZodTypeAny, {
382
+ coingeckoId?: string | undefined;
383
+ marketCapUsd?: {
384
+ value: bigint;
385
+ decimals: number;
386
+ } | undefined;
387
+ }, {
388
+ coingeckoId?: string | undefined;
389
+ marketCapUsd?: {
390
+ value: bigint;
391
+ decimals: number;
392
+ } | undefined;
393
+ }>, {
394
+ coingeckoId: string | undefined;
395
+ marketCapUsd: {
396
+ value: bigint;
397
+ decimals: number;
398
+ } | undefined;
399
+ }, {
400
+ coingeckoId?: string | undefined;
401
+ marketCapUsd?: {
402
+ value: bigint;
403
+ decimals: number;
404
+ } | undefined;
405
+ }>;
406
+ updatedAt: z.ZodNumber;
407
+ }, "strip", z.ZodTypeAny, {
408
+ symbol: string;
409
+ type: "CryptoCurrency";
410
+ id: string;
411
+ name: string;
412
+ market: {
413
+ coingeckoId: string | undefined;
414
+ marketCapUsd: {
415
+ value: bigint;
416
+ decimals: number;
417
+ } | undefined;
418
+ };
419
+ updatedAt: number;
420
+ icon?: string | undefined;
421
+ }, {
422
+ symbol: string;
423
+ type: "CryptoCurrency";
424
+ id: string;
425
+ name: string;
426
+ market: {
427
+ coingeckoId?: string | undefined;
428
+ marketCapUsd?: {
429
+ value: bigint;
430
+ decimals: number;
431
+ } | undefined;
432
+ };
433
+ updatedAt: number;
434
+ icon?: string | undefined;
435
+ }>, {
436
+ icon: string | undefined;
437
+ symbol: string;
438
+ type: "CryptoCurrency";
439
+ id: string;
440
+ name: string;
441
+ market: {
442
+ coingeckoId: string | undefined;
443
+ marketCapUsd: {
444
+ value: bigint;
445
+ decimals: number;
446
+ } | undefined;
447
+ };
448
+ updatedAt: number;
449
+ }, {
450
+ symbol: string;
451
+ type: "CryptoCurrency";
452
+ id: string;
453
+ name: string;
454
+ market: {
455
+ coingeckoId?: string | undefined;
456
+ marketCapUsd?: {
457
+ value: bigint;
458
+ decimals: number;
459
+ } | undefined;
460
+ };
461
+ updatedAt: number;
462
+ icon?: string | undefined;
463
+ }>;
464
+ }, "strip", z.ZodTypeAny, {
465
+ asset: {
466
+ icon: string | undefined;
467
+ symbol: string;
468
+ type: "CryptoCurrency";
469
+ id: string;
470
+ name: string;
471
+ market: {
472
+ coingeckoId: string | undefined;
473
+ marketCapUsd: {
474
+ value: bigint;
475
+ decimals: number;
476
+ } | undefined;
477
+ };
478
+ updatedAt: number;
479
+ };
480
+ amount: {
481
+ value: bigint;
482
+ decimals: number;
483
+ };
484
+ direction: "out";
485
+ price?: {
486
+ cryptoCurrencyId: string;
487
+ fiatCurrencyId: string;
488
+ price: {
489
+ value: bigint;
490
+ decimals: number;
491
+ };
492
+ timestamp: number;
493
+ } | undefined;
494
+ from?: string | undefined;
495
+ to?: string | undefined;
496
+ }, {
497
+ asset: {
498
+ symbol: string;
499
+ type: "CryptoCurrency";
500
+ id: string;
501
+ name: string;
502
+ market: {
503
+ coingeckoId?: string | undefined;
504
+ marketCapUsd?: {
505
+ value: bigint;
506
+ decimals: number;
507
+ } | undefined;
508
+ };
509
+ updatedAt: number;
510
+ icon?: string | undefined;
511
+ };
512
+ amount: {
513
+ value: bigint;
514
+ decimals: number;
515
+ };
516
+ direction: "out";
517
+ price?: {
518
+ cryptoCurrencyId: string;
519
+ fiatCurrencyId: string;
520
+ price: {
521
+ value: bigint;
522
+ decimals: number;
523
+ };
524
+ timestamp: number;
525
+ } | undefined;
526
+ from?: string | undefined;
527
+ to?: string | undefined;
528
+ }>, {
529
+ from: string | undefined;
530
+ to: string | undefined;
531
+ price: {
532
+ cryptoCurrencyId: string;
533
+ fiatCurrencyId: string;
534
+ price: {
535
+ value: bigint;
536
+ decimals: number;
537
+ };
538
+ timestamp: number;
539
+ } | undefined;
540
+ asset: {
541
+ icon: string | undefined;
542
+ symbol: string;
543
+ type: "CryptoCurrency";
544
+ id: string;
545
+ name: string;
546
+ market: {
547
+ coingeckoId: string | undefined;
548
+ marketCapUsd: {
549
+ value: bigint;
550
+ decimals: number;
551
+ } | undefined;
552
+ };
553
+ updatedAt: number;
554
+ };
555
+ amount: {
556
+ value: bigint;
557
+ decimals: number;
558
+ };
559
+ direction: "out";
560
+ }, {
561
+ asset: {
562
+ symbol: string;
563
+ type: "CryptoCurrency";
564
+ id: string;
565
+ name: string;
566
+ market: {
567
+ coingeckoId?: string | undefined;
568
+ marketCapUsd?: {
569
+ value: bigint;
570
+ decimals: number;
571
+ } | undefined;
572
+ };
573
+ updatedAt: number;
574
+ icon?: string | undefined;
575
+ };
576
+ amount: {
577
+ value: bigint;
578
+ decimals: number;
579
+ };
580
+ direction: "out";
581
+ price?: {
582
+ cryptoCurrencyId: string;
583
+ fiatCurrencyId: string;
584
+ price: {
585
+ value: bigint;
586
+ decimals: number;
587
+ };
588
+ timestamp: number;
589
+ } | undefined;
590
+ from?: string | undefined;
591
+ to?: string | undefined;
592
+ }>]>, "many">;
319
593
  }, "strip", z.ZodTypeAny, {
320
594
  type: "NormalAction";
321
595
  timestamp: number;
322
596
  action: "atomic-arbitrage";
323
597
  evidence: "none" | "contract" | "system-rule" | "user-rule" | "manual-check";
324
- transfers: {
598
+ transfers: ({
325
599
  from: string | undefined;
326
600
  to: string | undefined;
327
601
  price: {
@@ -353,7 +627,39 @@ export declare const normalActionAtomicArbitrageSchema: z.ZodEffects<z.ZodObject
353
627
  decimals: number;
354
628
  };
355
629
  direction: "in";
356
- }[];
630
+ } | {
631
+ from: string | undefined;
632
+ to: string | undefined;
633
+ price: {
634
+ cryptoCurrencyId: string;
635
+ fiatCurrencyId: string;
636
+ price: {
637
+ value: bigint;
638
+ decimals: number;
639
+ };
640
+ timestamp: number;
641
+ } | undefined;
642
+ asset: {
643
+ icon: string | undefined;
644
+ symbol: string;
645
+ type: "CryptoCurrency";
646
+ id: string;
647
+ name: string;
648
+ market: {
649
+ coingeckoId: string | undefined;
650
+ marketCapUsd: {
651
+ value: bigint;
652
+ decimals: number;
653
+ } | undefined;
654
+ };
655
+ updatedAt: number;
656
+ };
657
+ amount: {
658
+ value: bigint;
659
+ decimals: number;
660
+ };
661
+ direction: "out";
662
+ })[];
357
663
  comment?: string | undefined;
358
664
  app?: {
359
665
  description: string | undefined;
@@ -368,7 +674,7 @@ export declare const normalActionAtomicArbitrageSchema: z.ZodEffects<z.ZodObject
368
674
  timestamp: number;
369
675
  action: "atomic-arbitrage";
370
676
  evidence: "none" | "contract" | "system-rule" | "user-rule" | "manual-check";
371
- transfers: {
677
+ transfers: ({
372
678
  asset: {
373
679
  symbol: string;
374
680
  type: "CryptoCurrency";
@@ -400,7 +706,39 @@ export declare const normalActionAtomicArbitrageSchema: z.ZodEffects<z.ZodObject
400
706
  } | undefined;
401
707
  from?: string | undefined;
402
708
  to?: string | undefined;
403
- }[];
709
+ } | {
710
+ asset: {
711
+ symbol: string;
712
+ type: "CryptoCurrency";
713
+ id: string;
714
+ name: string;
715
+ market: {
716
+ coingeckoId?: string | undefined;
717
+ marketCapUsd?: {
718
+ value: bigint;
719
+ decimals: number;
720
+ } | undefined;
721
+ };
722
+ updatedAt: number;
723
+ icon?: string | undefined;
724
+ };
725
+ amount: {
726
+ value: bigint;
727
+ decimals: number;
728
+ };
729
+ direction: "out";
730
+ price?: {
731
+ cryptoCurrencyId: string;
732
+ fiatCurrencyId: string;
733
+ price: {
734
+ value: bigint;
735
+ decimals: number;
736
+ };
737
+ timestamp: number;
738
+ } | undefined;
739
+ from?: string | undefined;
740
+ to?: string | undefined;
741
+ })[];
404
742
  comment?: string | undefined;
405
743
  app?: {
406
744
  id: string;
@@ -424,7 +762,7 @@ export declare const normalActionAtomicArbitrageSchema: z.ZodEffects<z.ZodObject
424
762
  timestamp: number;
425
763
  action: "atomic-arbitrage";
426
764
  evidence: "none" | "contract" | "system-rule" | "user-rule" | "manual-check";
427
- transfers: {
765
+ transfers: ({
428
766
  from: string | undefined;
429
767
  to: string | undefined;
430
768
  price: {
@@ -456,13 +794,45 @@ export declare const normalActionAtomicArbitrageSchema: z.ZodEffects<z.ZodObject
456
794
  decimals: number;
457
795
  };
458
796
  direction: "in";
459
- }[];
797
+ } | {
798
+ from: string | undefined;
799
+ to: string | undefined;
800
+ price: {
801
+ cryptoCurrencyId: string;
802
+ fiatCurrencyId: string;
803
+ price: {
804
+ value: bigint;
805
+ decimals: number;
806
+ };
807
+ timestamp: number;
808
+ } | undefined;
809
+ asset: {
810
+ icon: string | undefined;
811
+ symbol: string;
812
+ type: "CryptoCurrency";
813
+ id: string;
814
+ name: string;
815
+ market: {
816
+ coingeckoId: string | undefined;
817
+ marketCapUsd: {
818
+ value: bigint;
819
+ decimals: number;
820
+ } | undefined;
821
+ };
822
+ updatedAt: number;
823
+ };
824
+ amount: {
825
+ value: bigint;
826
+ decimals: number;
827
+ };
828
+ direction: "out";
829
+ })[];
460
830
  }, {
461
831
  type: "NormalAction";
462
832
  timestamp: number;
463
833
  action: "atomic-arbitrage";
464
834
  evidence: "none" | "contract" | "system-rule" | "user-rule" | "manual-check";
465
- transfers: {
835
+ transfers: ({
466
836
  asset: {
467
837
  symbol: string;
468
838
  type: "CryptoCurrency";
@@ -494,7 +864,39 @@ export declare const normalActionAtomicArbitrageSchema: z.ZodEffects<z.ZodObject
494
864
  } | undefined;
495
865
  from?: string | undefined;
496
866
  to?: string | undefined;
497
- }[];
867
+ } | {
868
+ asset: {
869
+ symbol: string;
870
+ type: "CryptoCurrency";
871
+ id: string;
872
+ name: string;
873
+ market: {
874
+ coingeckoId?: string | undefined;
875
+ marketCapUsd?: {
876
+ value: bigint;
877
+ decimals: number;
878
+ } | undefined;
879
+ };
880
+ updatedAt: number;
881
+ icon?: string | undefined;
882
+ };
883
+ amount: {
884
+ value: bigint;
885
+ decimals: number;
886
+ };
887
+ direction: "out";
888
+ price?: {
889
+ cryptoCurrencyId: string;
890
+ fiatCurrencyId: string;
891
+ price: {
892
+ value: bigint;
893
+ decimals: number;
894
+ };
895
+ timestamp: number;
896
+ } | undefined;
897
+ from?: string | undefined;
898
+ to?: string | undefined;
899
+ })[];
498
900
  comment?: string | undefined;
499
901
  app?: {
500
902
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"atomicArbitrage.d.ts","sourceRoot":"","sources":["../../../../actions/schemas/income/atomicArbitrage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUxC,CAAA"}
@@ -3,12 +3,18 @@ import {
3
3
  normalAccountActionDefaultSchema,
4
4
  normalActionDefaultSchema,
5
5
  transferCryptoCurrencyInSchema,
6
+ transferCryptoCurrencyOutSchema,
6
7
  } from '../default'
7
8
 
8
9
  export const normalActionAtomicArbitrageSchema = normalActionDefaultSchema
9
10
  .extend({
10
11
  action: z.literal('atomic-arbitrage'),
11
- transfers: z.array(transferCryptoCurrencyInSchema),
12
+ transfers: z.array(
13
+ z.union([
14
+ transferCryptoCurrencyInSchema,
15
+ transferCryptoCurrencyOutSchema,
16
+ ]),
17
+ ),
12
18
  })
13
19
  .transform((v) => ({
14
20
  ...v,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xtorch/core",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Cryptorch | TypeScript Analyze Interface for Crypto Data.",
5
5
  "keywords": [
6
6
  "cryptorch",