@bitgo/public-types 6.6.0 → 6.7.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/transactionRequest/intents/atomPaymentIntent.js.map +1 -1
  2. package/dist/src/schema/transactionRequest/intents/atomStakeIntent.js.map +1 -1
  3. package/dist/src/schema/transactionRequest/intents/atomUnstakeIntent.js.map +1 -1
  4. package/dist/src/schema/transactionRequest/intents/atomWithdrawIntent.js.map +1 -1
  5. package/dist/src/schema/transactionRequest/intents/cosmosContractCallIntent.d.ts +70 -0
  6. package/dist/src/schema/transactionRequest/intents/cosmosContractCallIntent.js +41 -0
  7. package/dist/src/schema/transactionRequest/intents/cosmosContractCallIntent.js.map +1 -0
  8. package/dist/src/schema/transactionRequest/intents/cosmosPaymentIntent.js.map +1 -1
  9. package/dist/src/schema/transactionRequest/intents/cosmosStakeClaimRewardsIntent.d.ts +71 -0
  10. package/dist/src/schema/transactionRequest/intents/cosmosStakeClaimRewardsIntent.js +37 -0
  11. package/dist/src/schema/transactionRequest/intents/cosmosStakeClaimRewardsIntent.js.map +1 -0
  12. package/dist/src/schema/transactionRequest/intents/cosmosStakeIntent.js.map +1 -1
  13. package/dist/src/schema/transactionRequest/intents/cosmosSwitchValidatorIntent.js.map +1 -1
  14. package/dist/src/schema/transactionRequest/intents/cosmosUnstakeIntent.js.map +1 -1
  15. package/dist/src/schema/transactionRequest/intents/cosmosWithdrawIntent.js.map +1 -1
  16. package/dist/src/schema/transactionRequest/intents/index.d.ts +2 -0
  17. package/dist/src/schema/transactionRequest/intents/index.js +2 -0
  18. package/dist/src/schema/transactionRequest/intents/index.js.map +1 -1
  19. package/dist/src/schema/transactionRequest/intents/intent.d.ts +199 -158
  20. package/dist/src/schema/transactionRequest/intents/intent.js +6 -4
  21. package/dist/src/schema/transactionRequest/intents/intent.js.map +1 -1
  22. package/dist/src/schema/transactionRequest/intents/stakeSwitchValidatorIntent.js.map +1 -1
  23. package/dist/src/schema/transactionRequest/transactionRequest.d.ts +416 -334
  24. package/package.json +1 -1
  25. package/src/schema/transactionRequest/intents/atomPaymentIntent.ts +5 -0
  26. package/src/schema/transactionRequest/intents/atomStakeIntent.ts +6 -0
  27. package/src/schema/transactionRequest/intents/atomUnstakeIntent.ts +6 -0
  28. package/src/schema/transactionRequest/intents/atomWithdrawIntent.ts +6 -0
  29. package/src/schema/transactionRequest/intents/cosmosContractCallIntent.ts +30 -0
  30. package/src/schema/transactionRequest/intents/cosmosPaymentIntent.ts +5 -0
  31. package/src/schema/transactionRequest/intents/cosmosStakeClaimRewardsIntent.ts +23 -0
  32. package/src/schema/transactionRequest/intents/cosmosStakeIntent.ts +6 -0
  33. package/src/schema/transactionRequest/intents/cosmosSwitchValidatorIntent.ts +4 -0
  34. package/src/schema/transactionRequest/intents/cosmosUnstakeIntent.ts +7 -0
  35. package/src/schema/transactionRequest/intents/cosmosWithdrawIntent.ts +6 -0
  36. package/src/schema/transactionRequest/intents/index.ts +2 -0
  37. package/src/schema/transactionRequest/intents/intent.ts +6 -4
  38. package/src/schema/transactionRequest/intents/stakeSwitchValidatorIntent.ts +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "6.6.0",
3
+ "version": "6.7.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -3,11 +3,16 @@ import { optionalString } from "../../../utils";
3
3
  import { PaymentIntent } from "./paymentIntent";
4
4
 
5
5
  /**
6
+ * Transfer tokens from a Cosmos-family wallet to one or more recipient
7
+ * addresses. Supported on all Cosmos-family chains. An optional memo may
8
+ * be included for exchange routing or identification.
9
+ *
6
10
  * @title Atom Payment Intent
7
11
  */
8
12
  export const AtomPaymentIntent = t.intersection([
9
13
  PaymentIntent,
10
14
  t.type({
15
+ /** Optional memo string attached to the transaction, used for routing or identification by exchanges. */
11
16
  memo: optionalString,
12
17
  }),
13
18
  ]);
@@ -5,15 +5,21 @@ import { StakeIntent } from "./stakeIntent";
5
5
  import { BaseIntentWithAmount } from "./baseIntent";
6
6
 
7
7
  /**
8
+ * Delegate (stake) tokens to one or more validators on ATOM. Use
9
+ * `validatorAddress` and `amount` for a single validator, or `recipients`
10
+ * for multi-validator delegation.
11
+ *
8
12
  * @title Atom Stake Intent
9
13
  */
10
14
  export const AtomStakeIntent = t.intersection([
11
15
  StakeIntent,
12
16
  BaseIntentWithAmount,
13
17
  t.type({
18
+ /** Bech32 validator address to delegate tokens to (e.g. cosmosvaloper1...). */
14
19
  validatorAddress: t.string,
15
20
  }),
16
21
  t.partial({
22
+ /** Optional list of validator–amount pairs for multi-validator delegation. When provided, overrides validatorAddress and amount. */
17
23
  recipients: Optional(t.array(RecipientEntry)),
18
24
  }),
19
25
  ]);
@@ -5,15 +5,21 @@ import { RecipientEntry } from "./recipientEntry";
5
5
  import { Optional } from "../../../utils";
6
6
 
7
7
  /**
8
+ * Undelegate (unstake) tokens from one or more validators on ATOM. Tokens
9
+ * enter the unbonding period. Use `validatorAddress` and `amount` for
10
+ * single validator or `recipients` for multi-validator.
11
+ *
8
12
  * @title Atom Unstake Intent
9
13
  */
10
14
  export const AtomUnstakeIntent = t.intersection([
11
15
  UnstakeIntent,
12
16
  BaseIntentWithAmount,
13
17
  t.type({
18
+ /** Bech32 validator address to undelegate tokens from (e.g. cosmosvaloper1...). */
14
19
  validatorAddress: t.string,
15
20
  }),
16
21
  t.partial({
22
+ /** Optional list of validator–amount pairs for multi-validator undelegation. When provided, overrides validatorAddress and amount. */
17
23
  recipients: Optional(t.array(RecipientEntry)),
18
24
  }),
19
25
  ]);
@@ -3,7 +3,13 @@ import { WithdrawIntent } from "./withdrawIntent";
3
3
  import { BaseIntentWithAmount } from "./baseIntent";
4
4
 
5
5
  /**
6
+ * Internal codec for ATOM staking reward claims. The `claim` intentType
7
+ * discriminant is not dispatched by the server — do not use directly. Use
8
+ * `CosmosStakeClaimRewardsIntent` with `intentType: stakeClaimRewards`
9
+ * instead.
10
+ *
6
11
  * @title Atom Withdraw Intent
12
+ * @deprecated
7
13
  */
8
14
  export const AtomWithdrawIntent = t.intersection([
9
15
  WithdrawIntent,
@@ -0,0 +1,30 @@
1
+ import * as t from "io-ts";
2
+ import { BaseIntent } from "./baseIntent";
3
+ import { intentTypes } from "./intentType";
4
+
5
+ /**
6
+ * Execute a Wasm smart contract on a Cosmos-family chain. Supported on all
7
+ * Cosmos-family chains. The hash chain additionally supports fee-grant via
8
+ * the optional feeGranter field.
9
+ *
10
+ * @title Cosmos Contract Call Intent
11
+ */
12
+ export const CosmosContractCallIntent = t.intersection([
13
+ BaseIntent,
14
+ t.type({
15
+ /** Must be "contractCall" */
16
+ intentType: intentTypes.contractCall,
17
+ /** Bech32 contract address to execute */
18
+ contract: t.string,
19
+ /** Hex-encoded binary message to pass to the contract Execute entrypoint */
20
+ msgHex: t.string,
21
+ }),
22
+ t.partial({
23
+ /** Optional Bech32 address paying transaction fees on behalf of the submitter (fee-grant). Supported on hash chain; passed through for any chain. */
24
+ feeGranter: t.string,
25
+ }),
26
+ ]);
27
+
28
+ export type CosmosContractCallIntent = t.TypeOf<
29
+ typeof CosmosContractCallIntent
30
+ >;
@@ -3,11 +3,16 @@ import { PaymentIntent } from "./paymentIntent";
3
3
  import { optionalString } from "../../../utils";
4
4
 
5
5
  /**
6
+ * Transfer tokens from a Cosmos-family wallet to one or more recipient
7
+ * addresses. Supported on all Cosmos-family chains. An optional memo may
8
+ * be included for exchange routing or identification.
9
+ *
6
10
  * @title Cosmos Payment Intent
7
11
  */
8
12
  export const CosmosPaymentIntent = t.intersection([
9
13
  PaymentIntent,
10
14
  t.type({
15
+ /** Optional memo string attached to the transaction, used for routing or identification by exchanges. */
11
16
  memo: optionalString,
12
17
  }),
13
18
  ]);
@@ -0,0 +1,23 @@
1
+ import * as t from "io-ts";
2
+ import { BaseStakeIntent } from "./baseStakeIntent";
3
+ import { intentTypes } from "./intentType";
4
+
5
+ /**
6
+ * Claim accumulated staking rewards from a validator on a Cosmos-family chain.
7
+ * Supported on all Cosmos-family chains. Submit with intentType stakeClaimRewards.
8
+ *
9
+ * @title Cosmos Stake Claim Rewards Intent
10
+ */
11
+ export const CosmosStakeClaimRewardsIntent = t.intersection([
12
+ BaseStakeIntent,
13
+ t.type({
14
+ /** Must be "stakeClaimRewards" */
15
+ intentType: intentTypes.stakeClaimRewards,
16
+ /** Bech32 validator address to withdraw accumulated staking rewards from (e.g. cosmosvaloper1...) */
17
+ validatorAddress: t.string,
18
+ }),
19
+ ]);
20
+
21
+ export type CosmosStakeClaimRewardsIntent = t.TypeOf<
22
+ typeof CosmosStakeClaimRewardsIntent
23
+ >;
@@ -6,6 +6,10 @@ import { RecipientEntry } from "./recipientEntry";
6
6
  import { Optional } from "../../../utils";
7
7
 
8
8
  /**
9
+ * Delegate (stake) tokens to one or more validators on a Cosmos-family
10
+ * chain. Use `validatorAddress` and `amount` for a single validator, or
11
+ * `recipients` for multi-validator delegation in a single transaction.
12
+ *
9
13
  * @title Cosmos Stake Intent
10
14
  */
11
15
  export const CosmosStakeIntent = t.intersection([
@@ -13,9 +17,11 @@ export const CosmosStakeIntent = t.intersection([
13
17
  BaseIntentWithAmount,
14
18
  t.type({
15
19
  intentType: intentTypes.delegate,
20
+ /** Bech32 validator address to delegate tokens to (e.g. cosmosvaloper1...). */
16
21
  validatorAddress: t.string,
17
22
  }),
18
23
  t.partial({
24
+ /** Optional list of validator–amount pairs for multi-validator delegation. When provided, overrides validatorAddress and amount. */
19
25
  recipients: Optional(t.array(RecipientEntry)),
20
26
  }),
21
27
  ]);
@@ -2,6 +2,10 @@ import * as t from "io-ts";
2
2
  import { StakeSwitchValidatorIntent } from "./stakeSwitchValidatorIntent";
3
3
 
4
4
  /**
5
+ * Atomically move a delegation from one validator to another (redelegate)
6
+ * on a Cosmos-family chain. The redelegation is subject to the chain's
7
+ * redelegation cooldown rules.
8
+ *
5
9
  * @title Cosmos Switch Validator Intent
6
10
  */
7
11
  export const CosmosSwitchValidatorIntent = StakeSwitchValidatorIntent;
@@ -6,6 +6,11 @@ import { RecipientEntry } from "./recipientEntry";
6
6
  import { Optional } from "../../../utils";
7
7
 
8
8
  /**
9
+ * Undelegate (unstake) tokens from one or more validators on a
10
+ * Cosmos-family chain. Tokens enter the chain's unbonding period and are
11
+ * not immediately available. Use `validatorAddress` and `amount` for a
12
+ * single validator, or `recipients` for multi-validator undelegation.
13
+ *
9
14
  * @title Cosmos Unstake Intent
10
15
  */
11
16
  export const CosmosUnstakeIntent = t.intersection([
@@ -13,9 +18,11 @@ export const CosmosUnstakeIntent = t.intersection([
13
18
  BaseIntentWithAmount,
14
19
  t.type({
15
20
  intentType: intentTypes.undelegate,
21
+ /** Bech32 validator address to undelegate tokens from (e.g. cosmosvaloper1...). */
16
22
  validatorAddress: t.string,
17
23
  }),
18
24
  t.partial({
25
+ /** Optional list of validator–amount pairs for multi-validator undelegation. When provided, overrides validatorAddress and amount. */
19
26
  recipients: Optional(t.array(RecipientEntry)),
20
27
  }),
21
28
  ]);
@@ -2,7 +2,13 @@ import * as t from "io-ts";
2
2
  import { WithdrawIntent } from "./withdrawIntent";
3
3
 
4
4
  /**
5
+ * Internal codec for cosmos-family staking reward claims. The `claim`
6
+ * intentType discriminant is not dispatched by the server — do not use
7
+ * directly. Use `CosmosStakeClaimRewardsIntent` with
8
+ * `intentType: stakeClaimRewards` instead.
9
+ *
5
10
  * @title Cosmos Withdraw Intent
11
+ * @deprecated
6
12
  */
7
13
  export const CosmosWithdrawIntent = t.intersection([
8
14
  WithdrawIntent,
@@ -43,7 +43,9 @@ export * from "./consolidateTokenIntent";
43
43
  export * from "./coredaoClaimIntent";
44
44
  export * from "./coredaoDelegateIntent";
45
45
  export * from "./coredaoUndelegateIntent";
46
+ export * from "./cosmosContractCallIntent";
46
47
  export * from "./cosmosPaymentIntent";
48
+ export * from "./cosmosStakeClaimRewardsIntent";
47
49
  export * from "./cosmosStakeIntent";
48
50
  export * from "./cosmosSwitchValidatorIntent";
49
51
  export * from "./cosmosUnstakeIntent";
@@ -7,7 +7,6 @@ import { AptCustomTxIntent } from "./aptCustomTxIntent";
7
7
  import { AtomPaymentIntent } from "./atomPaymentIntent";
8
8
  import { AtomStakeIntent } from "./atomStakeIntent";
9
9
  import { AtomUnstakeIntent } from "./atomUnstakeIntent";
10
- import { AtomWithdrawIntent } from "./atomWithdrawIntent";
11
10
  import { BabyCreateBtcDelegationIntent } from "./babyCreateBtcDelegationIntent";
12
11
  import { BabyWithdrawRewardIntent } from "./babyWithdrawRewardIntent";
13
12
  import { BscDelegateIntent } from "./bscDelegateIntent";
@@ -20,11 +19,12 @@ import {
20
19
  } from "./vetUnstakingIntent";
21
20
  import { DefiDepositIntent } from "./defiDepositIntent";
22
21
  import { DefiRedeemIntent } from "./defiRedeemIntent";
22
+ import { CosmosContractCallIntent } from "./cosmosContractCallIntent";
23
23
  import { CosmosPaymentIntent } from "./cosmosPaymentIntent";
24
+ import { CosmosStakeClaimRewardsIntent } from "./cosmosStakeClaimRewardsIntent";
24
25
  import { CosmosStakeIntent } from "./cosmosStakeIntent";
25
26
  import { CosmosSwitchValidatorIntent } from "./cosmosSwitchValidatorIntent";
26
27
  import { CosmosUnstakeIntent } from "./cosmosUnstakeIntent";
27
- import { CosmosWithdrawIntent } from "./cosmosWithdrawIntent";
28
28
  import { DotCreateAccountIntent } from "./dotCreateAccountIntent";
29
29
  import { DotPaymentIntent } from "./dotPaymentIntent";
30
30
  import { DotStakingIntent } from "./dotStakingIntent";
@@ -130,6 +130,7 @@ import { XdcUploadKycIntent } from "./xdcStakingIntent";
130
130
  import { XdcProposeIntent } from "./xdcStakingIntent";
131
131
  import { XdcResignIntent } from "./xdcUnstakingIntent";
132
132
  import { XdcWithdrawIntent } from "./xdcUnstakingIntent";
133
+ import { FillNonceIntent } from "./fillNonceIntent";
133
134
  import { HypeevmBridgeFundsIntent } from "./hypeevmBridgeFundsIntent";
134
135
  import { HypeevmEnableBridgingIntent } from "./hypeevmEnableBridgingIntent";
135
136
  import { DelegateIntent } from "./delegateIntent";
@@ -147,7 +148,6 @@ export const TransactionIntent = t.union([
147
148
  AtomPaymentIntent,
148
149
  AtomStakeIntent,
149
150
  AtomUnstakeIntent,
150
- AtomWithdrawIntent,
151
151
  BabyCreateBtcDelegationIntent,
152
152
  BabyWithdrawRewardIntent,
153
153
  BscDelegateIntent,
@@ -159,11 +159,12 @@ export const TransactionIntent = t.union([
159
159
  CantonTransferOfferWithdrawnIntent,
160
160
  CantonTransferRejectIntent,
161
161
  ClaimIntent,
162
+ CosmosContractCallIntent,
162
163
  CosmosPaymentIntent,
164
+ CosmosStakeClaimRewardsIntent,
163
165
  CosmosStakeIntent,
164
166
  CosmosSwitchValidatorIntent,
165
167
  CosmosUnstakeIntent,
166
- CosmosWithdrawIntent,
167
168
  DefiDepositIntent,
168
169
  DefiRedeemIntent,
169
170
  DotConsolidateIntent,
@@ -177,6 +178,7 @@ export const TransactionIntent = t.union([
177
178
  EthConsolidateIntent,
178
179
  EthConsolidateTokenIntent,
179
180
  EthFillNonceIntent,
181
+ FillNonceIntent,
180
182
  EthPaymentIntent,
181
183
  EthStakingIntent,
182
184
  EthTransferTokenIntent,
@@ -8,7 +8,9 @@ export const StakeSwitchValidatorIntent = t.intersection([
8
8
  BaseIntentWithAmount,
9
9
  t.type({
10
10
  intentType: intentTypes.switchValidator,
11
+ /** Bech32 source validator address to redelegate from (e.g. cosmosvaloper1...). */
11
12
  validatorAddress: t.string,
13
+ /** Bech32 destination validator address to redelegate to (e.g. cosmosvaloper1...). */
12
14
  destValidatorAddress: t.string,
13
15
  }),
14
16
  ]);