@bitgo/public-types 5.16.0 → 5.18.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/index.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/index.js +1 -0
- package/dist/src/schema/transactionRequest/intents/index.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/intent.d.ts +2 -2
- package/dist/src/schema/transactionRequest/intents/solStakeIntent.d.ts +68 -1
- package/dist/src/schema/transactionRequest/intents/solStakeIntent.js +14 -6
- package/dist/src/schema/transactionRequest/intents/solStakeIntent.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/solStakingType.d.ts +8 -0
- package/dist/src/schema/transactionRequest/intents/solStakingType.js +35 -0
- package/dist/src/schema/transactionRequest/intents/solStakingType.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/solUnstakeIntent.d.ts +107 -1
- package/dist/src/schema/transactionRequest/intents/solUnstakeIntent.js +15 -6
- package/dist/src/schema/transactionRequest/intents/solUnstakeIntent.js.map +1 -1
- package/package.json +1 -1
- package/src/schema/transactionRequest/intents/index.ts +1 -0
- package/src/schema/transactionRequest/intents/solStakeIntent.ts +22 -5
- package/src/schema/transactionRequest/intents/solStakingType.ts +11 -0
- package/src/schema/transactionRequest/intents/solUnstakeIntent.ts +23 -5
@@ -90,6 +90,7 @@ export * from "./solCreateAssociatedTokenAccountIntent";
|
|
90
90
|
export * from "./solCustomTxIntent";
|
91
91
|
export * from "./solDeactivateIntent";
|
92
92
|
export * from "./solDelegateIntent";
|
93
|
+
export * from "./solStakingType";
|
93
94
|
export * from "./solGoUnstakeIntent";
|
94
95
|
export * from "./solPaymentIntent";
|
95
96
|
export * from "./solStakeIntent";
|
@@ -106,6 +106,7 @@ __exportStar(require("./solCreateAssociatedTokenAccountIntent"), exports);
|
|
106
106
|
__exportStar(require("./solCustomTxIntent"), exports);
|
107
107
|
__exportStar(require("./solDeactivateIntent"), exports);
|
108
108
|
__exportStar(require("./solDelegateIntent"), exports);
|
109
|
+
__exportStar(require("./solStakingType"), exports);
|
109
110
|
__exportStar(require("./solGoUnstakeIntent"), exports);
|
110
111
|
__exportStar(require("./solPaymentIntent"), exports);
|
111
112
|
__exportStar(require("./solStakeIntent"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,4DAA0C;AAC1C,iEAA+C;AAC/C,mEAAiD;AACjD,mEAAiD;AACjD,yDAAuC;AACvC,qDAAmC;AACnC,oDAAkC;AAClC,+DAA6C;AAC7C,mDAAiC;AACjC,qDAAmC;AACnC,4DAA0C;AAC1C,4CAA0B;AAC1B,2CAAyB;AACzB,sDAAoC;AACpC,oDAAkC;AAClC,sDAAoC;AACpC,uDAAqC;AACrC,kEAAgD;AAChD,6DAA2C;AAC3C,+CAA6B;AAC7B,oDAAkC;AAClC,gEAA8C;AAC9C,uDAAqC;AACrC,sDAAoC;AACpC,+DAA6C;AAC7C,wDAAsC;AACtC,gEAA8C;AAC9C,2DAAyC;AACzC,uDAAqC;AACrC,0DAAwC;AACxC,4DAA0C;AAC1C,wDAAsC;AACtC,sDAAoC;AACpC,gEAA8C;AAC9C,wDAAsC;AACtC,yDAAuC;AACvC,+DAA6C;AAC7C,kDAAgC;AAChC,yDAAuC;AACvC,2DAAyC;AACzC,wDAAsC;AACtC,kDAAgC;AAChC,qDAAmC;AACnC,6CAA2B;AAC3B,qDAAmC;AACnC,uDAAqC;AACrC,2DAAyC;AACzC,sDAAoC;AACpC,sDAAoC;AACpC,0DAAwC;AACxC,oDAAkC;AAClC,yDAAuC;AACvC,8DAA4C;AAC5C,uDAAqC;AACrC,uDAAqC;AACrC,qDAAmC;AACnC,qDAAmC;AACnC,2DAAyC;AACzC,6DAA2C;AAC3C,8CAA4B;AAC5B,qDAAmC;AACnC,qDAAmC;AACnC,kDAAgC;AAChC,oDAAkC;AAClC,8CAA4B;AAC5B,qDAAmC;AACnC,kDAAgC;AAChC,2CAAyB;AACzB,+CAA6B;AAC7B,2DAAyC;AACzC,yDAAuC;AACvC,6DAA2C;AAC3C,oDAAkC;AAClC,sDAAoC;AACpC,uDAAqC;AACrC,oDAAkC;AAClC,qDAAmC;AACnC,uDAAqC;AACrC,wDAAsC;AACtC,kDAAgC;AAChC,mDAAiC;AACjC,sDAAoC;AACpC,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,yEAAuD;AACvD,yDAAuC;AACvC,0EAAwD;AACxD,sDAAoC;AACpC,wDAAsC;AACtC,sDAAoC;AACpC,uDAAqC;AACrC,qDAAmC;AACnC,mDAAiC;AACjC,qDAAmC;AACnC,4DAA0C;AAC1C,gDAA8B;AAC9B,+DAA6C;AAC7C,qEAAmD;AACnD,wDAAsC;AACtC,+DAA6C;AAC7C,8DAA4C;AAC5C,wDAAsC;AACtC,2DAAyC;AACzC,yDAAuC;AACvC,mDAAiC;AACjC,qDAAmC;AACnC,oDAAkC;AAClC,yDAAuC;AACvC,sDAAoC;AACpC,kDAAgC;AAChC,uDAAqC;AACrC,qDAAmC;AACnC,qDAAmC;AACnC,uDAAqC;AACrC,qEAAmD;AACnD,8CAA4B;AAC5B,oDAAkC;AAClC,wDAAsC;AACtC,4DAA0C;AAC1C,yDAAuC;AACvC,sDAAoC;AACpC,qDAAmC;AACnC,wDAAsC;AACtC,wDAAsC;AACtC,kDAAgC;AAChC,uEAAqD;AACrD,qDAAmC;AACnC,+DAA6C;AAC7C,yDAAuC;AACvC,yDAAuC;AACvC,wDAAsC;AACtC,2DAAyC;AACzC,yDAAuC;AACvC,mDAAiC;AACjC,wDAAsC;AACtC,uDAAqC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,4DAA0C;AAC1C,iEAA+C;AAC/C,mEAAiD;AACjD,mEAAiD;AACjD,yDAAuC;AACvC,qDAAmC;AACnC,oDAAkC;AAClC,+DAA6C;AAC7C,mDAAiC;AACjC,qDAAmC;AACnC,4DAA0C;AAC1C,4CAA0B;AAC1B,2CAAyB;AACzB,sDAAoC;AACpC,oDAAkC;AAClC,sDAAoC;AACpC,uDAAqC;AACrC,kEAAgD;AAChD,6DAA2C;AAC3C,+CAA6B;AAC7B,oDAAkC;AAClC,gEAA8C;AAC9C,uDAAqC;AACrC,sDAAoC;AACpC,+DAA6C;AAC7C,wDAAsC;AACtC,gEAA8C;AAC9C,2DAAyC;AACzC,uDAAqC;AACrC,0DAAwC;AACxC,4DAA0C;AAC1C,wDAAsC;AACtC,sDAAoC;AACpC,gEAA8C;AAC9C,wDAAsC;AACtC,yDAAuC;AACvC,+DAA6C;AAC7C,kDAAgC;AAChC,yDAAuC;AACvC,2DAAyC;AACzC,wDAAsC;AACtC,kDAAgC;AAChC,qDAAmC;AACnC,6CAA2B;AAC3B,qDAAmC;AACnC,uDAAqC;AACrC,2DAAyC;AACzC,sDAAoC;AACpC,sDAAoC;AACpC,0DAAwC;AACxC,oDAAkC;AAClC,yDAAuC;AACvC,8DAA4C;AAC5C,uDAAqC;AACrC,uDAAqC;AACrC,qDAAmC;AACnC,qDAAmC;AACnC,2DAAyC;AACzC,6DAA2C;AAC3C,8CAA4B;AAC5B,qDAAmC;AACnC,qDAAmC;AACnC,kDAAgC;AAChC,oDAAkC;AAClC,8CAA4B;AAC5B,qDAAmC;AACnC,kDAAgC;AAChC,2CAAyB;AACzB,+CAA6B;AAC7B,2DAAyC;AACzC,yDAAuC;AACvC,6DAA2C;AAC3C,oDAAkC;AAClC,sDAAoC;AACpC,uDAAqC;AACrC,oDAAkC;AAClC,qDAAmC;AACnC,uDAAqC;AACrC,wDAAsC;AACtC,kDAAgC;AAChC,mDAAiC;AACjC,sDAAoC;AACpC,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,yEAAuD;AACvD,yDAAuC;AACvC,0EAAwD;AACxD,sDAAoC;AACpC,wDAAsC;AACtC,sDAAoC;AACpC,mDAAiC;AACjC,uDAAqC;AACrC,qDAAmC;AACnC,mDAAiC;AACjC,qDAAmC;AACnC,4DAA0C;AAC1C,gDAA8B;AAC9B,+DAA6C;AAC7C,qEAAmD;AACnD,wDAAsC;AACtC,+DAA6C;AAC7C,8DAA4C;AAC5C,wDAAsC;AACtC,2DAAyC;AACzC,yDAAuC;AACvC,mDAAiC;AACjC,qDAAmC;AACnC,oDAAkC;AAClC,yDAAuC;AACvC,sDAAoC;AACpC,kDAAgC;AAChC,uDAAqC;AACrC,qDAAmC;AACnC,qDAAmC;AACnC,uDAAqC;AACrC,qEAAmD;AACnD,8CAA4B;AAC5B,oDAAkC;AAClC,wDAAsC;AACtC,4DAA0C;AAC1C,yDAAuC;AACvC,sDAAoC;AACpC,qDAAmC;AACnC,wDAAsC;AACtC,wDAAsC;AACtC,kDAAgC;AAChC,uEAAqD;AACrD,qDAAmC;AACnC,+DAA6C;AAC7C,yDAAuC;AACvC,yDAAuC;AACvC,wDAAsC;AACtC,2DAAyC;AACzC,yDAAuC;AACvC,mDAAiC;AACjC,wDAAsC;AACtC,uDAAqC"}
|
@@ -3785,7 +3785,7 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
|
|
3785
3785
|
symbol: t.StringC;
|
3786
3786
|
}>;
|
3787
3787
|
isMarinade: t.UnionC<[t.Type<boolean, boolean, unknown>, t.UndefinedC]>;
|
3788
|
-
stakingType: t.UnionC<[t.
|
3788
|
+
stakingType: t.UnionC<[t.Type<"NATIVE" | "MARINADE" | "JITO", "NATIVE" | "MARINADE" | "JITO", unknown>, t.UndefinedC]>;
|
3789
3789
|
}>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
3790
3790
|
intentType: t.KeyofC<{
|
3791
3791
|
payment: t.LiteralC<"payment">;
|
@@ -3854,7 +3854,7 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
|
|
3854
3854
|
symbol: string;
|
3855
3855
|
}, unknown>, t.UndefinedC]>;
|
3856
3856
|
isMarinade: t.UnionC<[t.Type<boolean, boolean, unknown>, t.UndefinedC]>;
|
3857
|
-
stakingType: t.UnionC<[t.
|
3857
|
+
stakingType: t.UnionC<[t.Type<"NATIVE" | "MARINADE" | "JITO", "NATIVE" | "MARINADE" | "JITO", unknown>, t.UndefinedC]>;
|
3858
3858
|
recipients: t.UnionC<[t.Type<({
|
3859
3859
|
address: {
|
3860
3860
|
address?: string | undefined;
|
@@ -56,6 +56,73 @@ export declare const SolStakeIntent: t.IntersectionC<[t.IntersectionC<[t.Interse
|
|
56
56
|
symbol: t.StringC;
|
57
57
|
}>;
|
58
58
|
isMarinade: t.UnionC<[t.Type<boolean, boolean, unknown>, t.UndefinedC]>;
|
59
|
-
stakingType: t.UnionC<[t.
|
59
|
+
stakingType: t.UnionC<[t.Type<"NATIVE" | "MARINADE" | "JITO", "NATIVE" | "MARINADE" | "JITO", unknown>, t.UndefinedC]>;
|
60
60
|
}>]>;
|
61
61
|
export type SolStakeIntent = t.TypeOf<typeof SolStakeIntent>;
|
62
|
+
export declare const SolJitoStakeIntent: t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
63
|
+
intentType: t.KeyofC<{
|
64
|
+
payment: t.LiteralC<"payment">;
|
65
|
+
transferToken: t.LiteralC<"transferToken">;
|
66
|
+
consolidate: t.LiteralC<"consolidate">;
|
67
|
+
consolidateToken: t.LiteralC<"consolidateToken">;
|
68
|
+
fanout: t.LiteralC<"fanout">;
|
69
|
+
stake: t.LiteralC<"stake">;
|
70
|
+
unstake: t.LiteralC<"unstake">;
|
71
|
+
delegate: t.LiteralC<"delegate">;
|
72
|
+
undelegate: t.LiteralC<"undelegate">;
|
73
|
+
switchValidator: t.LiteralC<"switchValidator">;
|
74
|
+
claim: t.LiteralC<"claim">;
|
75
|
+
stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
|
76
|
+
pledge: t.LiteralC<"pledge">;
|
77
|
+
voteDelegation: t.LiteralC<"voteDelegation">;
|
78
|
+
vote: t.LiteralC<"vote">;
|
79
|
+
createAccount: t.LiteralC<"createAccount">;
|
80
|
+
updateAccount: t.LiteralC<"updateAccount">;
|
81
|
+
addTrustLine: t.LiteralC<"addTrustLine">;
|
82
|
+
removeTrustLine: t.LiteralC<"removeTrustLine">;
|
83
|
+
signMessage: t.LiteralC<"signMessage">;
|
84
|
+
signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
|
85
|
+
enableToken: t.LiteralC<"enableToken">;
|
86
|
+
authorize: t.LiteralC<"authorize">;
|
87
|
+
acceleration: t.LiteralC<"acceleration">;
|
88
|
+
fillNonce: t.LiteralC<"fillNonce">;
|
89
|
+
walletRecovery: t.LiteralC<"walletRecovery">;
|
90
|
+
contractCall: t.LiteralC<"contractCall">;
|
91
|
+
deactivate: t.LiteralC<"deactivate">;
|
92
|
+
customTx: t.LiteralC<"customTx">;
|
93
|
+
closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
|
94
|
+
stakeWithCallData: t.LiteralC<"stakeWithCallData">;
|
95
|
+
feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
|
96
|
+
tokenApproval: t.LiteralC<"tokenApproval">;
|
97
|
+
goUnstake: t.LiteralC<"goUnstake">;
|
98
|
+
createBtcDelegation: t.LiteralC<"createBtcDelegation">;
|
99
|
+
}>;
|
100
|
+
}>, t.PartialC<{
|
101
|
+
sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
102
|
+
comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
103
|
+
nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
|
104
|
+
}>]>, t.TypeC<{
|
105
|
+
stakingRequestId: t.StringC;
|
106
|
+
}>]>, t.TypeC<{
|
107
|
+
intentType: t.LiteralC<"stake">;
|
108
|
+
}>]>, t.IntersectionC<[t.PartialC<{
|
109
|
+
nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
|
110
|
+
}>, t.TypeC<{
|
111
|
+
memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
112
|
+
}>]>, t.TypeC<{
|
113
|
+
validatorAddress: t.StringC;
|
114
|
+
amount: t.TypeC<{
|
115
|
+
value: t.StringC;
|
116
|
+
symbol: t.StringC;
|
117
|
+
}>;
|
118
|
+
isMarinade: t.UnionC<[t.Type<boolean, boolean, unknown>, t.UndefinedC]>;
|
119
|
+
stakingType: t.UnionC<[t.Type<"NATIVE" | "MARINADE" | "JITO", "NATIVE" | "MARINADE" | "JITO", unknown>, t.UndefinedC]>;
|
120
|
+
}>]>, t.TypeC<{
|
121
|
+
stakingType: t.LiteralC<"JITO">;
|
122
|
+
stakePoolConfig: t.TypeC<{
|
123
|
+
poolMint: t.StringC;
|
124
|
+
reserveStake: t.StringC;
|
125
|
+
managerFeeAccount: t.StringC;
|
126
|
+
}>;
|
127
|
+
}>]>;
|
128
|
+
export type SolJitoStakeIntent = t.TypeOf<typeof SolJitoStakeIntent>;
|
@@ -23,12 +23,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
23
|
return result;
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.SolStakeIntent = void 0;
|
26
|
+
exports.SolJitoStakeIntent = exports.SolStakeIntent = void 0;
|
27
27
|
const t = __importStar(require("io-ts"));
|
28
28
|
const solBuildOptions_1 = require("./solBuildOptions");
|
29
29
|
const stakeIntent_1 = require("./stakeIntent");
|
30
30
|
const amount_1 = require("./amount");
|
31
31
|
const utils_1 = require("../../../utils");
|
32
|
+
const solStakingType_1 = require("./solStakingType");
|
32
33
|
exports.SolStakeIntent = t.intersection([
|
33
34
|
stakeIntent_1.StakeIntent,
|
34
35
|
solBuildOptions_1.SolBuildOptions,
|
@@ -36,11 +37,18 @@ exports.SolStakeIntent = t.intersection([
|
|
36
37
|
validatorAddress: t.string,
|
37
38
|
amount: amount_1.Amount,
|
38
39
|
isMarinade: (0, utils_1.Optional)(t.boolean),
|
39
|
-
stakingType:
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
stakingType: (0, utils_1.Optional)(solStakingType_1.SolStakingType),
|
41
|
+
}),
|
42
|
+
]);
|
43
|
+
exports.SolJitoStakeIntent = t.intersection([
|
44
|
+
exports.SolStakeIntent,
|
45
|
+
t.type({
|
46
|
+
stakingType: t.literal("JITO"),
|
47
|
+
stakePoolConfig: t.type({
|
48
|
+
poolMint: t.string,
|
49
|
+
reserveStake: t.string,
|
50
|
+
managerFeeAccount: t.string,
|
51
|
+
}),
|
44
52
|
}),
|
45
53
|
]);
|
46
54
|
//# sourceMappingURL=solStakeIntent.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solStakeIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/solStakeIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,uDAAoD;AACpD,+CAA4C;AAC5C,qCAAkC;AAClC,0CAA0C;
|
1
|
+
{"version":3,"file":"solStakeIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/solStakeIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,uDAAoD;AACpD,+CAA4C;AAC5C,qCAAkC;AAClC,0CAA0C;AAC1C,qDAAkD;AAKrC,QAAA,cAAc,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3C,yBAAW;IACX,iCAAe;IACf,CAAC,CAAC,IAAI,CAAC;QACL,gBAAgB,EAAE,CAAC,CAAC,MAAM;QAC1B,MAAM,EAAE,eAAM;QAId,UAAU,EAAE,IAAA,gBAAQ,EAAC,CAAC,CAAC,OAAO,CAAC;QAI/B,WAAW,EAAE,IAAA,gBAAQ,EAAC,+BAAc,CAAC;KACtC,CAAC;CACH,CAAC,CAAC;AAOU,QAAA,kBAAkB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC/C,sBAAc;IACd,CAAC,CAAC,IAAI,CAAC;QACL,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QAC9B,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC;YACtB,QAAQ,EAAE,CAAC,CAAC,MAAM;YAClB,YAAY,EAAE,CAAC,CAAC,MAAM;YACtB,iBAAiB,EAAE,CAAC,CAAC,MAAM;SAC5B,CAAC;KACH,CAAC;CACH,CAAC,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as t from "io-ts";
|
2
|
+
export declare enum SolStakingTypeEnum {
|
3
|
+
NATIVE = "NATIVE",
|
4
|
+
MARINADE = "MARINADE",
|
5
|
+
JITO = "JITO"
|
6
|
+
}
|
7
|
+
export declare const SolStakingType: t.KeyofC<typeof SolStakingTypeEnum>;
|
8
|
+
export type SolStakingType = t.TypeOf<typeof SolStakingType>;
|
@@ -0,0 +1,35 @@
|
|
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.SolStakingType = exports.SolStakingTypeEnum = void 0;
|
27
|
+
const t = __importStar(require("io-ts"));
|
28
|
+
var SolStakingTypeEnum;
|
29
|
+
(function (SolStakingTypeEnum) {
|
30
|
+
SolStakingTypeEnum["NATIVE"] = "NATIVE";
|
31
|
+
SolStakingTypeEnum["MARINADE"] = "MARINADE";
|
32
|
+
SolStakingTypeEnum["JITO"] = "JITO";
|
33
|
+
})(SolStakingTypeEnum || (exports.SolStakingTypeEnum = SolStakingTypeEnum = {}));
|
34
|
+
exports.SolStakingType = t.keyof(SolStakingTypeEnum);
|
35
|
+
//# sourceMappingURL=solStakingType.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"solStakingType.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/solStakingType.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAE3B,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,uCAAiB,CAAA;IACjB,2CAAqB,CAAA;IACrB,mCAAa,CAAA;AACf,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B;AAEY,QAAA,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC"}
|
@@ -67,7 +67,7 @@ export declare const SolUnstakeIntent: t.IntersectionC<[t.IntersectionC<[t.Inter
|
|
67
67
|
symbol: string;
|
68
68
|
}, unknown>, t.UndefinedC]>;
|
69
69
|
isMarinade: t.UnionC<[t.Type<boolean, boolean, unknown>, t.UndefinedC]>;
|
70
|
-
stakingType: t.UnionC<[t.
|
70
|
+
stakingType: t.UnionC<[t.Type<"NATIVE" | "MARINADE" | "JITO", "NATIVE" | "MARINADE" | "JITO", unknown>, t.UndefinedC]>;
|
71
71
|
recipients: t.UnionC<[t.Type<({
|
72
72
|
address: {
|
73
73
|
address?: string | undefined;
|
@@ -97,3 +97,109 @@ export declare const SolUnstakeIntent: t.IntersectionC<[t.IntersectionC<[t.Inter
|
|
97
97
|
})[], unknown>, t.UndefinedC]>;
|
98
98
|
}>]>;
|
99
99
|
export type SolUnstakeIntent = t.TypeOf<typeof SolUnstakeIntent>;
|
100
|
+
export declare const SolJitoUnstakeIntent: t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
101
|
+
intentType: t.KeyofC<{
|
102
|
+
payment: t.LiteralC<"payment">;
|
103
|
+
transferToken: t.LiteralC<"transferToken">;
|
104
|
+
consolidate: t.LiteralC<"consolidate">;
|
105
|
+
consolidateToken: t.LiteralC<"consolidateToken">;
|
106
|
+
fanout: t.LiteralC<"fanout">;
|
107
|
+
stake: t.LiteralC<"stake">;
|
108
|
+
unstake: t.LiteralC<"unstake">;
|
109
|
+
delegate: t.LiteralC<"delegate">;
|
110
|
+
undelegate: t.LiteralC<"undelegate">;
|
111
|
+
switchValidator: t.LiteralC<"switchValidator">;
|
112
|
+
claim: t.LiteralC<"claim">;
|
113
|
+
stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
|
114
|
+
pledge: t.LiteralC<"pledge">;
|
115
|
+
voteDelegation: t.LiteralC<"voteDelegation">;
|
116
|
+
vote: t.LiteralC<"vote">;
|
117
|
+
createAccount: t.LiteralC<"createAccount">;
|
118
|
+
updateAccount: t.LiteralC<"updateAccount">;
|
119
|
+
addTrustLine: t.LiteralC<"addTrustLine">;
|
120
|
+
removeTrustLine: t.LiteralC<"removeTrustLine">;
|
121
|
+
signMessage: t.LiteralC<"signMessage">;
|
122
|
+
signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
|
123
|
+
enableToken: t.LiteralC<"enableToken">;
|
124
|
+
authorize: t.LiteralC<"authorize">;
|
125
|
+
acceleration: t.LiteralC<"acceleration">;
|
126
|
+
fillNonce: t.LiteralC<"fillNonce">;
|
127
|
+
walletRecovery: t.LiteralC<"walletRecovery">;
|
128
|
+
contractCall: t.LiteralC<"contractCall">;
|
129
|
+
deactivate: t.LiteralC<"deactivate">;
|
130
|
+
customTx: t.LiteralC<"customTx">;
|
131
|
+
closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
|
132
|
+
stakeWithCallData: t.LiteralC<"stakeWithCallData">;
|
133
|
+
feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
|
134
|
+
tokenApproval: t.LiteralC<"tokenApproval">;
|
135
|
+
goUnstake: t.LiteralC<"goUnstake">;
|
136
|
+
createBtcDelegation: t.LiteralC<"createBtcDelegation">;
|
137
|
+
}>;
|
138
|
+
}>, t.PartialC<{
|
139
|
+
sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
140
|
+
comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
141
|
+
nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
|
142
|
+
}>]>, t.TypeC<{
|
143
|
+
stakingRequestId: t.StringC;
|
144
|
+
}>]>, t.TypeC<{
|
145
|
+
intentType: t.LiteralC<"unstake">;
|
146
|
+
}>]>, t.IntersectionC<[t.PartialC<{
|
147
|
+
nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
|
148
|
+
}>, t.TypeC<{
|
149
|
+
memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
150
|
+
}>]>, t.TypeC<{
|
151
|
+
stakingAddress: t.StringC;
|
152
|
+
}>, t.PartialC<{
|
153
|
+
amount: t.UnionC<[t.Type<{
|
154
|
+
value: string;
|
155
|
+
symbol: string;
|
156
|
+
}, {
|
157
|
+
value: string;
|
158
|
+
symbol: string;
|
159
|
+
}, unknown>, t.UndefinedC]>;
|
160
|
+
remainingStakingAmount: t.UnionC<[t.Type<{
|
161
|
+
value: string;
|
162
|
+
symbol: string;
|
163
|
+
}, {
|
164
|
+
value: string;
|
165
|
+
symbol: string;
|
166
|
+
}, unknown>, t.UndefinedC]>;
|
167
|
+
isMarinade: t.UnionC<[t.Type<boolean, boolean, unknown>, t.UndefinedC]>;
|
168
|
+
stakingType: t.UnionC<[t.Type<"NATIVE" | "MARINADE" | "JITO", "NATIVE" | "MARINADE" | "JITO", unknown>, t.UndefinedC]>;
|
169
|
+
recipients: t.UnionC<[t.Type<({
|
170
|
+
address: {
|
171
|
+
address?: string | undefined;
|
172
|
+
option?: {
|
173
|
+
[x: string]: unknown;
|
174
|
+
} | undefined;
|
175
|
+
};
|
176
|
+
amount: {
|
177
|
+
value: string;
|
178
|
+
symbol: string;
|
179
|
+
};
|
180
|
+
} & {
|
181
|
+
data?: string | undefined;
|
182
|
+
})[], ({
|
183
|
+
address: {
|
184
|
+
address?: string | undefined;
|
185
|
+
option?: {
|
186
|
+
[x: string]: unknown;
|
187
|
+
} | undefined;
|
188
|
+
};
|
189
|
+
amount: {
|
190
|
+
value: string;
|
191
|
+
symbol: string;
|
192
|
+
};
|
193
|
+
} & {
|
194
|
+
data?: string | undefined;
|
195
|
+
})[], unknown>, t.UndefinedC]>;
|
196
|
+
}>]>, t.TypeC<{
|
197
|
+
stakingType: t.LiteralC<"JITO">;
|
198
|
+
stakePoolConfig: t.TypeC<{
|
199
|
+
poolMint: t.StringC;
|
200
|
+
validatorListAccount: t.StringC;
|
201
|
+
managerFeeAccount: t.StringC;
|
202
|
+
}>;
|
203
|
+
validatorAddress: t.StringC;
|
204
|
+
}>]>;
|
205
|
+
export type SolJitoUnstakeIntent = t.TypeOf<typeof SolJitoUnstakeIntent>;
|
@@ -23,13 +23,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
23
|
return result;
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.SolUnstakeIntent = void 0;
|
26
|
+
exports.SolJitoUnstakeIntent = exports.SolUnstakeIntent = void 0;
|
27
27
|
const t = __importStar(require("io-ts"));
|
28
28
|
const solBuildOptions_1 = require("./solBuildOptions");
|
29
29
|
const amount_1 = require("./amount");
|
30
30
|
const unstakeIntent_1 = require("./unstakeIntent");
|
31
31
|
const utils_1 = require("../../../utils");
|
32
32
|
const recipientEntry_1 = require("./recipientEntry");
|
33
|
+
const solStakingType_1 = require("./solStakingType");
|
33
34
|
exports.SolUnstakeIntent = t.intersection([
|
34
35
|
unstakeIntent_1.UnstakeIntent,
|
35
36
|
solBuildOptions_1.SolBuildOptions,
|
@@ -40,12 +41,20 @@ exports.SolUnstakeIntent = t.intersection([
|
|
40
41
|
amount: (0, utils_1.Optional)(amount_1.Amount),
|
41
42
|
remainingStakingAmount: (0, utils_1.Optional)(amount_1.Amount),
|
42
43
|
isMarinade: (0, utils_1.Optional)(t.boolean),
|
43
|
-
stakingType:
|
44
|
-
t.literal("NATIVE"),
|
45
|
-
t.literal("MARINADE"),
|
46
|
-
t.literal("JITO"),
|
47
|
-
]),
|
44
|
+
stakingType: (0, utils_1.Optional)(solStakingType_1.SolStakingType),
|
48
45
|
recipients: (0, utils_1.Optional)(t.array(recipientEntry_1.RecipientEntry)),
|
49
46
|
}),
|
50
47
|
]);
|
48
|
+
exports.SolJitoUnstakeIntent = t.intersection([
|
49
|
+
exports.SolUnstakeIntent,
|
50
|
+
t.type({
|
51
|
+
stakingType: t.literal("JITO"),
|
52
|
+
stakePoolConfig: t.type({
|
53
|
+
poolMint: t.string,
|
54
|
+
validatorListAccount: t.string,
|
55
|
+
managerFeeAccount: t.string,
|
56
|
+
}),
|
57
|
+
validatorAddress: t.string,
|
58
|
+
}),
|
59
|
+
]);
|
51
60
|
//# sourceMappingURL=solUnstakeIntent.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solUnstakeIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/solUnstakeIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,uDAAoD;AACpD,qCAAkC;AAClC,mDAAgD;AAChD,0CAA0C;AAC1C,qDAAkD;AAKrC,QAAA,gBAAgB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7C,6BAAa;IACb,iCAAe;IACf,CAAC,CAAC,IAAI,CAAC;QACL,cAAc,EAAE,CAAC,CAAC,MAAM;KACzB,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,MAAM,EAAE,IAAA,gBAAQ,EAAC,eAAM,CAAC;QACxB,sBAAsB,EAAE,IAAA,gBAAQ,EAAC,eAAM,CAAC;QAIxC,UAAU,EAAE,IAAA,gBAAQ,EAAC,CAAC,CAAC,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"solUnstakeIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/solUnstakeIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,uDAAoD;AACpD,qCAAkC;AAClC,mDAAgD;AAChD,0CAA0C;AAC1C,qDAAkD;AAClD,qDAAkD;AAKrC,QAAA,gBAAgB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7C,6BAAa;IACb,iCAAe;IACf,CAAC,CAAC,IAAI,CAAC;QACL,cAAc,EAAE,CAAC,CAAC,MAAM;KACzB,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,MAAM,EAAE,IAAA,gBAAQ,EAAC,eAAM,CAAC;QACxB,sBAAsB,EAAE,IAAA,gBAAQ,EAAC,eAAM,CAAC;QAIxC,UAAU,EAAE,IAAA,gBAAQ,EAAC,CAAC,CAAC,OAAO,CAAC;QAI/B,WAAW,EAAE,IAAA,gBAAQ,EAAC,+BAAc,CAAC;QACrC,UAAU,EAAE,IAAA,gBAAQ,EAAC,CAAC,CAAC,KAAK,CAAC,+BAAc,CAAC,CAAC;KAC9C,CAAC;CACH,CAAC,CAAC;AAOU,QAAA,oBAAoB,GAAG,CAAC,CAAC,YAAY,CAAC;IACjD,wBAAgB;IAChB,CAAC,CAAC,IAAI,CAAC;QACL,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QAC9B,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC;YACtB,QAAQ,EAAE,CAAC,CAAC,MAAM;YAClB,oBAAoB,EAAE,CAAC,CAAC,MAAM;YAC9B,iBAAiB,EAAE,CAAC,CAAC,MAAM;SAC5B,CAAC;QACF,gBAAgB,EAAE,CAAC,CAAC,MAAM;KAC3B,CAAC;CACH,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -90,6 +90,7 @@ export * from "./solCreateAssociatedTokenAccountIntent";
|
|
90
90
|
export * from "./solCustomTxIntent";
|
91
91
|
export * from "./solDeactivateIntent";
|
92
92
|
export * from "./solDelegateIntent";
|
93
|
+
export * from "./solStakingType";
|
93
94
|
export * from "./solGoUnstakeIntent";
|
94
95
|
export * from "./solPaymentIntent";
|
95
96
|
export * from "./solStakeIntent";
|
@@ -3,6 +3,7 @@ import { SolBuildOptions } from "./solBuildOptions";
|
|
3
3
|
import { StakeIntent } from "./stakeIntent";
|
4
4
|
import { Amount } from "./amount";
|
5
5
|
import { Optional } from "../../../utils";
|
6
|
+
import { SolStakingType } from "./solStakingType";
|
6
7
|
|
7
8
|
/**
|
8
9
|
* @title SOL Stake Intent
|
@@ -17,12 +18,28 @@ export const SolStakeIntent = t.intersection([
|
|
17
18
|
* @deprecated Use `stakingType` instead.
|
18
19
|
*/
|
19
20
|
isMarinade: Optional(t.boolean),
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
]),
|
21
|
+
/**
|
22
|
+
* @todo Remove Optional once staking-service is updated.
|
23
|
+
*/
|
24
|
+
stakingType: Optional(SolStakingType),
|
25
25
|
}),
|
26
26
|
]);
|
27
27
|
|
28
28
|
export type SolStakeIntent = t.TypeOf<typeof SolStakeIntent>;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* @title SOL Stake Intent for Jito
|
32
|
+
*/
|
33
|
+
export const SolJitoStakeIntent = t.intersection([
|
34
|
+
SolStakeIntent,
|
35
|
+
t.type({
|
36
|
+
stakingType: t.literal("JITO"),
|
37
|
+
stakePoolConfig: t.type({
|
38
|
+
poolMint: t.string,
|
39
|
+
reserveStake: t.string,
|
40
|
+
managerFeeAccount: t.string,
|
41
|
+
}),
|
42
|
+
}),
|
43
|
+
]);
|
44
|
+
|
45
|
+
export type SolJitoStakeIntent = t.TypeOf<typeof SolJitoStakeIntent>;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import * as t from "io-ts";
|
2
|
+
|
3
|
+
export enum SolStakingTypeEnum {
|
4
|
+
NATIVE = "NATIVE",
|
5
|
+
MARINADE = "MARINADE",
|
6
|
+
JITO = "JITO",
|
7
|
+
}
|
8
|
+
|
9
|
+
export const SolStakingType = t.keyof(SolStakingTypeEnum);
|
10
|
+
|
11
|
+
export type SolStakingType = t.TypeOf<typeof SolStakingType>;
|
@@ -4,6 +4,7 @@ import { Amount } from "./amount";
|
|
4
4
|
import { UnstakeIntent } from "./unstakeIntent";
|
5
5
|
import { Optional } from "../../../utils";
|
6
6
|
import { RecipientEntry } from "./recipientEntry";
|
7
|
+
import { SolStakingType } from "./solStakingType";
|
7
8
|
|
8
9
|
/**
|
9
10
|
* @title SOL Unstake Intent
|
@@ -21,13 +22,30 @@ export const SolUnstakeIntent = t.intersection([
|
|
21
22
|
* @deprecated Use `stakingType` instead.
|
22
23
|
*/
|
23
24
|
isMarinade: Optional(t.boolean),
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
]),
|
25
|
+
/**
|
26
|
+
* @todo Remove Optional once staking-service is updated.
|
27
|
+
*/
|
28
|
+
stakingType: Optional(SolStakingType),
|
29
29
|
recipients: Optional(t.array(RecipientEntry)),
|
30
30
|
}),
|
31
31
|
]);
|
32
32
|
|
33
33
|
export type SolUnstakeIntent = t.TypeOf<typeof SolUnstakeIntent>;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* @title SOL Unstake Intent for Jito
|
37
|
+
*/
|
38
|
+
export const SolJitoUnstakeIntent = t.intersection([
|
39
|
+
SolUnstakeIntent,
|
40
|
+
t.type({
|
41
|
+
stakingType: t.literal("JITO"),
|
42
|
+
stakePoolConfig: t.type({
|
43
|
+
poolMint: t.string,
|
44
|
+
validatorListAccount: t.string,
|
45
|
+
managerFeeAccount: t.string,
|
46
|
+
}),
|
47
|
+
validatorAddress: t.string,
|
48
|
+
}),
|
49
|
+
]);
|
50
|
+
|
51
|
+
export type SolJitoUnstakeIntent = t.TypeOf<typeof SolJitoUnstakeIntent>;
|