@bitgo/public-types 5.59.0 → 5.61.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.
Files changed (26) hide show
  1. package/dist/src/schema/transactionRequest/intents/feeConfig.d.ts +21 -0
  2. package/dist/src/schema/transactionRequest/intents/feeConfig.js +43 -0
  3. package/dist/src/schema/transactionRequest/intents/feeConfig.js.map +1 -0
  4. package/dist/src/schema/transactionRequest/intents/flrpContext.d.ts +27 -0
  5. package/dist/src/schema/transactionRequest/intents/flrpContext.js +47 -0
  6. package/dist/src/schema/transactionRequest/intents/flrpContext.js.map +1 -0
  7. package/dist/src/schema/transactionRequest/intents/index.d.ts +3 -0
  8. package/dist/src/schema/transactionRequest/intents/index.js +3 -0
  9. package/dist/src/schema/transactionRequest/intents/index.js.map +1 -1
  10. package/dist/src/schema/transactionRequest/intents/intent.d.ts +64 -0
  11. package/dist/src/schema/transactionRequest/intents/intent.js +2 -0
  12. package/dist/src/schema/transactionRequest/intents/intent.js.map +1 -1
  13. package/dist/src/schema/transactionRequest/intents/tonUndelegateIntent.d.ts +2 -0
  14. package/dist/src/schema/transactionRequest/intents/tonUndelegateIntent.js +4 -0
  15. package/dist/src/schema/transactionRequest/intents/tonUndelegateIntent.js.map +1 -1
  16. package/dist/src/schema/transactionRequest/intents/tonWhalesUndelegateIntent.d.ts +66 -0
  17. package/dist/src/schema/transactionRequest/intents/tonWhalesUndelegateIntent.js +42 -0
  18. package/dist/src/schema/transactionRequest/intents/tonWhalesUndelegateIntent.js.map +1 -0
  19. package/dist/src/schema/transactionRequest/transactionRequest.d.ts +132 -4
  20. package/package.json +1 -1
  21. package/src/schema/transactionRequest/intents/feeConfig.ts +43 -0
  22. package/src/schema/transactionRequest/intents/flrpContext.ts +42 -0
  23. package/src/schema/transactionRequest/intents/index.ts +3 -0
  24. package/src/schema/transactionRequest/intents/intent.ts +2 -0
  25. package/src/schema/transactionRequest/intents/tonUndelegateIntent.ts +5 -0
  26. package/src/schema/transactionRequest/intents/tonWhalesUndelegateIntent.ts +30 -0
@@ -0,0 +1,21 @@
1
+ import * as t from "io-ts";
2
+ declare enum FeeDimensions {
3
+ Bandwidth = 0,
4
+ DBRead = 1,
5
+ DBWrite = 2,
6
+ Compute = 3
7
+ }
8
+ type DimensionValue = number;
9
+ type Dimensions = Record<FeeDimensions, DimensionValue>;
10
+ export declare const FeeConfig: t.TypeC<{
11
+ weights: t.RecordC<t.StringC, t.NumberC>;
12
+ maxCapacity: t.BigIntC;
13
+ maxPerSecond: t.BigIntC;
14
+ targetPerSecond: t.BigIntC;
15
+ minPrice: t.BigIntC;
16
+ excessConversionConstant: t.BigIntC;
17
+ }>;
18
+ export type FeeConfig = Omit<t.TypeOf<typeof FeeConfig>, "weights"> & {
19
+ weights: Dimensions;
20
+ };
21
+ export {};
@@ -0,0 +1,43 @@
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.FeeConfig = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ var FeeDimensions;
29
+ (function (FeeDimensions) {
30
+ FeeDimensions[FeeDimensions["Bandwidth"] = 0] = "Bandwidth";
31
+ FeeDimensions[FeeDimensions["DBRead"] = 1] = "DBRead";
32
+ FeeDimensions[FeeDimensions["DBWrite"] = 2] = "DBWrite";
33
+ FeeDimensions[FeeDimensions["Compute"] = 3] = "Compute";
34
+ })(FeeDimensions || (FeeDimensions = {}));
35
+ exports.FeeConfig = t.type({
36
+ weights: t.record(t.string, t.number),
37
+ maxCapacity: t.bigint,
38
+ maxPerSecond: t.bigint,
39
+ targetPerSecond: t.bigint,
40
+ minPrice: t.bigint,
41
+ excessConversionConstant: t.bigint,
42
+ });
43
+ //# sourceMappingURL=feeConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feeConfig.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/feeConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAK3B,IAAK,aAKJ;AALD,WAAK,aAAa;IAChB,2DAAa,CAAA;IACb,qDAAU,CAAA;IACV,uDAAW,CAAA;IACX,uDAAW,CAAA;AACb,CAAC,EALI,aAAa,KAAb,aAAa,QAKjB;AAqBY,QAAA,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;IACrC,WAAW,EAAE,CAAC,CAAC,MAAM;IACrB,YAAY,EAAE,CAAC,CAAC,MAAM;IACtB,eAAe,EAAE,CAAC,CAAC,MAAM;IACzB,QAAQ,EAAE,CAAC,CAAC,MAAM;IAClB,wBAAwB,EAAE,CAAC,CAAC,MAAM;CACnC,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import * as t from "io-ts";
2
+ export declare const FlrpContext: t.TypeC<{
3
+ networkID: t.NumberC;
4
+ hrp: t.StringC;
5
+ xBlockchainID: t.StringC;
6
+ pBlockchainID: t.StringC;
7
+ cBlockchainID: t.StringC;
8
+ avaxAssetID: t.StringC;
9
+ baseTxFee: t.BigIntC;
10
+ createAssetTxFee: t.BigIntC;
11
+ createSubnetTxFee: t.BigIntC;
12
+ transformSubnetTxFee: t.BigIntC;
13
+ createBlockchainTxFee: t.BigIntC;
14
+ addPrimaryNetworkValidatorFee: t.BigIntC;
15
+ addPrimaryNetworkDelegatorFee: t.BigIntC;
16
+ addSubnetValidatorFee: t.BigIntC;
17
+ addSubnetDelegatorFee: t.BigIntC;
18
+ platformFeeConfig: t.TypeC<{
19
+ weights: t.RecordC<t.StringC, t.NumberC>;
20
+ maxCapacity: t.BigIntC;
21
+ maxPerSecond: t.BigIntC;
22
+ targetPerSecond: t.BigIntC;
23
+ minPrice: t.BigIntC;
24
+ excessConversionConstant: t.BigIntC;
25
+ }>;
26
+ }>;
27
+ export type FlrpContext = t.TypeOf<typeof FlrpContext>;
@@ -0,0 +1,47 @@
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.FlrpContext = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ const feeConfig_1 = require("./feeConfig");
29
+ exports.FlrpContext = t.type({
30
+ networkID: t.number,
31
+ hrp: t.string,
32
+ xBlockchainID: t.string,
33
+ pBlockchainID: t.string,
34
+ cBlockchainID: t.string,
35
+ avaxAssetID: t.string,
36
+ baseTxFee: t.bigint,
37
+ createAssetTxFee: t.bigint,
38
+ createSubnetTxFee: t.bigint,
39
+ transformSubnetTxFee: t.bigint,
40
+ createBlockchainTxFee: t.bigint,
41
+ addPrimaryNetworkValidatorFee: t.bigint,
42
+ addPrimaryNetworkDelegatorFee: t.bigint,
43
+ addSubnetValidatorFee: t.bigint,
44
+ addSubnetDelegatorFee: t.bigint,
45
+ platformFeeConfig: feeConfig_1.FeeConfig,
46
+ });
47
+ //# sourceMappingURL=flrpContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flrpContext.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/flrpContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,2CAAwC;AAqB3B,QAAA,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM;IACnB,GAAG,EAAE,CAAC,CAAC,MAAM;IACb,aAAa,EAAE,CAAC,CAAC,MAAM;IACvB,aAAa,EAAE,CAAC,CAAC,MAAM;IACvB,aAAa,EAAE,CAAC,CAAC,MAAM;IACvB,WAAW,EAAE,CAAC,CAAC,MAAM;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM;IACnB,gBAAgB,EAAE,CAAC,CAAC,MAAM;IAC1B,iBAAiB,EAAE,CAAC,CAAC,MAAM;IAC3B,oBAAoB,EAAE,CAAC,CAAC,MAAM;IAC9B,qBAAqB,EAAE,CAAC,CAAC,MAAM;IAC/B,6BAA6B,EAAE,CAAC,CAAC,MAAM;IACvC,6BAA6B,EAAE,CAAC,CAAC,MAAM;IACvC,qBAAqB,EAAE,CAAC,CAAC,MAAM;IAC/B,qBAAqB,EAAE,CAAC,CAAC,MAAM;IAC/B,iBAAiB,EAAE,qBAAS;CAC7B,CAAC,CAAC"}
@@ -72,6 +72,7 @@ export * from "./feeOptionFeeType";
72
72
  export * from "./feeOptionFormula";
73
73
  export * from "./feeOptionUnit";
74
74
  export * from "./fillNonceIntent";
75
+ export * from "./flrpContext";
75
76
  export * from "./flrpFeeState";
76
77
  export * from "./goUnstakeIntent";
77
78
  export * from "./hopParams";
@@ -144,8 +145,10 @@ export * from "./tokenRecipientEntryItem";
144
145
  export * from "./tonConsolidateIntent";
145
146
  export * from "./tonDelegateIntent";
146
147
  export * from "./tonPaymentIntent";
148
+ export * from "./tonStakingType";
147
149
  export * from "./tonUndelegateIntent";
148
150
  export * from "./tonWhalesDelegateIntent";
151
+ export * from "./tonWhalesUndelegateIntent";
149
152
  export * from "./transferTokenIntent";
150
153
  export * from "./unstakeIntent";
151
154
  export * from "./unsupportedTokenRecipientEntryItem";
@@ -88,6 +88,7 @@ __exportStar(require("./feeOptionFeeType"), exports);
88
88
  __exportStar(require("./feeOptionFormula"), exports);
89
89
  __exportStar(require("./feeOptionUnit"), exports);
90
90
  __exportStar(require("./fillNonceIntent"), exports);
91
+ __exportStar(require("./flrpContext"), exports);
91
92
  __exportStar(require("./flrpFeeState"), exports);
92
93
  __exportStar(require("./goUnstakeIntent"), exports);
93
94
  __exportStar(require("./hopParams"), exports);
@@ -160,8 +161,10 @@ __exportStar(require("./tokenRecipientEntryItem"), exports);
160
161
  __exportStar(require("./tonConsolidateIntent"), exports);
161
162
  __exportStar(require("./tonDelegateIntent"), exports);
162
163
  __exportStar(require("./tonPaymentIntent"), exports);
164
+ __exportStar(require("./tonStakingType"), exports);
163
165
  __exportStar(require("./tonUndelegateIntent"), exports);
164
166
  __exportStar(require("./tonWhalesDelegateIntent"), exports);
167
+ __exportStar(require("./tonWhalesUndelegateIntent"), exports);
165
168
  __exportStar(require("./transferTokenIntent"), exports);
166
169
  __exportStar(require("./unstakeIntent"), exports);
167
170
  __exportStar(require("./unsupportedTokenRecipientEntryItem"), 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,oDAAkC;AAClC,sDAAoC;AACpC,mDAAiC;AACjC,qDAAmC;AACnC,2DAAyC;AACzC,sDAAoC;AACpC,oDAAkC;AAClC,sDAAoC;AACpC,uDAAqC;AACrC,kEAAgD;AAChD,6DAA2C;AAC3C,sDAAoC;AACpC,+CAA6B;AAC7B,oDAAkC;AAClC,gEAA8C;AAC9C,uDAAqC;AACrC,sDAAoC;AACpC,+DAA6C;AAC7C,wDAAsC;AACtC,gEAA8C;AAC9C,+DAA6C;AAC7C,oEAAkD;AAClD,+DAA6C;AAC7C,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,uD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DAA0C;AAC1C,wDAAsC;AACtC,kDAAgC;AAChC,uEAAqD;AACrD,gEAA8C;AAC9C,sDAAoC;AACpC,+DAA6C;AAC7C,qDAAmC;AACnC,uDAAqC;AACrC,mEAAiD;AACjD,yDAAuC;AACvC,yDAAuC;AACvC,wDAAsC;AACtC,2DAAyC;AACzC,yDAAuC;AACvC,mDAAiC"}
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,oDAAkC;AAClC,sDAAoC;AACpC,mDAAiC;AACjC,qDAAmC;AACnC,2DAAyC;AACzC,sDAAoC;AACpC,oDAAkC;AAClC,sDAAoC;AACpC,uDAAqC;AACrC,kEAAgD;AAChD,6DAA2C;AAC3C,sDAAoC;AACpC,+CAA6B;AAC7B,oDAAkC;AAClC,gEAA8C;AAC9C,uDAAqC;AACrC,sDAAoC;AACpC,+DAA6C;AAC7C,wDAAsC;AACtC,gEAA8C;AAC9C,+DAA6C;AAC7C,oEAAkD;AAClD,+DAA6C;AAC7C,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;AA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;AACvC,sDAAoC;AACpC,qDAAmC;AACnC,mDAAiC;AACjC,wDAAsC;AACtC,4DAA0C;AAC1C,8DAA4C;AAC5C,wDAAsC;AACtC,kDAAgC;AAChC,uEAAqD;AACrD,gEAA8C;AAC9C,sDAAoC;AACpC,+DAA6C;AAC7C,qDAAmC;AACnC,uDAAqC;AACrC,mEAAiD;AACjD,yDAAuC;AACvC,yDAAuC;AACvC,wDAAsC;AACtC,2DAAyC;AACzC,yDAAuC;AACvC,mDAAiC"}
@@ -6175,6 +6175,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
6175
6175
  value: t.StringC;
6176
6176
  symbol: t.StringC;
6177
6177
  }>;
6178
+ }>, t.PartialC<{
6179
+ tonStakingType: t.KeyofC<typeof import("./tonStakingType").TonStakingTypeEnum>;
6178
6180
  }>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
6179
6181
  intentType: t.KeyofC<{
6180
6182
  payment: t.LiteralC<"payment">;
@@ -6233,6 +6235,68 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
6233
6235
  intentType: t.LiteralC<"delegate">;
6234
6236
  validatorAddress: t.StringC;
6235
6237
  tonStakingType: t.LiteralC<import("./tonStakingType").TonStakingTypeEnum.TON_WHALES>;
6238
+ }>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
6239
+ intentType: t.KeyofC<{
6240
+ payment: t.LiteralC<"payment">;
6241
+ transferToken: t.LiteralC<"transferToken">;
6242
+ consolidate: t.LiteralC<"consolidate">;
6243
+ consolidateToken: t.LiteralC<"consolidateToken">;
6244
+ fanout: t.LiteralC<"fanout">;
6245
+ stake: t.LiteralC<"stake">;
6246
+ unstake: t.LiteralC<"unstake">;
6247
+ delegate: t.LiteralC<"delegate">;
6248
+ undelegate: t.LiteralC<"undelegate">;
6249
+ switchValidator: t.LiteralC<"switchValidator">;
6250
+ claim: t.LiteralC<"claim">;
6251
+ stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
6252
+ pledge: t.LiteralC<"pledge">;
6253
+ voteDelegation: t.LiteralC<"voteDelegation">;
6254
+ vote: t.LiteralC<"vote">;
6255
+ createAccount: t.LiteralC<"createAccount">;
6256
+ updateAccount: t.LiteralC<"updateAccount">;
6257
+ addTrustLine: t.LiteralC<"addTrustLine">;
6258
+ removeTrustLine: t.LiteralC<"removeTrustLine">;
6259
+ signMessage: t.LiteralC<"signMessage">;
6260
+ signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
6261
+ enableToken: t.LiteralC<"enableToken">;
6262
+ authorize: t.LiteralC<"authorize">;
6263
+ acceleration: t.LiteralC<"acceleration">;
6264
+ fillNonce: t.LiteralC<"fillNonce">;
6265
+ walletRecovery: t.LiteralC<"walletRecovery">;
6266
+ contractCall: t.LiteralC<"contractCall">;
6267
+ deactivate: t.LiteralC<"deactivate">;
6268
+ customTx: t.LiteralC<"customTx">;
6269
+ closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
6270
+ stakeWithCallData: t.LiteralC<"stakeWithCallData">;
6271
+ unstakeWithCallData: t.LiteralC<"unstakeWithCallData">;
6272
+ switchValidatorWithCallData: t.LiteralC<"switchValidatorWithCallData">;
6273
+ feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
6274
+ tokenApproval: t.LiteralC<"tokenApproval">;
6275
+ transferStake: t.LiteralC<"transferStake">;
6276
+ validatorRegistration: t.LiteralC<"validatorRegistration">;
6277
+ goUnstake: t.LiteralC<"goUnstake">;
6278
+ createBtcDelegation: t.LiteralC<"createBtcDelegation">;
6279
+ transferAccept: t.LiteralC<"transferAccept">;
6280
+ transferReject: t.LiteralC<"transferReject">;
6281
+ transferAcknowledge: t.LiteralC<"transferAcknowledge">;
6282
+ }>;
6283
+ }>, t.PartialC<{
6284
+ sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6285
+ comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6286
+ nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6287
+ }>]>, t.TypeC<{
6288
+ amount: t.TypeC<{
6289
+ value: t.StringC;
6290
+ symbol: t.StringC;
6291
+ }>;
6292
+ }>, t.TypeC<{
6293
+ intentType: t.LiteralC<"undelegate">;
6294
+ validatorAddress: t.StringC;
6295
+ withdrawalAmount: t.TypeC<{
6296
+ value: t.StringC;
6297
+ symbol: t.StringC;
6298
+ }>;
6299
+ tonStakingType: t.LiteralC<import("./tonStakingType").TonStakingTypeEnum.TON_WHALES>;
6236
6300
  }>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
6237
6301
  intentType: t.KeyofC<{
6238
6302
  payment: t.LiteralC<"payment">;
@@ -122,6 +122,7 @@ const cantonTransferAcceptIntent_1 = require("./cantonTransferAcceptIntent");
122
122
  const cantonTransferRejectIntent_1 = require("./cantonTransferRejectIntent");
123
123
  const cantonTransferAcknowledgeIntent_1 = require("./cantonTransferAcknowledgeIntent");
124
124
  const tonWhalesDelegateIntent_1 = require("./tonWhalesDelegateIntent");
125
+ const tonWhalesUndelegateIntent_1 = require("./tonWhalesUndelegateIntent");
125
126
  exports.TransactionIntent = t.union([
126
127
  adaConsolidateIntent_1.AdaConsolidateIntent,
127
128
  adaPaymentIntent_1.AdaPaymentIntent,
@@ -204,6 +205,7 @@ exports.TransactionIntent = t.union([
204
205
  tonPaymentIntent_1.TonPaymentIntent,
205
206
  tonUndelegateIntent_1.TonUndelegateIntent,
206
207
  tonWhalesDelegateIntent_1.TonWhalesDelegateIntent,
208
+ tonWhalesUndelegateIntent_1.TonWhalesUndelegateIntent,
207
209
  vetStakingIntent_1.VetStakingIntent,
208
210
  vetDelegateIntent_1.VetDelegateIntent,
209
211
  vetUnstakingIntent_1.VetExitDelegationIntent,
@@ -1 +1 @@
1
- {"version":3,"file":"intent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/intent.ts"],"names":[],"mappings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B,uDAA0B;IAC1B,+CAAsB;IACtB,2CAAoB;IACpB,qCAAiB;IACjB,uCAAkB;IAClB,mCAAgB;IAChB,mCAAgB;IAChB,uCAAkB;IAClB,+BAAc;IACd,mDAAwB;IACxB,+CAAsB;IACtB,mCAAgB;IAChB,yCAAmB;IACnB,2CAAoB;IACpB,qCAAiB;IACjB,mCAAgB;IAChB,yCAAmB;IACnB,iDAAuB;IACvB,mCAAgB;IAChB,qCAAiB;IACjB,4CAAuB;IACvB,qCAAgB;IAChB,uDAA0B;IAC1B,+DAA8B;IAC9B,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,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;AAClE,iEAA8D;AAC9D,uDAAoD;AACpD,2DAAwD;AACxD,6DAA0D;AAC1D,yEAAsE;AACtE,6EAA0E;AAC1E,yDAAsD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ACnB,qCAAiB;IACjB,yDAA2B;IAC3B,yCAAmB;IACnB,2CAAoB;IACpB,2CAAoB;IACpB,+CAAsB;IACtB,mCAAgB;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,uDAA0B;IAC1B,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,uDAA0B;IAC1B,+CAAsB;IACtB,2CAAoB;IACpB,qCAAiB;IACjB,uCAAkB;IAClB,mCAAgB;IAChB,mCAAgB;IAChB,uCAAkB;IAClB,+BAAc;IACd,mDAAwB;IACxB,+CAAsB;IACtB,mCAAgB;IAChB,yCAAmB;IACnB,2CAAoB;IACpB,qCAAiB;IACjB,mCAAgB;IAChB,yCAAmB;IACnB,iDAAuB;IACvB,qDAAyB;IACzB,mCAAgB;IAChB,qCAAiB;IACjB,4CAAuB;IACvB,qCAAgB;IAChB,uDAA0B;IAC1B,+DAA8B;IAC9B,2CAAoB;IACpB,yDAA2B;IAC3B,6CAAqB;IACrB,iDAAuB;IACvB,uCAAkB;IAClB,uCAAkB;IAClB,uCAAkB;IAClB,yCAAmB;IACnB,+CAAsB;IACtB,2CAAoB;IAKpB,uBAAU;CACX,CAAC,CAAC"}
@@ -56,5 +56,7 @@ export declare const TonUndelegateIntent: t.IntersectionC<[t.IntersectionC<[t.Ty
56
56
  value: t.StringC;
57
57
  symbol: t.StringC;
58
58
  }>;
59
+ }>, t.PartialC<{
60
+ tonStakingType: t.KeyofC<typeof import("./tonStakingType").TonStakingTypeEnum>;
59
61
  }>]>;
60
62
  export type TonUndelegateIntent = t.TypeOf<typeof TonUndelegateIntent>;
@@ -28,6 +28,7 @@ const t = __importStar(require("io-ts"));
28
28
  const baseIntent_1 = require("./baseIntent");
29
29
  const intentType_1 = require("./intentType");
30
30
  const amount_1 = require("./amount");
31
+ const tonStakingType_1 = require("./tonStakingType");
31
32
  exports.TonUndelegateIntent = t.intersection([
32
33
  baseIntent_1.BaseIntent,
33
34
  t.type({
@@ -36,5 +37,8 @@ exports.TonUndelegateIntent = t.intersection([
36
37
  useSingleNominator: t.boolean,
37
38
  singleNominatorAmount: amount_1.Amount,
38
39
  }),
40
+ t.partial({
41
+ tonStakingType: tonStakingType_1.TonStakingType,
42
+ }),
39
43
  ]);
40
44
  //# sourceMappingURL=tonUndelegateIntent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tonUndelegateIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/tonUndelegateIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;AAC3C,qCAAkC;AAWrB,QAAA,mBAAmB,GAAG,CAAC,CAAC,YAAY,CAAC;IAChD,uBAAU;IACV,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,UAAU;QAClC,gBAAgB,EAAE,CAAC,CAAC,MAAM;QAC1B,kBAAkB,EAAE,CAAC,CAAC,OAAO;QAC7B,qBAAqB,EAAE,eAAM;KAC9B,CAAC;CACH,CAAC,CAAC"}
1
+ {"version":3,"file":"tonUndelegateIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/tonUndelegateIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;AAC3C,qCAAkC;AAClC,qDAAkD;AAYrC,QAAA,mBAAmB,GAAG,CAAC,CAAC,YAAY,CAAC;IAChD,uBAAU;IACV,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,UAAU;QAClC,gBAAgB,EAAE,CAAC,CAAC,MAAM;QAC1B,kBAAkB,EAAE,CAAC,CAAC,OAAO;QAC7B,qBAAqB,EAAE,eAAM;KAC9B,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,cAAc,EAAE,+BAAc;KAC/B,CAAC;CACH,CAAC,CAAC"}
@@ -0,0 +1,66 @@
1
+ import * as t from "io-ts";
2
+ import { TonStakingTypeEnum } from "./tonStakingType";
3
+ export declare const TonWhalesUndelegateIntent: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
4
+ intentType: t.KeyofC<{
5
+ payment: t.LiteralC<"payment">;
6
+ transferToken: t.LiteralC<"transferToken">;
7
+ consolidate: t.LiteralC<"consolidate">;
8
+ consolidateToken: t.LiteralC<"consolidateToken">;
9
+ fanout: t.LiteralC<"fanout">;
10
+ stake: t.LiteralC<"stake">;
11
+ unstake: t.LiteralC<"unstake">;
12
+ delegate: t.LiteralC<"delegate">;
13
+ undelegate: t.LiteralC<"undelegate">;
14
+ switchValidator: t.LiteralC<"switchValidator">;
15
+ claim: t.LiteralC<"claim">;
16
+ stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
17
+ pledge: t.LiteralC<"pledge">;
18
+ voteDelegation: t.LiteralC<"voteDelegation">;
19
+ vote: t.LiteralC<"vote">;
20
+ createAccount: t.LiteralC<"createAccount">;
21
+ updateAccount: t.LiteralC<"updateAccount">;
22
+ addTrustLine: t.LiteralC<"addTrustLine">;
23
+ removeTrustLine: t.LiteralC<"removeTrustLine">;
24
+ signMessage: t.LiteralC<"signMessage">;
25
+ signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
26
+ enableToken: t.LiteralC<"enableToken">;
27
+ authorize: t.LiteralC<"authorize">;
28
+ acceleration: t.LiteralC<"acceleration">;
29
+ fillNonce: t.LiteralC<"fillNonce">;
30
+ walletRecovery: t.LiteralC<"walletRecovery">;
31
+ contractCall: t.LiteralC<"contractCall">;
32
+ deactivate: t.LiteralC<"deactivate">;
33
+ customTx: t.LiteralC<"customTx">;
34
+ closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
35
+ stakeWithCallData: t.LiteralC<"stakeWithCallData">;
36
+ unstakeWithCallData: t.LiteralC<"unstakeWithCallData">;
37
+ switchValidatorWithCallData: t.LiteralC<"switchValidatorWithCallData">;
38
+ feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
39
+ tokenApproval: t.LiteralC<"tokenApproval">;
40
+ transferStake: t.LiteralC<"transferStake">;
41
+ validatorRegistration: t.LiteralC<"validatorRegistration">;
42
+ goUnstake: t.LiteralC<"goUnstake">;
43
+ createBtcDelegation: t.LiteralC<"createBtcDelegation">;
44
+ transferAccept: t.LiteralC<"transferAccept">;
45
+ transferReject: t.LiteralC<"transferReject">;
46
+ transferAcknowledge: t.LiteralC<"transferAcknowledge">;
47
+ }>;
48
+ }>, t.PartialC<{
49
+ sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
50
+ comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
51
+ nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
52
+ }>]>, t.TypeC<{
53
+ amount: t.TypeC<{
54
+ value: t.StringC;
55
+ symbol: t.StringC;
56
+ }>;
57
+ }>, t.TypeC<{
58
+ intentType: t.LiteralC<"undelegate">;
59
+ validatorAddress: t.StringC;
60
+ withdrawalAmount: t.TypeC<{
61
+ value: t.StringC;
62
+ symbol: t.StringC;
63
+ }>;
64
+ tonStakingType: t.LiteralC<TonStakingTypeEnum.TON_WHALES>;
65
+ }>]>;
66
+ export type TonWhalesUndelegateIntent = t.TypeOf<typeof TonWhalesUndelegateIntent>;
@@ -0,0 +1,42 @@
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.TonWhalesUndelegateIntent = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ const intentType_1 = require("./intentType");
29
+ const tonStakingType_1 = require("./tonStakingType");
30
+ const baseIntent_1 = require("./baseIntent");
31
+ const amount_1 = require("./amount");
32
+ exports.TonWhalesUndelegateIntent = t.intersection([
33
+ baseIntent_1.BaseIntent,
34
+ baseIntent_1.BaseIntentWithAmount,
35
+ t.type({
36
+ intentType: intentType_1.intentTypes.undelegate,
37
+ validatorAddress: t.string,
38
+ withdrawalAmount: amount_1.Amount,
39
+ tonStakingType: t.literal(tonStakingType_1.TonStakingTypeEnum.TON_WHALES),
40
+ }),
41
+ ]);
42
+ //# sourceMappingURL=tonWhalesUndelegateIntent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tonWhalesUndelegateIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/tonWhalesUndelegateIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA2C;AAC3C,qDAAsD;AACtD,6CAAgE;AAChE,qCAAkC;AAYrB,QAAA,yBAAyB,GAAG,CAAC,CAAC,YAAY,CAAC;IACtD,uBAAU;IACV,iCAAoB;IACpB,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,UAAU;QAClC,gBAAgB,EAAE,CAAC,CAAC,MAAM;QAC1B,gBAAgB,EAAE,eAAM;QACxB,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,mCAAkB,CAAC,UAAU,CAAC;KACzD,CAAC;CACH,CAAC,CAAC"}
@@ -6142,7 +6142,7 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
6142
6142
  useSingleNominator: t.BooleanC;
6143
6143
  }>, t.PartialC<{
6144
6144
  ownerAddress: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6145
- tonStakingType: t.KeyofC<typeof import("./intents/tonStakingType").TonStakingTypeEnum>;
6145
+ tonStakingType: t.KeyofC<typeof import(".").TonStakingTypeEnum>;
6146
6146
  }>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
6147
6147
  intentType: t.KeyofC<{
6148
6148
  payment: t.LiteralC<"payment">;
@@ -6273,6 +6273,8 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
6273
6273
  value: t.StringC;
6274
6274
  symbol: t.StringC;
6275
6275
  }>;
6276
+ }>, t.PartialC<{
6277
+ tonStakingType: t.KeyofC<typeof import(".").TonStakingTypeEnum>;
6276
6278
  }>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
6277
6279
  intentType: t.KeyofC<{
6278
6280
  payment: t.LiteralC<"payment">;
@@ -6330,7 +6332,69 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
6330
6332
  }>, t.TypeC<{
6331
6333
  intentType: t.LiteralC<"delegate">;
6332
6334
  validatorAddress: t.StringC;
6333
- tonStakingType: t.LiteralC<import("./intents/tonStakingType").TonStakingTypeEnum.TON_WHALES>;
6335
+ tonStakingType: t.LiteralC<import(".").TonStakingTypeEnum.TON_WHALES>;
6336
+ }>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
6337
+ intentType: t.KeyofC<{
6338
+ payment: t.LiteralC<"payment">;
6339
+ transferToken: t.LiteralC<"transferToken">;
6340
+ consolidate: t.LiteralC<"consolidate">;
6341
+ consolidateToken: t.LiteralC<"consolidateToken">;
6342
+ fanout: t.LiteralC<"fanout">;
6343
+ stake: t.LiteralC<"stake">;
6344
+ unstake: t.LiteralC<"unstake">;
6345
+ delegate: t.LiteralC<"delegate">;
6346
+ undelegate: t.LiteralC<"undelegate">;
6347
+ switchValidator: t.LiteralC<"switchValidator">;
6348
+ claim: t.LiteralC<"claim">;
6349
+ stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
6350
+ pledge: t.LiteralC<"pledge">;
6351
+ voteDelegation: t.LiteralC<"voteDelegation">;
6352
+ vote: t.LiteralC<"vote">;
6353
+ createAccount: t.LiteralC<"createAccount">;
6354
+ updateAccount: t.LiteralC<"updateAccount">;
6355
+ addTrustLine: t.LiteralC<"addTrustLine">;
6356
+ removeTrustLine: t.LiteralC<"removeTrustLine">;
6357
+ signMessage: t.LiteralC<"signMessage">;
6358
+ signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
6359
+ enableToken: t.LiteralC<"enableToken">;
6360
+ authorize: t.LiteralC<"authorize">;
6361
+ acceleration: t.LiteralC<"acceleration">;
6362
+ fillNonce: t.LiteralC<"fillNonce">;
6363
+ walletRecovery: t.LiteralC<"walletRecovery">;
6364
+ contractCall: t.LiteralC<"contractCall">;
6365
+ deactivate: t.LiteralC<"deactivate">;
6366
+ customTx: t.LiteralC<"customTx">;
6367
+ closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
6368
+ stakeWithCallData: t.LiteralC<"stakeWithCallData">;
6369
+ unstakeWithCallData: t.LiteralC<"unstakeWithCallData">;
6370
+ switchValidatorWithCallData: t.LiteralC<"switchValidatorWithCallData">;
6371
+ feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
6372
+ tokenApproval: t.LiteralC<"tokenApproval">;
6373
+ transferStake: t.LiteralC<"transferStake">;
6374
+ validatorRegistration: t.LiteralC<"validatorRegistration">;
6375
+ goUnstake: t.LiteralC<"goUnstake">;
6376
+ createBtcDelegation: t.LiteralC<"createBtcDelegation">;
6377
+ transferAccept: t.LiteralC<"transferAccept">;
6378
+ transferReject: t.LiteralC<"transferReject">;
6379
+ transferAcknowledge: t.LiteralC<"transferAcknowledge">;
6380
+ }>;
6381
+ }>, t.PartialC<{
6382
+ sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6383
+ comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6384
+ nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6385
+ }>]>, t.TypeC<{
6386
+ amount: t.TypeC<{
6387
+ value: t.StringC;
6388
+ symbol: t.StringC;
6389
+ }>;
6390
+ }>, t.TypeC<{
6391
+ intentType: t.LiteralC<"undelegate">;
6392
+ validatorAddress: t.StringC;
6393
+ withdrawalAmount: t.TypeC<{
6394
+ value: t.StringC;
6395
+ symbol: t.StringC;
6396
+ }>;
6397
+ tonStakingType: t.LiteralC<import(".").TonStakingTypeEnum.TON_WHALES>;
6334
6398
  }>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
6335
6399
  intentType: t.KeyofC<{
6336
6400
  payment: t.LiteralC<"payment">;
@@ -13873,7 +13937,7 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
13873
13937
  useSingleNominator: t.BooleanC;
13874
13938
  }>, t.PartialC<{
13875
13939
  ownerAddress: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
13876
- tonStakingType: t.KeyofC<typeof import("./intents/tonStakingType").TonStakingTypeEnum>;
13940
+ tonStakingType: t.KeyofC<typeof import(".").TonStakingTypeEnum>;
13877
13941
  }>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
13878
13942
  intentType: t.KeyofC<{
13879
13943
  payment: t.LiteralC<"payment">;
@@ -14004,6 +14068,8 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
14004
14068
  value: t.StringC;
14005
14069
  symbol: t.StringC;
14006
14070
  }>;
14071
+ }>, t.PartialC<{
14072
+ tonStakingType: t.KeyofC<typeof import(".").TonStakingTypeEnum>;
14007
14073
  }>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
14008
14074
  intentType: t.KeyofC<{
14009
14075
  payment: t.LiteralC<"payment">;
@@ -14061,7 +14127,69 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
14061
14127
  }>, t.TypeC<{
14062
14128
  intentType: t.LiteralC<"delegate">;
14063
14129
  validatorAddress: t.StringC;
14064
- tonStakingType: t.LiteralC<import("./intents/tonStakingType").TonStakingTypeEnum.TON_WHALES>;
14130
+ tonStakingType: t.LiteralC<import(".").TonStakingTypeEnum.TON_WHALES>;
14131
+ }>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
14132
+ intentType: t.KeyofC<{
14133
+ payment: t.LiteralC<"payment">;
14134
+ transferToken: t.LiteralC<"transferToken">;
14135
+ consolidate: t.LiteralC<"consolidate">;
14136
+ consolidateToken: t.LiteralC<"consolidateToken">;
14137
+ fanout: t.LiteralC<"fanout">;
14138
+ stake: t.LiteralC<"stake">;
14139
+ unstake: t.LiteralC<"unstake">;
14140
+ delegate: t.LiteralC<"delegate">;
14141
+ undelegate: t.LiteralC<"undelegate">;
14142
+ switchValidator: t.LiteralC<"switchValidator">;
14143
+ claim: t.LiteralC<"claim">;
14144
+ stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
14145
+ pledge: t.LiteralC<"pledge">;
14146
+ voteDelegation: t.LiteralC<"voteDelegation">;
14147
+ vote: t.LiteralC<"vote">;
14148
+ createAccount: t.LiteralC<"createAccount">;
14149
+ updateAccount: t.LiteralC<"updateAccount">;
14150
+ addTrustLine: t.LiteralC<"addTrustLine">;
14151
+ removeTrustLine: t.LiteralC<"removeTrustLine">;
14152
+ signMessage: t.LiteralC<"signMessage">;
14153
+ signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
14154
+ enableToken: t.LiteralC<"enableToken">;
14155
+ authorize: t.LiteralC<"authorize">;
14156
+ acceleration: t.LiteralC<"acceleration">;
14157
+ fillNonce: t.LiteralC<"fillNonce">;
14158
+ walletRecovery: t.LiteralC<"walletRecovery">;
14159
+ contractCall: t.LiteralC<"contractCall">;
14160
+ deactivate: t.LiteralC<"deactivate">;
14161
+ customTx: t.LiteralC<"customTx">;
14162
+ closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
14163
+ stakeWithCallData: t.LiteralC<"stakeWithCallData">;
14164
+ unstakeWithCallData: t.LiteralC<"unstakeWithCallData">;
14165
+ switchValidatorWithCallData: t.LiteralC<"switchValidatorWithCallData">;
14166
+ feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
14167
+ tokenApproval: t.LiteralC<"tokenApproval">;
14168
+ transferStake: t.LiteralC<"transferStake">;
14169
+ validatorRegistration: t.LiteralC<"validatorRegistration">;
14170
+ goUnstake: t.LiteralC<"goUnstake">;
14171
+ createBtcDelegation: t.LiteralC<"createBtcDelegation">;
14172
+ transferAccept: t.LiteralC<"transferAccept">;
14173
+ transferReject: t.LiteralC<"transferReject">;
14174
+ transferAcknowledge: t.LiteralC<"transferAcknowledge">;
14175
+ }>;
14176
+ }>, t.PartialC<{
14177
+ sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
14178
+ comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
14179
+ nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
14180
+ }>]>, t.TypeC<{
14181
+ amount: t.TypeC<{
14182
+ value: t.StringC;
14183
+ symbol: t.StringC;
14184
+ }>;
14185
+ }>, t.TypeC<{
14186
+ intentType: t.LiteralC<"undelegate">;
14187
+ validatorAddress: t.StringC;
14188
+ withdrawalAmount: t.TypeC<{
14189
+ value: t.StringC;
14190
+ symbol: t.StringC;
14191
+ }>;
14192
+ tonStakingType: t.LiteralC<import(".").TonStakingTypeEnum.TON_WHALES>;
14065
14193
  }>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
14066
14194
  intentType: t.KeyofC<{
14067
14195
  payment: t.LiteralC<"payment">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "5.59.0",
3
+ "version": "5.61.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -0,0 +1,43 @@
1
+ import * as t from "io-ts";
2
+
3
+ /**
4
+ * Fee dimensions for FLR P chain transactions
5
+ */
6
+ enum FeeDimensions {
7
+ Bandwidth = 0,
8
+ DBRead = 1,
9
+ DBWrite = 2,
10
+ Compute = 3,
11
+ }
12
+
13
+ /**
14
+ * Dimension value type
15
+ */
16
+ type DimensionValue = number;
17
+
18
+ /**
19
+ * Dimensions mapping for fee calculation
20
+ */
21
+ type Dimensions = Record<FeeDimensions, DimensionValue>;
22
+
23
+ /**
24
+ * Fee configuration for post-Etna FLR P chain transactions
25
+ * @property {Dimensions} weights - Dimension weights for fee calculation
26
+ * @property {bigint} maxCapacity - Maximum capacity value
27
+ * @property {bigint} maxPerSecond - Maximum units per second
28
+ * @property {bigint} targetPerSecond - Target units per second
29
+ * @property {bigint} minPrice - Minimum gas price
30
+ * @property {bigint} excessConversionConstant - Conversion constant for excess calculation
31
+ */
32
+ export const FeeConfig = t.type({
33
+ weights: t.record(t.string, t.number),
34
+ maxCapacity: t.bigint,
35
+ maxPerSecond: t.bigint,
36
+ targetPerSecond: t.bigint,
37
+ minPrice: t.bigint,
38
+ excessConversionConstant: t.bigint,
39
+ });
40
+
41
+ export type FeeConfig = Omit<t.TypeOf<typeof FeeConfig>, "weights"> & {
42
+ weights: Dimensions;
43
+ };
@@ -0,0 +1,42 @@
1
+ import * as t from "io-ts";
2
+ import { FeeConfig } from "./feeConfig";
3
+
4
+ /**
5
+ * Context for FLR P chain transactions
6
+ * @property {number} networkID - Network identifier
7
+ * @property {string} hrp - Human-readable part for addresses
8
+ * @property {string} xBlockchainID - X-Chain blockchain ID
9
+ * @property {string} pBlockchainID - P-Chain blockchain ID
10
+ * @property {string} cBlockchainID - C-Chain blockchain ID
11
+ * @property {string} avaxAssetID - AVAX asset identifier
12
+ * @property {bigint} baseTxFee - Base transaction fee
13
+ * @property {bigint} createAssetTxFee - Create asset transaction fee
14
+ * @property {bigint} createSubnetTxFee - Create subnet transaction fee
15
+ * @property {bigint} transformSubnetTxFee - Transform subnet transaction fee
16
+ * @property {bigint} createBlockchainTxFee - Create blockchain transaction fee
17
+ * @property {bigint} addPrimaryNetworkValidatorFee - Add primary network validator fee
18
+ * @property {bigint} addPrimaryNetworkDelegatorFee - Add primary network delegator fee
19
+ * @property {bigint} addSubnetValidatorFee - Add subnet validator fee
20
+ * @property {bigint} addSubnetDelegatorFee - Add subnet delegator fee
21
+ * @property {FeeConfig} platformFeeConfig - Platform fee configuration (Post Etna)
22
+ */
23
+ export const FlrpContext = t.type({
24
+ networkID: t.number,
25
+ hrp: t.string,
26
+ xBlockchainID: t.string,
27
+ pBlockchainID: t.string,
28
+ cBlockchainID: t.string,
29
+ avaxAssetID: t.string,
30
+ baseTxFee: t.bigint,
31
+ createAssetTxFee: t.bigint,
32
+ createSubnetTxFee: t.bigint,
33
+ transformSubnetTxFee: t.bigint,
34
+ createBlockchainTxFee: t.bigint,
35
+ addPrimaryNetworkValidatorFee: t.bigint,
36
+ addPrimaryNetworkDelegatorFee: t.bigint,
37
+ addSubnetValidatorFee: t.bigint,
38
+ addSubnetDelegatorFee: t.bigint,
39
+ platformFeeConfig: FeeConfig,
40
+ });
41
+
42
+ export type FlrpContext = t.TypeOf<typeof FlrpContext>;
@@ -72,6 +72,7 @@ export * from "./feeOptionFeeType";
72
72
  export * from "./feeOptionFormula";
73
73
  export * from "./feeOptionUnit";
74
74
  export * from "./fillNonceIntent";
75
+ export * from "./flrpContext";
75
76
  export * from "./flrpFeeState";
76
77
  export * from "./goUnstakeIntent";
77
78
  export * from "./hopParams";
@@ -144,8 +145,10 @@ export * from "./tokenRecipientEntryItem";
144
145
  export * from "./tonConsolidateIntent";
145
146
  export * from "./tonDelegateIntent";
146
147
  export * from "./tonPaymentIntent";
148
+ export * from "./tonStakingType";
147
149
  export * from "./tonUndelegateIntent";
148
150
  export * from "./tonWhalesDelegateIntent";
151
+ export * from "./tonWhalesUndelegateIntent";
149
152
  export * from "./transferTokenIntent";
150
153
  export * from "./unstakeIntent";
151
154
  export * from "./unsupportedTokenRecipientEntryItem";
@@ -99,6 +99,7 @@ import { CantonTransferAcceptIntent } from "./cantonTransferAcceptIntent";
99
99
  import { CantonTransferRejectIntent } from "./cantonTransferRejectIntent";
100
100
  import { CantonTransferAcknowledgeIntent } from "./cantonTransferAcknowledgeIntent";
101
101
  import { TonWhalesDelegateIntent } from "./tonWhalesDelegateIntent";
102
+ import { TonWhalesUndelegateIntent } from "./tonWhalesUndelegateIntent";
102
103
 
103
104
  export const TransactionIntent = t.union([
104
105
  AdaConsolidateIntent,
@@ -182,6 +183,7 @@ export const TransactionIntent = t.union([
182
183
  TonPaymentIntent,
183
184
  TonUndelegateIntent,
184
185
  TonWhalesDelegateIntent,
186
+ TonWhalesUndelegateIntent,
185
187
  VetStakingIntent,
186
188
  VetDelegateIntent,
187
189
  VetExitDelegationIntent,
@@ -2,6 +2,7 @@ import * as t from "io-ts";
2
2
  import { BaseIntent } from "./baseIntent";
3
3
  import { intentTypes } from "./intentType";
4
4
  import { Amount } from "./amount";
5
+ import { TonStakingType } from "./tonStakingType";
5
6
 
6
7
  /**
7
8
  * @title TON Undelegate Intent
@@ -11,6 +12,7 @@ import { Amount } from "./amount";
11
12
  * @param {string} validatorAddress The address of the validator
12
13
  * @param {boolean} useSingleNominator Whether to use a single nominator pool, if false then a multi nominator pool will be used
13
14
  * @param {Amount} singleNominatorAmount The amount to delegate to the single nominator pool
15
+ * @param {string} [tonStakingType] The type of TON staking (SINGLE_NOMINATOR, MULTI_NOMINATOR, TON_WHALES)
14
16
  */
15
17
  export const TonUndelegateIntent = t.intersection([
16
18
  BaseIntent,
@@ -20,6 +22,9 @@ export const TonUndelegateIntent = t.intersection([
20
22
  useSingleNominator: t.boolean,
21
23
  singleNominatorAmount: Amount,
22
24
  }),
25
+ t.partial({
26
+ tonStakingType: TonStakingType,
27
+ }),
23
28
  ]);
24
29
 
25
30
  export type TonUndelegateIntent = t.TypeOf<typeof TonUndelegateIntent>;
@@ -0,0 +1,30 @@
1
+ import * as t from "io-ts";
2
+ import { intentTypes } from "./intentType";
3
+ import { TonStakingTypeEnum } from "./tonStakingType";
4
+ import { BaseIntent, BaseIntentWithAmount } from "./baseIntent";
5
+ import { Amount } from "./amount";
6
+
7
+ /**
8
+ * @title TON Whales Undelegate Intent
9
+ *
10
+ * @description The intent for undelegate/unstake requests to TON Whales validators
11
+ *
12
+ * @param {string} intentType The type of intent (always set to delegate)
13
+ * @param {string} validatorAddress The address of the validator
14
+ * @param {Amount} withdrawalAmount The amount to undelegate/unstake, used in the message to TON Whales
15
+ * @param {string} tonStakingType The type of TON staking (always set to TON_WHALES)
16
+ */
17
+ export const TonWhalesUndelegateIntent = t.intersection([
18
+ BaseIntent,
19
+ BaseIntentWithAmount,
20
+ t.type({
21
+ intentType: intentTypes.undelegate,
22
+ validatorAddress: t.string,
23
+ withdrawalAmount: Amount,
24
+ tonStakingType: t.literal(TonStakingTypeEnum.TON_WHALES),
25
+ }),
26
+ ]);
27
+
28
+ export type TonWhalesUndelegateIntent = t.TypeOf<
29
+ typeof TonWhalesUndelegateIntent
30
+ >;