@bitgo/public-types 5.24.0 → 5.25.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/dist/src/schema/transactionRequest/intents/intent.d.ts +78 -0
- package/dist/src/schema/transactionRequest/intents/intent.js +2 -0
- package/dist/src/schema/transactionRequest/intents/intent.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/polyxPreApproveAssetIntent.d.ts +81 -0
- package/dist/src/schema/transactionRequest/intents/polyxPreApproveAssetIntent.js +44 -0
- package/dist/src/schema/transactionRequest/intents/polyxPreApproveAssetIntent.js.map +1 -0
- package/package.json +1 -1
- package/src/schema/transactionRequest/intents/intent.ts +2 -0
- package/src/schema/transactionRequest/intents/polyxPreApproveAssetIntent.ts +25 -0
@@ -2973,6 +2973,84 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
|
|
2973
2973
|
} & {
|
2974
2974
|
data?: string | undefined;
|
2975
2975
|
})[], unknown>, t.UndefinedC]>;
|
2976
|
+
}>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
2977
|
+
intentType: t.KeyofC<{
|
2978
|
+
payment: t.LiteralC<"payment">;
|
2979
|
+
transferToken: t.LiteralC<"transferToken">;
|
2980
|
+
consolidate: t.LiteralC<"consolidate">;
|
2981
|
+
consolidateToken: t.LiteralC<"consolidateToken">;
|
2982
|
+
fanout: t.LiteralC<"fanout">;
|
2983
|
+
stake: t.LiteralC<"stake">;
|
2984
|
+
unstake: t.LiteralC<"unstake">;
|
2985
|
+
delegate: t.LiteralC<"delegate">;
|
2986
|
+
undelegate: t.LiteralC<"undelegate">;
|
2987
|
+
switchValidator: t.LiteralC<"switchValidator">;
|
2988
|
+
claim: t.LiteralC<"claim">;
|
2989
|
+
stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
|
2990
|
+
pledge: t.LiteralC<"pledge">;
|
2991
|
+
voteDelegation: t.LiteralC<"voteDelegation">;
|
2992
|
+
vote: t.LiteralC<"vote">;
|
2993
|
+
createAccount: t.LiteralC<"createAccount">;
|
2994
|
+
updateAccount: t.LiteralC<"updateAccount">;
|
2995
|
+
addTrustLine: t.LiteralC<"addTrustLine">;
|
2996
|
+
removeTrustLine: t.LiteralC<"removeTrustLine">;
|
2997
|
+
signMessage: t.LiteralC<"signMessage">;
|
2998
|
+
signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
|
2999
|
+
enableToken: t.LiteralC<"enableToken">;
|
3000
|
+
authorize: t.LiteralC<"authorize">;
|
3001
|
+
acceleration: t.LiteralC<"acceleration">;
|
3002
|
+
fillNonce: t.LiteralC<"fillNonce">;
|
3003
|
+
walletRecovery: t.LiteralC<"walletRecovery">;
|
3004
|
+
contractCall: t.LiteralC<"contractCall">;
|
3005
|
+
deactivate: t.LiteralC<"deactivate">;
|
3006
|
+
customTx: t.LiteralC<"customTx">;
|
3007
|
+
closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
|
3008
|
+
stakeWithCallData: t.LiteralC<"stakeWithCallData">;
|
3009
|
+
feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
|
3010
|
+
tokenApproval: t.LiteralC<"tokenApproval">;
|
3011
|
+
goUnstake: t.LiteralC<"goUnstake">;
|
3012
|
+
createBtcDelegation: t.LiteralC<"createBtcDelegation">;
|
3013
|
+
}>;
|
3014
|
+
}>, t.PartialC<{
|
3015
|
+
sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
3016
|
+
comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
3017
|
+
nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
|
3018
|
+
}>]>, t.IntersectionC<[t.PartialC<{
|
3019
|
+
nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
|
3020
|
+
}>, t.PartialC<{
|
3021
|
+
fee: t.UnionC<[t.Type<{
|
3022
|
+
amount: string | number;
|
3023
|
+
} & {
|
3024
|
+
unit?: "baseUnit" | "cpu" | "ram" | undefined;
|
3025
|
+
formula?: "fixed" | "feeRate" | "perKB" | "custom" | undefined;
|
3026
|
+
type?: "max" | "base" | "tip" | undefined;
|
3027
|
+
}, {
|
3028
|
+
amount: string | number;
|
3029
|
+
} & {
|
3030
|
+
unit?: "baseUnit" | "cpu" | "ram" | undefined;
|
3031
|
+
formula?: "fixed" | "feeRate" | "perKB" | "custom" | undefined;
|
3032
|
+
type?: "max" | "base" | "tip" | undefined;
|
3033
|
+
}, unknown>, t.UndefinedC]>;
|
3034
|
+
}>]>, t.TypeC<{
|
3035
|
+
intentType: t.LiteralC<"addTrustLine">;
|
3036
|
+
recipients: t.ArrayC<t.IntersectionC<[t.TypeC<{
|
3037
|
+
address: t.PartialC<{
|
3038
|
+
address: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
3039
|
+
option: t.UnionC<[t.Type<{
|
3040
|
+
[x: string]: unknown;
|
3041
|
+
}, {
|
3042
|
+
[x: string]: unknown;
|
3043
|
+
}, unknown>, t.UndefinedC]>;
|
3044
|
+
}>;
|
3045
|
+
amount: t.TypeC<{
|
3046
|
+
value: t.StringC;
|
3047
|
+
symbol: t.StringC;
|
3048
|
+
}>;
|
3049
|
+
}>, t.PartialC<{
|
3050
|
+
data: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
3051
|
+
}>]>>;
|
3052
|
+
}>, t.PartialC<{
|
3053
|
+
memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
2976
3054
|
}>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
2977
3055
|
intentType: t.KeyofC<{
|
2978
3056
|
payment: t.LiteralC<"payment">;
|
@@ -62,6 +62,7 @@ const nearStakeIntent_1 = require("./nearStakeIntent");
|
|
62
62
|
const nearUnstakeIntent_1 = require("./nearUnstakeIntent");
|
63
63
|
const nearWithdrawIntent_1 = require("./nearWithdrawIntent");
|
64
64
|
const polyxCreateAccountIntent_1 = require("./polyxCreateAccountIntent");
|
65
|
+
const polyxPreApproveAssetIntent_1 = require("./polyxPreApproveAssetIntent");
|
65
66
|
const polyxStakeIntent_1 = require("./polyxStakeIntent");
|
66
67
|
const polyxUnstakeIntent_1 = require("./polyxUnstakeIntent");
|
67
68
|
const polyxWithdrawIntent_1 = require("./polyxWithdrawIntent");
|
@@ -157,6 +158,7 @@ exports.TransactionIntent = t.union([
|
|
157
158
|
nearUnstakeIntent_1.NearUnstakeIntent,
|
158
159
|
nearWithdrawIntent_1.NearWithdrawIntent,
|
159
160
|
polyxCreateAccountIntent_1.PolyxCreateAccountIntent,
|
161
|
+
polyxPreApproveAssetIntent_1.PolyxPreApproveAssetIntent,
|
160
162
|
polyxStakeIntent_1.PolyxStakeIntent,
|
161
163
|
polyxUnstakeIntent_1.PolyxUnstakeIntent,
|
162
164
|
polyxWithdrawIntent_1.PolyxWithdrawIntent,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"intent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/intent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,iEAA8D;AAC9D,yDAAsD;AACtD,qDAAkD;AAClD,uEAAoE;AACpE,2DAAwD;AACxD,2DAAwD;AACxD,uDAAoD;AACpD,2DAAwD;AACxD,6DAA0D;AAC1D,mFAAgF;AAChF,yEAAsE;AACtE,2DAAwD;AACxD,+DAA4D;AAC5D,+EAA4E;AAC5E,6DAG8B;AAC9B,+DAA4D;AAC5D,2DAAwD;AACxD,+EAA4E;AAC5E,+DAA4D;AAC5D,iEAA8D;AAC9D,qEAAkE;AAClE,yDAAsD;AACtD,yDAAsD;AACtD,6DAA0D;AAC1D,qEAAkE;AAClE,mEAAgE;AAChE,6DAA0D;AAC1D,yDAAsD;AACtD,yDAAsD;AACtD,yEAAsE;AACtE,yDAAsD;AACtD,qEAAkE;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CAAgB;IAChB,mCAAgB;IAChB,uCAAkB;IAClB,+CAAsB;IACtB,6CAAqB;IACrB,2CAAoB;IACpB,qDAAyB;IACzB,uCAAkB;IAClB,mCAAgB;IAChB,mCAAgB;IAChB,+CAAsB;IACtB,mDAAwB;IACxB,mCAAgB;IAChB,+CAAsB;IACtB,2CAAoB;IACpB,mDAAwB;IACxB,iCAAe;IACf,qCAAiB;IACjB,uCAAkB;IAClB,mDAAwB;IACxB,mCAAgB;IAChB,uCAAkB;IAClB,yCAAmB;IACnB,uCAAkB;IAClB,+BAAc;IACd,2EAAoC;IACpC,2CAAoB;IACpB,6EAAqC;IACrC,qCAAiB;IACjB,yCAAmB;IACnB,qCAAiB;IACjB,uCAAkB;IAClB,mCAAgB;IAChB,+BAAc;IACd,mCAAgB;IAChB,uDAA0B;IAC1B,+CAAsB;IACtB,2CAAoB;IACpB,qCAAiB;IACjB,uCAAkB;IAClB,mCAAgB;IAChB,mCAAgB;IAChB,uCAAkB;IAClB,+BAAc;IACd,mDAAwB;IACxB,mCAAgB;IAChB,yCAAmB;IACnB,2CAAoB;IACpB,qCAAiB;IACjB,mCAAgB;IAChB,yCAAmB;IACnB,mCAAgB;IAChB,4CAAuB;IACvB,qCAAgB;IAChB,uDAA0B;IAC1B,2CAAoB;IACpB,yDAA2B;IAC3B,6CAAqB;IACrB,iDAAuB;IACvB,uCAAkB;IAClB,uCAAkB;IAClB,uCAAkB;IAClB,yCAAmB;IACnB,+CAAsB;IACtB,2CAAoB;IAKpB,uBAAU;CACX,CAAC,CAAC"}
|
1
|
+
{"version":3,"file":"intent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/intent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,iEAA8D;AAC9D,yDAAsD;AACtD,qDAAkD;AAClD,uEAAoE;AACpE,2DAAwD;AACxD,2DAAwD;AACxD,uDAAoD;AACpD,2DAAwD;AACxD,6DAA0D;AAC1D,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kB;IAClB,uCAAkB;IAClB,yCAAmB;IACnB,+CAAsB;IACtB,2CAAoB;IAKpB,uBAAU;CACX,CAAC,CAAC"}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import * as t from "io-ts";
|
2
|
+
export declare const PolyxPreApproveAssetIntent: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
3
|
+
intentType: t.KeyofC<{
|
4
|
+
payment: t.LiteralC<"payment">;
|
5
|
+
transferToken: t.LiteralC<"transferToken">;
|
6
|
+
consolidate: t.LiteralC<"consolidate">;
|
7
|
+
consolidateToken: t.LiteralC<"consolidateToken">;
|
8
|
+
fanout: t.LiteralC<"fanout">;
|
9
|
+
stake: t.LiteralC<"stake">;
|
10
|
+
unstake: t.LiteralC<"unstake">;
|
11
|
+
delegate: t.LiteralC<"delegate">;
|
12
|
+
undelegate: t.LiteralC<"undelegate">;
|
13
|
+
switchValidator: t.LiteralC<"switchValidator">;
|
14
|
+
claim: t.LiteralC<"claim">;
|
15
|
+
stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
|
16
|
+
pledge: t.LiteralC<"pledge">;
|
17
|
+
voteDelegation: t.LiteralC<"voteDelegation">;
|
18
|
+
vote: t.LiteralC<"vote">;
|
19
|
+
createAccount: t.LiteralC<"createAccount">;
|
20
|
+
updateAccount: t.LiteralC<"updateAccount">;
|
21
|
+
addTrustLine: t.LiteralC<"addTrustLine">;
|
22
|
+
removeTrustLine: t.LiteralC<"removeTrustLine">;
|
23
|
+
signMessage: t.LiteralC<"signMessage">;
|
24
|
+
signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
|
25
|
+
enableToken: t.LiteralC<"enableToken">;
|
26
|
+
authorize: t.LiteralC<"authorize">;
|
27
|
+
acceleration: t.LiteralC<"acceleration">;
|
28
|
+
fillNonce: t.LiteralC<"fillNonce">;
|
29
|
+
walletRecovery: t.LiteralC<"walletRecovery">;
|
30
|
+
contractCall: t.LiteralC<"contractCall">;
|
31
|
+
deactivate: t.LiteralC<"deactivate">;
|
32
|
+
customTx: t.LiteralC<"customTx">;
|
33
|
+
closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
|
34
|
+
stakeWithCallData: t.LiteralC<"stakeWithCallData">;
|
35
|
+
feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
|
36
|
+
tokenApproval: t.LiteralC<"tokenApproval">;
|
37
|
+
goUnstake: t.LiteralC<"goUnstake">;
|
38
|
+
createBtcDelegation: t.LiteralC<"createBtcDelegation">;
|
39
|
+
}>;
|
40
|
+
}>, t.PartialC<{
|
41
|
+
sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
42
|
+
comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
43
|
+
nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
|
44
|
+
}>]>, t.IntersectionC<[t.PartialC<{
|
45
|
+
nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
|
46
|
+
}>, t.PartialC<{
|
47
|
+
fee: t.UnionC<[t.Type<{
|
48
|
+
amount: string | number;
|
49
|
+
} & {
|
50
|
+
unit?: "baseUnit" | "cpu" | "ram" | undefined;
|
51
|
+
formula?: "fixed" | "feeRate" | "perKB" | "custom" | undefined;
|
52
|
+
type?: "max" | "base" | "tip" | undefined;
|
53
|
+
}, {
|
54
|
+
amount: string | number;
|
55
|
+
} & {
|
56
|
+
unit?: "baseUnit" | "cpu" | "ram" | undefined;
|
57
|
+
formula?: "fixed" | "feeRate" | "perKB" | "custom" | undefined;
|
58
|
+
type?: "max" | "base" | "tip" | undefined;
|
59
|
+
}, unknown>, t.UndefinedC]>;
|
60
|
+
}>]>, t.TypeC<{
|
61
|
+
intentType: t.LiteralC<"addTrustLine">;
|
62
|
+
recipients: t.ArrayC<t.IntersectionC<[t.TypeC<{
|
63
|
+
address: t.PartialC<{
|
64
|
+
address: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
65
|
+
option: t.UnionC<[t.Type<{
|
66
|
+
[x: string]: unknown;
|
67
|
+
}, {
|
68
|
+
[x: string]: unknown;
|
69
|
+
}, unknown>, t.UndefinedC]>;
|
70
|
+
}>;
|
71
|
+
amount: t.TypeC<{
|
72
|
+
value: t.StringC;
|
73
|
+
symbol: t.StringC;
|
74
|
+
}>;
|
75
|
+
}>, t.PartialC<{
|
76
|
+
data: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
77
|
+
}>]>>;
|
78
|
+
}>, t.PartialC<{
|
79
|
+
memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
80
|
+
}>]>;
|
81
|
+
export type PolyxPreApproveAssetIntent = t.TypeOf<typeof PolyxPreApproveAssetIntent>;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
+
exports.PolyxPreApproveAssetIntent = void 0;
|
27
|
+
const t = __importStar(require("io-ts"));
|
28
|
+
const baseIntent_1 = require("./baseIntent");
|
29
|
+
const intentType_1 = require("./intentType");
|
30
|
+
const substrateAccountBaseBuildOptions_1 = require("./substrateAccountBaseBuildOptions");
|
31
|
+
const recipientEntry_1 = require("./recipientEntry");
|
32
|
+
const utils_1 = require("../../../utils");
|
33
|
+
exports.PolyxPreApproveAssetIntent = t.intersection([
|
34
|
+
baseIntent_1.BaseIntent,
|
35
|
+
substrateAccountBaseBuildOptions_1.SubstrateAccountBaseBuildOptions,
|
36
|
+
t.type({
|
37
|
+
intentType: intentType_1.intentTypes.addTrustLine,
|
38
|
+
recipients: t.array(recipientEntry_1.RecipientEntry),
|
39
|
+
}),
|
40
|
+
t.partial({
|
41
|
+
memo: utils_1.optionalString,
|
42
|
+
}),
|
43
|
+
]);
|
44
|
+
//# sourceMappingURL=polyxPreApproveAssetIntent.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"polyxPreApproveAssetIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/polyxPreApproveAssetIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;AAC3C,yFAAsF;AACtF,qDAAkD;AAClD,0CAAgD;AAKnC,QAAA,0BAA0B,GAAG,CAAC,CAAC,YAAY,CAAC;IACvD,uBAAU;IACV,mEAAgC;IAChC,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,YAAY;QACpC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,+BAAc,CAAC;KACpC,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,IAAI,EAAE,sBAAc;KACrB,CAAC;CACH,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -39,6 +39,7 @@ import { NearStakeIntent } from "./nearStakeIntent";
|
|
39
39
|
import { NearUnstakeIntent } from "./nearUnstakeIntent";
|
40
40
|
import { NearWithdrawIntent } from "./nearWithdrawIntent";
|
41
41
|
import { PolyxCreateAccountIntent } from "./polyxCreateAccountIntent";
|
42
|
+
import { PolyxPreApproveAssetIntent } from "./polyxPreApproveAssetIntent";
|
42
43
|
import { PolyxStakeIntent } from "./polyxStakeIntent";
|
43
44
|
import { PolyxUnstakeIntent } from "./polyxUnstakeIntent";
|
44
45
|
import { PolyxWithdrawIntent } from "./polyxWithdrawIntent";
|
@@ -135,6 +136,7 @@ export const TransactionIntent = t.union([
|
|
135
136
|
NearUnstakeIntent,
|
136
137
|
NearWithdrawIntent,
|
137
138
|
PolyxCreateAccountIntent,
|
139
|
+
PolyxPreApproveAssetIntent,
|
138
140
|
PolyxStakeIntent,
|
139
141
|
PolyxUnstakeIntent,
|
140
142
|
PolyxWithdrawIntent,
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import * as t from "io-ts";
|
2
|
+
import { BaseIntent } from "./baseIntent";
|
3
|
+
import { intentTypes } from "./intentType";
|
4
|
+
import { SubstrateAccountBaseBuildOptions } from "./substrateAccountBaseBuildOptions";
|
5
|
+
import { RecipientEntry } from "./recipientEntry";
|
6
|
+
import { optionalString } from "../../../utils";
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @title POLYX Pre-Approve Asset Intent
|
10
|
+
*/
|
11
|
+
export const PolyxPreApproveAssetIntent = t.intersection([
|
12
|
+
BaseIntent,
|
13
|
+
SubstrateAccountBaseBuildOptions,
|
14
|
+
t.type({
|
15
|
+
intentType: intentTypes.addTrustLine,
|
16
|
+
recipients: t.array(RecipientEntry),
|
17
|
+
}),
|
18
|
+
t.partial({
|
19
|
+
memo: optionalString,
|
20
|
+
}),
|
21
|
+
]);
|
22
|
+
|
23
|
+
export type PolyxPreApproveAssetIntent = t.TypeOf<
|
24
|
+
typeof PolyxPreApproveAssetIntent
|
25
|
+
>;
|