@mimicprotocol/sdk 0.0.1-rc.16 → 0.0.1-rc.17

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.
Files changed (35) hide show
  1. package/dist/client/domains/IntentsClient.d.ts +14 -7
  2. package/dist/client/domains/IntentsClient.d.ts.map +1 -1
  3. package/dist/client/domains/IntentsClient.js +15 -6
  4. package/dist/client/domains/IntentsClient.js.map +1 -1
  5. package/dist/relayer/validators.d.ts +358 -2
  6. package/dist/relayer/validators.d.ts.map +1 -1
  7. package/dist/relayer/validators.js +2 -1
  8. package/dist/relayer/validators.js.map +1 -1
  9. package/dist/shared/codec/chains/evm.d.ts +3 -1
  10. package/dist/shared/codec/chains/evm.d.ts.map +1 -1
  11. package/dist/shared/codec/chains/evm.js +19 -0
  12. package/dist/shared/codec/chains/evm.js.map +1 -1
  13. package/dist/shared/codec/chains/svm.d.ts +15 -10
  14. package/dist/shared/codec/chains/svm.d.ts.map +1 -1
  15. package/dist/shared/codec/chains/svm.js +91 -35
  16. package/dist/shared/codec/chains/svm.js.map +1 -1
  17. package/dist/shared/codec/decoder.d.ts +3 -2
  18. package/dist/shared/codec/decoder.d.ts.map +1 -1
  19. package/dist/shared/codec/decoder.js +11 -16
  20. package/dist/shared/codec/decoder.js.map +1 -1
  21. package/dist/shared/codec/encoder.d.ts +31 -3
  22. package/dist/shared/codec/encoder.d.ts.map +1 -1
  23. package/dist/shared/codec/encoder.js +12 -5
  24. package/dist/shared/codec/encoder.js.map +1 -1
  25. package/dist/shared/codec/index.d.ts +1 -1
  26. package/dist/shared/codec/index.d.ts.map +1 -1
  27. package/dist/shared/codec/index.js +13 -8
  28. package/dist/shared/codec/index.js.map +1 -1
  29. package/dist/shared/types/intents.d.ts +8 -4
  30. package/dist/shared/types/intents.d.ts.map +1 -1
  31. package/dist/shared/validators/intents.d.ts +225 -7
  32. package/dist/shared/validators/intents.d.ts.map +1 -1
  33. package/dist/shared/validators/intents.js +24 -8
  34. package/dist/shared/validators/intents.js.map +1 -1
  35. package/package.json +1 -1
@@ -2,7 +2,8 @@ import { z } from 'zod';
2
2
  export declare enum OpType {
3
3
  Swap = 0,
4
4
  Transfer = 1,
5
- Call = 2
5
+ EvmCall = 2,
6
+ SvmCall = 3
6
7
  }
7
8
  export declare const MaxFeeValidator: z.ZodObject<{
8
9
  token: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
@@ -551,8 +552,8 @@ export declare const TransferIntentValidator: z.ZodObject<z.objectUtil.extendSha
551
552
  recipient: string;
552
553
  }[];
553
554
  }>;
554
- export declare const CallIntentCallValidator: z.ZodObject<{
555
- target: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
555
+ export declare const EvmCallIntentCallValidator: z.ZodObject<{
556
+ target: z.ZodEffects<z.ZodString, string, string>;
556
557
  data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
557
558
  value: z.ZodEffects<z.ZodString, string, string>;
558
559
  }, "strip", z.ZodTypeAny, {
@@ -564,10 +565,10 @@ export declare const CallIntentCallValidator: z.ZodObject<{
564
565
  value: string;
565
566
  target: string;
566
567
  }>;
567
- export declare const CallIntentDataValidator: z.ZodObject<{
568
+ export declare const EvmCallIntentDataValidator: z.ZodObject<{
568
569
  chainId: z.ZodEffects<z.ZodNumber, number, number>;
569
570
  calls: z.ZodArray<z.ZodObject<{
570
- target: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
571
+ target: z.ZodEffects<z.ZodString, string, string>;
571
572
  data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
572
573
  value: z.ZodEffects<z.ZodString, string, string>;
573
574
  }, "strip", z.ZodTypeAny, {
@@ -594,7 +595,7 @@ export declare const CallIntentDataValidator: z.ZodObject<{
594
595
  target: string;
595
596
  }[];
596
597
  }>;
597
- export declare const CallIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
598
+ export declare const EvmCallIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
598
599
  op: z.ZodNativeEnum<typeof OpType>;
599
600
  user: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
600
601
  settler: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
@@ -626,7 +627,7 @@ export declare const CallIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
626
627
  }, {
627
628
  chainId: z.ZodEffects<z.ZodNumber, number, number>;
628
629
  calls: z.ZodArray<z.ZodObject<{
629
- target: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
630
+ target: z.ZodEffects<z.ZodString, string, string>;
630
631
  data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
631
632
  value: z.ZodEffects<z.ZodString, string, string>;
632
633
  }, "strip", z.ZodTypeAny, {
@@ -685,4 +686,221 @@ export declare const CallIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
685
686
  target: string;
686
687
  }[];
687
688
  }>;
689
+ export declare const SvmAccountMetaValidator: z.ZodObject<{
690
+ pubkey: z.ZodEffects<z.ZodString, string, string>;
691
+ isSigner: z.ZodBoolean;
692
+ isWritable: z.ZodBoolean;
693
+ }, "strip", z.ZodTypeAny, {
694
+ pubkey: string;
695
+ isSigner: boolean;
696
+ isWritable: boolean;
697
+ }, {
698
+ pubkey: string;
699
+ isSigner: boolean;
700
+ isWritable: boolean;
701
+ }>;
702
+ export declare const SvmCallIntentInstructionValidator: z.ZodObject<{
703
+ programId: z.ZodEffects<z.ZodString, string, string>;
704
+ accountsMeta: z.ZodArray<z.ZodObject<{
705
+ pubkey: z.ZodEffects<z.ZodString, string, string>;
706
+ isSigner: z.ZodBoolean;
707
+ isWritable: z.ZodBoolean;
708
+ }, "strip", z.ZodTypeAny, {
709
+ pubkey: string;
710
+ isSigner: boolean;
711
+ isWritable: boolean;
712
+ }, {
713
+ pubkey: string;
714
+ isSigner: boolean;
715
+ isWritable: boolean;
716
+ }>, "many">;
717
+ data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
718
+ }, "strip", z.ZodTypeAny, {
719
+ data: string;
720
+ programId: string;
721
+ accountsMeta: {
722
+ pubkey: string;
723
+ isSigner: boolean;
724
+ isWritable: boolean;
725
+ }[];
726
+ }, {
727
+ data: string;
728
+ programId: string;
729
+ accountsMeta: {
730
+ pubkey: string;
731
+ isSigner: boolean;
732
+ isWritable: boolean;
733
+ }[];
734
+ }>;
735
+ export declare const SvmCallIntentDataValidator: z.ZodObject<{
736
+ instructions: z.ZodArray<z.ZodObject<{
737
+ programId: z.ZodEffects<z.ZodString, string, string>;
738
+ accountsMeta: z.ZodArray<z.ZodObject<{
739
+ pubkey: z.ZodEffects<z.ZodString, string, string>;
740
+ isSigner: z.ZodBoolean;
741
+ isWritable: z.ZodBoolean;
742
+ }, "strip", z.ZodTypeAny, {
743
+ pubkey: string;
744
+ isSigner: boolean;
745
+ isWritable: boolean;
746
+ }, {
747
+ pubkey: string;
748
+ isSigner: boolean;
749
+ isWritable: boolean;
750
+ }>, "many">;
751
+ data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
752
+ }, "strip", z.ZodTypeAny, {
753
+ data: string;
754
+ programId: string;
755
+ accountsMeta: {
756
+ pubkey: string;
757
+ isSigner: boolean;
758
+ isWritable: boolean;
759
+ }[];
760
+ }, {
761
+ data: string;
762
+ programId: string;
763
+ accountsMeta: {
764
+ pubkey: string;
765
+ isSigner: boolean;
766
+ isWritable: boolean;
767
+ }[];
768
+ }>, "many">;
769
+ }, "strip", z.ZodTypeAny, {
770
+ instructions: {
771
+ data: string;
772
+ programId: string;
773
+ accountsMeta: {
774
+ pubkey: string;
775
+ isSigner: boolean;
776
+ isWritable: boolean;
777
+ }[];
778
+ }[];
779
+ }, {
780
+ instructions: {
781
+ data: string;
782
+ programId: string;
783
+ accountsMeta: {
784
+ pubkey: string;
785
+ isSigner: boolean;
786
+ isWritable: boolean;
787
+ }[];
788
+ }[];
789
+ }>;
790
+ export declare const SvmCallIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
791
+ op: z.ZodNativeEnum<typeof OpType>;
792
+ user: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
793
+ settler: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
794
+ nonce: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
795
+ deadline: z.ZodEffects<z.ZodString, string, string>;
796
+ data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
797
+ maxFees: z.ZodArray<z.ZodObject<{
798
+ token: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
799
+ amount: z.ZodEffects<z.ZodString, string, string>;
800
+ }, "strip", z.ZodTypeAny, {
801
+ token: string;
802
+ amount: string;
803
+ }, {
804
+ token: string;
805
+ amount: string;
806
+ }>, "many">;
807
+ events: z.ZodArray<z.ZodObject<{
808
+ topic: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
809
+ data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
810
+ }, "strip", z.ZodTypeAny, {
811
+ data: string;
812
+ topic: string;
813
+ }, {
814
+ data: string;
815
+ topic: string;
816
+ }>, "many">;
817
+ configSig: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
818
+ minValidations: z.ZodNumber;
819
+ }, {
820
+ instructions: z.ZodArray<z.ZodObject<{
821
+ programId: z.ZodEffects<z.ZodString, string, string>;
822
+ accountsMeta: z.ZodArray<z.ZodObject<{
823
+ pubkey: z.ZodEffects<z.ZodString, string, string>;
824
+ isSigner: z.ZodBoolean;
825
+ isWritable: z.ZodBoolean;
826
+ }, "strip", z.ZodTypeAny, {
827
+ pubkey: string;
828
+ isSigner: boolean;
829
+ isWritable: boolean;
830
+ }, {
831
+ pubkey: string;
832
+ isSigner: boolean;
833
+ isWritable: boolean;
834
+ }>, "many">;
835
+ data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
836
+ }, "strip", z.ZodTypeAny, {
837
+ data: string;
838
+ programId: string;
839
+ accountsMeta: {
840
+ pubkey: string;
841
+ isSigner: boolean;
842
+ isWritable: boolean;
843
+ }[];
844
+ }, {
845
+ data: string;
846
+ programId: string;
847
+ accountsMeta: {
848
+ pubkey: string;
849
+ isSigner: boolean;
850
+ isWritable: boolean;
851
+ }[];
852
+ }>, "many">;
853
+ }>, "strip", z.ZodTypeAny, {
854
+ data: string;
855
+ configSig: string;
856
+ op: OpType;
857
+ user: string;
858
+ settler: string;
859
+ nonce: string;
860
+ deadline: string;
861
+ maxFees: {
862
+ token: string;
863
+ amount: string;
864
+ }[];
865
+ events: {
866
+ data: string;
867
+ topic: string;
868
+ }[];
869
+ minValidations: number;
870
+ instructions: {
871
+ data: string;
872
+ programId: string;
873
+ accountsMeta: {
874
+ pubkey: string;
875
+ isSigner: boolean;
876
+ isWritable: boolean;
877
+ }[];
878
+ }[];
879
+ }, {
880
+ data: string;
881
+ configSig: string;
882
+ op: OpType;
883
+ user: string;
884
+ settler: string;
885
+ nonce: string;
886
+ deadline: string;
887
+ maxFees: {
888
+ token: string;
889
+ amount: string;
890
+ }[];
891
+ events: {
892
+ data: string;
893
+ topic: string;
894
+ }[];
895
+ minValidations: number;
896
+ instructions: {
897
+ data: string;
898
+ programId: string;
899
+ accountsMeta: {
900
+ pubkey: string;
901
+ isSigner: boolean;
902
+ isWritable: boolean;
903
+ }[];
904
+ }[];
905
+ }>;
688
906
  //# sourceMappingURL=intents.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"intents.d.ts","sourceRoot":"","sources":["../../../src/shared/validators/intents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAWvB,oBAAY,MAAM;IAChB,IAAI,IAAA;IACJ,QAAQ,IAAA;IACR,IAAI,IAAA;CACL;AAED,eAAO,MAAM,eAAe;;;;;;;;;EAG1B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;WAA2B,C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exports.CallIntentCallValidator = exports.TransferIntentValidator = exports.TransferIntentDataValidator = exports.TransferIntentTransferValidator = exports.SwapProposalValidator = exports.SwapProposalDataValidator = exports.SwapIntentValidator = exports.SwapIntentDataValidator = exports.SwapIntentTokenOutValidator = exports.SwapIntentTokenInValidator = exports.ProposalValidator = exports.ValidatedIntentValidator = exports.IntentValidator = exports.IntentEventsValidator = exports.IntentEventValidator = exports.MaxFeesValidator = exports.MaxFeeValidator = exports.OpType = void 0;
3
+ exports.SvmCallIntentValidator = exports.SvmCallIntentDataValidator = exports.SvmCallIntentInstructionValidator = exports.SvmAccountMetaValidator = exports.EvmCallIntentValidator = exports.EvmCallIntentDataValidator = exports.EvmCallIntentCallValidator = exports.TransferIntentValidator = exports.TransferIntentDataValidator = exports.TransferIntentTransferValidator = exports.SwapProposalValidator = exports.SwapProposalDataValidator = exports.SwapIntentValidator = exports.SwapIntentDataValidator = exports.SwapIntentTokenOutValidator = exports.SwapIntentTokenInValidator = exports.ProposalValidator = exports.ValidatedIntentValidator = exports.IntentValidator = exports.IntentEventsValidator = exports.IntentEventValidator = exports.MaxFeesValidator = exports.MaxFeeValidator = exports.OpType = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const primitives_1 = require("./primitives");
6
6
  var OpType;
7
7
  (function (OpType) {
8
8
  OpType[OpType["Swap"] = 0] = "Swap";
9
9
  OpType[OpType["Transfer"] = 1] = "Transfer";
10
- OpType[OpType["Call"] = 2] = "Call";
10
+ OpType[OpType["EvmCall"] = 2] = "EvmCall";
11
+ OpType[OpType["SvmCall"] = 3] = "SvmCall";
11
12
  })(OpType || (exports.OpType = OpType = {}));
12
13
  exports.MaxFeeValidator = zod_1.z.object({
13
14
  token: primitives_1.AddressValidator,
@@ -74,15 +75,30 @@ exports.TransferIntentDataValidator = zod_1.z.object({
74
75
  transfers: zod_1.z.array(exports.TransferIntentTransferValidator),
75
76
  });
76
77
  exports.TransferIntentValidator = exports.IntentValidator.merge(exports.TransferIntentDataValidator);
77
- // === CALL ===
78
- exports.CallIntentCallValidator = zod_1.z.object({
79
- target: primitives_1.AddressValidator,
78
+ // === EVM CALL ===
79
+ exports.EvmCallIntentCallValidator = zod_1.z.object({
80
+ target: primitives_1.EvmAddressValidator,
80
81
  data: primitives_1.HexValidator,
81
82
  value: primitives_1.BigIntegerValidator,
82
83
  });
83
- exports.CallIntentDataValidator = zod_1.z.object({
84
+ exports.EvmCallIntentDataValidator = zod_1.z.object({
84
85
  chainId: primitives_1.ChainIdValidator,
85
- calls: zod_1.z.array(exports.CallIntentCallValidator),
86
+ calls: zod_1.z.array(exports.EvmCallIntentCallValidator),
86
87
  });
87
- exports.CallIntentValidator = exports.IntentValidator.merge(exports.CallIntentDataValidator);
88
+ exports.EvmCallIntentValidator = exports.IntentValidator.merge(exports.EvmCallIntentDataValidator);
89
+ // === SVM CALL ===
90
+ exports.SvmAccountMetaValidator = zod_1.z.object({
91
+ pubkey: primitives_1.SvmAddressValidator,
92
+ isSigner: zod_1.z.boolean(),
93
+ isWritable: zod_1.z.boolean(),
94
+ });
95
+ exports.SvmCallIntentInstructionValidator = zod_1.z.object({
96
+ programId: primitives_1.SvmAddressValidator,
97
+ accountsMeta: zod_1.z.array(exports.SvmAccountMetaValidator),
98
+ data: primitives_1.HexValidator,
99
+ });
100
+ exports.SvmCallIntentDataValidator = zod_1.z.object({
101
+ instructions: zod_1.z.array(exports.SvmCallIntentInstructionValidator),
102
+ });
103
+ exports.SvmCallIntentValidator = exports.IntentValidator.merge(exports.SvmCallIntentDataValidator);
88
104
  //# sourceMappingURL=intents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"intents.js","sourceRoot":"","sources":["../../../src/shared/validators/intents.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,6CAOqB;AAErB,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,mCAAI,CAAA;IACJ,2CAAQ,CAAA;IACR,mCAAI,CAAA;AACN,CAAC,EAJW,MAAM,sBAAN,MAAM,QAIjB;AAE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nB,CAAC,CAAA;AAEW,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,yCAAiC,CAAC;CACzD,CAAC,CAAA;AAEW,QAAA,sBAAsB,GAAG,uBAAe,CAAC,KAAK,CAAC,kCAA0B,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimicprotocol/sdk",
3
- "version": "0.0.1-rc.16",
3
+ "version": "0.0.1-rc.17",
4
4
  "license": "GPL-3.0",
5
5
  "private": false,
6
6
  "description": "Mimic Protocol SDK",