@bitgo/public-types 2.18.0 → 2.19.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.
@@ -193,7 +193,7 @@ export declare const txSendBody: {
193
193
  amount: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
194
194
  unit: t.UnionC<[t.Type<"baseUnit" | "cpu" | "ram", "baseUnit" | "cpu" | "ram", unknown>, t.UndefinedC]>;
195
195
  formula: t.UnionC<[t.Type<"fixed" | "feeRate" | "perKB" | "custom", "fixed" | "feeRate" | "perKB" | "custom", unknown>, t.UndefinedC]>;
196
- type: t.UnionC<[t.Type<"base" | "max" | "tip", "base" | "max" | "tip", unknown>, t.UndefinedC]>;
196
+ type: t.UnionC<[t.Type<"max" | "base" | "tip", "max" | "base" | "tip", unknown>, t.UndefinedC]>;
197
197
  }>]>;
198
198
  timeBounds: t.UnionC<[t.Type<{
199
199
  minTime?: string | number | undefined;
@@ -383,7 +383,7 @@ export declare const TxSendBody: t.ExactC<t.IntersectionC<[t.PartialC<{
383
383
  amount: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
384
384
  unit: t.UnionC<[t.Type<"baseUnit" | "cpu" | "ram", "baseUnit" | "cpu" | "ram", unknown>, t.UndefinedC]>;
385
385
  formula: t.UnionC<[t.Type<"fixed" | "feeRate" | "perKB" | "custom", "fixed" | "feeRate" | "perKB" | "custom", unknown>, t.UndefinedC]>;
386
- type: t.UnionC<[t.Type<"base" | "max" | "tip", "base" | "max" | "tip", unknown>, t.UndefinedC]>;
386
+ type: t.UnionC<[t.Type<"max" | "base" | "tip", "max" | "base" | "tip", unknown>, t.UndefinedC]>;
387
387
  }>]>;
388
388
  timeBounds: t.UnionC<[t.Type<{
389
389
  minTime?: string | number | undefined;
@@ -1,4 +1,5 @@
1
1
  export * from "./optional";
2
2
  export * from "./primitives";
3
3
  export * from "./arrayFromSingle";
4
+ export * from "./minMaxArray";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC"}
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./optional"), exports);
18
18
  __exportStar(require("./primitives"), exports);
19
19
  __exportStar(require("./arrayFromSingle"), exports);
20
+ __exportStar(require("./minMaxArray"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,+CAA6B;AAC7B,oDAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,+CAA6B;AAC7B,oDAAkC;AAClC,gDAA8B"}
@@ -0,0 +1,9 @@
1
+ import * as t from "io-ts";
2
+ export interface IMinMaxArray<T> extends Array<T> {
3
+ readonly minMaxArray: unique symbol;
4
+ }
5
+ export declare const minMaxArray: <C extends t.Mixed>(codec: C, { min, max, }?: {
6
+ min?: number | undefined;
7
+ max?: number | undefined;
8
+ }) => t.BrandC<t.ArrayC<C>, IMinMaxArray<C>>;
9
+ //# sourceMappingURL=minMaxArray.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"minMaxArray.d.ts","sourceRoot":"","sources":["../../../src/utils/minMaxArray.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAE3B,MAAM,WAAW,YAAY,CAAC,CAAC,CAAE,SAAQ,KAAK,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,WAAW,EAAE,OAAO,MAAM,CAAC;CACrC;AAOD,eAAO,MAAM,WAAW;;;4CAerB,CAAC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.minMaxArray = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ const minMaxArray = (codec, { min, max, } = {}) => t.brand(t.array(codec), (n) => (!min || min <= n.length) && (!max || n.length <= max), "minMaxArray");
29
+ exports.minMaxArray = minMaxArray;
30
+ //# sourceMappingURL=minMaxArray.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"minMaxArray.js","sourceRoot":"","sources":["../../../src/utils/minMaxArray.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAWpB,MAAM,WAAW,GAAG,CACzB,KAAQ,EACR,EACE,GAAG,EACH,GAAG,MAID,EAAE,EACN,EAAE,CACF,CAAC,CAAC,KAAK,CACL,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EACd,CAAC,CAAM,EAAwC,EAAE,CAC/C,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,IAAI,GAAG,CAAC,EACxD,aAAa,CACd,CAAC;AAfS,QAAA,WAAW,eAepB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "2.18.0",
3
+ "version": "2.19.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",