@bitgo/public-types 6.25.0 → 6.27.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 (20) hide show
  1. package/dist/src/schema/transactionRequest/intents/cantonCommandIntent.d.ts +3 -1
  2. package/dist/src/schema/transactionRequest/intents/cantonCommandIntent.js +4 -1
  3. package/dist/src/schema/transactionRequest/intents/cantonCommandIntent.js.map +1 -1
  4. package/dist/src/schema/transactionRequest/intents/feeAddressTransferIntent.js.map +1 -1
  5. package/dist/src/schema/transactionRequest/intents/intent.d.ts +307 -1
  6. package/dist/src/schema/transactionRequest/intents/intent.js +4 -0
  7. package/dist/src/schema/transactionRequest/intents/intent.js.map +1 -1
  8. package/dist/src/schema/transactionRequest/intents/iotaBuildOptions.js.map +1 -1
  9. package/dist/src/schema/transactionRequest/intents/iotaConsolidateIntent.js.map +1 -1
  10. package/dist/src/schema/transactionRequest/intents/iotaFeeOptions.js.map +1 -1
  11. package/dist/src/schema/transactionRequest/intents/iotaPaymentIntent.js.map +1 -1
  12. package/dist/src/schema/transactionRequest/transactionRequest.d.ts +964 -352
  13. package/package.json +1 -1
  14. package/src/schema/transactionRequest/intents/cantonCommandIntent.ts +9 -1
  15. package/src/schema/transactionRequest/intents/feeAddressTransferIntent.ts +10 -0
  16. package/src/schema/transactionRequest/intents/intent.ts +4 -0
  17. package/src/schema/transactionRequest/intents/iotaBuildOptions.ts +11 -0
  18. package/src/schema/transactionRequest/intents/iotaConsolidateIntent.ts +4 -0
  19. package/src/schema/transactionRequest/intents/iotaFeeOptions.ts +7 -0
  20. package/src/schema/transactionRequest/intents/iotaPaymentIntent.ts +7 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "6.25.0",
3
+ "version": "6.27.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -33,9 +33,10 @@ const ExerciseCommand = t.type({
33
33
  t.type({
34
34
  templateId: t.string,
35
35
  choice: t.string,
36
- choiceArgument: t.record(t.string, t.unknown),
37
36
  }),
38
37
  t.partial({
38
+ // optional: no-arg choices omit it
39
+ choiceArgument: t.record(t.string, t.unknown),
39
40
  // omit when contractId will be injected via resolveContracts at build time
40
41
  contractId: t.string,
41
42
  }),
@@ -75,6 +76,13 @@ export const CantonCommandIntent = t.intersection([
75
76
  intentType: intentTypes.cantonCommand,
76
77
  cantonCommandParams: CantonCommandParams,
77
78
  }),
79
+ t.partial({
80
+ /**
81
+ * Optional registered coin/token identifier for the command target (e.g. "tcanton:stgusd1").
82
+ * This is not an auth/session token.
83
+ */
84
+ token: t.string,
85
+ }),
78
86
  ]);
79
87
 
80
88
  export type CantonCommandIntent = t.TypeOf<typeof CantonCommandIntent>;
@@ -3,6 +3,16 @@ import { BaseIntent } from "./baseIntent";
3
3
  import { intentTypes } from "./intentType";
4
4
  import { RecipientEntry } from "./recipientEntry";
5
5
 
6
+ /**
7
+ * @title Fee Address Transfer Intent
8
+ *
9
+ * @description Transfer funds from the wallet's IOTA fee address (gas tank) to one or
10
+ * more destinations. The fee address acts as the sender; use this intent to sweep
11
+ * gas-tank balances back to an operational address. Requires that a fee address is
12
+ * configured for the wallet's enterprise.
13
+ *
14
+ * @param {RecipientEntry[]} recipients - Destination addresses and amounts to transfer.
15
+ */
6
16
  export const FeeAddressTransferIntent = t.intersection([
7
17
  BaseIntent,
8
18
  t.type({
@@ -38,6 +38,8 @@ import { FeeAddressTransferIntent } from "./feeAddressTransferIntent";
38
38
  import { HbarUpdateAccountIntent } from "./hbarUpdateAccountIntent";
39
39
  import { HypeevmSpotTransferIntent } from "./hypeevmSpotTransferIntent";
40
40
  import { IcpPaymentIntent } from "./icpPaymentIntent";
41
+ import { IotaConsolidateIntent } from "./iotaConsolidateIntent";
42
+ import { IotaPaymentIntent } from "./iotaPaymentIntent";
41
43
  import { LightningPaymentIntent } from "./lightningPaymentIntent";
42
44
  import { MmiSignMessageIntent } from "./mmiSignMessageIntent";
43
45
  import { NearStakeIntent } from "./nearStakeIntent";
@@ -199,6 +201,8 @@ export const TransactionIntent = t.union([
199
201
  HypeevmSpotTransferIntent,
200
202
  HypeevmEnableBridgingIntent,
201
203
  IcpPaymentIntent,
204
+ IotaConsolidateIntent,
205
+ IotaPaymentIntent,
202
206
  LightningPaymentIntent,
203
207
  MmiSignMessageIntent,
204
208
  MmiSignTransactionIntent,
@@ -3,6 +3,17 @@ import { BaseIntent } from "./baseIntent";
3
3
  import { optionalString } from "../../../utils";
4
4
  import { IotaFeeOptions } from "./iotaFeeOptions";
5
5
 
6
+ /**
7
+ * @title IOTA Build Options
8
+ *
9
+ * @description Shared IOTA-specific build configuration mixed into payment and consolidate
10
+ * intents.
11
+ *
12
+ * @param {IotaFeeOptions} feeOptions - Gas budget options for this transaction. Controls
13
+ * the maximum gas units the transaction may consume.
14
+ * @param {string} lockedAmount - Server-injected value from wallet.lockedAsset; client
15
+ * values are overwritten at request time.
16
+ */
6
17
  export const IotaBuildOptions = t.intersection([
7
18
  BaseIntent,
8
19
  t.type({
@@ -4,6 +4,10 @@ import { AccountBaseConsolidateIntent } from "./accountBaseConsolidateIntent";
4
4
 
5
5
  /**
6
6
  * @title IOTA Consolidate Intent
7
+ *
8
+ * @description Consolidate IOTA coins or tokens from the wallet's receive addresses into
9
+ * the specified destination address. Both native IOTA and token consolidation are handled
10
+ * by this intent. The destination must be a wallet-owned address.
7
11
  */
8
12
  export const IotaConsolidateIntent = t.intersection([
9
13
  AccountBaseConsolidateIntent,
@@ -1,5 +1,12 @@
1
1
  import * as t from "io-ts";
2
2
 
3
+ /**
4
+ * @title IOTA Fee Options
5
+ *
6
+ * @description Gas budget configuration for an IOTA transaction.
7
+ *
8
+ * @param {number} gasLimit - Maximum gas units this transaction may consume.
9
+ */
3
10
  export const IotaFeeOptions = t.type({
4
11
  gasLimit: t.number,
5
12
  });
@@ -5,6 +5,13 @@ import { optionalStringArray } from "../../../utils";
5
5
 
6
6
  /**
7
7
  * @title IOTA Payment Intent
8
+ *
9
+ * @description Send IOTA or IOTA-based tokens from the wallet to one or more recipients.
10
+ * Specify recipients with address and amount; optionally provide specific object IDs to
11
+ * include as inputs via `unspents`.
12
+ *
13
+ * @param {string[]} unspents - Specific IOTA object IDs to use as inputs for this
14
+ * transaction. When omitted, the server selects inputs automatically.
8
15
  */
9
16
  export const IotaPaymentIntent = t.intersection([
10
17
  PaymentIntent,