@bitgo/public-types 6.24.0 → 6.25.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.
@@ -81,6 +81,7 @@ export declare const HbarUpdateAccountIntent: t.IntersectionC<[t.IntersectionC<[
81
81
  }, unknown>, t.UndefinedC]>;
82
82
  }>]>, t.PartialC<{
83
83
  stakedNodeId: t.UnionC<[t.Type<number, number, unknown>, t.UndefinedC]>;
84
+ stakedAccountId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
84
85
  declineStakingReward: t.UnionC<[t.Type<boolean, boolean, unknown>, t.UndefinedC]>;
85
86
  }>]>;
86
87
  export type HbarUpdateAccountIntent = t.TypeOf<typeof HbarUpdateAccountIntent>;
@@ -31,6 +31,7 @@ exports.HbarUpdateAccountIntent = t.intersection([
31
31
  accountBaseUpdateAccountIntent_1.AccountBaseUpdateAccountIntent,
32
32
  t.partial({
33
33
  stakedNodeId: utils_1.optionalNumber,
34
+ stakedAccountId: utils_1.optionalString,
34
35
  declineStakingReward: utils_1.optionalBoolean,
35
36
  }),
36
37
  ]);
@@ -1 +1 @@
1
- {"version":3,"file":"hbarUpdateAccountIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/hbarUpdateAccountIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,qFAAkF;AAClF,0CAAiE;AASpD,QAAA,uBAAuB,GAAG,CAAC,CAAC,YAAY,CAAC;IACpD,+DAA8B;IAC9B,CAAC,CAAC,OAAO,CAAC;QACR,YAAY,EAAE,sBAAc;QAC5B,oBAAoB,EAAE,uBAAe;KACtC,CAAC;CACH,CAAC,CAAC"}
1
+ {"version":3,"file":"hbarUpdateAccountIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/hbarUpdateAccountIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,qFAAkF;AAClF,0CAIwB;AAeX,QAAA,uBAAuB,GAAG,CAAC,CAAC,YAAY,CAAC;IACpD,+DAA8B;IAC9B,CAAC,CAAC,OAAO,CAAC;QACR,YAAY,EAAE,sBAAc;QAC5B,eAAe,EAAE,sBAAc;QAC/B,oBAAoB,EAAE,uBAAe;KACtC,CAAC;CACH,CAAC,CAAC"}
@@ -4785,6 +4785,7 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
4785
4785
  }, unknown>, t.UndefinedC]>;
4786
4786
  }>]>, t.PartialC<{
4787
4787
  stakedNodeId: t.UnionC<[t.Type<number, number, unknown>, t.UndefinedC]>;
4788
+ stakedAccountId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
4788
4789
  declineStakingReward: t.UnionC<[t.Type<boolean, boolean, unknown>, t.UndefinedC]>;
4789
4790
  }>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
4790
4791
  intentType: t.KeyofC<{
@@ -4883,6 +4883,7 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
4883
4883
  }, unknown>, t.UndefinedC]>;
4884
4884
  }>]>, t.PartialC<{
4885
4885
  stakedNodeId: t.UnionC<[t.Type<number, number, unknown>, t.UndefinedC]>;
4886
+ stakedAccountId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
4886
4887
  declineStakingReward: t.UnionC<[t.Type<boolean, boolean, unknown>, t.UndefinedC]>;
4887
4888
  }>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
4888
4889
  intentType: t.KeyofC<{
@@ -18145,6 +18146,7 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
18145
18146
  }, unknown>, t.UndefinedC]>;
18146
18147
  }>]>, t.PartialC<{
18147
18148
  stakedNodeId: t.UnionC<[t.Type<number, number, unknown>, t.UndefinedC]>;
18149
+ stakedAccountId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
18148
18150
  declineStakingReward: t.UnionC<[t.Type<boolean, boolean, unknown>, t.UndefinedC]>;
18149
18151
  }>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
18150
18152
  intentType: t.KeyofC<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "6.24.0",
3
+ "version": "6.25.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -1,18 +1,29 @@
1
1
  import * as t from "io-ts";
2
2
  import { AccountBaseUpdateAccountIntent } from "./accountBaseUpdateAccountIntent";
3
- import { optionalNumber, optionalBoolean } from "../../../utils";
3
+ import {
4
+ optionalNumber,
5
+ optionalBoolean,
6
+ optionalString,
7
+ } from "../../../utils";
4
8
 
5
9
  /**
6
10
  * @title HBAR Update Account Intent
7
11
  *
8
12
  * Extends the base updateAccount intent with Hedera-specific staking fields.
9
- * Used for stake (stakedNodeId >= 0), unstake (stakedNodeId = -1), and
10
- * switch validator (stakedNodeId = new node) operations.
13
+ *
14
+ * Supports two mutually exclusive staking modes:
15
+ * - **Node staking (direct):** Set `stakedNodeId` to a consensus node ID
16
+ * (>= 0 to stake, -1 to unstake).
17
+ * - **Account staking (indirect):** Set `stakedAccountId` to a Hedera account
18
+ * in "0.0.X" format ("0.0.0" to unstake).
19
+ *
20
+ * Only one of `stakedNodeId` or `stakedAccountId` should be provided per request.
11
21
  */
12
22
  export const HbarUpdateAccountIntent = t.intersection([
13
23
  AccountBaseUpdateAccountIntent,
14
24
  t.partial({
15
25
  stakedNodeId: optionalNumber,
26
+ stakedAccountId: optionalString,
16
27
  declineStakingReward: optionalBoolean,
17
28
  }),
18
29
  ]);