wasm-ast-types 0.24.0 → 0.26.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.
Files changed (77) hide show
  1. package/main/client/client.js +46 -72
  2. package/main/client/index.js +0 -2
  3. package/main/client/test/ts-client.account-nfts.spec.js +3 -5
  4. package/main/client/test/ts-client.arrays-ref.spec.js +0 -4
  5. package/main/client/test/ts-client.arrays.spec.js +3 -6
  6. package/main/client/test/ts-client.cw-named-groups.test.js +0 -4
  7. package/main/client/test/ts-client.cw-proposal-single.test.js +0 -5
  8. package/main/client/test/ts-client.empty-enums.spec.js +0 -4
  9. package/main/client/test/ts-client.issue-101.spec.js +0 -4
  10. package/main/client/test/ts-client.issue-103.test.js +0 -4
  11. package/main/client/test/ts-client.issue-71.test.js +28 -50
  12. package/main/client/test/ts-client.issue-98.test.js +3 -5
  13. package/main/client/test/ts-client.issues.test.js +28 -50
  14. package/main/client/test/ts-client.overrides.spec.js +0 -4
  15. package/main/client/test/ts-client.sg721.spec.js +0 -4
  16. package/main/client/test/ts-client.spec.js +0 -17
  17. package/main/client/test/ts-client.vectis.spec.js +0 -8
  18. package/main/client/test/ts-client.wager.spec.js +4 -5
  19. package/main/context/context.js +6 -33
  20. package/main/context/imports.js +7 -43
  21. package/main/context/index.js +0 -4
  22. package/main/index.js +4 -22
  23. package/main/{msg-builder → message-builder}/index.js +4 -6
  24. package/main/{msg-builder/msg-builder.js → message-builder/message-builder.js} +24 -30
  25. package/main/{msg-builder/msg-builder.spec.js → message-builder/message-builder.spec.js} +4 -10
  26. package/main/message-composer/index.js +0 -2
  27. package/main/message-composer/message-composer.js +18 -28
  28. package/main/message-composer/message-composer.spec.js +0 -5
  29. package/main/provider/index.js +0 -2
  30. package/main/provider/provider.js +2 -29
  31. package/main/provider/provider.spec.js +0 -3
  32. package/main/react-query/index.js +0 -2
  33. package/main/react-query/react-query.js +125 -152
  34. package/main/react-query/react-query.spec.js +0 -10
  35. package/main/recoil/index.js +0 -2
  36. package/main/recoil/recoil.js +0 -14
  37. package/main/recoil/recoil.spec.js +0 -8
  38. package/main/utils/babel.js +12 -98
  39. package/main/utils/babel.spec.js +72 -67
  40. package/main/utils/constants.js +0 -6
  41. package/main/utils/index.js +0 -7
  42. package/main/utils/ref.js +0 -3
  43. package/main/utils/types.js +22 -109
  44. package/module/client/client.js +46 -32
  45. package/module/client/test/ts-client.account-nfts.spec.js +3 -1
  46. package/module/client/test/ts-client.arrays.spec.js +3 -1
  47. package/module/client/test/ts-client.issue-101.spec.js +3 -1
  48. package/module/client/test/ts-client.issue-98.test.js +3 -1
  49. package/module/client/test/ts-client.wager.spec.js +4 -1
  50. package/module/context/context.js +9 -23
  51. package/module/context/imports.js +5 -24
  52. package/module/index.js +1 -1
  53. package/module/message-builder/index.js +1 -0
  54. package/module/{msg-builder/msg-builder.js → message-builder/message-builder.js} +22 -17
  55. package/module/{msg-builder/msg-builder.spec.js → message-builder/message-builder.spec.js} +4 -4
  56. package/module/message-composer/message-composer.js +18 -14
  57. package/module/provider/provider.js +0 -8
  58. package/module/react-query/react-query.js +77 -76
  59. package/module/utils/babel.js +4 -14
  60. package/module/utils/babel.spec.js +49 -23
  61. package/module/utils/types.js +18 -66
  62. package/package.json +2 -2
  63. package/src/context/context.ts +158 -158
  64. package/src/index.ts +1 -1
  65. package/src/{msg-builder/__snapshots__/msg-builder.spec.ts.snap → message-builder/__snapshots__/message-builder.spec.ts.snap} +2 -2
  66. package/src/message-builder/index.ts +1 -0
  67. package/src/{msg-builder/msg-builder.spec.ts → message-builder/message-builder.spec.ts} +6 -7
  68. package/src/{msg-builder/msg-builder.ts → message-builder/message-builder.ts} +5 -5
  69. package/src/react-query/react-query.spec.ts +1 -1
  70. package/types/context/context.d.ts +2 -2
  71. package/types/index.d.ts +1 -1
  72. package/types/message-builder/index.d.ts +1 -0
  73. package/types/message-builder/message-builder.d.ts +4 -0
  74. package/module/msg-builder/index.js +0 -1
  75. package/src/msg-builder/index.ts +0 -1
  76. package/types/msg-builder/index.d.ts +0 -1
  77. package/types/msg-builder/msg-builder.d.ts +0 -4
@@ -1,21 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  var _typeof = require("@babel/runtime/helpers/typeof");
6
-
7
5
  var t = _interopRequireWildcard(require("@babel/types"));
8
-
9
6
  var _query_msg = _interopRequireDefault(require("../../../../__fixtures__/basic/query_msg.json"));
10
-
11
7
  var _recoil = require("./recoil");
12
-
13
8
  var _testUtils = require("../../test-utils");
14
-
15
9
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
-
17
10
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
-
19
11
  var ctx = (0, _testUtils.makeContext)(_query_msg["default"]);
20
12
  it('selector', function () {
21
13
  (0, _testUtils.expectCode)((0, _recoil.createRecoilSelector)(ctx, 'SG721', 'SG721QueryClient', 'governanceModules', 'GovernanceModulesResponse'));
@@ -1,36 +1,22 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  var _typeof = require("@babel/runtime/helpers/typeof");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
8
  exports.typedIdentifier = exports.typeRefOrUnionWithUndefined = exports.tsTypeOperator = exports.tsPropertySignature = exports.tsObjectPattern = exports.shorthandProperty = exports.recursiveNamespace = exports.propertySignature = exports.promiseTypeAnnotation = exports.pickTypeReference = exports.parameterizedTypeReference = exports.optionalConditionalExpression = exports.omitTypeReference = exports.memberExpressionOrIdentifierSnake = exports.memberExpressionOrIdentifier = exports.importStmt = exports.importAs = exports.importAminoMsg = exports.identifier = exports.getMessageProperties = exports.getFieldDimensionality = exports.classProperty = exports.classDeclaration = exports.callExpression = exports.bindMethod = exports.arrowFunctionExpression = exports.arrayTypeNDimensions = exports.abstractClassDeclaration = exports.FieldTypeAsts = void 0;
11
-
12
9
  var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toArray"));
13
-
14
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
-
16
11
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
17
-
18
12
  var t = _interopRequireWildcard(require("@babel/types"));
19
-
20
13
  var _case = require("case");
21
-
22
14
  var _ref = require("./ref");
23
-
24
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
-
26
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
-
28
17
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
29
-
30
18
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
31
-
32
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
33
-
19
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
34
20
  // t.TSPropertySignature - kind?
35
21
  var propertySignature = function propertySignature(name, typeAnnotation) {
36
22
  var optional = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
@@ -42,9 +28,7 @@ var propertySignature = function propertySignature(name, typeAnnotation) {
42
28
  optional: optional
43
29
  };
44
30
  };
45
-
46
31
  exports.propertySignature = propertySignature;
47
-
48
32
  var identifier = function identifier(name, typeAnnotation) {
49
33
  var optional = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
50
34
  var type = t.identifier(name);
@@ -52,21 +36,16 @@ var identifier = function identifier(name, typeAnnotation) {
52
36
  type.optional = optional;
53
37
  return type;
54
38
  };
55
-
56
39
  exports.identifier = identifier;
57
-
58
40
  var tsTypeOperator = function tsTypeOperator(typeAnnotation, operator) {
59
41
  var obj = t.tsTypeOperator(typeAnnotation);
60
42
  obj.operator = operator;
61
43
  return obj;
62
44
  };
63
-
64
45
  exports.tsTypeOperator = tsTypeOperator;
65
-
66
46
  var getMessageProperties = function getMessageProperties(msg) {
67
47
  var results = [];
68
48
  var objs = [];
69
-
70
49
  if (msg.anyOf) {
71
50
  objs = msg.anyOf;
72
51
  } else if (msg.oneOf) {
@@ -74,14 +53,11 @@ var getMessageProperties = function getMessageProperties(msg) {
74
53
  } else if (msg.allOf) {
75
54
  objs = msg.allOf;
76
55
  }
77
-
78
56
  var _iterator = _createForOfIteratorHelper(objs),
79
- _step;
80
-
57
+ _step;
81
58
  try {
82
59
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
83
60
  var obj = _step.value;
84
-
85
61
  if (obj.properties) {
86
62
  results.push(obj);
87
63
  } else {
@@ -97,42 +73,31 @@ var getMessageProperties = function getMessageProperties(msg) {
97
73
  } finally {
98
74
  _iterator.f();
99
75
  }
100
-
101
76
  return results;
102
77
  };
103
-
104
78
  exports.getMessageProperties = getMessageProperties;
105
-
106
79
  var tsPropertySignature = function tsPropertySignature(key, typeAnnotation, optional) {
107
80
  var obj = t.tsPropertySignature(key, typeAnnotation);
108
81
  obj.optional = optional;
109
82
  return obj;
110
83
  };
111
-
112
84
  exports.tsPropertySignature = tsPropertySignature;
113
-
114
85
  var tsObjectPattern = function tsObjectPattern(properties, typeAnnotation) {
115
86
  var obj = t.objectPattern(properties);
116
87
  obj.typeAnnotation = typeAnnotation;
117
88
  return obj;
118
89
  };
119
-
120
90
  exports.tsObjectPattern = tsObjectPattern;
121
-
122
91
  var callExpression = function callExpression(callee, _arguments, typeParameters) {
123
92
  var callExpr = t.callExpression(callee, _arguments);
124
93
  callExpr.typeParameters = typeParameters;
125
94
  return callExpr;
126
95
  };
127
-
128
96
  exports.callExpression = callExpression;
129
-
130
97
  var bindMethod = function bindMethod(name) {
131
98
  return t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.thisExpression(), t.identifier(name)), t.callExpression(t.memberExpression(t.memberExpression(t.thisExpression(), t.identifier(name)), t.identifier('bind')), [t.thisExpression()])));
132
99
  };
133
-
134
100
  exports.bindMethod = bindMethod;
135
-
136
101
  var typedIdentifier = function typedIdentifier(name, typeAnnotation) {
137
102
  var optional = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
138
103
  var type = t.identifier(name);
@@ -140,15 +105,11 @@ var typedIdentifier = function typedIdentifier(name, typeAnnotation) {
140
105
  type.optional = optional;
141
106
  return type;
142
107
  };
143
-
144
108
  exports.typedIdentifier = typedIdentifier;
145
-
146
109
  var promiseTypeAnnotation = function promiseTypeAnnotation(name) {
147
110
  return t.tsTypeAnnotation(t.tsTypeReference(t.identifier('Promise'), t.tsTypeParameterInstantiation([t.tsTypeReference(t.identifier(name))])));
148
111
  };
149
-
150
112
  exports.promiseTypeAnnotation = promiseTypeAnnotation;
151
-
152
113
  var abstractClassDeclaration = function abstractClassDeclaration(name, body) {
153
114
  var implementsExressions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
154
115
  var superClass = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
@@ -156,23 +117,17 @@ var abstractClassDeclaration = function abstractClassDeclaration(name, body) {
156
117
  declaration["abstract"] = true;
157
118
  return declaration;
158
119
  };
159
-
160
120
  exports.abstractClassDeclaration = abstractClassDeclaration;
161
-
162
121
  var classDeclaration = function classDeclaration(name, body) {
163
122
  var implementsExressions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
164
123
  var superClass = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
165
124
  var declaration = t.classDeclaration(t.identifier(name), superClass, t.classBody(body));
166
-
167
125
  if (implementsExressions.length) {
168
126
  declaration["implements"] = implementsExressions;
169
127
  }
170
-
171
128
  return declaration;
172
129
  };
173
-
174
130
  exports.classDeclaration = classDeclaration;
175
-
176
131
  var classProperty = function classProperty(name) {
177
132
  var typeAnnotation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
178
133
  var isReadonly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
@@ -185,32 +140,25 @@ var classProperty = function classProperty(name) {
185
140
  if (noImplicitOverride) prop.override = true;
186
141
  return prop;
187
142
  };
188
-
189
143
  exports.classProperty = classProperty;
190
-
191
144
  var arrowFunctionExpression = function arrowFunctionExpression(params, body, returnType) {
192
145
  var isAsync = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
193
146
  var func = t.arrowFunctionExpression(params, body, isAsync);
194
147
  if (returnType) func.returnType = returnType;
195
148
  return func;
196
149
  };
197
-
198
150
  exports.arrowFunctionExpression = arrowFunctionExpression;
199
-
200
151
  var recursiveNamespace = function recursiveNamespace(names, moduleBlockBody) {
201
152
  if (!names || !names.length) return moduleBlockBody;
202
153
  var name = names.pop();
203
154
  var body = [t.exportNamedDeclaration(t.tsModuleDeclaration(t.identifier(name), t.tsModuleBlock(recursiveNamespace(names, moduleBlockBody))))];
204
155
  return body;
205
156
  };
206
-
207
157
  exports.recursiveNamespace = recursiveNamespace;
208
-
209
158
  var arrayTypeNDimensions = function arrayTypeNDimensions(body, n) {
210
159
  if (!n) return t.tsArrayType(body);
211
160
  return t.tsArrayType(arrayTypeNDimensions(body, n - 1));
212
161
  };
213
-
214
162
  exports.arrayTypeNDimensions = arrayTypeNDimensions;
215
163
  var FieldTypeAsts = {
216
164
  string: function string() {
@@ -233,136 +181,102 @@ var FieldTypeAsts = {
233
181
  }
234
182
  };
235
183
  exports.FieldTypeAsts = FieldTypeAsts;
236
-
237
184
  var shorthandProperty = function shorthandProperty(prop) {
238
185
  return t.objectProperty(t.identifier(prop), t.identifier(prop), false, true);
239
186
  };
240
-
241
187
  exports.shorthandProperty = shorthandProperty;
242
-
243
188
  var importStmt = function importStmt(names, path) {
244
189
  return t.importDeclaration(names.map(function (name) {
245
190
  return t.importSpecifier(t.identifier(name), t.identifier(name));
246
191
  }), t.stringLiteral(path));
247
192
  };
248
-
249
193
  exports.importStmt = importStmt;
250
-
251
194
  var importAs = function importAs(name, _importAs, importPath) {
252
195
  return t.importDeclaration([t.importSpecifier(t.identifier(_importAs), t.identifier(name))], t.stringLiteral(importPath));
253
196
  };
254
-
255
197
  exports.importAs = importAs;
256
-
257
198
  var importAminoMsg = function importAminoMsg() {
258
199
  return importStmt(['AminoMsg'], '@cosmjs/amino');
259
200
  };
260
-
261
201
  exports.importAminoMsg = importAminoMsg;
262
-
263
202
  var getFieldDimensionality = function getFieldDimensionality(field) {
264
203
  var typeName = field.type;
265
204
  var isArray = typeName.endsWith('[]');
266
205
  var dimensions = 0;
267
-
268
206
  if (isArray) {
269
207
  dimensions = typeName.match(/\[\]/g).length - 1;
270
208
  typeName = typeName.replace(/\[\]/g, '');
271
209
  }
272
-
273
210
  return {
274
211
  typeName: typeName,
275
212
  dimensions: dimensions,
276
213
  isArray: isArray
277
214
  };
278
215
  };
279
-
280
216
  exports.getFieldDimensionality = getFieldDimensionality;
281
-
282
217
  var memberExpressionOrIdentifier = function memberExpressionOrIdentifier(names) {
283
218
  if (names.length === 1) {
284
219
  return t.identifier(names[0]);
285
220
  }
286
-
287
221
  if (names.length === 2) {
288
222
  var _names = (0, _slicedToArray2["default"])(names, 2),
289
- b = _names[0],
290
- a = _names[1];
291
-
223
+ b = _names[0],
224
+ a = _names[1];
292
225
  return t.memberExpression(t.identifier(a), t.identifier(b));
293
226
  }
294
-
295
227
  var _names2 = (0, _toArray2["default"])(names),
296
- name = _names2[0],
297
- rest = _names2.slice(1);
298
-
228
+ name = _names2[0],
229
+ rest = _names2.slice(1);
299
230
  return t.memberExpression(memberExpressionOrIdentifier(rest), t.identifier(name));
300
231
  };
301
-
302
232
  exports.memberExpressionOrIdentifier = memberExpressionOrIdentifier;
303
-
304
233
  var memberExpressionOrIdentifierSnake = function memberExpressionOrIdentifierSnake(names) {
305
234
  if (names.length === 1) {
306
235
  return t.identifier((0, _case.snake)(names[0]));
307
236
  }
308
-
309
237
  if (names.length === 2) {
310
238
  var _names3 = (0, _slicedToArray2["default"])(names, 2),
311
- b = _names3[0],
312
- a = _names3[1];
313
-
239
+ b = _names3[0],
240
+ a = _names3[1];
314
241
  return t.memberExpression(t.identifier((0, _case.snake)(a)), t.identifier((0, _case.snake)(b)));
315
242
  }
316
-
317
243
  var _names4 = (0, _toArray2["default"])(names),
318
- name = _names4[0],
319
- rest = _names4.slice(1);
320
-
244
+ name = _names4[0],
245
+ rest = _names4.slice(1);
321
246
  return t.memberExpression(memberExpressionOrIdentifierSnake(rest), t.identifier((0, _case.snake)(name)));
322
247
  };
248
+
323
249
  /**
324
250
  * If optional, return a conditional, otherwise just the expression
325
251
  */
326
-
327
-
328
252
  exports.memberExpressionOrIdentifierSnake = memberExpressionOrIdentifierSnake;
329
-
330
253
  var optionalConditionalExpression = function optionalConditionalExpression(test, expression, alternate) {
331
254
  var optional = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
332
255
  return optional ? t.conditionalExpression(test, expression, alternate) : expression;
333
256
  };
334
-
335
257
  exports.optionalConditionalExpression = optionalConditionalExpression;
336
-
337
258
  var typeRefOrUnionWithUndefined = function typeRefOrUnionWithUndefined(identifier) {
338
259
  var optional = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
339
260
  var typeReference = t.tsTypeReference(identifier);
340
261
  return optional ? t.tsUnionType([typeReference, t.tsUndefinedKeyword()]) : typeReference;
341
262
  };
342
-
343
263
  exports.typeRefOrUnionWithUndefined = typeRefOrUnionWithUndefined;
344
-
345
264
  var parameterizedTypeReference = function parameterizedTypeReference(identifier, from, omit) {
346
265
  return t.tsTypeReference(t.identifier(identifier), t.tsTypeParameterInstantiation([from, typeof omit === 'string' ? t.tsLiteralType(t.stringLiteral(omit)) : t.tsUnionType(omit.map(function (o) {
347
266
  return t.tsLiteralType(t.stringLiteral(o));
348
267
  }))]));
349
268
  };
269
+
350
270
  /**
351
271
  * omitTypeReference(t.tsTypeReference(t.identifier('Cw4UpdateMembersMutation'),),'args').....
352
272
  * Omit<Cw4UpdateMembersMutation, 'args'>
353
273
  */
354
-
355
-
356
274
  exports.parameterizedTypeReference = parameterizedTypeReference;
357
-
358
275
  var omitTypeReference = function omitTypeReference(from, omit) {
359
276
  return parameterizedTypeReference('Omit', from, omit);
360
277
  };
361
-
362
278
  exports.omitTypeReference = omitTypeReference;
363
-
364
279
  var pickTypeReference = function pickTypeReference(from, pick) {
365
280
  return parameterizedTypeReference('Pick', from, pick);
366
281
  };
367
-
368
282
  exports.pickTypeReference = pickTypeReference;
@@ -1,104 +1,109 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  var _typeof = require("@babel/runtime/helpers/typeof");
6
-
7
5
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
8
-
9
6
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
-
11
7
  var _babel = require("./babel");
12
-
13
8
  var t = _interopRequireWildcard(require("@babel/types"));
14
-
15
9
  var _testUtils = require("../../test-utils");
16
-
17
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
-
19
11
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
-
21
12
  it('top import', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
22
13
  return _regenerator["default"].wrap(function _callee$(_context) {
23
- while (1) {
24
- switch (_context.prev = _context.next) {
25
- case 0:
26
- (0, _testUtils.expectCode)((0, _babel.importStmt)(['CosmWasmClient', 'ExecuteResult', 'SigningCosmWasmClient'], '@cosmjs/cosmwasm-stargate'));
27
-
28
- case 1:
29
- case "end":
30
- return _context.stop();
31
- }
14
+ while (1) switch (_context.prev = _context.next) {
15
+ case 0:
16
+ (0, _testUtils.expectCode)((0, _babel.importStmt)(['CosmWasmClient', 'ExecuteResult', 'SigningCosmWasmClient'], '@cosmjs/cosmwasm-stargate'));
17
+ case 1:
18
+ case "end":
19
+ return _context.stop();
32
20
  }
33
21
  }, _callee);
34
22
  })));
35
23
  it('interfaces', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
36
24
  return _regenerator["default"].wrap(function _callee2$(_context2) {
37
- while (1) {
38
- switch (_context2.prev = _context2.next) {
39
- case 0:
40
- (0, _testUtils.expectCode)(t.program([t.exportNamedDeclaration(t.tsInterfaceDeclaration(t.identifier('SG721ReadOnlyInstance'), null, [], t.tSInterfaceBody([t.tSPropertySignature(t.identifier('contractAddress'), t.tsTypeAnnotation(t.tsStringKeyword())), // methods
41
- t.tSPropertySignature(t.identifier('tokens'), t.tsTypeAnnotation(t.tsFunctionType(null, [(0, _babel.typedIdentifier)('owner', t.tsTypeAnnotation(t.tsStringKeyword())), (0, _babel.typedIdentifier)('startAfter', t.tsTypeAnnotation(t.tsStringKeyword()), true), (0, _babel.typedIdentifier)('limit', t.tsTypeAnnotation(t.tsStringKeyword()), true)], (0, _babel.promiseTypeAnnotation)('TokensResponse'))))]))), // extends
42
- t.exportNamedDeclaration(t.tsInterfaceDeclaration(t.identifier('SG721Instance'), null, [t.tSExpressionWithTypeArguments(t.identifier('SG721ReadOnlyInstance'))], t.tSInterfaceBody([// contract address
43
- t.tSPropertySignature(t.identifier('contractAddress'), t.tsTypeAnnotation(t.tsStringKeyword())), // METHOD
44
- t.tSPropertySignature(t.identifier('mint'), t.tsTypeAnnotation(t.tsFunctionType(null, [(0, _babel.typedIdentifier)('sender', t.tsTypeAnnotation(t.tsStringKeyword())), (0, _babel.typedIdentifier)('anotherProp', t.tsTypeAnnotation(t.tsStringKeyword())), (0, _babel.typedIdentifier)('prop3', t.tsTypeAnnotation(t.tsStringKeyword()))], (0, _babel.promiseTypeAnnotation)('ExecuteResult'))))])))]));
25
+ while (1) switch (_context2.prev = _context2.next) {
26
+ case 0:
27
+ (0, _testUtils.expectCode)(t.program([t.exportNamedDeclaration(t.tsInterfaceDeclaration(t.identifier('SG721ReadOnlyInstance'), null, [], t.tSInterfaceBody([t.tSPropertySignature(t.identifier('contractAddress'), t.tsTypeAnnotation(t.tsStringKeyword())),
28
+ // methods
29
+
30
+ t.tSPropertySignature(t.identifier('tokens'), t.tsTypeAnnotation(t.tsFunctionType(null, [(0, _babel.typedIdentifier)('owner', t.tsTypeAnnotation(t.tsStringKeyword())), (0, _babel.typedIdentifier)('startAfter', t.tsTypeAnnotation(t.tsStringKeyword()), true), (0, _babel.typedIdentifier)('limit', t.tsTypeAnnotation(t.tsStringKeyword()), true)], (0, _babel.promiseTypeAnnotation)('TokensResponse'))))]))),
31
+ // extends
45
32
 
46
- case 1:
47
- case "end":
48
- return _context2.stop();
49
- }
33
+ t.exportNamedDeclaration(t.tsInterfaceDeclaration(t.identifier('SG721Instance'), null, [t.tSExpressionWithTypeArguments(t.identifier('SG721ReadOnlyInstance'))], t.tSInterfaceBody([
34
+ // contract address
35
+
36
+ t.tSPropertySignature(t.identifier('contractAddress'), t.tsTypeAnnotation(t.tsStringKeyword())),
37
+ // METHOD
38
+ t.tSPropertySignature(t.identifier('mint'), t.tsTypeAnnotation(t.tsFunctionType(null, [(0, _babel.typedIdentifier)('sender', t.tsTypeAnnotation(t.tsStringKeyword())), (0, _babel.typedIdentifier)('anotherProp', t.tsTypeAnnotation(t.tsStringKeyword())), (0, _babel.typedIdentifier)('prop3', t.tsTypeAnnotation(t.tsStringKeyword()))], (0, _babel.promiseTypeAnnotation)('ExecuteResult'))))])))]));
39
+ case 1:
40
+ case "end":
41
+ return _context2.stop();
50
42
  }
51
43
  }, _callee2);
52
44
  })));
53
45
  it('readonly classes', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
54
46
  return _regenerator["default"].wrap(function _callee3$(_context3) {
55
- while (1) {
56
- switch (_context3.prev = _context3.next) {
57
- case 0:
58
- (0, _testUtils.expectCode)(t.program([t.exportNamedDeclaration((0, _babel.classDeclaration)('SG721QueryClient', [// client
59
- (0, _babel.classProperty)('client', t.tsTypeAnnotation(t.tsTypeReference(t.identifier('CosmWasmClient')))), // contractAddress
60
- (0, _babel.classProperty)('contractAddress', t.tsTypeAnnotation(t.tsStringKeyword())), // constructor
61
- t.classMethod('constructor', t.identifier('constructor'), [(0, _babel.typedIdentifier)('client', t.tsTypeAnnotation(t.tsTypeReference(t.identifier('CosmWasmClient')))), (0, _babel.typedIdentifier)('contractAddress', t.tsTypeAnnotation(t.tsStringKeyword()))], t.blockStatement([// client/contract set
62
- t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.thisExpression(), t.identifier('client')), t.identifier('client'))), t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.thisExpression(), t.identifier('contractAddress')), t.identifier('contractAddress'))), // bindings
63
- (0, _babel.bindMethod)('approval'), (0, _babel.bindMethod)('otherProp'), (0, _babel.bindMethod)('hello'), (0, _babel.bindMethod)('mintme')])), // methods:
64
- t.classProperty(t.identifier('approval'), (0, _babel.arrowFunctionExpression)([// props
65
- (0, _babel.typedIdentifier)('owner', t.tsTypeAnnotation(t.tsStringKeyword())), //
66
- (0, _babel.typedIdentifier)('spender', t.tsTypeAnnotation(t.tsStringKeyword()))], t.blockStatement([t.returnStatement(t.callExpression(t.memberExpression(t.memberExpression(t.thisExpression(), t.identifier('client')), t.identifier('queryContractSmart')), [t.memberExpression(t.thisExpression(), t.identifier('contractAddress')), t.objectExpression([// props
67
- t.objectProperty(t.identifier('owner'), t.identifier('owner'), false, true), t.objectProperty(t.identifier('spender'), t.identifier('spender'), false, true)])]))]), t.tsTypeAnnotation(t.tsTypeReference(t.identifier('Promise'), t.tsTypeParameterInstantiation([t.tSTypeReference(t.identifier('ApprovalResponse'))]))), true))], [t.tSExpressionWithTypeArguments(t.identifier('SG721ReadOnlyInstance'))]))]));
68
-
69
- case 1:
70
- case "end":
71
- return _context3.stop();
72
- }
47
+ while (1) switch (_context3.prev = _context3.next) {
48
+ case 0:
49
+ (0, _testUtils.expectCode)(t.program([t.exportNamedDeclaration((0, _babel.classDeclaration)('SG721QueryClient', [
50
+ // client
51
+ (0, _babel.classProperty)('client', t.tsTypeAnnotation(t.tsTypeReference(t.identifier('CosmWasmClient')))),
52
+ // contractAddress
53
+ (0, _babel.classProperty)('contractAddress', t.tsTypeAnnotation(t.tsStringKeyword())),
54
+ // constructor
55
+ t.classMethod('constructor', t.identifier('constructor'), [(0, _babel.typedIdentifier)('client', t.tsTypeAnnotation(t.tsTypeReference(t.identifier('CosmWasmClient')))), (0, _babel.typedIdentifier)('contractAddress', t.tsTypeAnnotation(t.tsStringKeyword()))], t.blockStatement([
56
+ // client/contract set
57
+ t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.thisExpression(), t.identifier('client')), t.identifier('client'))), t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.thisExpression(), t.identifier('contractAddress')), t.identifier('contractAddress'))),
58
+ // bindings
59
+ (0, _babel.bindMethod)('approval'), (0, _babel.bindMethod)('otherProp'), (0, _babel.bindMethod)('hello'), (0, _babel.bindMethod)('mintme')])),
60
+ // methods:
61
+ t.classProperty(t.identifier('approval'), (0, _babel.arrowFunctionExpression)([
62
+ // props
63
+ (0, _babel.typedIdentifier)('owner', t.tsTypeAnnotation(t.tsStringKeyword())),
64
+ //
65
+ (0, _babel.typedIdentifier)('spender', t.tsTypeAnnotation(t.tsStringKeyword()))], t.blockStatement([t.returnStatement(t.callExpression(t.memberExpression(t.memberExpression(t.thisExpression(), t.identifier('client')), t.identifier('queryContractSmart')), [t.memberExpression(t.thisExpression(), t.identifier('contractAddress')), t.objectExpression([
66
+ // props
67
+ t.objectProperty(t.identifier('owner'), t.identifier('owner'), false, true), t.objectProperty(t.identifier('spender'), t.identifier('spender'), false, true)])]))]), t.tsTypeAnnotation(t.tsTypeReference(t.identifier('Promise'), t.tsTypeParameterInstantiation([t.tSTypeReference(t.identifier('ApprovalResponse'))]))), true))], [t.tSExpressionWithTypeArguments(t.identifier('SG721ReadOnlyInstance'))]))]));
68
+ case 1:
69
+ case "end":
70
+ return _context3.stop();
73
71
  }
74
72
  }, _callee3);
75
73
  })));
76
74
  it('mutation classes', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
77
75
  return _regenerator["default"].wrap(function _callee4$(_context4) {
78
- while (1) {
79
- switch (_context4.prev = _context4.next) {
80
- case 0:
81
- (0, _testUtils.expectCode)(t.program([t.exportNamedDeclaration((0, _babel.classDeclaration)('SG721Client', [// client
82
- (0, _babel.classProperty)('client', t.tsTypeAnnotation(t.tsTypeReference(t.identifier('SigningCosmWasmClient')))), // contractAddress
83
- (0, _babel.classProperty)('contractAddress', t.tsTypeAnnotation(t.tsStringKeyword())), // constructor
84
- t.classMethod('constructor', t.identifier('constructor'), [(0, _babel.typedIdentifier)('client', t.tsTypeAnnotation(t.tsTypeReference(t.identifier('SigningCosmWasmClient')))), (0, _babel.typedIdentifier)('contractAddress', t.tsTypeAnnotation(t.tsStringKeyword()))], t.blockStatement([// super()
85
- t.expressionStatement(t.callExpression(t["super"](), [t.identifier('client'), t.identifier('contractAddress')])), // client/contract set
86
- t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.thisExpression(), t.identifier('client')), t.identifier('client'))), t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.thisExpression(), t.identifier('contractAddress')), t.identifier('contractAddress'))), // bindings
87
- (0, _babel.bindMethod)('approval'), (0, _babel.bindMethod)('otherProp'), (0, _babel.bindMethod)('hello'), (0, _babel.bindMethod)('mintme')])), // methods:
88
- t.classProperty(t.identifier('mint'), (0, _babel.arrowFunctionExpression)([// props
89
- (0, _babel.typedIdentifier)('sender', t.tsTypeAnnotation(t.tsStringKeyword())), (0, _babel.typedIdentifier)('tokenId', t.tsTypeAnnotation(t.tsStringKeyword())), (0, _babel.typedIdentifier)('owner', t.tsTypeAnnotation(t.tsStringKeyword())), (0, _babel.typedIdentifier)('token_uri', t.tsTypeAnnotation(t.tsStringKeyword()))], t.blockStatement([t.returnStatement(t.awaitExpression(t.callExpression(t.memberExpression(t.memberExpression(t.thisExpression(), t.identifier('client')), t.identifier('execute')), [t.identifier('sender'), t.memberExpression(t.thisExpression(), t.identifier('contractAddress')), t.objectExpression([t.objectProperty(t.identifier('mint'), t.objectExpression([t.objectProperty(t.identifier('token_id'), t.identifier('tokenId')), t.objectProperty(t.identifier('owner'), t.identifier('owner')), t.objectProperty(t.identifier('token_uri'), t.identifier('token_uri')), t.objectProperty(t.identifier('expression'), t.objectExpression([]))]))]), t.stringLiteral('auto')])))]), // return type
90
- t.tsTypeAnnotation(t.tsTypeReference(t.identifier('Promise'), t.tsTypeParameterInstantiation([t.tSTypeReference(t.identifier('ExecuteResult'))]))), true))], [t.tSExpressionWithTypeArguments(t.identifier('SG721ReadOnlyInstance'))], t.identifier('SG721QueryClient')))]));
91
-
92
- case 1:
93
- case "end":
94
- return _context4.stop();
95
- }
76
+ while (1) switch (_context4.prev = _context4.next) {
77
+ case 0:
78
+ (0, _testUtils.expectCode)(t.program([t.exportNamedDeclaration((0, _babel.classDeclaration)('SG721Client', [
79
+ // client
80
+ (0, _babel.classProperty)('client', t.tsTypeAnnotation(t.tsTypeReference(t.identifier('SigningCosmWasmClient')))),
81
+ // contractAddress
82
+ (0, _babel.classProperty)('contractAddress', t.tsTypeAnnotation(t.tsStringKeyword())),
83
+ // constructor
84
+ t.classMethod('constructor', t.identifier('constructor'), [(0, _babel.typedIdentifier)('client', t.tsTypeAnnotation(t.tsTypeReference(t.identifier('SigningCosmWasmClient')))), (0, _babel.typedIdentifier)('contractAddress', t.tsTypeAnnotation(t.tsStringKeyword()))], t.blockStatement([
85
+ // super()
86
+ t.expressionStatement(t.callExpression(t["super"](), [t.identifier('client'), t.identifier('contractAddress')])),
87
+ // client/contract set
88
+ t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.thisExpression(), t.identifier('client')), t.identifier('client'))), t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.thisExpression(), t.identifier('contractAddress')), t.identifier('contractAddress'))),
89
+ // bindings
90
+ (0, _babel.bindMethod)('approval'), (0, _babel.bindMethod)('otherProp'), (0, _babel.bindMethod)('hello'), (0, _babel.bindMethod)('mintme')])),
91
+ // methods:
92
+ t.classProperty(t.identifier('mint'), (0, _babel.arrowFunctionExpression)([
93
+ // props
94
+ (0, _babel.typedIdentifier)('sender', t.tsTypeAnnotation(t.tsStringKeyword())), (0, _babel.typedIdentifier)('tokenId', t.tsTypeAnnotation(t.tsStringKeyword())), (0, _babel.typedIdentifier)('owner', t.tsTypeAnnotation(t.tsStringKeyword())), (0, _babel.typedIdentifier)('token_uri', t.tsTypeAnnotation(t.tsStringKeyword()))], t.blockStatement([t.returnStatement(t.awaitExpression(t.callExpression(t.memberExpression(t.memberExpression(t.thisExpression(), t.identifier('client')), t.identifier('execute')), [t.identifier('sender'), t.memberExpression(t.thisExpression(), t.identifier('contractAddress')), t.objectExpression([t.objectProperty(t.identifier('mint'), t.objectExpression([t.objectProperty(t.identifier('token_id'), t.identifier('tokenId')), t.objectProperty(t.identifier('owner'), t.identifier('owner')), t.objectProperty(t.identifier('token_uri'), t.identifier('token_uri')), t.objectProperty(t.identifier('expression'), t.objectExpression([]))]))]), t.stringLiteral('auto')])))]),
95
+ // return type
96
+ t.tsTypeAnnotation(t.tsTypeReference(t.identifier('Promise'), t.tsTypeParameterInstantiation([t.tSTypeReference(t.identifier('ExecuteResult'))]))), true))], [t.tSExpressionWithTypeArguments(t.identifier('SG721ReadOnlyInstance'))], t.identifier('SG721QueryClient')))]));
97
+ case 1:
98
+ case "end":
99
+ return _context4.stop();
96
100
  }
97
101
  }, _callee4);
98
102
  })));
99
103
  it('object parms', function () {
100
104
  var obj = t.objectPattern([t.objectProperty(t.identifier('includeExpired'), t.identifier('includeExpired'), false, true), t.objectProperty(t.identifier('tokenId'), t.identifier('tokenId'), false, true)]);
101
105
  obj.typeAnnotation = t.tsTypeAnnotation(t.tsTypeLiteral([t.tsPropertySignature(t.identifier('includeExpired'), t.tsTypeAnnotation(t.tsBooleanKeyword())), t.tsPropertySignature(t.identifier('tokenId'), t.tsTypeAnnotation(t.tsStringKeyword()))]));
102
- (0, _testUtils.expectCode)(t.program([t.expressionStatement(t.assignmentExpression('=', t.identifier('ownerOf'), (0, _babel.arrowFunctionExpression)([obj], t.blockStatement([// body
106
+ (0, _testUtils.expectCode)(t.program([t.expressionStatement(t.assignmentExpression('=', t.identifier('ownerOf'), (0, _babel.arrowFunctionExpression)([obj], t.blockStatement([
107
+ // body
103
108
  ], []), t.tsTypeAnnotation(t.tsTypeReference(t.identifier('Promise'), t.tsTypeParameterInstantiation([t.tsTypeReference(t.identifier('OwnerOfResponse'))]))))))]));
104
109
  });
@@ -1,20 +1,14 @@
1
1
  "use strict";
2
2
 
3
3
  var _typeof = require("@babel/runtime/helpers/typeof");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.PROVIDER_TYPES = exports.OPTIONAL_MEMO_PARAM = exports.OPTIONAL_FUNDS_PARAM = exports.OPTIONAL_FEE_PARAM = exports.FIXED_EXECUTE_PARAMS = void 0;
9
-
10
8
  var _babel = require("./babel");
11
-
12
9
  var t = _interopRequireWildcard(require("@babel/types"));
13
-
14
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
-
16
11
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
-
18
12
  var OPTIONAL_FUNDS_PARAM = (0, _babel.identifier)('_funds', t.tsTypeAnnotation(t.tsArrayType(t.tsTypeReference(t.identifier('Coin')))), true);
19
13
  exports.OPTIONAL_FUNDS_PARAM = OPTIONAL_FUNDS_PARAM;
20
14
  var OPTIONAL_FEE_PARAM = (0, _babel.identifier)('fee', t.tsTypeAnnotation(t.tsUnionType([t.tsNumberKeyword(), t.tsTypeReference(t.identifier('StdFee')), t.tsLiteralType(t.stringLiteral('auto'))])), true);
@@ -26,9 +26,7 @@ Object.defineProperty(exports, "PROVIDER_TYPES", {
26
26
  return _constants.PROVIDER_TYPES;
27
27
  }
28
28
  });
29
-
30
29
  var _babel = require("./babel");
31
-
32
30
  Object.keys(_babel).forEach(function (key) {
33
31
  if (key === "default" || key === "__esModule") return;
34
32
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -40,9 +38,7 @@ Object.keys(_babel).forEach(function (key) {
40
38
  }
41
39
  });
42
40
  });
43
-
44
41
  var _types = require("./types");
45
-
46
42
  Object.keys(_types).forEach(function (key) {
47
43
  if (key === "default" || key === "__esModule") return;
48
44
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -54,9 +50,7 @@ Object.keys(_types).forEach(function (key) {
54
50
  }
55
51
  });
56
52
  });
57
-
58
53
  var _ref = require("./ref");
59
-
60
54
  Object.keys(_ref).forEach(function (key) {
61
55
  if (key === "default" || key === "__esModule") return;
62
56
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -68,5 +62,4 @@ Object.keys(_ref).forEach(function (key) {
68
62
  }
69
63
  });
70
64
  });
71
-
72
65
  var _constants = require("./constants");
package/main/utils/ref.js CHANGED
@@ -4,12 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.refLookup = void 0;
7
-
8
7
  var refLookup = function refLookup($ref, schema) {
9
8
  var _schema$definitions;
10
-
11
9
  var refName = $ref.replace('#/definitions/', '');
12
10
  return (_schema$definitions = schema.definitions) === null || _schema$definitions === void 0 ? void 0 : _schema$definitions[refName];
13
11
  };
14
-
15
12
  exports.refLookup = refLookup;