@ledgerhq/revault-api 1.34.0 → 1.35.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/lib/{app-types-CAcz9y3Z.d.mts → app-types-DVWgnjvj.d.mts} +1829 -131
- package/lib/fakes.d.mts +269 -21
- package/lib/fakes.mjs +64 -10
- package/lib/fakes.mjs.map +1 -1
- package/lib/index.d.mts +607 -36
- package/package.json +2 -2
package/lib/fakes.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RequestType, VaultRequest, VaultRequestReview, Account } from '@prisma/client';
|
|
2
|
-
import {
|
|
2
|
+
import { y as UserChallenge, A as AccountResponse, u as VaultRequestResponse } from './app-types-DVWgnjvj.mjs';
|
|
3
3
|
import z__default from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -989,7 +989,70 @@ declare const zCreateTransactionRequestData: z__default.ZodObject<{
|
|
|
989
989
|
maxFee: z__default.ZodNullable<z__default.ZodString>;
|
|
990
990
|
recipient: z__default.ZodString;
|
|
991
991
|
} & {
|
|
992
|
+
type: z__default.ZodLiteral<"SUI_LIKE_SEND">;
|
|
993
|
+
feeStrategy: z__default.ZodObject<{
|
|
994
|
+
type: z__default.ZodEnum<["SLOW", "NORMAL", "FAST"]>;
|
|
995
|
+
}, "strip", z__default.ZodTypeAny, {
|
|
996
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
997
|
+
}, {
|
|
998
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
999
|
+
}>;
|
|
1000
|
+
}, "strip", z__default.ZodTypeAny, {
|
|
1001
|
+
type: "SUI_LIKE_SEND";
|
|
1002
|
+
currency: string;
|
|
1003
|
+
recipient: string;
|
|
1004
|
+
amount: string;
|
|
1005
|
+
maxFee: string | null;
|
|
1006
|
+
feeStrategy: {
|
|
1007
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
1008
|
+
};
|
|
1009
|
+
}, {
|
|
1010
|
+
type: "SUI_LIKE_SEND";
|
|
1011
|
+
currency: string;
|
|
1012
|
+
recipient: string;
|
|
1013
|
+
amount: string;
|
|
1014
|
+
maxFee: string | null;
|
|
1015
|
+
feeStrategy: {
|
|
1016
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
1017
|
+
};
|
|
1018
|
+
}>, z__default.ZodObject<{
|
|
1019
|
+
amount: z__default.ZodString;
|
|
1020
|
+
currency: z__default.ZodString;
|
|
1021
|
+
maxFee: z__default.ZodNullable<z__default.ZodString>;
|
|
1022
|
+
recipient: z__default.ZodString;
|
|
1023
|
+
} & {
|
|
1024
|
+
type: z__default.ZodLiteral<"SUI_LIKE_TRANSFER_TOKEN">;
|
|
1025
|
+
feeStrategy: z__default.ZodObject<{
|
|
1026
|
+
type: z__default.ZodEnum<["SLOW", "NORMAL", "FAST"]>;
|
|
1027
|
+
}, "strip", z__default.ZodTypeAny, {
|
|
1028
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
1029
|
+
}, {
|
|
1030
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
1031
|
+
}>;
|
|
1032
|
+
}, "strip", z__default.ZodTypeAny, {
|
|
1033
|
+
type: "SUI_LIKE_TRANSFER_TOKEN";
|
|
1034
|
+
currency: string;
|
|
1035
|
+
recipient: string;
|
|
1036
|
+
amount: string;
|
|
1037
|
+
maxFee: string | null;
|
|
1038
|
+
feeStrategy: {
|
|
1039
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
1040
|
+
};
|
|
1041
|
+
}, {
|
|
1042
|
+
type: "SUI_LIKE_TRANSFER_TOKEN";
|
|
1043
|
+
currency: string;
|
|
1044
|
+
recipient: string;
|
|
1045
|
+
amount: string;
|
|
1046
|
+
maxFee: string | null;
|
|
1047
|
+
feeStrategy: {
|
|
1048
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
1049
|
+
};
|
|
1050
|
+
}>, z__default.ZodObject<{
|
|
992
1051
|
type: z__default.ZodLiteral<"TEZOS_LIKE_DELEGATE">;
|
|
1052
|
+
amount: z__default.ZodOptional<z__default.ZodString>;
|
|
1053
|
+
currency: z__default.ZodString;
|
|
1054
|
+
maxFee: z__default.ZodNullable<z__default.ZodString>;
|
|
1055
|
+
recipient: z__default.ZodString;
|
|
993
1056
|
feeStrategy: z__default.ZodObject<{
|
|
994
1057
|
type: z__default.ZodEnum<["SLOW", "NORMAL", "FAST", "CUSTOM"]>;
|
|
995
1058
|
} & {
|
|
@@ -1008,24 +1071,24 @@ declare const zCreateTransactionRequestData: z__default.ZodObject<{
|
|
|
1008
1071
|
type: "TEZOS_LIKE_DELEGATE";
|
|
1009
1072
|
currency: string;
|
|
1010
1073
|
recipient: string;
|
|
1011
|
-
amount: string;
|
|
1012
1074
|
maxFee: string | null;
|
|
1013
1075
|
feeStrategy: {
|
|
1014
1076
|
type: "FAST" | "NORMAL" | "SLOW" | "CUSTOM";
|
|
1015
1077
|
gasLimit: string;
|
|
1016
1078
|
storageLimit: string | null;
|
|
1017
1079
|
};
|
|
1080
|
+
amount?: string | undefined;
|
|
1018
1081
|
}, {
|
|
1019
1082
|
type: "TEZOS_LIKE_DELEGATE";
|
|
1020
1083
|
currency: string;
|
|
1021
1084
|
recipient: string;
|
|
1022
|
-
amount: string;
|
|
1023
1085
|
maxFee: string | null;
|
|
1024
1086
|
feeStrategy: {
|
|
1025
1087
|
type: "FAST" | "NORMAL" | "SLOW" | "CUSTOM";
|
|
1026
1088
|
gasLimit: string;
|
|
1027
1089
|
storageLimit: string | null;
|
|
1028
1090
|
};
|
|
1091
|
+
amount?: string | undefined;
|
|
1029
1092
|
}>, z__default.ZodObject<{
|
|
1030
1093
|
amount: z__default.ZodString;
|
|
1031
1094
|
currency: z__default.ZodString;
|
|
@@ -1070,12 +1133,11 @@ declare const zCreateTransactionRequestData: z__default.ZodObject<{
|
|
|
1070
1133
|
storageLimit: string | null;
|
|
1071
1134
|
};
|
|
1072
1135
|
}>, z__default.ZodObject<{
|
|
1073
|
-
|
|
1136
|
+
type: z__default.ZodLiteral<"TEZOS_LIKE_UNDELEGATE">;
|
|
1137
|
+
amount: z__default.ZodOptional<z__default.ZodString>;
|
|
1074
1138
|
currency: z__default.ZodString;
|
|
1075
1139
|
maxFee: z__default.ZodNullable<z__default.ZodString>;
|
|
1076
|
-
recipient: z__default.ZodString
|
|
1077
|
-
} & {
|
|
1078
|
-
type: z__default.ZodLiteral<"TEZOS_LIKE_UNDELEGATE">;
|
|
1140
|
+
recipient: z__default.ZodOptional<z__default.ZodString>;
|
|
1079
1141
|
feeStrategy: z__default.ZodObject<{
|
|
1080
1142
|
type: z__default.ZodEnum<["SLOW", "NORMAL", "FAST", "CUSTOM"]>;
|
|
1081
1143
|
} & {
|
|
@@ -1093,25 +1155,25 @@ declare const zCreateTransactionRequestData: z__default.ZodObject<{
|
|
|
1093
1155
|
}, "strip", z__default.ZodTypeAny, {
|
|
1094
1156
|
type: "TEZOS_LIKE_UNDELEGATE";
|
|
1095
1157
|
currency: string;
|
|
1096
|
-
recipient: string;
|
|
1097
|
-
amount: string;
|
|
1098
1158
|
maxFee: string | null;
|
|
1099
1159
|
feeStrategy: {
|
|
1100
1160
|
type: "FAST" | "NORMAL" | "SLOW" | "CUSTOM";
|
|
1101
1161
|
gasLimit: string;
|
|
1102
1162
|
storageLimit: string | null;
|
|
1103
1163
|
};
|
|
1164
|
+
recipient?: string | undefined;
|
|
1165
|
+
amount?: string | undefined;
|
|
1104
1166
|
}, {
|
|
1105
1167
|
type: "TEZOS_LIKE_UNDELEGATE";
|
|
1106
1168
|
currency: string;
|
|
1107
|
-
recipient: string;
|
|
1108
|
-
amount: string;
|
|
1109
1169
|
maxFee: string | null;
|
|
1110
1170
|
feeStrategy: {
|
|
1111
1171
|
type: "FAST" | "NORMAL" | "SLOW" | "CUSTOM";
|
|
1112
1172
|
gasLimit: string;
|
|
1113
1173
|
storageLimit: string | null;
|
|
1114
1174
|
};
|
|
1175
|
+
recipient?: string | undefined;
|
|
1176
|
+
amount?: string | undefined;
|
|
1115
1177
|
}>]>;
|
|
1116
1178
|
}, "strip", z__default.ZodTypeAny, {
|
|
1117
1179
|
accountId: string;
|
|
@@ -1176,7 +1238,7 @@ declare const zCreateTransactionRequestData: z__default.ZodObject<{
|
|
|
1176
1238
|
maxFeePerGas: string;
|
|
1177
1239
|
};
|
|
1178
1240
|
} | {
|
|
1179
|
-
type: "
|
|
1241
|
+
type: "TEZOS_LIKE_SEND";
|
|
1180
1242
|
currency: string;
|
|
1181
1243
|
recipient: string;
|
|
1182
1244
|
amount: string;
|
|
@@ -1187,27 +1249,27 @@ declare const zCreateTransactionRequestData: z__default.ZodObject<{
|
|
|
1187
1249
|
storageLimit: string | null;
|
|
1188
1250
|
};
|
|
1189
1251
|
} | {
|
|
1190
|
-
type: "
|
|
1252
|
+
type: "TEZOS_LIKE_DELEGATE";
|
|
1191
1253
|
currency: string;
|
|
1192
1254
|
recipient: string;
|
|
1193
|
-
amount: string;
|
|
1194
1255
|
maxFee: string | null;
|
|
1195
1256
|
feeStrategy: {
|
|
1196
1257
|
type: "FAST" | "NORMAL" | "SLOW" | "CUSTOM";
|
|
1197
1258
|
gasLimit: string;
|
|
1198
1259
|
storageLimit: string | null;
|
|
1199
1260
|
};
|
|
1261
|
+
amount?: string | undefined;
|
|
1200
1262
|
} | {
|
|
1201
1263
|
type: "TEZOS_LIKE_UNDELEGATE";
|
|
1202
1264
|
currency: string;
|
|
1203
|
-
recipient: string;
|
|
1204
|
-
amount: string;
|
|
1205
1265
|
maxFee: string | null;
|
|
1206
1266
|
feeStrategy: {
|
|
1207
1267
|
type: "FAST" | "NORMAL" | "SLOW" | "CUSTOM";
|
|
1208
1268
|
gasLimit: string;
|
|
1209
1269
|
storageLimit: string | null;
|
|
1210
1270
|
};
|
|
1271
|
+
recipient?: string | undefined;
|
|
1272
|
+
amount?: string | undefined;
|
|
1211
1273
|
} | {
|
|
1212
1274
|
type: "POLKADOT_LIKE_ADDPROXY";
|
|
1213
1275
|
proxy: string;
|
|
@@ -1415,6 +1477,24 @@ declare const zCreateTransactionRequestData: z__default.ZodObject<{
|
|
|
1415
1477
|
feeStrategy: {
|
|
1416
1478
|
type: "FAST" | "NORMAL" | "SLOW";
|
|
1417
1479
|
};
|
|
1480
|
+
} | {
|
|
1481
|
+
type: "SUI_LIKE_SEND";
|
|
1482
|
+
currency: string;
|
|
1483
|
+
recipient: string;
|
|
1484
|
+
amount: string;
|
|
1485
|
+
maxFee: string | null;
|
|
1486
|
+
feeStrategy: {
|
|
1487
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
1488
|
+
};
|
|
1489
|
+
} | {
|
|
1490
|
+
type: "SUI_LIKE_TRANSFER_TOKEN";
|
|
1491
|
+
currency: string;
|
|
1492
|
+
recipient: string;
|
|
1493
|
+
amount: string;
|
|
1494
|
+
maxFee: string | null;
|
|
1495
|
+
feeStrategy: {
|
|
1496
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
1497
|
+
};
|
|
1418
1498
|
} | {
|
|
1419
1499
|
type: "GENERIC_TRANSACTION";
|
|
1420
1500
|
currency: string;
|
|
@@ -1483,7 +1563,7 @@ declare const zCreateTransactionRequestData: z__default.ZodObject<{
|
|
|
1483
1563
|
maxFeePerGas: string;
|
|
1484
1564
|
};
|
|
1485
1565
|
} | {
|
|
1486
|
-
type: "
|
|
1566
|
+
type: "TEZOS_LIKE_SEND";
|
|
1487
1567
|
currency: string;
|
|
1488
1568
|
recipient: string;
|
|
1489
1569
|
amount: string;
|
|
@@ -1494,27 +1574,27 @@ declare const zCreateTransactionRequestData: z__default.ZodObject<{
|
|
|
1494
1574
|
storageLimit: string | null;
|
|
1495
1575
|
};
|
|
1496
1576
|
} | {
|
|
1497
|
-
type: "
|
|
1577
|
+
type: "TEZOS_LIKE_DELEGATE";
|
|
1498
1578
|
currency: string;
|
|
1499
1579
|
recipient: string;
|
|
1500
|
-
amount: string;
|
|
1501
1580
|
maxFee: string | null;
|
|
1502
1581
|
feeStrategy: {
|
|
1503
1582
|
type: "FAST" | "NORMAL" | "SLOW" | "CUSTOM";
|
|
1504
1583
|
gasLimit: string;
|
|
1505
1584
|
storageLimit: string | null;
|
|
1506
1585
|
};
|
|
1586
|
+
amount?: string | undefined;
|
|
1507
1587
|
} | {
|
|
1508
1588
|
type: "TEZOS_LIKE_UNDELEGATE";
|
|
1509
1589
|
currency: string;
|
|
1510
|
-
recipient: string;
|
|
1511
|
-
amount: string;
|
|
1512
1590
|
maxFee: string | null;
|
|
1513
1591
|
feeStrategy: {
|
|
1514
1592
|
type: "FAST" | "NORMAL" | "SLOW" | "CUSTOM";
|
|
1515
1593
|
gasLimit: string;
|
|
1516
1594
|
storageLimit: string | null;
|
|
1517
1595
|
};
|
|
1596
|
+
recipient?: string | undefined;
|
|
1597
|
+
amount?: string | undefined;
|
|
1518
1598
|
} | {
|
|
1519
1599
|
type: "POLKADOT_LIKE_ADDPROXY";
|
|
1520
1600
|
proxy: string;
|
|
@@ -1722,6 +1802,24 @@ declare const zCreateTransactionRequestData: z__default.ZodObject<{
|
|
|
1722
1802
|
feeStrategy: {
|
|
1723
1803
|
type: "FAST" | "NORMAL" | "SLOW";
|
|
1724
1804
|
};
|
|
1805
|
+
} | {
|
|
1806
|
+
type: "SUI_LIKE_SEND";
|
|
1807
|
+
currency: string;
|
|
1808
|
+
recipient: string;
|
|
1809
|
+
amount: string;
|
|
1810
|
+
maxFee: string | null;
|
|
1811
|
+
feeStrategy: {
|
|
1812
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
1813
|
+
};
|
|
1814
|
+
} | {
|
|
1815
|
+
type: "SUI_LIKE_TRANSFER_TOKEN";
|
|
1816
|
+
currency: string;
|
|
1817
|
+
recipient: string;
|
|
1818
|
+
amount: string;
|
|
1819
|
+
maxFee: string | null;
|
|
1820
|
+
feeStrategy: {
|
|
1821
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
1822
|
+
};
|
|
1725
1823
|
} | {
|
|
1726
1824
|
type: "GENERIC_TRANSACTION";
|
|
1727
1825
|
currency: string;
|
|
@@ -3175,6 +3273,38 @@ declare const zCreateSettlementRequestData: z__default.ZodObject<{
|
|
|
3175
3273
|
currency: z__default.ZodString;
|
|
3176
3274
|
maxFee: z__default.ZodNullable<z__default.ZodString>;
|
|
3177
3275
|
recipient: z__default.ZodString;
|
|
3276
|
+
} & {
|
|
3277
|
+
type: z__default.ZodLiteral<"SUI_LIKE_SEND">;
|
|
3278
|
+
feeStrategy: z__default.ZodObject<{
|
|
3279
|
+
type: z__default.ZodEnum<["SLOW", "NORMAL", "FAST"]>;
|
|
3280
|
+
}, "strip", z__default.ZodTypeAny, {
|
|
3281
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
3282
|
+
}, {
|
|
3283
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
3284
|
+
}>;
|
|
3285
|
+
}, "strip", z__default.ZodTypeAny, {
|
|
3286
|
+
type: "SUI_LIKE_SEND";
|
|
3287
|
+
currency: string;
|
|
3288
|
+
recipient: string;
|
|
3289
|
+
amount: string;
|
|
3290
|
+
maxFee: string | null;
|
|
3291
|
+
feeStrategy: {
|
|
3292
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
3293
|
+
};
|
|
3294
|
+
}, {
|
|
3295
|
+
type: "SUI_LIKE_SEND";
|
|
3296
|
+
currency: string;
|
|
3297
|
+
recipient: string;
|
|
3298
|
+
amount: string;
|
|
3299
|
+
maxFee: string | null;
|
|
3300
|
+
feeStrategy: {
|
|
3301
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
3302
|
+
};
|
|
3303
|
+
}>, z__default.ZodObject<{
|
|
3304
|
+
amount: z__default.ZodString;
|
|
3305
|
+
currency: z__default.ZodString;
|
|
3306
|
+
maxFee: z__default.ZodNullable<z__default.ZodString>;
|
|
3307
|
+
recipient: z__default.ZodString;
|
|
3178
3308
|
} & {
|
|
3179
3309
|
type: z__default.ZodLiteral<"TEZOS_LIKE_SEND">;
|
|
3180
3310
|
feeStrategy: z__default.ZodObject<{
|
|
@@ -3306,6 +3436,15 @@ declare const zCreateSettlementRequestData: z__default.ZodObject<{
|
|
|
3306
3436
|
feeStrategy: {
|
|
3307
3437
|
type: "FAST" | "NORMAL" | "SLOW";
|
|
3308
3438
|
};
|
|
3439
|
+
} | {
|
|
3440
|
+
type: "SUI_LIKE_SEND";
|
|
3441
|
+
currency: string;
|
|
3442
|
+
recipient: string;
|
|
3443
|
+
amount: string;
|
|
3444
|
+
maxFee: string | null;
|
|
3445
|
+
feeStrategy: {
|
|
3446
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
3447
|
+
};
|
|
3309
3448
|
};
|
|
3310
3449
|
}, {
|
|
3311
3450
|
accountId: string;
|
|
@@ -3399,6 +3538,15 @@ declare const zCreateSettlementRequestData: z__default.ZodObject<{
|
|
|
3399
3538
|
feeStrategy: {
|
|
3400
3539
|
type: "FAST" | "NORMAL" | "SLOW";
|
|
3401
3540
|
};
|
|
3541
|
+
} | {
|
|
3542
|
+
type: "SUI_LIKE_SEND";
|
|
3543
|
+
currency: string;
|
|
3544
|
+
recipient: string;
|
|
3545
|
+
amount: string;
|
|
3546
|
+
maxFee: string | null;
|
|
3547
|
+
feeStrategy: {
|
|
3548
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
3549
|
+
};
|
|
3402
3550
|
};
|
|
3403
3551
|
}>;
|
|
3404
3552
|
type CreateSettlementRequestData = z__default.infer<typeof zCreateSettlementRequestData>;
|
|
@@ -3720,6 +3868,38 @@ declare const zTradelinkWithdrawRequestData: z__default.ZodObject<{
|
|
|
3720
3868
|
currency: z__default.ZodString;
|
|
3721
3869
|
maxFee: z__default.ZodNullable<z__default.ZodString>;
|
|
3722
3870
|
recipient: z__default.ZodString;
|
|
3871
|
+
} & {
|
|
3872
|
+
type: z__default.ZodLiteral<"SUI_LIKE_SEND">;
|
|
3873
|
+
feeStrategy: z__default.ZodObject<{
|
|
3874
|
+
type: z__default.ZodEnum<["SLOW", "NORMAL", "FAST"]>;
|
|
3875
|
+
}, "strip", z__default.ZodTypeAny, {
|
|
3876
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
3877
|
+
}, {
|
|
3878
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
3879
|
+
}>;
|
|
3880
|
+
}, "strip", z__default.ZodTypeAny, {
|
|
3881
|
+
type: "SUI_LIKE_SEND";
|
|
3882
|
+
currency: string;
|
|
3883
|
+
recipient: string;
|
|
3884
|
+
amount: string;
|
|
3885
|
+
maxFee: string | null;
|
|
3886
|
+
feeStrategy: {
|
|
3887
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
3888
|
+
};
|
|
3889
|
+
}, {
|
|
3890
|
+
type: "SUI_LIKE_SEND";
|
|
3891
|
+
currency: string;
|
|
3892
|
+
recipient: string;
|
|
3893
|
+
amount: string;
|
|
3894
|
+
maxFee: string | null;
|
|
3895
|
+
feeStrategy: {
|
|
3896
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
3897
|
+
};
|
|
3898
|
+
}>, z__default.ZodObject<{
|
|
3899
|
+
amount: z__default.ZodString;
|
|
3900
|
+
currency: z__default.ZodString;
|
|
3901
|
+
maxFee: z__default.ZodNullable<z__default.ZodString>;
|
|
3902
|
+
recipient: z__default.ZodString;
|
|
3723
3903
|
} & {
|
|
3724
3904
|
type: z__default.ZodLiteral<"TEZOS_LIKE_SEND">;
|
|
3725
3905
|
feeStrategy: z__default.ZodObject<{
|
|
@@ -3850,6 +4030,15 @@ declare const zTradelinkWithdrawRequestData: z__default.ZodObject<{
|
|
|
3850
4030
|
feeStrategy: {
|
|
3851
4031
|
type: "FAST" | "NORMAL" | "SLOW";
|
|
3852
4032
|
};
|
|
4033
|
+
} | {
|
|
4034
|
+
type: "SUI_LIKE_SEND";
|
|
4035
|
+
currency: string;
|
|
4036
|
+
recipient: string;
|
|
4037
|
+
amount: string;
|
|
4038
|
+
maxFee: string | null;
|
|
4039
|
+
feeStrategy: {
|
|
4040
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
4041
|
+
};
|
|
3853
4042
|
};
|
|
3854
4043
|
}, {
|
|
3855
4044
|
accountId: string;
|
|
@@ -3942,6 +4131,15 @@ declare const zTradelinkWithdrawRequestData: z__default.ZodObject<{
|
|
|
3942
4131
|
feeStrategy: {
|
|
3943
4132
|
type: "FAST" | "NORMAL" | "SLOW";
|
|
3944
4133
|
};
|
|
4134
|
+
} | {
|
|
4135
|
+
type: "SUI_LIKE_SEND";
|
|
4136
|
+
currency: string;
|
|
4137
|
+
recipient: string;
|
|
4138
|
+
amount: string;
|
|
4139
|
+
maxFee: string | null;
|
|
4140
|
+
feeStrategy: {
|
|
4141
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
4142
|
+
};
|
|
3945
4143
|
};
|
|
3946
4144
|
}>;
|
|
3947
4145
|
type TradelinkWithdrawRequestData = z__default.infer<typeof zTradelinkWithdrawRequestData>;
|
|
@@ -4252,6 +4450,38 @@ declare const zTradelinkArbitrationRequestData: z__default.ZodObject<{
|
|
|
4252
4450
|
currency: z__default.ZodString;
|
|
4253
4451
|
maxFee: z__default.ZodNullable<z__default.ZodString>;
|
|
4254
4452
|
recipient: z__default.ZodString;
|
|
4453
|
+
} & {
|
|
4454
|
+
type: z__default.ZodLiteral<"SUI_LIKE_SEND">;
|
|
4455
|
+
feeStrategy: z__default.ZodObject<{
|
|
4456
|
+
type: z__default.ZodEnum<["SLOW", "NORMAL", "FAST"]>;
|
|
4457
|
+
}, "strip", z__default.ZodTypeAny, {
|
|
4458
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
4459
|
+
}, {
|
|
4460
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
4461
|
+
}>;
|
|
4462
|
+
}, "strip", z__default.ZodTypeAny, {
|
|
4463
|
+
type: "SUI_LIKE_SEND";
|
|
4464
|
+
currency: string;
|
|
4465
|
+
recipient: string;
|
|
4466
|
+
amount: string;
|
|
4467
|
+
maxFee: string | null;
|
|
4468
|
+
feeStrategy: {
|
|
4469
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
4470
|
+
};
|
|
4471
|
+
}, {
|
|
4472
|
+
type: "SUI_LIKE_SEND";
|
|
4473
|
+
currency: string;
|
|
4474
|
+
recipient: string;
|
|
4475
|
+
amount: string;
|
|
4476
|
+
maxFee: string | null;
|
|
4477
|
+
feeStrategy: {
|
|
4478
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
4479
|
+
};
|
|
4480
|
+
}>, z__default.ZodObject<{
|
|
4481
|
+
amount: z__default.ZodString;
|
|
4482
|
+
currency: z__default.ZodString;
|
|
4483
|
+
maxFee: z__default.ZodNullable<z__default.ZodString>;
|
|
4484
|
+
recipient: z__default.ZodString;
|
|
4255
4485
|
} & {
|
|
4256
4486
|
type: z__default.ZodLiteral<"TEZOS_LIKE_SEND">;
|
|
4257
4487
|
feeStrategy: z__default.ZodObject<{
|
|
@@ -4382,6 +4612,15 @@ declare const zTradelinkArbitrationRequestData: z__default.ZodObject<{
|
|
|
4382
4612
|
feeStrategy: {
|
|
4383
4613
|
type: "FAST" | "NORMAL" | "SLOW";
|
|
4384
4614
|
};
|
|
4615
|
+
} | {
|
|
4616
|
+
type: "SUI_LIKE_SEND";
|
|
4617
|
+
currency: string;
|
|
4618
|
+
recipient: string;
|
|
4619
|
+
amount: string;
|
|
4620
|
+
maxFee: string | null;
|
|
4621
|
+
feeStrategy: {
|
|
4622
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
4623
|
+
};
|
|
4385
4624
|
};
|
|
4386
4625
|
}, {
|
|
4387
4626
|
accountId: string;
|
|
@@ -4474,6 +4713,15 @@ declare const zTradelinkArbitrationRequestData: z__default.ZodObject<{
|
|
|
4474
4713
|
feeStrategy: {
|
|
4475
4714
|
type: "FAST" | "NORMAL" | "SLOW";
|
|
4476
4715
|
};
|
|
4716
|
+
} | {
|
|
4717
|
+
type: "SUI_LIKE_SEND";
|
|
4718
|
+
currency: string;
|
|
4719
|
+
recipient: string;
|
|
4720
|
+
amount: string;
|
|
4721
|
+
maxFee: string | null;
|
|
4722
|
+
feeStrategy: {
|
|
4723
|
+
type: "FAST" | "NORMAL" | "SLOW";
|
|
4724
|
+
};
|
|
4477
4725
|
};
|
|
4478
4726
|
}>;
|
|
4479
4727
|
type TradelinkArbitrationRequestData = z__default.infer<typeof zTradelinkArbitrationRequestData>;
|
package/lib/fakes.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import { ChallengeType, PsdModel, AccountType, AccountGovernanceType, Activation
|
|
|
3
3
|
import z7, { z } from 'zod';
|
|
4
4
|
import 'axios';
|
|
5
5
|
import invariant from 'invariant';
|
|
6
|
-
import { omit, times } from 'lodash';
|
|
7
|
-
import 'crypto';
|
|
6
|
+
import { omit, times, get, isPlainObject } from 'lodash';
|
|
7
|
+
import { randomUUID } from 'crypto';
|
|
8
8
|
|
|
9
9
|
var __defProp = Object.defineProperty;
|
|
10
10
|
var __export = (target, all) => {
|
|
@@ -72,6 +72,7 @@ var buildGateSyncId = (workspaceName, gateType, gateId) => {
|
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
// src/utils.ts
|
|
75
|
+
var isRecord = (value) => isPlainObject(value);
|
|
75
76
|
var ensureNonEmptyArray = (values, message) => {
|
|
76
77
|
invariant(
|
|
77
78
|
values.length > 0,
|
|
@@ -243,6 +244,7 @@ var zTezosLikeTransactionType = z7.enum([
|
|
|
243
244
|
"TEZOS_LIKE_UNDELEGATE"
|
|
244
245
|
]).describe("Tezos-like transaction type");
|
|
245
246
|
var zGenericTransactionType = z7.enum(["GENERIC_TRANSACTION"]).describe("Generic transaction type");
|
|
247
|
+
var zSuiLikeTransactionType = z7.enum(["SUI_LIKE_SEND", "SUI_LIKE_RECEIVE", "SUI_LIKE_TRANSFER_TOKEN"]).describe("Sui-like transaction type");
|
|
246
248
|
z7.union([
|
|
247
249
|
zBitcoinLikeTransactionType,
|
|
248
250
|
zCardanoLikeTransactionType,
|
|
@@ -253,6 +255,7 @@ z7.union([
|
|
|
253
255
|
zRippleLikeTransactionType,
|
|
254
256
|
zSolanaLikeTransactionType,
|
|
255
257
|
zStellarLikeTransactionType,
|
|
258
|
+
zSuiLikeTransactionType,
|
|
256
259
|
zTezosLikeTransactionType
|
|
257
260
|
]);
|
|
258
261
|
z7.discriminatedUnion("type", [
|
|
@@ -280,7 +283,7 @@ var zCommonTransactionData = z7.object({
|
|
|
280
283
|
currency: zCurrency.describe("Transaction currency"),
|
|
281
284
|
// TODO: strict literal or enum?
|
|
282
285
|
maxFee: zUnsignedIntString.nullable().describe("Transaction max fee"),
|
|
283
|
-
recipient: z7.string().describe("Transaction recipient")
|
|
286
|
+
recipient: z7.string().nonempty().describe("Transaction recipient")
|
|
284
287
|
});
|
|
285
288
|
var zFeeStrategyCustom = z7.object({
|
|
286
289
|
type: z7.enum(["SLOW", "NORMAL", "FAST", "CUSTOM"])
|
|
@@ -326,16 +329,24 @@ var zTezosLikeFeeStrategy = zFeeStrategyCustom.extend({
|
|
|
326
329
|
gasLimit: zUnsignedIntString.describe("Gas limit"),
|
|
327
330
|
storageLimit: zUnsignedIntString.nullable().describe("Storage limit")
|
|
328
331
|
}).describe("Tezos-like fee strategy");
|
|
329
|
-
var zTezosLikeDelegateData = zCommonTransactionData.extend({
|
|
330
|
-
type: z7.literal(zTezosLikeTransactionType.enum.TEZOS_LIKE_DELEGATE),
|
|
331
|
-
feeStrategy: zTezosLikeFeeStrategy
|
|
332
|
-
}).describe("Tezos-like delegate data");
|
|
333
332
|
var zTezosLikeSendData = zCommonTransactionData.extend({
|
|
334
333
|
type: z7.literal(zTezosLikeTransactionType.enum.TEZOS_LIKE_SEND),
|
|
335
334
|
feeStrategy: zTezosLikeFeeStrategy
|
|
336
335
|
}).describe("Tezos-like send data");
|
|
337
|
-
var
|
|
336
|
+
var zTezosLikeDelegateData = z7.object({
|
|
337
|
+
type: z7.literal(zTezosLikeTransactionType.enum.TEZOS_LIKE_DELEGATE),
|
|
338
|
+
amount: zUnsignedIntString.optional().describe("Deprecated: DO NOT USE!"),
|
|
339
|
+
currency: zCurrency.describe("Transaction currency"),
|
|
340
|
+
maxFee: zUnsignedIntString.nullable().describe("Transaction max fee"),
|
|
341
|
+
recipient: z7.string().nonempty().describe("Transaction recipient"),
|
|
342
|
+
feeStrategy: zTezosLikeFeeStrategy
|
|
343
|
+
}).describe("Tezos-like delegate data");
|
|
344
|
+
var zTezosLikeUndelegateData = z7.object({
|
|
338
345
|
type: z7.literal(zTezosLikeTransactionType.enum.TEZOS_LIKE_UNDELEGATE),
|
|
346
|
+
amount: zUnsignedIntString.optional().describe("Deprecated: DO NOT USE!"),
|
|
347
|
+
currency: zCurrency.describe("Transaction currency"),
|
|
348
|
+
maxFee: zUnsignedIntString.nullable().describe("Transaction max fee"),
|
|
349
|
+
recipient: z7.string().nonempty().optional().describe("Deprecated: DO NOT USE!"),
|
|
339
350
|
feeStrategy: zTezosLikeFeeStrategy
|
|
340
351
|
}).describe("Tezos-like undelegate data");
|
|
341
352
|
var zPolkadotRewardDestination = z7.enum(["Staked", "Stash"]);
|
|
@@ -529,6 +540,14 @@ var zCardanoStakingWithdrawData = z7.object({
|
|
|
529
540
|
// WITHDRAW doesn't have a recipient
|
|
530
541
|
amount: zUnsignedIntString.describe("Amount to withdraw")
|
|
531
542
|
}).describe("Cardano-like staking withdraw data");
|
|
543
|
+
var zSuiLikeSendData = zCommonTransactionData.extend({
|
|
544
|
+
type: z7.literal(zSuiLikeTransactionType.enum.SUI_LIKE_SEND),
|
|
545
|
+
feeStrategy: zFeeStrategy.describe("Sui-like fee strategy")
|
|
546
|
+
}).describe("Sui-like send data");
|
|
547
|
+
var zSuiLikeTransferTokenData = zCommonTransactionData.extend({
|
|
548
|
+
type: z7.literal(zSuiLikeTransactionType.enum.SUI_LIKE_TRANSFER_TOKEN),
|
|
549
|
+
feeStrategy: zFeeStrategy.describe("Sui-like fee strategy")
|
|
550
|
+
}).describe("Sui-like transfer token data");
|
|
532
551
|
var zGenericTransactionData = z7.object({
|
|
533
552
|
type: z7.literal(zGenericTransactionType.enum.GENERIC_TRANSACTION),
|
|
534
553
|
currency: zCurrency.describe("Transaction currency"),
|
|
@@ -577,6 +596,9 @@ var zTransactionData = z7.discriminatedUnion("type", [
|
|
|
577
596
|
zSolanaLikeFundTokenData,
|
|
578
597
|
// Stellar
|
|
579
598
|
zStellarLikeSendData,
|
|
599
|
+
// Sui
|
|
600
|
+
zSuiLikeSendData,
|
|
601
|
+
zSuiLikeTransferTokenData,
|
|
580
602
|
// Tezos
|
|
581
603
|
zTezosLikeDelegateData,
|
|
582
604
|
zTezosLikeSendData,
|
|
@@ -590,6 +612,7 @@ var zSendOnlyTransactionData = z7.discriminatedUnion("type", [
|
|
|
590
612
|
zRippleLikeSendData,
|
|
591
613
|
zSolanaLikeSendData,
|
|
592
614
|
zStellarLikeSendData,
|
|
615
|
+
zSuiLikeSendData,
|
|
593
616
|
zTezosLikeSendData
|
|
594
617
|
]);
|
|
595
618
|
var zCreateTransactionRequestData = z7.object({
|
|
@@ -1167,6 +1190,10 @@ z7.discriminatedUnion("type", [
|
|
|
1167
1190
|
zSuiLikeLiveData,
|
|
1168
1191
|
zTezosLikeLiveData
|
|
1169
1192
|
]);
|
|
1193
|
+
z7.object({
|
|
1194
|
+
address: z7.string().describe("Address"),
|
|
1195
|
+
derivationPath: z7.string().nullable().describe("Derivation path")
|
|
1196
|
+
});
|
|
1170
1197
|
|
|
1171
1198
|
// src/accounts/app-types.ts
|
|
1172
1199
|
z7.discriminatedUnion(
|
|
@@ -1396,6 +1423,28 @@ var serializeAccount = (account) => {
|
|
|
1396
1423
|
};
|
|
1397
1424
|
return zAccountResponse.parse(response);
|
|
1398
1425
|
};
|
|
1426
|
+
|
|
1427
|
+
// src/compat/patch-request-expired-at.ts
|
|
1428
|
+
var patchRequestExpiredAt = (data) => ({
|
|
1429
|
+
...data,
|
|
1430
|
+
expiredAt: data.expiresAt
|
|
1431
|
+
});
|
|
1432
|
+
var patchTezosRequestData = (data) => {
|
|
1433
|
+
if (data.type !== RequestType.CREATE_TRANSACTION) {
|
|
1434
|
+
return data;
|
|
1435
|
+
}
|
|
1436
|
+
const transaction = get(data, ["data", "transaction"]);
|
|
1437
|
+
if (!isRecord(transaction)) {
|
|
1438
|
+
return data;
|
|
1439
|
+
}
|
|
1440
|
+
if (transaction.type === "TEZOS_LIKE_DELEGATE") {
|
|
1441
|
+
transaction.amount = transaction.amount ?? "0";
|
|
1442
|
+
} else if (transaction.type === "TEZOS_LIKE_UNDELEGATE") {
|
|
1443
|
+
transaction.amount = transaction.amount ?? "0";
|
|
1444
|
+
transaction.recipient = transaction.recipient ?? "0";
|
|
1445
|
+
}
|
|
1446
|
+
return data;
|
|
1447
|
+
};
|
|
1399
1448
|
var zSciConfigData = z7.object({
|
|
1400
1449
|
dapps: z7.array(z7.string()).nullable().describe("Allowed DApps, null allows all"),
|
|
1401
1450
|
customContractCallEnabled: z7.boolean().describe("Allow non-DApp SCI")
|
|
@@ -1694,6 +1743,7 @@ var zVaultRequestCommonMixin = z7.object({
|
|
|
1694
1743
|
reviewSteps: zRequestReviewSteps.describe("Request review steps"),
|
|
1695
1744
|
currentStepIndex: z7.number().int().min(0).describe("Index of the current approval step"),
|
|
1696
1745
|
expiresAt: z7.coerce.date().describe("Request expiration date"),
|
|
1746
|
+
expiredAt: z7.coerce.date().optional().describe("Deprecated: use expiresAt"),
|
|
1697
1747
|
targetId: z7.string().nullable().describe("Optional ID of the target object"),
|
|
1698
1748
|
note: zNote.nullable().describe("Optional request note"),
|
|
1699
1749
|
reviews: z7.array(zRequestReviewResponse).describe("Requests reviews"),
|
|
@@ -1887,8 +1937,12 @@ function serializeVaultRequest(request) {
|
|
|
1887
1937
|
});
|
|
1888
1938
|
break;
|
|
1889
1939
|
}
|
|
1890
|
-
|
|
1940
|
+
let patched = zVaultRequestResponse.parse(serialized);
|
|
1941
|
+
patched = patchRequestExpiredAt(patched);
|
|
1942
|
+
patched = patchTezosRequestData(patched);
|
|
1943
|
+
return patched;
|
|
1891
1944
|
}
|
|
1945
|
+
var fakeUniqueName = (length) => randomUUID().replace(/-/g, "").slice(0, 20);
|
|
1892
1946
|
var fakeHexString = (length, casing = "upper") => faker.string.hexadecimal({ prefix: "", casing, length });
|
|
1893
1947
|
var fakePubKey = () => fakeHexString(130);
|
|
1894
1948
|
var fakeIntegerId = () => faker.number.int({ min: 1, max: 2e9 });
|
|
@@ -2101,7 +2155,7 @@ var genAccount = (opts) => {
|
|
|
2101
2155
|
const commonFields = {
|
|
2102
2156
|
id: faker.string.uuid(),
|
|
2103
2157
|
workspaceName: fakeWorkspaceName(),
|
|
2104
|
-
name:
|
|
2158
|
+
name: fakeUniqueName(),
|
|
2105
2159
|
hsmId: fakeHsmObjectId(),
|
|
2106
2160
|
status: ActivationStatus.ACTIVE,
|
|
2107
2161
|
index: faker.number.int({ min: 0, max: 10 }),
|