@bitgo/public-types 5.94.0 → 5.96.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 (38) hide show
  1. package/dist/src/schema/keyGen/index.d.ts +1 -0
  2. package/dist/src/schema/keyGen/index.js +1 -0
  3. package/dist/src/schema/keyGen/index.js.map +1 -1
  4. package/dist/src/schema/keyGen/keyCurve.d.ts +7 -0
  5. package/dist/src/schema/keyGen/keyCurve.js +34 -0
  6. package/dist/src/schema/keyGen/keyCurve.js.map +1 -0
  7. package/dist/src/schema/transactionRequest/intents/index.d.ts +5 -0
  8. package/dist/src/schema/transactionRequest/intents/index.js +5 -0
  9. package/dist/src/schema/transactionRequest/intents/index.js.map +1 -1
  10. package/dist/src/schema/transactionRequest/intents/intent.d.ts +363 -0
  11. package/dist/src/schema/transactionRequest/intents/intent.js +10 -0
  12. package/dist/src/schema/transactionRequest/intents/intent.js.map +1 -1
  13. package/dist/src/schema/transactionRequest/intents/trxClaimRewardsIntent.d.ts +74 -0
  14. package/dist/src/schema/transactionRequest/intents/trxClaimRewardsIntent.js +39 -0
  15. package/dist/src/schema/transactionRequest/intents/trxClaimRewardsIntent.js.map +1 -0
  16. package/dist/src/schema/transactionRequest/intents/trxFreezeIntent.d.ts +76 -0
  17. package/dist/src/schema/transactionRequest/intents/trxFreezeIntent.js +41 -0
  18. package/dist/src/schema/transactionRequest/intents/trxFreezeIntent.js.map +1 -0
  19. package/dist/src/schema/transactionRequest/intents/trxUnfreezeIntent.d.ts +75 -0
  20. package/dist/src/schema/transactionRequest/intents/trxUnfreezeIntent.js +40 -0
  21. package/dist/src/schema/transactionRequest/intents/trxUnfreezeIntent.js.map +1 -0
  22. package/dist/src/schema/transactionRequest/intents/trxVoteIntent.d.ts +84 -0
  23. package/dist/src/schema/transactionRequest/intents/trxVoteIntent.js +45 -0
  24. package/dist/src/schema/transactionRequest/intents/trxVoteIntent.js.map +1 -0
  25. package/dist/src/schema/transactionRequest/intents/trxWithdrawExpireUnfreezeIntent.d.ts +74 -0
  26. package/dist/src/schema/transactionRequest/intents/trxWithdrawExpireUnfreezeIntent.js +39 -0
  27. package/dist/src/schema/transactionRequest/intents/trxWithdrawExpireUnfreezeIntent.js.map +1 -0
  28. package/dist/src/schema/transactionRequest/transactionRequest.d.ts +2202 -1476
  29. package/package.json +1 -1
  30. package/src/schema/keyGen/index.ts +1 -0
  31. package/src/schema/keyGen/keyCurve.ts +8 -0
  32. package/src/schema/transactionRequest/intents/index.ts +5 -0
  33. package/src/schema/transactionRequest/intents/intent.ts +10 -0
  34. package/src/schema/transactionRequest/intents/trxClaimRewardsIntent.ts +18 -0
  35. package/src/schema/transactionRequest/intents/trxFreezeIntent.ts +20 -0
  36. package/src/schema/transactionRequest/intents/trxUnfreezeIntent.ts +19 -0
  37. package/src/schema/transactionRequest/intents/trxVoteIntent.ts +27 -0
  38. package/src/schema/transactionRequest/intents/trxWithdrawExpireUnfreezeIntent.ts +20 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "5.94.0",
3
+ "version": "5.96.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -1,2 +1,3 @@
1
+ export * from "./keyCurve";
1
2
  export * from "./keyGenState";
2
3
  export * from "./keyGenType";
@@ -0,0 +1,8 @@
1
+ import * as t from "io-ts";
2
+
3
+ export enum KeyCurveEnum {
4
+ EdDSA = "EdDSA",
5
+ ECDSA = "ECDSA",
6
+ }
7
+ export const KeyCurve = t.keyof(KeyCurveEnum);
8
+ export type KeyCurve = t.TypeOf<typeof KeyCurve>;
@@ -165,6 +165,11 @@ export * from "./tonUndelegateIntent";
165
165
  export * from "./tonWhalesDelegateIntent";
166
166
  export * from "./tonWhalesUndelegateIntent";
167
167
  export * from "./transferTokenIntent";
168
+ export * from "./trxClaimRewardsIntent";
169
+ export * from "./trxFreezeIntent";
170
+ export * from "./trxUnfreezeIntent";
171
+ export * from "./trxVoteIntent";
172
+ export * from "./trxWithdrawExpireUnfreezeIntent";
168
173
  export * from "./unstakeIntent";
169
174
  export * from "./unsupportedTokenRecipientEntryItem";
170
175
  export * from "./validatorRegistrationIntent";
@@ -115,6 +115,11 @@ import { CantonTransferOfferWithdrawnIntent } from "./cantonTransferOfferWithdra
115
115
  import { CantonTransferRejectIntent } from "./cantonTransferRejectIntent";
116
116
  import { TonWhalesDelegateIntent } from "./tonWhalesDelegateIntent";
117
117
  import { TonWhalesUndelegateIntent } from "./tonWhalesUndelegateIntent";
118
+ import { TrxClaimRewardsIntent } from "./trxClaimRewardsIntent";
119
+ import { TrxFreezeIntent } from "./trxFreezeIntent";
120
+ import { TrxUnfreezeIntent } from "./trxUnfreezeIntent";
121
+ import { TrxVoteIntent } from "./trxVoteIntent";
122
+ import { TrxWithdrawExpireUnfreezeIntent } from "./trxWithdrawExpireUnfreezeIntent";
118
123
  import { XdcUploadKycIntent } from "./xdcStakingIntent";
119
124
  import { XdcProposeIntent } from "./xdcStakingIntent";
120
125
  import { XdcResignIntent } from "./xdcUnstakingIntent";
@@ -218,6 +223,11 @@ export const TransactionIntent = t.union([
218
223
  TonUndelegateIntent,
219
224
  TonWhalesDelegateIntent,
220
225
  TonWhalesUndelegateIntent,
226
+ TrxClaimRewardsIntent,
227
+ TrxFreezeIntent,
228
+ TrxUnfreezeIntent,
229
+ TrxVoteIntent,
230
+ TrxWithdrawExpireUnfreezeIntent,
221
231
  VetStakingIntent,
222
232
  VetDelegateIntent,
223
233
  VetExitDelegationIntent,
@@ -0,0 +1,18 @@
1
+ import * as t from "io-ts";
2
+ import { BaseStakeIntent } from "./baseStakeIntent";
3
+ import { BaseIntentWithAmount } from "./baseIntent";
4
+ import { intentTypes } from "./intentType";
5
+
6
+ /**
7
+ * @title TRX Claim Rewards Intent
8
+ */
9
+ export const TrxClaimRewardsIntent = t.intersection([
10
+ BaseStakeIntent,
11
+ BaseIntentWithAmount,
12
+ t.type({
13
+ intentType: intentTypes.stakeClaimRewards,
14
+ ownerAddress: t.string,
15
+ }),
16
+ ]);
17
+
18
+ export type TrxClaimRewardsIntent = t.TypeOf<typeof TrxClaimRewardsIntent>;
@@ -0,0 +1,20 @@
1
+ import * as t from "io-ts";
2
+ import { BaseStakeIntent } from "./baseStakeIntent";
3
+ import { BaseIntentWithAmount } from "./baseIntent";
4
+ import { intentTypes } from "./intentType";
5
+
6
+ /**
7
+ * @title TRX Freeze Intent
8
+ */
9
+ export const TrxFreezeIntent = t.intersection([
10
+ BaseStakeIntent,
11
+ BaseIntentWithAmount,
12
+ t.type({
13
+ intentType: intentTypes.stake,
14
+ validatorAddress: t.string,
15
+ ownerAddress: t.string,
16
+ resource: t.union([t.literal("BANDWIDTH"), t.literal("ENERGY")]),
17
+ }),
18
+ ]);
19
+
20
+ export type TrxFreezeIntent = t.TypeOf<typeof TrxFreezeIntent>;
@@ -0,0 +1,19 @@
1
+ import * as t from "io-ts";
2
+ import { BaseStakeIntent } from "./baseStakeIntent";
3
+ import { BaseIntentWithAmount } from "./baseIntent";
4
+ import { intentTypes } from "./intentType";
5
+
6
+ /**
7
+ * @title TRX Unfreeze Intent
8
+ */
9
+ export const TrxUnfreezeIntent = t.intersection([
10
+ BaseStakeIntent,
11
+ BaseIntentWithAmount,
12
+ t.type({
13
+ intentType: intentTypes.unstake,
14
+ ownerAddress: t.string,
15
+ resource: t.union([t.literal("BANDWIDTH"), t.literal("ENERGY")]),
16
+ }),
17
+ ]);
18
+
19
+ export type TrxUnfreezeIntent = t.TypeOf<typeof TrxUnfreezeIntent>;
@@ -0,0 +1,27 @@
1
+ import * as t from "io-ts";
2
+ import { BaseStakeIntent } from "./baseStakeIntent";
3
+ import { BaseIntentWithAmount } from "./baseIntent";
4
+ import { intentTypes } from "./intentType";
5
+
6
+ export const TrxVote = t.type({
7
+ vote_address: t.string,
8
+ vote_count: t.string,
9
+ });
10
+
11
+ export type TrxVote = t.TypeOf<typeof TrxVote>;
12
+
13
+ /**
14
+ * @title TRX Vote Intent
15
+ */
16
+ export const TrxVoteIntent = t.intersection([
17
+ BaseStakeIntent,
18
+ BaseIntentWithAmount,
19
+ t.type({
20
+ intentType: intentTypes.voteDelegation,
21
+ validatorAddress: t.string,
22
+ ownerAddress: t.string,
23
+ votes: t.array(TrxVote),
24
+ }),
25
+ ]);
26
+
27
+ export type TrxVoteIntent = t.TypeOf<typeof TrxVoteIntent>;
@@ -0,0 +1,20 @@
1
+ import * as t from "io-ts";
2
+ import { BaseStakeIntent } from "./baseStakeIntent";
3
+ import { BaseIntentWithAmount } from "./baseIntent";
4
+ import { intentTypes } from "./intentType";
5
+
6
+ /**
7
+ * @title TRX Withdraw Expire Unfreeze Intent
8
+ */
9
+ export const TrxWithdrawExpireUnfreezeIntent = t.intersection([
10
+ BaseStakeIntent,
11
+ BaseIntentWithAmount,
12
+ t.type({
13
+ intentType: intentTypes.claim,
14
+ ownerAddress: t.string,
15
+ }),
16
+ ]);
17
+
18
+ export type TrxWithdrawExpireUnfreezeIntent = t.TypeOf<
19
+ typeof TrxWithdrawExpireUnfreezeIntent
20
+ >;