@bitgo/public-types 5.30.0 → 5.31.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.
@@ -4,13 +4,15 @@ export declare const LightningOnchainRecipient: t.TypeC<{
4
4
  address: t.StringC;
5
5
  }>;
6
6
  export type LightningOnchainRecipient = t.TypeOf<typeof LightningOnchainRecipient>;
7
- export declare const LightningOnchainRequest: t.TypeC<{
7
+ export declare const LightningOnchainRequest: t.IntersectionC<[t.TypeC<{
8
8
  recipients: t.ArrayC<t.TypeC<{
9
9
  amountSat: import("io-ts-types").BigIntFromStringC;
10
10
  address: t.StringC;
11
11
  }>>;
12
+ }>, t.PartialC<{
12
13
  satsPerVbyte: import("io-ts-types").BigIntFromStringC;
13
- }>;
14
+ numBlocks: t.NumberC;
15
+ }>]>;
14
16
  export type LightningOnchainRequest = t.TypeOf<typeof LightningOnchainRequest>;
15
17
  export declare const LightningPaymentRequest: t.IntersectionC<[t.TypeC<{
16
18
  invoice: t.StringC;
@@ -30,10 +30,15 @@ exports.LightningOnchainRecipient = t.type({
30
30
  amountSat: io_ts_types_1.BigIntFromString,
31
31
  address: t.string,
32
32
  });
33
- exports.LightningOnchainRequest = t.type({
34
- recipients: t.array(exports.LightningOnchainRecipient),
35
- satsPerVbyte: io_ts_types_1.BigIntFromString,
36
- });
33
+ exports.LightningOnchainRequest = t.intersection([
34
+ t.type({
35
+ recipients: t.array(exports.LightningOnchainRecipient),
36
+ }),
37
+ t.partial({
38
+ satsPerVbyte: io_ts_types_1.BigIntFromString,
39
+ numBlocks: t.number,
40
+ }),
41
+ ]);
37
42
  exports.LightningPaymentRequest = t.intersection([
38
43
  t.type({
39
44
  invoice: t.string,
@@ -1 +1 @@
1
- {"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../../src/schema/lightning/payment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA+C;AAElC,QAAA,yBAAy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BAAuB,GAAG,CAAC,CAAC,YAAY,CAAC;IACpD,CAAC,CAAC,IAAI,CAAC;QACL,OAAO,EAAE,CAAC,CAAC,MAAM;KAClB,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,UAAU,EAAE,8BAAgB;QAC5B,YAAY,EAAE,8BAAgB;QAC9B,aAAa,EAAE,CAAC,CAAC,MAAM;KACxB,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAG,CAAC,CAAC,IAAI,CAAC;IACnD,aAAa,EAAE,+BAAuB;IACtC,SAAS,EAAE,CAAC,CAAC,MAAM;CACpB,CAAC,CAAC"}
@@ -2680,13 +2680,15 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
2680
2680
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
2681
2681
  }>]>, t.TypeC<{
2682
2682
  intentType: t.LiteralC<"payment">;
2683
- onchainRequest: t.TypeC<{
2683
+ onchainRequest: t.IntersectionC<[t.TypeC<{
2684
2684
  recipients: t.ArrayC<t.TypeC<{
2685
2685
  amountSat: import("io-ts-types").BigIntFromStringC;
2686
2686
  address: t.StringC;
2687
2687
  }>>;
2688
+ }>, t.PartialC<{
2688
2689
  satsPerVbyte: import("io-ts-types").BigIntFromStringC;
2689
- }>;
2690
+ numBlocks: t.NumberC;
2691
+ }>]>;
2690
2692
  }>]>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
2691
2693
  intentType: t.KeyofC<{
2692
2694
  payment: t.LiteralC<"payment">;
@@ -96,12 +96,14 @@ export declare const LightningPaymentIntent: t.UnionC<[t.IntersectionC<[t.Inters
96
96
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
97
97
  }>]>, t.TypeC<{
98
98
  intentType: t.LiteralC<"payment">;
99
- onchainRequest: t.TypeC<{
99
+ onchainRequest: t.IntersectionC<[t.TypeC<{
100
100
  recipients: t.ArrayC<t.TypeC<{
101
101
  amountSat: import("io-ts-types").BigIntFromStringC;
102
102
  address: t.StringC;
103
103
  }>>;
104
+ }>, t.PartialC<{
104
105
  satsPerVbyte: import("io-ts-types").BigIntFromStringC;
105
- }>;
106
+ numBlocks: t.NumberC;
107
+ }>]>;
106
108
  }>]>]>;
107
109
  export type LightningPaymentIntent = t.TypeOf<typeof LightningPaymentIntent>;
@@ -2778,13 +2778,15 @@ export declare const TransactionRequestLite: t.IntersectionC<[t.IntersectionC<[t
2778
2778
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
2779
2779
  }>]>, t.TypeC<{
2780
2780
  intentType: t.LiteralC<"payment">;
2781
- onchainRequest: t.TypeC<{
2781
+ onchainRequest: t.IntersectionC<[t.TypeC<{
2782
2782
  recipients: t.ArrayC<t.TypeC<{
2783
2783
  amountSat: import("io-ts-types").BigIntFromStringC;
2784
2784
  address: t.StringC;
2785
2785
  }>>;
2786
+ }>, t.PartialC<{
2786
2787
  satsPerVbyte: import("io-ts-types").BigIntFromStringC;
2787
- }>;
2788
+ numBlocks: t.NumberC;
2789
+ }>]>;
2788
2790
  }>]>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
2789
2791
  intentType: t.KeyofC<{
2790
2792
  payment: t.LiteralC<"payment">;
@@ -9585,13 +9587,15 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
9585
9587
  nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
9586
9588
  }>]>, t.TypeC<{
9587
9589
  intentType: t.LiteralC<"payment">;
9588
- onchainRequest: t.TypeC<{
9590
+ onchainRequest: t.IntersectionC<[t.TypeC<{
9589
9591
  recipients: t.ArrayC<t.TypeC<{
9590
9592
  amountSat: import("io-ts-types").BigIntFromStringC;
9591
9593
  address: t.StringC;
9592
9594
  }>>;
9595
+ }>, t.PartialC<{
9593
9596
  satsPerVbyte: import("io-ts-types").BigIntFromStringC;
9594
- }>;
9597
+ numBlocks: t.NumberC;
9598
+ }>]>;
9595
9599
  }>]>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
9596
9600
  intentType: t.KeyofC<{
9597
9601
  payment: t.LiteralC<"payment">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "5.30.0",
3
+ "version": "5.31.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -9,10 +9,15 @@ export type LightningOnchainRecipient = t.TypeOf<
9
9
  typeof LightningOnchainRecipient
10
10
  >;
11
11
 
12
- export const LightningOnchainRequest = t.type({
13
- recipients: t.array(LightningOnchainRecipient),
14
- satsPerVbyte: BigIntFromString,
15
- });
12
+ export const LightningOnchainRequest = t.intersection([
13
+ t.type({
14
+ recipients: t.array(LightningOnchainRecipient),
15
+ }),
16
+ t.partial({
17
+ satsPerVbyte: BigIntFromString,
18
+ numBlocks: t.number,
19
+ }),
20
+ ]);
16
21
  export type LightningOnchainRequest = t.TypeOf<typeof LightningOnchainRequest>;
17
22
 
18
23
  export const LightningPaymentRequest = t.intersection([