utxo-lib 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,7 +21,8 @@ var ProprietaryKeySubtype;
21
21
  * Default identifierEncoding is utf-8 for identifier.
22
22
  */
23
23
  function getPsbtInputProprietaryKeyVals(input, keySearch) {
24
- if (!input.unknownKeyVals?.length) {
24
+ var _a;
25
+ if (!((_a = input.unknownKeyVals) === null || _a === void 0 ? void 0 : _a.length)) {
25
26
  return [];
26
27
  }
27
28
  if (keySearch && keySearch.subtype === undefined && Buffer.isBuffer(keySearch.keydata)) {
@@ -88,4 +89,4 @@ function withUnsafeNonSegwit(psbt, fn, unsafe = true) {
88
89
  }
89
90
  }
90
91
  exports.withUnsafeNonSegwit = withUnsafeNonSegwit;
91
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHNidFV0aWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYml0Z28vUHNidFV0aWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsd0VBQXdGO0FBSXhGOztHQUVHO0FBQ1UsUUFBQSwyQkFBMkIsR0FBRyxPQUFPLENBQUM7QUFFbkQ7O0dBRUc7QUFDSCxJQUFZLHFCQUtYO0FBTEQsV0FBWSxxQkFBcUI7SUFDL0IsdUdBQThCLENBQUE7SUFDOUIsK0dBQWtDLENBQUE7SUFDbEMseUZBQXVCLENBQUE7SUFDdkIsNkZBQXlCLENBQUE7QUFDM0IsQ0FBQyxFQUxXLHFCQUFxQixHQUFyQiw2QkFBcUIsS0FBckIsNkJBQXFCLFFBS2hDO0FBdUJEOzs7R0FHRztBQUNILFNBQWdCLDhCQUE4QixDQUM1QyxLQUFnQixFQUNoQixTQUFnQztJQUVoQyxJQUFJLENBQUMsS0FBSyxDQUFDLGNBQWMsRUFBRSxNQUFNLEVBQUU7UUFDakMsT0FBTyxFQUFFLENBQUM7S0FDWDtJQUNELElBQUksU0F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