@bitgo/public-types 6.8.0 → 6.8.1

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 (19) hide show
  1. package/dist/src/schema/transactionRequest/intents/intent.d.ts +24 -24
  2. package/dist/src/schema/transactionRequest/intents/solAuthorizeIntent.d.ts +2 -2
  3. package/dist/src/schema/transactionRequest/intents/solBuildOptions.d.ts +2 -2
  4. package/dist/src/schema/transactionRequest/intents/solBuildOptions.js +3 -2
  5. package/dist/src/schema/transactionRequest/intents/solBuildOptions.js.map +1 -1
  6. package/dist/src/schema/transactionRequest/intents/solClaimIntent.d.ts +2 -2
  7. package/dist/src/schema/transactionRequest/intents/solCloseAssociatedTokenAccountIntent.d.ts +2 -2
  8. package/dist/src/schema/transactionRequest/intents/solCreateAssociatedTokenAccountIntent.d.ts +2 -2
  9. package/dist/src/schema/transactionRequest/intents/solCustomTxIntent.d.ts +2 -2
  10. package/dist/src/schema/transactionRequest/intents/solDeactivateIntent.d.ts +2 -2
  11. package/dist/src/schema/transactionRequest/intents/solDelegateIntent.d.ts +2 -2
  12. package/dist/src/schema/transactionRequest/intents/solGoUnstakeIntent.d.ts +2 -2
  13. package/dist/src/schema/transactionRequest/intents/solPaymentIntent.d.ts +2 -2
  14. package/dist/src/schema/transactionRequest/intents/solStakeIntent.d.ts +4 -4
  15. package/dist/src/schema/transactionRequest/intents/solUnstakeIntent.d.ts +4 -4
  16. package/dist/src/schema/transactionRequest/intents/solVersionedCustomTxIntent.d.ts +2 -2
  17. package/dist/src/schema/transactionRequest/transactionRequest.d.ts +48 -48
  18. package/package.json +1 -1
  19. package/src/schema/transactionRequest/intents/solBuildOptions.ts +11 -14
@@ -5826,8 +5826,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
5826
5826
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
5827
5827
  }>]>, t.IntersectionC<[t.PartialC<{
5828
5828
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
5829
- }>, t.PartialC<{
5830
- memo: t.StringC;
5829
+ }>, t.TypeC<{
5830
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
5831
5831
  }>]>, t.TypeC<{
5832
5832
  intentType: t.LiteralC<"authorize">;
5833
5833
  transactionMessage: t.StringC;
@@ -5917,8 +5917,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
5917
5917
  }, unknown>, t.UndefinedC]>;
5918
5918
  }>]>, t.IntersectionC<[t.PartialC<{
5919
5919
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
5920
- }>, t.PartialC<{
5921
- memo: t.StringC;
5920
+ }>, t.TypeC<{
5921
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
5922
5922
  }>]>, t.TypeC<{
5923
5923
  amount: t.TypeC<{
5924
5924
  value: t.StringC;
@@ -5991,8 +5991,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
5991
5991
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
5992
5992
  }>]>, t.IntersectionC<[t.PartialC<{
5993
5993
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
5994
- }>, t.PartialC<{
5995
- memo: t.StringC;
5994
+ }>, t.TypeC<{
5995
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
5996
5996
  }>]>, t.TypeC<{
5997
5997
  intentType: t.LiteralC<"closeAssociatedTokenAccount">;
5998
5998
  recipients: t.BrandC<t.ArrayC<t.BrandC<t.IntersectionC<[t.TypeC<{
@@ -6143,8 +6143,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
6143
6143
  }>]>>;
6144
6144
  }>]>, t.IntersectionC<[t.PartialC<{
6145
6145
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6146
- }>, t.PartialC<{
6147
- memo: t.StringC;
6146
+ }>, t.TypeC<{
6147
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6148
6148
  }>]>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
6149
6149
  intentType: t.KeyofC<{
6150
6150
  payment: t.LiteralC<"payment">;
@@ -6210,8 +6210,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
6210
6210
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6211
6211
  }>]>, t.IntersectionC<[t.PartialC<{
6212
6212
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6213
- }>, t.PartialC<{
6214
- memo: t.StringC;
6213
+ }>, t.TypeC<{
6214
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6215
6215
  }>]>, t.TypeC<{
6216
6216
  intentType: t.LiteralC<"customTx">;
6217
6217
  solInstructions: t.ArrayC<t.TypeC<{
@@ -6288,8 +6288,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
6288
6288
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6289
6289
  }>]>, t.IntersectionC<[t.PartialC<{
6290
6290
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6291
- }>, t.PartialC<{
6292
- memo: t.StringC;
6291
+ }>, t.TypeC<{
6292
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6293
6293
  }>]>, t.TypeC<{
6294
6294
  intentType: t.LiteralC<"deactivate">;
6295
6295
  stakingAddresses: t.UnionC<[t.Type<string[], string[], unknown>, t.UndefinedC]>;
@@ -6359,8 +6359,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
6359
6359
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6360
6360
  }>]>, t.IntersectionC<[t.PartialC<{
6361
6361
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6362
- }>, t.PartialC<{
6363
- memo: t.StringC;
6362
+ }>, t.TypeC<{
6363
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6364
6364
  }>]>, t.TypeC<{
6365
6365
  intentType: t.LiteralC<"delegate">;
6366
6366
  validatorAddress: t.StringC;
@@ -6451,8 +6451,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
6451
6451
  }>]>>;
6452
6452
  }>]>, t.IntersectionC<[t.PartialC<{
6453
6453
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6454
- }>, t.PartialC<{
6455
- memo: t.StringC;
6454
+ }>, t.TypeC<{
6455
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6456
6456
  }>]>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
6457
6457
  intentType: t.KeyofC<{
6458
6458
  payment: t.LiteralC<"payment">;
@@ -6540,8 +6540,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
6540
6540
  isTestTransaction: t.BooleanC;
6541
6541
  }>]>]>, t.IntersectionC<[t.PartialC<{
6542
6542
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6543
- }>, t.PartialC<{
6544
- memo: t.StringC;
6543
+ }>, t.TypeC<{
6544
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6545
6545
  }>]>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
6546
6546
  intentType: t.KeyofC<{
6547
6547
  payment: t.LiteralC<"payment">;
@@ -6613,8 +6613,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
6613
6613
  intentType: t.LiteralC<"stake">;
6614
6614
  }>]>, t.IntersectionC<[t.PartialC<{
6615
6615
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6616
- }>, t.PartialC<{
6617
- memo: t.StringC;
6616
+ }>, t.TypeC<{
6617
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6618
6618
  }>]>, t.TypeC<{
6619
6619
  amount: t.TypeC<{
6620
6620
  value: t.StringC;
@@ -6695,8 +6695,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
6695
6695
  intentType: t.LiteralC<"unstake">;
6696
6696
  }>]>, t.IntersectionC<[t.PartialC<{
6697
6697
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6698
- }>, t.PartialC<{
6699
- memo: t.StringC;
6698
+ }>, t.TypeC<{
6699
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6700
6700
  }>]>, t.TypeC<{
6701
6701
  stakingAddress: t.StringC;
6702
6702
  }>, t.PartialC<{
@@ -6808,8 +6808,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
6808
6808
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6809
6809
  }>]>, t.IntersectionC<[t.PartialC<{
6810
6810
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6811
- }>, t.PartialC<{
6812
- memo: t.StringC;
6811
+ }>, t.TypeC<{
6812
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6813
6813
  }>]>, t.TypeC<{
6814
6814
  intentType: t.LiteralC<"customTx">;
6815
6815
  solVersionedTransactionData: t.IntersectionC<[t.TypeC<{
@@ -64,8 +64,8 @@ export declare const SolAuthorizeIntent: t.IntersectionC<[t.IntersectionC<[t.Typ
64
64
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
65
65
  }>]>, t.IntersectionC<[t.PartialC<{
66
66
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
67
- }>, t.PartialC<{
68
- memo: t.StringC;
67
+ }>, t.TypeC<{
68
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
69
69
  }>]>, t.TypeC<{
70
70
  intentType: t.LiteralC<"authorize">;
71
71
  transactionMessage: t.StringC;
@@ -1,7 +1,7 @@
1
1
  import * as t from "io-ts";
2
2
  export declare const SolBuildOptions: t.IntersectionC<[t.PartialC<{
3
3
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
4
- }>, t.PartialC<{
5
- memo: t.StringC;
4
+ }>, t.TypeC<{
5
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6
6
  }>]>;
7
7
  export type SolBuildOptions = t.TypeOf<typeof SolBuildOptions>;
@@ -25,11 +25,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.SolBuildOptions = void 0;
27
27
  const t = __importStar(require("io-ts"));
28
+ const utils_1 = require("../../../utils");
28
29
  const accountBaseBuildOptions_1 = require("./accountBaseBuildOptions");
29
30
  exports.SolBuildOptions = t.intersection([
30
31
  accountBaseBuildOptions_1.AccountBaseBuildOptions,
31
- t.partial({
32
- memo: t.string,
32
+ t.type({
33
+ memo: utils_1.optionalString,
33
34
  }),
34
35
  ]);
35
36
  //# sourceMappingURL=solBuildOptions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"solBuildOptions.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/solBuildOptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,uEAAoE;AAoBvD,QAAA,eAAe,GAAG,CAAC,CAAC,YAAY,CAAC;IAC5C,iDAAuB;IACvB,CAAC,CAAC,OAAO,CAAC;QACR,IAAI,EAAE,CAAC,CAAC,MAAM;KACf,CAAC;CACH,CAAC,CAAC"}
1
+ {"version":3,"file":"solBuildOptions.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/solBuildOptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,0CAAgD;AAChD,uEAAoE;AAgBvD,QAAA,eAAe,GAAG,CAAC,CAAC,YAAY,CAAC;IAC5C,iDAAuB;IACvB,CAAC,CAAC,IAAI,CAAC;QACL,IAAI,EAAE,sBAAc;KACrB,CAAC;CACH,CAAC,CAAC"}
@@ -78,8 +78,8 @@ export declare const SolClaimIntent: t.IntersectionC<[t.IntersectionC<[t.Interse
78
78
  }, unknown>, t.UndefinedC]>;
79
79
  }>]>, t.IntersectionC<[t.PartialC<{
80
80
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
81
- }>, t.PartialC<{
82
- memo: t.StringC;
81
+ }>, t.TypeC<{
82
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
83
83
  }>]>, t.TypeC<{
84
84
  amount: t.TypeC<{
85
85
  value: t.StringC;
@@ -81,8 +81,8 @@ export declare const SolCloseAssociatedTokenAccountIntent: t.IntersectionC<[t.In
81
81
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
82
82
  }>]>, t.IntersectionC<[t.PartialC<{
83
83
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
84
- }>, t.PartialC<{
85
- memo: t.StringC;
84
+ }>, t.TypeC<{
85
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
86
86
  }>]>, t.TypeC<{
87
87
  intentType: t.LiteralC<"closeAssociatedTokenAccount">;
88
88
  recipients: t.BrandC<t.ArrayC<t.BrandC<t.IntersectionC<[t.TypeC<{
@@ -71,7 +71,7 @@ export declare const SolCreateAssociatedTokenAccountIntent: t.IntersectionC<[t.I
71
71
  }>]>>;
72
72
  }>]>, t.IntersectionC<[t.PartialC<{
73
73
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
74
- }>, t.PartialC<{
75
- memo: t.StringC;
74
+ }>, t.TypeC<{
75
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
76
76
  }>]>]>;
77
77
  export type SolCreateAssociatedTokenAccountIntent = t.TypeOf<typeof SolCreateAssociatedTokenAccountIntent>;
@@ -64,8 +64,8 @@ export declare const SolCustomTxIntent: t.IntersectionC<[t.IntersectionC<[t.Type
64
64
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
65
65
  }>]>, t.IntersectionC<[t.PartialC<{
66
66
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
67
- }>, t.PartialC<{
68
- memo: t.StringC;
67
+ }>, t.TypeC<{
68
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
69
69
  }>]>, t.TypeC<{
70
70
  intentType: t.LiteralC<"customTx">;
71
71
  solInstructions: t.ArrayC<t.TypeC<{
@@ -64,8 +64,8 @@ export declare const SolDeactivateIntent: t.IntersectionC<[t.IntersectionC<[t.Ty
64
64
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
65
65
  }>]>, t.IntersectionC<[t.PartialC<{
66
66
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
67
- }>, t.PartialC<{
68
- memo: t.StringC;
67
+ }>, t.TypeC<{
68
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
69
69
  }>]>, t.TypeC<{
70
70
  intentType: t.LiteralC<"deactivate">;
71
71
  stakingAddresses: t.UnionC<[t.Type<string[], string[], unknown>, t.UndefinedC]>;
@@ -64,8 +64,8 @@ export declare const SolDelegateIntent: t.IntersectionC<[t.IntersectionC<[t.Type
64
64
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
65
65
  }>]>, t.IntersectionC<[t.PartialC<{
66
66
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
67
- }>, t.PartialC<{
68
- memo: t.StringC;
67
+ }>, t.TypeC<{
68
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
69
69
  }>]>, t.TypeC<{
70
70
  intentType: t.LiteralC<"delegate">;
71
71
  validatorAddress: t.StringC;
@@ -84,7 +84,7 @@ export declare const SolGoUnstakeIntent: t.IntersectionC<[t.IntersectionC<[t.Int
84
84
  }>]>>;
85
85
  }>]>, t.IntersectionC<[t.PartialC<{
86
86
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
87
- }>, t.PartialC<{
88
- memo: t.StringC;
87
+ }>, t.TypeC<{
88
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
89
89
  }>]>]>;
90
90
  export type SolGoUnstakeIntent = t.TypeOf<typeof SolGoUnstakeIntent>;
@@ -86,7 +86,7 @@ export declare const SolPaymentIntent: t.IntersectionC<[t.IntersectionC<[t.Inter
86
86
  isTestTransaction: t.BooleanC;
87
87
  }>]>]>, t.IntersectionC<[t.PartialC<{
88
88
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
89
- }>, t.PartialC<{
90
- memo: t.StringC;
89
+ }>, t.TypeC<{
90
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
91
91
  }>]>]>;
92
92
  export type SolPaymentIntent = t.TypeOf<typeof SolPaymentIntent>;
@@ -70,8 +70,8 @@ export declare const SolStakeIntent: t.IntersectionC<[t.IntersectionC<[t.Interse
70
70
  intentType: t.LiteralC<"stake">;
71
71
  }>]>, t.IntersectionC<[t.PartialC<{
72
72
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
73
- }>, t.PartialC<{
74
- memo: t.StringC;
73
+ }>, t.TypeC<{
74
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
75
75
  }>]>, t.TypeC<{
76
76
  amount: t.TypeC<{
77
77
  value: t.StringC;
@@ -154,8 +154,8 @@ export declare const SolJitoStakeIntent: t.IntersectionC<[t.IntersectionC<[t.Int
154
154
  intentType: t.LiteralC<"stake">;
155
155
  }>]>, t.IntersectionC<[t.PartialC<{
156
156
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
157
- }>, t.PartialC<{
158
- memo: t.StringC;
157
+ }>, t.TypeC<{
158
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
159
159
  }>]>, t.TypeC<{
160
160
  amount: t.TypeC<{
161
161
  value: t.StringC;
@@ -70,8 +70,8 @@ export declare const SolUnstakeIntent: t.IntersectionC<[t.IntersectionC<[t.Inter
70
70
  intentType: t.LiteralC<"unstake">;
71
71
  }>]>, t.IntersectionC<[t.PartialC<{
72
72
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
73
- }>, t.PartialC<{
74
- memo: t.StringC;
73
+ }>, t.TypeC<{
74
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
75
75
  }>]>, t.TypeC<{
76
76
  stakingAddress: t.StringC;
77
77
  }>, t.PartialC<{
@@ -191,8 +191,8 @@ export declare const SolJitoUnstakeIntent: t.IntersectionC<[t.IntersectionC<[t.I
191
191
  intentType: t.LiteralC<"unstake">;
192
192
  }>]>, t.IntersectionC<[t.PartialC<{
193
193
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
194
- }>, t.PartialC<{
195
- memo: t.StringC;
194
+ }>, t.TypeC<{
195
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
196
196
  }>]>, t.TypeC<{
197
197
  stakingAddress: t.StringC;
198
198
  }>, t.PartialC<{
@@ -64,8 +64,8 @@ export declare const SolVersionedCustomTxIntent: t.IntersectionC<[t.Intersection
64
64
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
65
65
  }>]>, t.IntersectionC<[t.PartialC<{
66
66
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
67
- }>, t.PartialC<{
68
- memo: t.StringC;
67
+ }>, t.TypeC<{
68
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
69
69
  }>]>, t.TypeC<{
70
70
  intentType: t.LiteralC<"customTx">;
71
71
  solVersionedTransactionData: t.IntersectionC<[t.TypeC<{
@@ -5924,8 +5924,8 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
5924
5924
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
5925
5925
  }>]>, t.IntersectionC<[t.PartialC<{
5926
5926
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
5927
- }>, t.PartialC<{
5928
- memo: t.StringC;
5927
+ }>, t.TypeC<{
5928
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
5929
5929
  }>]>, t.TypeC<{
5930
5930
  intentType: t.LiteralC<"authorize">;
5931
5931
  transactionMessage: t.StringC;
@@ -6015,8 +6015,8 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
6015
6015
  }, unknown>, t.UndefinedC]>;
6016
6016
  }>]>, t.IntersectionC<[t.PartialC<{
6017
6017
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6018
- }>, t.PartialC<{
6019
- memo: t.StringC;
6018
+ }>, t.TypeC<{
6019
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6020
6020
  }>]>, t.TypeC<{
6021
6021
  amount: t.TypeC<{
6022
6022
  value: t.StringC;
@@ -6089,8 +6089,8 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
6089
6089
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6090
6090
  }>]>, t.IntersectionC<[t.PartialC<{
6091
6091
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6092
- }>, t.PartialC<{
6093
- memo: t.StringC;
6092
+ }>, t.TypeC<{
6093
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6094
6094
  }>]>, t.TypeC<{
6095
6095
  intentType: t.LiteralC<"closeAssociatedTokenAccount">;
6096
6096
  recipients: t.BrandC<t.ArrayC<t.BrandC<t.IntersectionC<[t.TypeC<{
@@ -6241,8 +6241,8 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
6241
6241
  }>]>>;
6242
6242
  }>]>, t.IntersectionC<[t.PartialC<{
6243
6243
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6244
- }>, t.PartialC<{
6245
- memo: t.StringC;
6244
+ }>, t.TypeC<{
6245
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6246
6246
  }>]>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
6247
6247
  intentType: t.KeyofC<{
6248
6248
  payment: t.LiteralC<"payment">;
@@ -6308,8 +6308,8 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
6308
6308
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6309
6309
  }>]>, t.IntersectionC<[t.PartialC<{
6310
6310
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6311
- }>, t.PartialC<{
6312
- memo: t.StringC;
6311
+ }>, t.TypeC<{
6312
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6313
6313
  }>]>, t.TypeC<{
6314
6314
  intentType: t.LiteralC<"customTx">;
6315
6315
  solInstructions: t.ArrayC<t.TypeC<{
@@ -6386,8 +6386,8 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
6386
6386
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6387
6387
  }>]>, t.IntersectionC<[t.PartialC<{
6388
6388
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6389
- }>, t.PartialC<{
6390
- memo: t.StringC;
6389
+ }>, t.TypeC<{
6390
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6391
6391
  }>]>, t.TypeC<{
6392
6392
  intentType: t.LiteralC<"deactivate">;
6393
6393
  stakingAddresses: t.UnionC<[t.Type<string[], string[], unknown>, t.UndefinedC]>;
@@ -6457,8 +6457,8 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
6457
6457
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6458
6458
  }>]>, t.IntersectionC<[t.PartialC<{
6459
6459
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6460
- }>, t.PartialC<{
6461
- memo: t.StringC;
6460
+ }>, t.TypeC<{
6461
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6462
6462
  }>]>, t.TypeC<{
6463
6463
  intentType: t.LiteralC<"delegate">;
6464
6464
  validatorAddress: t.StringC;
@@ -6549,8 +6549,8 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
6549
6549
  }>]>>;
6550
6550
  }>]>, t.IntersectionC<[t.PartialC<{
6551
6551
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6552
- }>, t.PartialC<{
6553
- memo: t.StringC;
6552
+ }>, t.TypeC<{
6553
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6554
6554
  }>]>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
6555
6555
  intentType: t.KeyofC<{
6556
6556
  payment: t.LiteralC<"payment">;
@@ -6638,8 +6638,8 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
6638
6638
  isTestTransaction: t.BooleanC;
6639
6639
  }>]>]>, t.IntersectionC<[t.PartialC<{
6640
6640
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6641
- }>, t.PartialC<{
6642
- memo: t.StringC;
6641
+ }>, t.TypeC<{
6642
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6643
6643
  }>]>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
6644
6644
  intentType: t.KeyofC<{
6645
6645
  payment: t.LiteralC<"payment">;
@@ -6711,8 +6711,8 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
6711
6711
  intentType: t.LiteralC<"stake">;
6712
6712
  }>]>, t.IntersectionC<[t.PartialC<{
6713
6713
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6714
- }>, t.PartialC<{
6715
- memo: t.StringC;
6714
+ }>, t.TypeC<{
6715
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6716
6716
  }>]>, t.TypeC<{
6717
6717
  amount: t.TypeC<{
6718
6718
  value: t.StringC;
@@ -6793,8 +6793,8 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
6793
6793
  intentType: t.LiteralC<"unstake">;
6794
6794
  }>]>, t.IntersectionC<[t.PartialC<{
6795
6795
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6796
- }>, t.PartialC<{
6797
- memo: t.StringC;
6796
+ }>, t.TypeC<{
6797
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6798
6798
  }>]>, t.TypeC<{
6799
6799
  stakingAddress: t.StringC;
6800
6800
  }>, t.PartialC<{
@@ -6906,8 +6906,8 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
6906
6906
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6907
6907
  }>]>, t.IntersectionC<[t.PartialC<{
6908
6908
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
6909
- }>, t.PartialC<{
6910
- memo: t.StringC;
6909
+ }>, t.TypeC<{
6910
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6911
6911
  }>]>, t.TypeC<{
6912
6912
  intentType: t.LiteralC<"customTx">;
6913
6913
  solVersionedTransactionData: t.IntersectionC<[t.TypeC<{
@@ -18029,8 +18029,8 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
18029
18029
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18030
18030
  }>]>, t.IntersectionC<[t.PartialC<{
18031
18031
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18032
- }>, t.PartialC<{
18033
- memo: t.StringC;
18032
+ }>, t.TypeC<{
18033
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
18034
18034
  }>]>, t.TypeC<{
18035
18035
  intentType: t.LiteralC<"authorize">;
18036
18036
  transactionMessage: t.StringC;
@@ -18120,8 +18120,8 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
18120
18120
  }, unknown>, t.UndefinedC]>;
18121
18121
  }>]>, t.IntersectionC<[t.PartialC<{
18122
18122
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18123
- }>, t.PartialC<{
18124
- memo: t.StringC;
18123
+ }>, t.TypeC<{
18124
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
18125
18125
  }>]>, t.TypeC<{
18126
18126
  amount: t.TypeC<{
18127
18127
  value: t.StringC;
@@ -18194,8 +18194,8 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
18194
18194
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18195
18195
  }>]>, t.IntersectionC<[t.PartialC<{
18196
18196
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18197
- }>, t.PartialC<{
18198
- memo: t.StringC;
18197
+ }>, t.TypeC<{
18198
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
18199
18199
  }>]>, t.TypeC<{
18200
18200
  intentType: t.LiteralC<"closeAssociatedTokenAccount">;
18201
18201
  recipients: t.BrandC<t.ArrayC<t.BrandC<t.IntersectionC<[t.TypeC<{
@@ -18346,8 +18346,8 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
18346
18346
  }>]>>;
18347
18347
  }>]>, t.IntersectionC<[t.PartialC<{
18348
18348
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18349
- }>, t.PartialC<{
18350
- memo: t.StringC;
18349
+ }>, t.TypeC<{
18350
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
18351
18351
  }>]>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
18352
18352
  intentType: t.KeyofC<{
18353
18353
  payment: t.LiteralC<"payment">;
@@ -18413,8 +18413,8 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
18413
18413
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18414
18414
  }>]>, t.IntersectionC<[t.PartialC<{
18415
18415
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18416
- }>, t.PartialC<{
18417
- memo: t.StringC;
18416
+ }>, t.TypeC<{
18417
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
18418
18418
  }>]>, t.TypeC<{
18419
18419
  intentType: t.LiteralC<"customTx">;
18420
18420
  solInstructions: t.ArrayC<t.TypeC<{
@@ -18491,8 +18491,8 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
18491
18491
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18492
18492
  }>]>, t.IntersectionC<[t.PartialC<{
18493
18493
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18494
- }>, t.PartialC<{
18495
- memo: t.StringC;
18494
+ }>, t.TypeC<{
18495
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
18496
18496
  }>]>, t.TypeC<{
18497
18497
  intentType: t.LiteralC<"deactivate">;
18498
18498
  stakingAddresses: t.UnionC<[t.Type<string[], string[], unknown>, t.UndefinedC]>;
@@ -18562,8 +18562,8 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
18562
18562
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18563
18563
  }>]>, t.IntersectionC<[t.PartialC<{
18564
18564
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18565
- }>, t.PartialC<{
18566
- memo: t.StringC;
18565
+ }>, t.TypeC<{
18566
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
18567
18567
  }>]>, t.TypeC<{
18568
18568
  intentType: t.LiteralC<"delegate">;
18569
18569
  validatorAddress: t.StringC;
@@ -18654,8 +18654,8 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
18654
18654
  }>]>>;
18655
18655
  }>]>, t.IntersectionC<[t.PartialC<{
18656
18656
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18657
- }>, t.PartialC<{
18658
- memo: t.StringC;
18657
+ }>, t.TypeC<{
18658
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
18659
18659
  }>]>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
18660
18660
  intentType: t.KeyofC<{
18661
18661
  payment: t.LiteralC<"payment">;
@@ -18743,8 +18743,8 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
18743
18743
  isTestTransaction: t.BooleanC;
18744
18744
  }>]>]>, t.IntersectionC<[t.PartialC<{
18745
18745
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18746
- }>, t.PartialC<{
18747
- memo: t.StringC;
18746
+ }>, t.TypeC<{
18747
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
18748
18748
  }>]>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
18749
18749
  intentType: t.KeyofC<{
18750
18750
  payment: t.LiteralC<"payment">;
@@ -18816,8 +18816,8 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
18816
18816
  intentType: t.LiteralC<"stake">;
18817
18817
  }>]>, t.IntersectionC<[t.PartialC<{
18818
18818
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18819
- }>, t.PartialC<{
18820
- memo: t.StringC;
18819
+ }>, t.TypeC<{
18820
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
18821
18821
  }>]>, t.TypeC<{
18822
18822
  amount: t.TypeC<{
18823
18823
  value: t.StringC;
@@ -18898,8 +18898,8 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
18898
18898
  intentType: t.LiteralC<"unstake">;
18899
18899
  }>]>, t.IntersectionC<[t.PartialC<{
18900
18900
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
18901
- }>, t.PartialC<{
18902
- memo: t.StringC;
18901
+ }>, t.TypeC<{
18902
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
18903
18903
  }>]>, t.TypeC<{
18904
18904
  stakingAddress: t.StringC;
18905
18905
  }>, t.PartialC<{
@@ -19011,8 +19011,8 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
19011
19011
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
19012
19012
  }>]>, t.IntersectionC<[t.PartialC<{
19013
19013
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
19014
- }>, t.PartialC<{
19015
- memo: t.StringC;
19014
+ }>, t.TypeC<{
19015
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
19016
19016
  }>]>, t.TypeC<{
19017
19017
  intentType: t.LiteralC<"customTx">;
19018
19018
  solVersionedTransactionData: t.IntersectionC<[t.TypeC<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "6.8.0",
3
+ "version": "6.8.1",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -1,28 +1,25 @@
1
1
  import * as t from "io-ts";
2
+ import { optionalString } from "../../../utils";
2
3
  import { AccountBaseBuildOptions } from "./accountBaseBuildOptions";
3
4
 
4
5
  /**
5
6
  * Solana build fragment intersected by **every** Sol intent codec that composes
6
7
  * `SolBuildOptions` (e.g. payment, stake, consolidate, close-ATA, etc.).
7
8
  *
8
- * **`memo` change is a wire-format alignment, not a type-narrowing change.**
9
- * Switching from `t.type({ memo: optionalString })` to
10
- * `t.partial({ memo: t.string })` lets the **key be omitted** on the wire — real
11
- * prebuild payloads frequently leave `memo` out, and the previous `t.type` form
12
- * required the key for `.is()` even when the value would have been `undefined`.
13
- * When `memo` is present, the value is validated as a `string`; if a caller
14
- * passes `memo: undefined`, `t.partial` does not run the inner codec (the key
15
- * is treated as absent), so runtime stays compatible with spreads.
9
+ * **`memo` is part of the legacy wire contract:** `t.type({ memo: optionalString })`
10
+ * keeps the **`memo` key structurally present** for `.is()` / `decode` (value may
11
+ * be a string or `undefined` per `optionalString`). Payloads that omit `memo`
12
+ * entirely are not accepted by this codec.
16
13
  *
17
- * Inferred TS types are effectively unchanged: optional-key inference for
18
- * `t.partial` already produces `memo?: string | undefined`, the same shape
19
- * `t.TypeOf` would have given with `optionalString`. Package-wide Solana intent
20
- * fix, not limited to close-ATA.
14
+ * Upstream services (for example wallet-platform when persisting
15
+ * `closeAssociatedTokenAccount` intents) may normalize a missing `memo` to
16
+ * `""` before validation so stored objects match this shape. Other Sol flows
17
+ * should send `memo` or apply the same normalization if they share this path.
21
18
  */
22
19
  export const SolBuildOptions = t.intersection([
23
20
  AccountBaseBuildOptions,
24
- t.partial({
25
- memo: t.string,
21
+ t.type({
22
+ memo: optionalString,
26
23
  }),
27
24
  ]);
28
25