@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.
- package/dist/client/domains/IntentsClient.d.ts +14 -7
- package/dist/client/domains/IntentsClient.d.ts.map +1 -1
- package/dist/client/domains/IntentsClient.js +15 -6
- package/dist/client/domains/IntentsClient.js.map +1 -1
- package/dist/relayer/validators.d.ts +358 -2
- package/dist/relayer/validators.d.ts.map +1 -1
- package/dist/relayer/validators.js +2 -1
- package/dist/relayer/validators.js.map +1 -1
- package/dist/shared/codec/chains/evm.d.ts +3 -1
- package/dist/shared/codec/chains/evm.d.ts.map +1 -1
- package/dist/shared/codec/chains/evm.js +19 -0
- package/dist/shared/codec/chains/evm.js.map +1 -1
- package/dist/shared/codec/chains/svm.d.ts +15 -10
- package/dist/shared/codec/chains/svm.d.ts.map +1 -1
- package/dist/shared/codec/chains/svm.js +91 -35
- package/dist/shared/codec/chains/svm.js.map +1 -1
- package/dist/shared/codec/decoder.d.ts +3 -2
- package/dist/shared/codec/decoder.d.ts.map +1 -1
- package/dist/shared/codec/decoder.js +11 -16
- package/dist/shared/codec/decoder.js.map +1 -1
- package/dist/shared/codec/encoder.d.ts +31 -3
- package/dist/shared/codec/encoder.d.ts.map +1 -1
- package/dist/shared/codec/encoder.js +12 -5
- package/dist/shared/codec/encoder.js.map +1 -1
- package/dist/shared/codec/index.d.ts +1 -1
- package/dist/shared/codec/index.d.ts.map +1 -1
- package/dist/shared/codec/index.js +13 -8
- package/dist/shared/codec/index.js.map +1 -1
- package/dist/shared/types/intents.d.ts +8 -4
- package/dist/shared/types/intents.d.ts.map +1 -1
- package/dist/shared/validators/intents.d.ts +225 -7
- package/dist/shared/validators/intents.d.ts.map +1 -1
- package/dist/shared/validators/intents.js +24 -8
- package/dist/shared/validators/intents.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiaIntent, IntentsGetRequest } from '../../axia';
|
|
2
2
|
import { OpType } from '../../shared';
|
|
3
|
-
import {
|
|
3
|
+
import { EvmCallIntent, EvmCallIntentData, Intent, Proposal, SvmCallIntent, SvmCallIntentData, SwapIntent, SwapIntentData, SwapProposal, SwapProposalData, TransferIntent, TransferIntentData } from '../../shared/types';
|
|
4
4
|
import { MethodRequestConfig } from '../core';
|
|
5
5
|
import Client from './Client';
|
|
6
6
|
export default class IntentsClient extends Client {
|
|
@@ -10,7 +10,8 @@ export default class IntentsClient extends Client {
|
|
|
10
10
|
encodeProposal(data: Proposal, intentOrHash: string | Intent): string;
|
|
11
11
|
encodeSwapIntentData(data: SwapIntentData): string;
|
|
12
12
|
encodeTransferIntentData(data: TransferIntentData): string;
|
|
13
|
-
|
|
13
|
+
encodeEvmCallIntentData(data: EvmCallIntentData): string;
|
|
14
|
+
encodeSvmCallIntentData(data: SvmCallIntentData): string;
|
|
14
15
|
encodeSwapProposalData(data: SwapProposalData): string;
|
|
15
16
|
decodeProposal(data: Proposal): SwapProposal | Proposal;
|
|
16
17
|
decodeSwapIntent(data: Intent & {
|
|
@@ -19,17 +20,23 @@ export default class IntentsClient extends Client {
|
|
|
19
20
|
decodeTransferIntent(data: Intent & {
|
|
20
21
|
op: OpType.Transfer;
|
|
21
22
|
}): TransferIntent;
|
|
22
|
-
|
|
23
|
-
op: OpType.
|
|
24
|
-
}):
|
|
23
|
+
decodeEvmCallIntent(data: Intent & {
|
|
24
|
+
op: OpType.EvmCall;
|
|
25
|
+
}): EvmCallIntent;
|
|
26
|
+
decodeSvmCallIntent(data: Intent & {
|
|
27
|
+
op: OpType.SvmCall;
|
|
28
|
+
}): SvmCallIntent;
|
|
25
29
|
isSwap(data: Intent): data is Intent & {
|
|
26
30
|
op: OpType.Swap;
|
|
27
31
|
};
|
|
28
32
|
isTransfer(data: Intent): data is Intent & {
|
|
29
33
|
op: OpType.Transfer;
|
|
30
34
|
};
|
|
31
|
-
|
|
32
|
-
op: OpType.
|
|
35
|
+
isEvmCall(data: Intent): data is Intent & {
|
|
36
|
+
op: OpType.EvmCall;
|
|
37
|
+
};
|
|
38
|
+
isSvmCall(data: Intent): data is Intent & {
|
|
39
|
+
op: OpType.SvmCall;
|
|
33
40
|
};
|
|
34
41
|
getChainId(data: Intent): number;
|
|
35
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntentsClient.d.ts","sourceRoot":"","sources":["../../../src/client/domains/IntentsClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA6C,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACrG,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAGrC,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"IntentsClient.d.ts","sourceRoot":"","sources":["../../../src/client/domains/IntentsClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA6C,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACrG,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAGrC,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,MAAM,EACN,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EACnB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAE7C,OAAO,MAAM,MAAM,UAAU,CAAA;AAE7B,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,MAAM;IACzC,GAAG,CAAC,KAAK,CAAC,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAInF,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;IAIhF,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAA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AG,IAAI,IAAI,MAAM,GAAG;QAAE,EAAE,EAAE,MAAM,CAAC,OAAO,CAAA;KAAE;IAIhE,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAGjC"}
|
|
@@ -50,8 +50,11 @@ class IntentsClient extends Client_1.default {
|
|
|
50
50
|
encodeTransferIntentData(data) {
|
|
51
51
|
return encoder.encodeTransferIntent(data);
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
return encoder.
|
|
53
|
+
encodeEvmCallIntentData(data) {
|
|
54
|
+
return encoder.encodeEvmCallIntent(data);
|
|
55
|
+
}
|
|
56
|
+
encodeSvmCallIntentData(data) {
|
|
57
|
+
return encoder.encodeSvmCallIntent(data);
|
|
55
58
|
}
|
|
56
59
|
encodeSwapProposalData(data) {
|
|
57
60
|
return encoder.encodeSwapProposal(data);
|
|
@@ -67,8 +70,11 @@ class IntentsClient extends Client_1.default {
|
|
|
67
70
|
decodeTransferIntent(data) {
|
|
68
71
|
return decoder.decodeTransferIntent(data);
|
|
69
72
|
}
|
|
70
|
-
|
|
71
|
-
return decoder.
|
|
73
|
+
decodeEvmCallIntent(data) {
|
|
74
|
+
return decoder.decodeEvmCallIntent(data);
|
|
75
|
+
}
|
|
76
|
+
decodeSvmCallIntent(data) {
|
|
77
|
+
return decoder.decodeSvmCallIntent(data);
|
|
72
78
|
}
|
|
73
79
|
isSwap(data) {
|
|
74
80
|
return data.op === shared_1.OpType.Swap;
|
|
@@ -76,8 +82,11 @@ class IntentsClient extends Client_1.default {
|
|
|
76
82
|
isTransfer(data) {
|
|
77
83
|
return data.op === shared_1.OpType.Transfer;
|
|
78
84
|
}
|
|
79
|
-
|
|
80
|
-
return data.op === shared_1.OpType.
|
|
85
|
+
isEvmCall(data) {
|
|
86
|
+
return data.op === shared_1.OpType.EvmCall;
|
|
87
|
+
}
|
|
88
|
+
isSvmCall(data) {
|
|
89
|
+
return data.op === shared_1.OpType.SvmCall;
|
|
81
90
|
}
|
|
82
91
|
getChainId(data) {
|
|
83
92
|
return decoder.getChainId(data);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntentsClient.js","sourceRoot":"","sources":["../../../src/client/domains/IntentsClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAqG;AACrG,yCAAqC;AACrC,oEAAqD;AACrD,oEAAqD;
|
|
1
|
+
{"version":3,"file":"IntentsClient.js","sourceRoot":"","sources":["../../../src/client/domains/IntentsClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAqG;AACrG,yCAAqC;AACrC,oEAAqD;AACrD,oEAAqD;AAiBrD,sDAA6B;AAE7B,MAAqB,aAAc,SAAQ,gBAAM;IAC/C,KAAK,CAAC,GAAG,CAAC,KAAyB,EAAE,MAA4B;QAC/D,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,2BAAoB,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;IAClE,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,IAAY,EAAE,MAA4B;QACxD,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,EAAE,0BAAmB,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;IAC7E,CAAC;IAED,YAAY,CAAC,IAAY;QACvB,OAAO,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;IACnC,CAAC;IAED,cAAc,CAAC,IAAc,EAAE,YAA6B;QAC1D,OAAO,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,CAAA;IACnD,CAAC;IAED,oBAAoB,CAAC,IAAoB;QACvC,OAAO,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAA;IACvC,CAAC;IAED,wBAAwB,CAAC,IAAwB;QAC/C,OAAO,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;IAC3C,CAAC;IAED,uBAAuB,CAAC,IAAuB;QAC7C,OAAO,OAAO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AAI,CAAC,CAAA;IACjC,CAAC;CACF;AA9ED,gCA8EC"}
|
|
@@ -691,7 +691,7 @@ export declare const RunnerExecutionResultDataValidator: z.ZodObject<{
|
|
|
691
691
|
}, {
|
|
692
692
|
chainId: z.ZodEffects<z.ZodNumber, number, number>;
|
|
693
693
|
calls: z.ZodArray<z.ZodObject<{
|
|
694
|
-
target: z.ZodEffects<z.
|
|
694
|
+
target: z.ZodEffects<z.ZodString, string, string>;
|
|
695
695
|
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
696
696
|
value: z.ZodEffects<z.ZodString, string, string>;
|
|
697
697
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -743,6 +743,115 @@ export declare const RunnerExecutionResultDataValidator: z.ZodObject<{
|
|
|
743
743
|
value: string;
|
|
744
744
|
target: string;
|
|
745
745
|
}[];
|
|
746
|
+
}>, z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
747
|
+
op: z.ZodNativeEnum<typeof import("../shared").OpType>;
|
|
748
|
+
user: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
749
|
+
settler: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
750
|
+
nonce: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
751
|
+
deadline: z.ZodEffects<z.ZodString, string, string>;
|
|
752
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
753
|
+
maxFees: z.ZodArray<z.ZodObject<{
|
|
754
|
+
token: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
755
|
+
amount: z.ZodEffects<z.ZodString, string, string>;
|
|
756
|
+
}, "strip", z.ZodTypeAny, {
|
|
757
|
+
token: string;
|
|
758
|
+
amount: string;
|
|
759
|
+
}, {
|
|
760
|
+
token: string;
|
|
761
|
+
amount: string;
|
|
762
|
+
}>, "many">;
|
|
763
|
+
events: z.ZodArray<z.ZodObject<{
|
|
764
|
+
topic: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
765
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
766
|
+
}, "strip", z.ZodTypeAny, {
|
|
767
|
+
data: string;
|
|
768
|
+
topic: string;
|
|
769
|
+
}, {
|
|
770
|
+
data: string;
|
|
771
|
+
topic: string;
|
|
772
|
+
}>, "many">;
|
|
773
|
+
configSig: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
774
|
+
minValidations: z.ZodNumber;
|
|
775
|
+
}, {
|
|
776
|
+
instructions: z.ZodArray<z.ZodObject<{
|
|
777
|
+
programId: z.ZodEffects<z.ZodString, string, string>;
|
|
778
|
+
accountsMeta: z.ZodArray<z.ZodObject<{
|
|
779
|
+
pubkey: z.ZodEffects<z.ZodString, string, string>;
|
|
780
|
+
isSigner: z.ZodBoolean;
|
|
781
|
+
isWritable: z.ZodBoolean;
|
|
782
|
+
}, "strip", z.ZodTypeAny, {
|
|
783
|
+
pubkey: string;
|
|
784
|
+
isSigner: boolean;
|
|
785
|
+
isWritable: boolean;
|
|
786
|
+
}, {
|
|
787
|
+
pubkey: string;
|
|
788
|
+
isSigner: boolean;
|
|
789
|
+
isWritable: boolean;
|
|
790
|
+
}>, "many">;
|
|
791
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
792
|
+
}, "strip", z.ZodTypeAny, {
|
|
793
|
+
data: string;
|
|
794
|
+
programId: string;
|
|
795
|
+
accountsMeta: {
|
|
796
|
+
pubkey: string;
|
|
797
|
+
isSigner: boolean;
|
|
798
|
+
isWritable: boolean;
|
|
799
|
+
}[];
|
|
800
|
+
}, {
|
|
801
|
+
data: string;
|
|
802
|
+
programId: string;
|
|
803
|
+
accountsMeta: {
|
|
804
|
+
pubkey: string;
|
|
805
|
+
isSigner: boolean;
|
|
806
|
+
isWritable: boolean;
|
|
807
|
+
}[];
|
|
808
|
+
}>, "many">;
|
|
809
|
+
}>, "data" | "configSig" | "minValidations">, "strip", z.ZodTypeAny, {
|
|
810
|
+
op: import("../shared").OpType;
|
|
811
|
+
user: string;
|
|
812
|
+
settler: string;
|
|
813
|
+
nonce: string;
|
|
814
|
+
deadline: string;
|
|
815
|
+
maxFees: {
|
|
816
|
+
token: string;
|
|
817
|
+
amount: string;
|
|
818
|
+
}[];
|
|
819
|
+
events: {
|
|
820
|
+
data: string;
|
|
821
|
+
topic: string;
|
|
822
|
+
}[];
|
|
823
|
+
instructions: {
|
|
824
|
+
data: string;
|
|
825
|
+
programId: string;
|
|
826
|
+
accountsMeta: {
|
|
827
|
+
pubkey: string;
|
|
828
|
+
isSigner: boolean;
|
|
829
|
+
isWritable: boolean;
|
|
830
|
+
}[];
|
|
831
|
+
}[];
|
|
832
|
+
}, {
|
|
833
|
+
op: import("../shared").OpType;
|
|
834
|
+
user: string;
|
|
835
|
+
settler: string;
|
|
836
|
+
nonce: string;
|
|
837
|
+
deadline: string;
|
|
838
|
+
maxFees: {
|
|
839
|
+
token: string;
|
|
840
|
+
amount: string;
|
|
841
|
+
}[];
|
|
842
|
+
events: {
|
|
843
|
+
data: string;
|
|
844
|
+
topic: string;
|
|
845
|
+
}[];
|
|
846
|
+
instructions: {
|
|
847
|
+
data: string;
|
|
848
|
+
programId: string;
|
|
849
|
+
accountsMeta: {
|
|
850
|
+
pubkey: string;
|
|
851
|
+
isSigner: boolean;
|
|
852
|
+
isWritable: boolean;
|
|
853
|
+
}[];
|
|
854
|
+
}[];
|
|
746
855
|
}>]>, "many">;
|
|
747
856
|
}, "strip", z.ZodTypeAny, {
|
|
748
857
|
timestamp: number;
|
|
@@ -890,6 +999,29 @@ export declare const RunnerExecutionResultDataValidator: z.ZodObject<{
|
|
|
890
999
|
value: string;
|
|
891
1000
|
target: string;
|
|
892
1001
|
}[];
|
|
1002
|
+
} | {
|
|
1003
|
+
op: import("../shared").OpType;
|
|
1004
|
+
user: string;
|
|
1005
|
+
settler: string;
|
|
1006
|
+
nonce: string;
|
|
1007
|
+
deadline: string;
|
|
1008
|
+
maxFees: {
|
|
1009
|
+
token: string;
|
|
1010
|
+
amount: string;
|
|
1011
|
+
}[];
|
|
1012
|
+
events: {
|
|
1013
|
+
data: string;
|
|
1014
|
+
topic: string;
|
|
1015
|
+
}[];
|
|
1016
|
+
instructions: {
|
|
1017
|
+
data: string;
|
|
1018
|
+
programId: string;
|
|
1019
|
+
accountsMeta: {
|
|
1020
|
+
pubkey: string;
|
|
1021
|
+
isSigner: boolean;
|
|
1022
|
+
isWritable: boolean;
|
|
1023
|
+
}[];
|
|
1024
|
+
}[];
|
|
893
1025
|
})[];
|
|
894
1026
|
}, {
|
|
895
1027
|
timestamp: number;
|
|
@@ -1037,6 +1169,29 @@ export declare const RunnerExecutionResultDataValidator: z.ZodObject<{
|
|
|
1037
1169
|
value: string;
|
|
1038
1170
|
target: string;
|
|
1039
1171
|
}[];
|
|
1172
|
+
} | {
|
|
1173
|
+
op: import("../shared").OpType;
|
|
1174
|
+
user: string;
|
|
1175
|
+
settler: string;
|
|
1176
|
+
nonce: string;
|
|
1177
|
+
deadline: string;
|
|
1178
|
+
maxFees: {
|
|
1179
|
+
token: string;
|
|
1180
|
+
amount: string;
|
|
1181
|
+
}[];
|
|
1182
|
+
events: {
|
|
1183
|
+
data: string;
|
|
1184
|
+
topic: string;
|
|
1185
|
+
}[];
|
|
1186
|
+
instructions: {
|
|
1187
|
+
data: string;
|
|
1188
|
+
programId: string;
|
|
1189
|
+
accountsMeta: {
|
|
1190
|
+
pubkey: string;
|
|
1191
|
+
isSigner: boolean;
|
|
1192
|
+
isWritable: boolean;
|
|
1193
|
+
}[];
|
|
1194
|
+
}[];
|
|
1040
1195
|
})[];
|
|
1041
1196
|
}>;
|
|
1042
1197
|
export declare const RunnerExecutionResultValidator: z.ZodObject<{
|
|
@@ -1724,7 +1879,7 @@ export declare const RunnerExecutionResultValidator: z.ZodObject<{
|
|
|
1724
1879
|
}, {
|
|
1725
1880
|
chainId: z.ZodEffects<z.ZodNumber, number, number>;
|
|
1726
1881
|
calls: z.ZodArray<z.ZodObject<{
|
|
1727
|
-
target: z.ZodEffects<z.
|
|
1882
|
+
target: z.ZodEffects<z.ZodString, string, string>;
|
|
1728
1883
|
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1729
1884
|
value: z.ZodEffects<z.ZodString, string, string>;
|
|
1730
1885
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1776,6 +1931,115 @@ export declare const RunnerExecutionResultValidator: z.ZodObject<{
|
|
|
1776
1931
|
value: string;
|
|
1777
1932
|
target: string;
|
|
1778
1933
|
}[];
|
|
1934
|
+
}>, z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
1935
|
+
op: z.ZodNativeEnum<typeof import("../shared").OpType>;
|
|
1936
|
+
user: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1937
|
+
settler: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1938
|
+
nonce: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1939
|
+
deadline: z.ZodEffects<z.ZodString, string, string>;
|
|
1940
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1941
|
+
maxFees: z.ZodArray<z.ZodObject<{
|
|
1942
|
+
token: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1943
|
+
amount: z.ZodEffects<z.ZodString, string, string>;
|
|
1944
|
+
}, "strip", z.ZodTypeAny, {
|
|
1945
|
+
token: string;
|
|
1946
|
+
amount: string;
|
|
1947
|
+
}, {
|
|
1948
|
+
token: string;
|
|
1949
|
+
amount: string;
|
|
1950
|
+
}>, "many">;
|
|
1951
|
+
events: z.ZodArray<z.ZodObject<{
|
|
1952
|
+
topic: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1953
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1954
|
+
}, "strip", z.ZodTypeAny, {
|
|
1955
|
+
data: string;
|
|
1956
|
+
topic: string;
|
|
1957
|
+
}, {
|
|
1958
|
+
data: string;
|
|
1959
|
+
topic: string;
|
|
1960
|
+
}>, "many">;
|
|
1961
|
+
configSig: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1962
|
+
minValidations: z.ZodNumber;
|
|
1963
|
+
}, {
|
|
1964
|
+
instructions: z.ZodArray<z.ZodObject<{
|
|
1965
|
+
programId: z.ZodEffects<z.ZodString, string, string>;
|
|
1966
|
+
accountsMeta: z.ZodArray<z.ZodObject<{
|
|
1967
|
+
pubkey: z.ZodEffects<z.ZodString, string, string>;
|
|
1968
|
+
isSigner: z.ZodBoolean;
|
|
1969
|
+
isWritable: z.ZodBoolean;
|
|
1970
|
+
}, "strip", z.ZodTypeAny, {
|
|
1971
|
+
pubkey: string;
|
|
1972
|
+
isSigner: boolean;
|
|
1973
|
+
isWritable: boolean;
|
|
1974
|
+
}, {
|
|
1975
|
+
pubkey: string;
|
|
1976
|
+
isSigner: boolean;
|
|
1977
|
+
isWritable: boolean;
|
|
1978
|
+
}>, "many">;
|
|
1979
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1980
|
+
}, "strip", z.ZodTypeAny, {
|
|
1981
|
+
data: string;
|
|
1982
|
+
programId: string;
|
|
1983
|
+
accountsMeta: {
|
|
1984
|
+
pubkey: string;
|
|
1985
|
+
isSigner: boolean;
|
|
1986
|
+
isWritable: boolean;
|
|
1987
|
+
}[];
|
|
1988
|
+
}, {
|
|
1989
|
+
data: string;
|
|
1990
|
+
programId: string;
|
|
1991
|
+
accountsMeta: {
|
|
1992
|
+
pubkey: string;
|
|
1993
|
+
isSigner: boolean;
|
|
1994
|
+
isWritable: boolean;
|
|
1995
|
+
}[];
|
|
1996
|
+
}>, "many">;
|
|
1997
|
+
}>, "data" | "configSig" | "minValidations">, "strip", z.ZodTypeAny, {
|
|
1998
|
+
op: import("../shared").OpType;
|
|
1999
|
+
user: string;
|
|
2000
|
+
settler: string;
|
|
2001
|
+
nonce: string;
|
|
2002
|
+
deadline: string;
|
|
2003
|
+
maxFees: {
|
|
2004
|
+
token: string;
|
|
2005
|
+
amount: string;
|
|
2006
|
+
}[];
|
|
2007
|
+
events: {
|
|
2008
|
+
data: string;
|
|
2009
|
+
topic: string;
|
|
2010
|
+
}[];
|
|
2011
|
+
instructions: {
|
|
2012
|
+
data: string;
|
|
2013
|
+
programId: string;
|
|
2014
|
+
accountsMeta: {
|
|
2015
|
+
pubkey: string;
|
|
2016
|
+
isSigner: boolean;
|
|
2017
|
+
isWritable: boolean;
|
|
2018
|
+
}[];
|
|
2019
|
+
}[];
|
|
2020
|
+
}, {
|
|
2021
|
+
op: import("../shared").OpType;
|
|
2022
|
+
user: string;
|
|
2023
|
+
settler: string;
|
|
2024
|
+
nonce: string;
|
|
2025
|
+
deadline: string;
|
|
2026
|
+
maxFees: {
|
|
2027
|
+
token: string;
|
|
2028
|
+
amount: string;
|
|
2029
|
+
}[];
|
|
2030
|
+
events: {
|
|
2031
|
+
data: string;
|
|
2032
|
+
topic: string;
|
|
2033
|
+
}[];
|
|
2034
|
+
instructions: {
|
|
2035
|
+
data: string;
|
|
2036
|
+
programId: string;
|
|
2037
|
+
accountsMeta: {
|
|
2038
|
+
pubkey: string;
|
|
2039
|
+
isSigner: boolean;
|
|
2040
|
+
isWritable: boolean;
|
|
2041
|
+
}[];
|
|
2042
|
+
}[];
|
|
1779
2043
|
}>]>, "many">;
|
|
1780
2044
|
}, "strip", z.ZodTypeAny, {
|
|
1781
2045
|
timestamp: number;
|
|
@@ -1923,6 +2187,29 @@ export declare const RunnerExecutionResultValidator: z.ZodObject<{
|
|
|
1923
2187
|
value: string;
|
|
1924
2188
|
target: string;
|
|
1925
2189
|
}[];
|
|
2190
|
+
} | {
|
|
2191
|
+
op: import("../shared").OpType;
|
|
2192
|
+
user: string;
|
|
2193
|
+
settler: string;
|
|
2194
|
+
nonce: string;
|
|
2195
|
+
deadline: string;
|
|
2196
|
+
maxFees: {
|
|
2197
|
+
token: string;
|
|
2198
|
+
amount: string;
|
|
2199
|
+
}[];
|
|
2200
|
+
events: {
|
|
2201
|
+
data: string;
|
|
2202
|
+
topic: string;
|
|
2203
|
+
}[];
|
|
2204
|
+
instructions: {
|
|
2205
|
+
data: string;
|
|
2206
|
+
programId: string;
|
|
2207
|
+
accountsMeta: {
|
|
2208
|
+
pubkey: string;
|
|
2209
|
+
isSigner: boolean;
|
|
2210
|
+
isWritable: boolean;
|
|
2211
|
+
}[];
|
|
2212
|
+
}[];
|
|
1926
2213
|
})[];
|
|
1927
2214
|
}, {
|
|
1928
2215
|
timestamp: number;
|
|
@@ -2070,6 +2357,29 @@ export declare const RunnerExecutionResultValidator: z.ZodObject<{
|
|
|
2070
2357
|
value: string;
|
|
2071
2358
|
target: string;
|
|
2072
2359
|
}[];
|
|
2360
|
+
} | {
|
|
2361
|
+
op: import("../shared").OpType;
|
|
2362
|
+
user: string;
|
|
2363
|
+
settler: string;
|
|
2364
|
+
nonce: string;
|
|
2365
|
+
deadline: string;
|
|
2366
|
+
maxFees: {
|
|
2367
|
+
token: string;
|
|
2368
|
+
amount: string;
|
|
2369
|
+
}[];
|
|
2370
|
+
events: {
|
|
2371
|
+
data: string;
|
|
2372
|
+
topic: string;
|
|
2373
|
+
}[];
|
|
2374
|
+
instructions: {
|
|
2375
|
+
data: string;
|
|
2376
|
+
programId: string;
|
|
2377
|
+
accountsMeta: {
|
|
2378
|
+
pubkey: string;
|
|
2379
|
+
isSigner: boolean;
|
|
2380
|
+
isWritable: boolean;
|
|
2381
|
+
}[];
|
|
2382
|
+
}[];
|
|
2073
2383
|
})[];
|
|
2074
2384
|
}>;
|
|
2075
2385
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -2219,6 +2529,29 @@ export declare const RunnerExecutionResultValidator: z.ZodObject<{
|
|
|
2219
2529
|
value: string;
|
|
2220
2530
|
target: string;
|
|
2221
2531
|
}[];
|
|
2532
|
+
} | {
|
|
2533
|
+
op: import("../shared").OpType;
|
|
2534
|
+
user: string;
|
|
2535
|
+
settler: string;
|
|
2536
|
+
nonce: string;
|
|
2537
|
+
deadline: string;
|
|
2538
|
+
maxFees: {
|
|
2539
|
+
token: string;
|
|
2540
|
+
amount: string;
|
|
2541
|
+
}[];
|
|
2542
|
+
events: {
|
|
2543
|
+
data: string;
|
|
2544
|
+
topic: string;
|
|
2545
|
+
}[];
|
|
2546
|
+
instructions: {
|
|
2547
|
+
data: string;
|
|
2548
|
+
programId: string;
|
|
2549
|
+
accountsMeta: {
|
|
2550
|
+
pubkey: string;
|
|
2551
|
+
isSigner: boolean;
|
|
2552
|
+
isWritable: boolean;
|
|
2553
|
+
}[];
|
|
2554
|
+
}[];
|
|
2222
2555
|
})[];
|
|
2223
2556
|
};
|
|
2224
2557
|
status: "success" | "error";
|
|
@@ -2370,6 +2703,29 @@ export declare const RunnerExecutionResultValidator: z.ZodObject<{
|
|
|
2370
2703
|
value: string;
|
|
2371
2704
|
target: string;
|
|
2372
2705
|
}[];
|
|
2706
|
+
} | {
|
|
2707
|
+
op: import("../shared").OpType;
|
|
2708
|
+
user: string;
|
|
2709
|
+
settler: string;
|
|
2710
|
+
nonce: string;
|
|
2711
|
+
deadline: string;
|
|
2712
|
+
maxFees: {
|
|
2713
|
+
token: string;
|
|
2714
|
+
amount: string;
|
|
2715
|
+
}[];
|
|
2716
|
+
events: {
|
|
2717
|
+
data: string;
|
|
2718
|
+
topic: string;
|
|
2719
|
+
}[];
|
|
2720
|
+
instructions: {
|
|
2721
|
+
data: string;
|
|
2722
|
+
programId: string;
|
|
2723
|
+
accountsMeta: {
|
|
2724
|
+
pubkey: string;
|
|
2725
|
+
isSigner: boolean;
|
|
2726
|
+
isWritable: boolean;
|
|
2727
|
+
}[];
|
|
2728
|
+
}[];
|
|
2373
2729
|
})[];
|
|
2374
2730
|
};
|
|
2375
2731
|
status: "success" | "error";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/relayer/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAcvB,eAAO,MAAM,uBAAuB;;;;;;;;;EAGlC,CAAA;AAEF,eAAO,MAAM,kCAAkC
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/relayer/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAcvB,eAAO,MAAM,uBAAuB;;;;;;;;;EAGlC,CAAA;AAEF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIzC,CAAA;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO1C,CAAA"}
|
|
@@ -17,7 +17,8 @@ exports.RunnerExecutionResultDataValidator = zod_1.z.object({
|
|
|
17
17
|
outputs: zod_1.z.array(zod_1.z.union([
|
|
18
18
|
shared_1.SwapIntentValidator.omit({ data: true, configSig: true, minValidations: true }),
|
|
19
19
|
shared_1.TransferIntentValidator.omit({ data: true, configSig: true, minValidations: true }),
|
|
20
|
-
shared_1.
|
|
20
|
+
shared_1.EvmCallIntentValidator.omit({ data: true, configSig: true, minValidations: true }),
|
|
21
|
+
validators_1.SvmCallIntentValidator.omit({ data: true, configSig: true, minValidations: true }),
|
|
21
22
|
])),
|
|
22
23
|
});
|
|
23
24
|
exports.RunnerExecutionResultValidator = zod_1.z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/relayer/validators.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,kCAAkD;AAClD,sCAAmD;AACnD,sCAOkB;AAClB,
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/relayer/validators.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,kCAAkD;AAClD,sCAAmD;AACnD,sCAOkB;AAClB,qDAAwG;AAE3F,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,qBAAY;IAClB,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,4BAAe,CAAC,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAA;AAEW,QAAA,kCAAkC,GAAG,OAAC,CAAC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,9 @@
|
|
|
1
|
-
import { Intent, SwapIntent, SwapIntentData, TransferIntent, TransferIntentData } from '../../types';
|
|
1
|
+
import { EvmCallIntent, EvmCallIntentData, Intent, SwapIntent, SwapIntentData, TransferIntent, TransferIntentData } from '../../types';
|
|
2
2
|
export declare function evmEncodeIntent(intent: Intent): string;
|
|
3
3
|
export declare function evmEncodeTransferIntent(intent: TransferIntentData): string;
|
|
4
4
|
export declare function evmDecodeTransferIntent(intent: Intent): TransferIntent;
|
|
5
5
|
export declare function evmEncodeSwapIntent(intent: SwapIntentData): string;
|
|
6
6
|
export declare function evmDecodeSwapIntent(intent: Intent): SwapIntent;
|
|
7
|
+
export declare function evmEncodeCallIntent(intent: EvmCallIntentData): string;
|
|
8
|
+
export declare function evmDecodeCallIntent(intent: Intent): EvmCallIntent;
|
|
7
9
|
//# sourceMappingURL=evm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../../src/shared/codec/chains/evm.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../../src/shared/codec/chains/evm.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,MAAM,EAGN,UAAU,EACV,cAAc,EACd,cAAc,EACd,kBAAkB,EACnB,MAAM,aAAa,CAAA;AAEpB,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA6BtD;AA0BD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAU1E;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CActE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAYlE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAsB9D;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAKrE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAcjE"}
|
|
@@ -5,6 +5,8 @@ exports.evmEncodeTransferIntent = evmEncodeTransferIntent;
|
|
|
5
5
|
exports.evmDecodeTransferIntent = evmDecodeTransferIntent;
|
|
6
6
|
exports.evmEncodeSwapIntent = evmEncodeSwapIntent;
|
|
7
7
|
exports.evmDecodeSwapIntent = evmDecodeSwapIntent;
|
|
8
|
+
exports.evmEncodeCallIntent = evmEncodeCallIntent;
|
|
9
|
+
exports.evmDecodeCallIntent = evmDecodeCallIntent;
|
|
8
10
|
const ethers_1 = require("ethers");
|
|
9
11
|
const eip712Types_1 = require("../../eip712Types");
|
|
10
12
|
function evmEncodeIntent(intent) {
|
|
@@ -100,4 +102,21 @@ function evmDecodeSwapIntent(intent) {
|
|
|
100
102
|
tokensOut,
|
|
101
103
|
};
|
|
102
104
|
}
|
|
105
|
+
function evmEncodeCallIntent(intent) {
|
|
106
|
+
return ethers_1.AbiCoder.defaultAbiCoder().encode([eip712Types_1.CALL_INTENT_ABI_TYPE], [[intent.chainId, (intent.calls || []).map((call) => [call.target, call.data, call.value])]]);
|
|
107
|
+
}
|
|
108
|
+
function evmDecodeCallIntent(intent) {
|
|
109
|
+
const [decoded] = ethers_1.AbiCoder.defaultAbiCoder().decode([eip712Types_1.CALL_INTENT_ABI_TYPE], intent.data);
|
|
110
|
+
const [chainId, callsRaw] = decoded;
|
|
111
|
+
const calls = callsRaw.map(([target, data, value]) => ({
|
|
112
|
+
target: target.toLowerCase(),
|
|
113
|
+
data,
|
|
114
|
+
value: value.toString(),
|
|
115
|
+
}));
|
|
116
|
+
return {
|
|
117
|
+
...intent,
|
|
118
|
+
chainId: parseInt(chainId),
|
|
119
|
+
calls,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
103
122
|
//# sourceMappingURL=evm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.js","sourceRoot":"","sources":["../../../../src/shared/codec/chains/evm.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"evm.js","sourceRoot":"","sources":["../../../../src/shared/codec/chains/evm.ts"],"names":[],"mappings":";;AAsBA,0CA6BC;AA0BD,0DAUC;AAED,0DAcC;AAED,kDAYC;AAED,kDAsBC;AAED,kDAKC;AAED,kDAcC;AApKD,mCAA4C;AAE5C,mDAO0B;AAa1B,SAAgB,eAAe,CAAC,MAAc;IAC5C,OAAO,iBAAQ,CAAC,eAAe,EAAE,CAAC,MAAM,CACtC;QACE,SAAS,EAAE,YAAY;QACvB,OAAO,EAAE,KAAK;QACd,SAAS,EAAE,OAAO;QAClB,SAAS,EAAE,UAAU;QACrB,SAAS,EAAE,QAAQ;QACnB,SAAS,EAAE,WAAW;QACtB,SAAS,EAAE,oBAAoB;QAC/B,SAAS,EAAE,wBAAwB;QACnC,SAAS,EAAE,sBAAsB;QACjC,OAAO,EAAE,YAAY;QACrB,SAAS,EAAE,iBAAiB;KAC7B,EACD;QACE,8BAAgB;QAChB,MAAM,CAAC,EAAE;QACT,MAAM,CAAC,IAAI;QACX,MAAM,CAAC,OAAO;QACd,MAAM,CAAC,KAAK;QACZ,MAAM,CAAC,QAAQ;QACf,IAAA,kBAAS,EAAC,MAAM,CAAC,IAAI,CAAC;QACtB,IAAA,kBAAS,EAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,IAAA,kBAAS,EAAC,qBAAqB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC/C,MAAM,CAAC,SAAS;QAChB,MAAM,CAAC,cAAc;KACtB,CACF,CAAA;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAiB;IACzC,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAA,kBAAS,EAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IACjF,OAAO,IAAI,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