wapi-client 0.15.8 → 0.16.0-beta.2

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 (72) hide show
  1. package/dist/api/base-client.browser.cjs +62 -41
  2. package/dist/api/base-client.browser.js +62 -41
  3. package/dist/api/base-client.cjs +62 -41
  4. package/dist/api/base-client.js +62 -41
  5. package/dist/api/http-client.browser.cjs +13 -13
  6. package/dist/api/http-client.browser.js +14 -14
  7. package/dist/api/http-client.cjs +13 -13
  8. package/dist/api/http-client.js +14 -14
  9. package/dist/api/ws-client.browser.cjs +2 -2
  10. package/dist/api/ws-client.browser.js +2 -2
  11. package/dist/api/ws-client.cjs +2 -2
  12. package/dist/api/ws-client.js +2 -2
  13. package/dist/client-options.schema.zod.browser.cjs +12 -17
  14. package/dist/client-options.schema.zod.browser.js +12 -17
  15. package/dist/client-options.schema.zod.cjs +15 -21
  16. package/dist/client-options.schema.zod.js +12 -17
  17. package/dist/client.browser.cjs +19 -5
  18. package/dist/client.browser.js +19 -5
  19. package/dist/client.cjs +19 -5
  20. package/dist/client.js +19 -5
  21. package/dist/fns/create-transfer/create-transfer.browser.cjs +2 -2
  22. package/dist/fns/create-transfer/create-transfer.browser.js +2 -2
  23. package/dist/fns/create-transfer/create-transfer.cjs +2 -2
  24. package/dist/fns/create-transfer/create-transfer.js +2 -2
  25. package/dist/fns/create-transfer/create-transfer.schema.zod.browser.cjs +2 -1
  26. package/dist/fns/create-transfer/create-transfer.schema.zod.browser.js +2 -1
  27. package/dist/fns/create-transfer/create-transfer.schema.zod.cjs +2 -1
  28. package/dist/fns/create-transfer/create-transfer.schema.zod.js +2 -1
  29. package/dist/fns/create-wallet/create-wallet.browser.cjs +2 -14
  30. package/dist/fns/create-wallet/create-wallet.browser.js +2 -15
  31. package/dist/fns/create-wallet/create-wallet.cjs +2 -14
  32. package/dist/fns/create-wallet/create-wallet.js +2 -15
  33. package/dist/fns/create-wallet/create-wallet.schema.zod.browser.cjs +3 -1
  34. package/dist/fns/create-wallet/create-wallet.schema.zod.browser.js +3 -1
  35. package/dist/fns/create-wallet/create-wallet.schema.zod.cjs +3 -1
  36. package/dist/fns/create-wallet/create-wallet.schema.zod.js +3 -1
  37. package/dist/fns/update-wallet/update-wallet.browser.cjs +18 -7
  38. package/dist/fns/update-wallet/update-wallet.browser.js +20 -7
  39. package/dist/fns/update-wallet/update-wallet.cjs +18 -7
  40. package/dist/fns/update-wallet/update-wallet.js +20 -7
  41. package/dist/fns/update-wallet/update-wallet.schema.zod.browser.cjs +3 -1
  42. package/dist/fns/update-wallet/update-wallet.schema.zod.browser.js +3 -1
  43. package/dist/fns/update-wallet/update-wallet.schema.zod.cjs +3 -1
  44. package/dist/fns/update-wallet/update-wallet.schema.zod.js +3 -1
  45. package/dist/lib/env.browser.cjs +1 -1
  46. package/dist/lib/env.browser.js +1 -1
  47. package/dist/lib/env.cjs +1 -1
  48. package/dist/lib/env.js +1 -1
  49. package/dist/lib/errors.browser.cjs +5 -0
  50. package/dist/lib/errors.browser.js +5 -0
  51. package/dist/lib/errors.cjs +5 -0
  52. package/dist/lib/errors.js +5 -0
  53. package/dist/lib/utils.browser.cjs +10 -4
  54. package/dist/lib/utils.browser.js +10 -4
  55. package/dist/lib/utils.cjs +11 -4
  56. package/dist/lib/utils.js +10 -4
  57. package/dist/txs/create-wallet/create-wallet.schema.zod.browser.cjs +3 -1
  58. package/dist/txs/create-wallet/create-wallet.schema.zod.browser.js +3 -1
  59. package/dist/txs/create-wallet/create-wallet.schema.zod.cjs +3 -1
  60. package/dist/txs/create-wallet/create-wallet.schema.zod.js +3 -1
  61. package/dist/txs/update-wallet/update-wallet.schema.zod.browser.cjs +3 -1
  62. package/dist/txs/update-wallet/update-wallet.schema.zod.browser.js +3 -1
  63. package/dist/txs/update-wallet/update-wallet.schema.zod.cjs +3 -1
  64. package/dist/txs/update-wallet/update-wallet.schema.zod.js +3 -1
  65. package/dist/types/wapi-client.d.ts +122 -52
  66. package/dist/wapi-client-web.iife.js +7 -7
  67. package/dist/wapi-client.browser.cjs +4 -6
  68. package/dist/wapi-client.browser.js +5 -10
  69. package/dist/wapi-client.cjs +4 -6
  70. package/dist/wapi-client.iife.js +7 -7
  71. package/dist/wapi-client.js +5 -10
  72. package/package.json +2 -2
package/dist/client.cjs CHANGED
@@ -123,7 +123,7 @@ var Client = class {
123
123
  this.api = _apiClient;
124
124
  this.$connect = _apiClient.$connect;
125
125
  if (initialConf) {
126
- this.configure(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, initialConf.token && { token: initialConf.token }), initialConf.sendingTimeout && {
126
+ this.configure(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, initialConf.token && { token: initialConf.token }), initialConf.sendingTimeout && {
127
127
  sendingTimeout: initialConf.sendingTimeout
128
128
  }), initialConf.connectingTimeout && {
129
129
  connectingTimeout: initialConf.connectingTimeout
@@ -133,6 +133,8 @@ var Client = class {
133
133
  connectionName: initialConf.connectionName
134
134
  }), initialConf.httpSkipInitialAuthConnection && {
135
135
  httpSkipInitialAuthConnection: initialConf.httpSkipInitialAuthConnection
136
+ }), initialConf.requestTimeout && {
137
+ requestTimeout: initialConf.requestTimeout
136
138
  }));
137
139
  }
138
140
  }
@@ -190,7 +192,10 @@ var Client = class {
190
192
  *
191
193
  * wapiClient.configure({
192
194
  * token: 'EURO',
193
- * timeout: 45000,
195
+ * connectingTimeout: 45000,
196
+ * reconnectingTimeout: 45000,
197
+ * sendingTimeout: 10000,
198
+ * requestTimeout: 120000,
194
199
  * hooks: {
195
200
  * disconnect: () => {}
196
201
  * },
@@ -206,7 +211,12 @@ var Client = class {
206
211
  error: `Must be a string|number, '${newConf.token}' provided`
207
212
  });
208
213
  }
209
- ["sendingTimeout", "connectingTimeout", "reconnectingTimeout"].forEach((t) => {
214
+ [
215
+ "sendingTimeout",
216
+ "connectingTimeout",
217
+ "reconnectingTimeout",
218
+ "requestTimeout"
219
+ ].forEach((t) => {
210
220
  if (newConf[t] && typeof newConf[t] !== "number") {
211
221
  throw new import_errors.ConfigError("CONFIG_INVALID", {
212
222
  field: t,
@@ -217,9 +227,12 @@ var Client = class {
217
227
  const hooks = newConf.hooks;
218
228
  delete newConf.hooks;
219
229
  this.config = __spreadValues(__spreadValues({}, this.config), newConf);
220
- if (this.config.sendingTimeout) {
230
+ if ("sendingTimeout" in this.config) {
221
231
  this.api.sendingTimeout = this.config.sendingTimeout;
222
232
  }
233
+ if ("requestTimeout" in this.config) {
234
+ this.api.requestTimeout = this.config.requestTimeout;
235
+ }
223
236
  if (hooks) {
224
237
  for (const [hookName, value] of Object.entries(hooks)) {
225
238
  this.setHook(hookName, value);
@@ -2182,7 +2195,8 @@ var Client = class {
2182
2195
  function createClientWithWS(opts, config) {
2183
2196
  const wsClient = (0, import_api.createWsClient)(opts, {
2184
2197
  connectingTimeout: config == null ? void 0 : config.connectingTimeout,
2185
- reconnectingTimeout: config == null ? void 0 : config.reconnectingTimeout
2198
+ reconnectingTimeout: config == null ? void 0 : config.reconnectingTimeout,
2199
+ connectionName: config == null ? void 0 : config.connectionName
2186
2200
  });
2187
2201
  return new Client(wsClient, config);
2188
2202
  }
package/dist/client.js CHANGED
@@ -103,7 +103,7 @@ var Client = class {
103
103
  this.api = _apiClient;
104
104
  this.$connect = _apiClient.$connect;
105
105
  if (initialConf) {
106
- this.configure(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, initialConf.token && { token: initialConf.token }), initialConf.sendingTimeout && {
106
+ this.configure(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, initialConf.token && { token: initialConf.token }), initialConf.sendingTimeout && {
107
107
  sendingTimeout: initialConf.sendingTimeout
108
108
  }), initialConf.connectingTimeout && {
109
109
  connectingTimeout: initialConf.connectingTimeout
@@ -113,6 +113,8 @@ var Client = class {
113
113
  connectionName: initialConf.connectionName
114
114
  }), initialConf.httpSkipInitialAuthConnection && {
115
115
  httpSkipInitialAuthConnection: initialConf.httpSkipInitialAuthConnection
116
+ }), initialConf.requestTimeout && {
117
+ requestTimeout: initialConf.requestTimeout
116
118
  }));
117
119
  }
118
120
  }
@@ -170,7 +172,10 @@ var Client = class {
170
172
  *
171
173
  * wapiClient.configure({
172
174
  * token: 'EURO',
173
- * timeout: 45000,
175
+ * connectingTimeout: 45000,
176
+ * reconnectingTimeout: 45000,
177
+ * sendingTimeout: 10000,
178
+ * requestTimeout: 120000,
174
179
  * hooks: {
175
180
  * disconnect: () => {}
176
181
  * },
@@ -186,7 +191,12 @@ var Client = class {
186
191
  error: `Must be a string|number, '${newConf.token}' provided`
187
192
  });
188
193
  }
189
- ["sendingTimeout", "connectingTimeout", "reconnectingTimeout"].forEach((t) => {
194
+ [
195
+ "sendingTimeout",
196
+ "connectingTimeout",
197
+ "reconnectingTimeout",
198
+ "requestTimeout"
199
+ ].forEach((t) => {
190
200
  if (newConf[t] && typeof newConf[t] !== "number") {
191
201
  throw new ConfigError("CONFIG_INVALID", {
192
202
  field: t,
@@ -197,9 +207,12 @@ var Client = class {
197
207
  const hooks = newConf.hooks;
198
208
  delete newConf.hooks;
199
209
  this.config = __spreadValues(__spreadValues({}, this.config), newConf);
200
- if (this.config.sendingTimeout) {
210
+ if ("sendingTimeout" in this.config) {
201
211
  this.api.sendingTimeout = this.config.sendingTimeout;
202
212
  }
213
+ if ("requestTimeout" in this.config) {
214
+ this.api.requestTimeout = this.config.requestTimeout;
215
+ }
203
216
  if (hooks) {
204
217
  for (const [hookName, value] of Object.entries(hooks)) {
205
218
  this.setHook(hookName, value);
@@ -2162,7 +2175,8 @@ var Client = class {
2162
2175
  function createClientWithWS(opts, config) {
2163
2176
  const wsClient = createWsClient(opts, {
2164
2177
  connectingTimeout: config == null ? void 0 : config.connectingTimeout,
2165
- reconnectingTimeout: config == null ? void 0 : config.reconnectingTimeout
2178
+ reconnectingTimeout: config == null ? void 0 : config.reconnectingTimeout,
2179
+ connectionName: config == null ? void 0 : config.connectionName
2166
2180
  });
2167
2181
  return new Client(wsClient, config);
2168
2182
  }
@@ -72,7 +72,7 @@ function createTransfer(options, input, fnOptions) {
72
72
  }
73
73
  function transferFnInputToTransferData(input, token) {
74
74
  input.type = input.type || "transfer";
75
- const transfer = {
75
+ const transfer = __spreadValues({
76
76
  identifier: input.identifier,
77
77
  token: input.token || token,
78
78
  amount: (0, import_utils.convertToNumber)(input.amount),
@@ -81,7 +81,7 @@ function transferFnInputToTransferData(input, token) {
81
81
  type: input.type,
82
82
  transfer_group: input.transfer_group,
83
83
  created_at: input.created_at
84
- };
84
+ }, "force" in input ? { force: Boolean(input.force) } : {});
85
85
  if (input.type === "transfer") {
86
86
  if (input.latest_control_hash) {
87
87
  console.warn("deprecated: latest_control_hash is deprecated");
@@ -54,7 +54,7 @@ function createTransfer(options, input, fnOptions) {
54
54
  }
55
55
  function transferFnInputToTransferData(input, token) {
56
56
  input.type = input.type || "transfer";
57
- const transfer = {
57
+ const transfer = __spreadValues({
58
58
  identifier: input.identifier,
59
59
  token: input.token || token,
60
60
  amount: convertToNumber(input.amount),
@@ -63,7 +63,7 @@ function transferFnInputToTransferData(input, token) {
63
63
  type: input.type,
64
64
  transfer_group: input.transfer_group,
65
65
  created_at: input.created_at
66
- };
66
+ }, "force" in input ? { force: Boolean(input.force) } : {});
67
67
  if (input.type === "transfer") {
68
68
  if (input.latest_control_hash) {
69
69
  console.warn("deprecated: latest_control_hash is deprecated");
@@ -72,7 +72,7 @@ function createTransfer(options, input, fnOptions) {
72
72
  }
73
73
  function transferFnInputToTransferData(input, token) {
74
74
  input.type = input.type || "transfer";
75
- const transfer = {
75
+ const transfer = __spreadValues({
76
76
  identifier: input.identifier,
77
77
  token: input.token || token,
78
78
  amount: (0, import_utils.convertToNumber)(input.amount),
@@ -81,7 +81,7 @@ function transferFnInputToTransferData(input, token) {
81
81
  type: input.type,
82
82
  transfer_group: input.transfer_group,
83
83
  created_at: input.created_at
84
- };
84
+ }, "force" in input ? { force: Boolean(input.force) } : {});
85
85
  if (input.type === "transfer") {
86
86
  if (input.latest_control_hash) {
87
87
  console.warn("deprecated: latest_control_hash is deprecated");
@@ -54,7 +54,7 @@ function createTransfer(options, input, fnOptions) {
54
54
  }
55
55
  function transferFnInputToTransferData(input, token) {
56
56
  input.type = input.type || "transfer";
57
- const transfer = {
57
+ const transfer = __spreadValues({
58
58
  identifier: input.identifier,
59
59
  token: input.token || token,
60
60
  amount: convertToNumber(input.amount),
@@ -63,7 +63,7 @@ function transferFnInputToTransferData(input, token) {
63
63
  type: input.type,
64
64
  transfer_group: input.transfer_group,
65
65
  created_at: input.created_at
66
- };
66
+ }, "force" in input ? { force: Boolean(input.force) } : {});
67
67
  if (input.type === "transfer") {
68
68
  if (input.latest_control_hash) {
69
69
  console.warn("deprecated: latest_control_hash is deprecated");
@@ -53,7 +53,8 @@ var createTransferBaseInputSchema = import_zod.z.object({
53
53
  "Id of the transfer_group this transfer is linked to"
54
54
  ),
55
55
  created_at: import_transfer_schema_zod.transferTableSchema.shape.created_at,
56
- type: import_zod.z.literal("transfer")
56
+ type: import_zod.z.literal("transfer"),
57
+ force: import_transfer_schema_zod.transferTableSchema.shape.force
57
58
  });
58
59
  var createTransferRegularInputSchema = createTransferBaseInputSchema.extend({
59
60
  type: import_zod.z.literal("transfer")
@@ -30,7 +30,8 @@ var createTransferBaseInputSchema = z.object({
30
30
  "Id of the transfer_group this transfer is linked to"
31
31
  ),
32
32
  created_at: transferTableSchema.shape.created_at,
33
- type: z.literal("transfer")
33
+ type: z.literal("transfer"),
34
+ force: transferTableSchema.shape.force
34
35
  });
35
36
  var createTransferRegularInputSchema = createTransferBaseInputSchema.extend({
36
37
  type: z.literal("transfer")
@@ -53,7 +53,8 @@ var createTransferBaseInputSchema = import_zod.z.object({
53
53
  "Id of the transfer_group this transfer is linked to"
54
54
  ),
55
55
  created_at: import_transfer_schema_zod.transferTableSchema.shape.created_at,
56
- type: import_zod.z.literal("transfer")
56
+ type: import_zod.z.literal("transfer"),
57
+ force: import_transfer_schema_zod.transferTableSchema.shape.force
57
58
  });
58
59
  var createTransferRegularInputSchema = createTransferBaseInputSchema.extend({
59
60
  type: import_zod.z.literal("transfer")
@@ -30,7 +30,8 @@ var createTransferBaseInputSchema = z.object({
30
30
  "Id of the transfer_group this transfer is linked to"
31
31
  ),
32
32
  created_at: transferTableSchema.shape.created_at,
33
- type: z.literal("transfer")
33
+ type: z.literal("transfer"),
34
+ force: transferTableSchema.shape.force
34
35
  });
35
36
  var createTransferRegularInputSchema = createTransferBaseInputSchema.extend({
36
37
  type: z.literal("transfer")
@@ -5,18 +5,6 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
8
  var __objRest = (source, exclude) => {
21
9
  var target = {};
22
10
  for (var prop in source)
@@ -55,9 +43,9 @@ var zodValidator = (0, import_validation.getValidator)(import_create_wallet_sche
55
43
  function createWallet(options, input, fnOptions) {
56
44
  const { client } = options;
57
45
  const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
58
- const _a = inputCopy, { options: clientOptions, metadata } = _a, wallet = __objRest(_a, ["options", "metadata"]);
46
+ const _a = inputCopy, { options: clientOptions } = _a, wallet = __objRest(_a, ["options"]);
59
47
  return client.api.createWallet({
60
- wallet: __spreadValues(__spreadValues({}, wallet), metadata ? { metadata } : {}),
48
+ wallet,
61
49
  options: clientOptions
62
50
  });
63
51
  }
@@ -1,19 +1,6 @@
1
- var __defProp = Object.defineProperty;
2
1
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
2
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
3
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
10
- if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- }
15
- return a;
16
- };
17
4
  var __objRest = (source, exclude) => {
18
5
  var target = {};
19
6
  for (var prop in source)
@@ -34,9 +21,9 @@ var zodValidator = getValidator(createWalletFnInputSchema);
34
21
  function createWallet(options, input, fnOptions) {
35
22
  const { client } = options;
36
23
  const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
37
- const _a = inputCopy, { options: clientOptions, metadata } = _a, wallet = __objRest(_a, ["options", "metadata"]);
24
+ const _a = inputCopy, { options: clientOptions } = _a, wallet = __objRest(_a, ["options"]);
38
25
  return client.api.createWallet({
39
- wallet: __spreadValues(__spreadValues({}, wallet), metadata ? { metadata } : {}),
26
+ wallet,
40
27
  options: clientOptions
41
28
  });
42
29
  }
@@ -5,18 +5,6 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
8
  var __objRest = (source, exclude) => {
21
9
  var target = {};
22
10
  for (var prop in source)
@@ -55,9 +43,9 @@ var zodValidator = (0, import_validation.getValidator)(import_create_wallet_sche
55
43
  function createWallet(options, input, fnOptions) {
56
44
  const { client } = options;
57
45
  const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
58
- const _a = inputCopy, { options: clientOptions, metadata } = _a, wallet = __objRest(_a, ["options", "metadata"]);
46
+ const _a = inputCopy, { options: clientOptions } = _a, wallet = __objRest(_a, ["options"]);
59
47
  return client.api.createWallet({
60
- wallet: __spreadValues(__spreadValues({}, wallet), metadata ? { metadata } : {}),
48
+ wallet,
61
49
  options: clientOptions
62
50
  });
63
51
  }
@@ -1,19 +1,6 @@
1
- var __defProp = Object.defineProperty;
2
1
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
2
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
3
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
10
- if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- }
15
- return a;
16
- };
17
4
  var __objRest = (source, exclude) => {
18
5
  var target = {};
19
6
  for (var prop in source)
@@ -34,9 +21,9 @@ var zodValidator = getValidator(createWalletFnInputSchema);
34
21
  function createWallet(options, input, fnOptions) {
35
22
  const { client } = options;
36
23
  const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
37
- const _a = inputCopy, { options: clientOptions, metadata } = _a, wallet = __objRest(_a, ["options", "metadata"]);
24
+ const _a = inputCopy, { options: clientOptions } = _a, wallet = __objRest(_a, ["options"]);
38
25
  return client.api.createWallet({
39
- wallet: __spreadValues(__spreadValues({}, wallet), metadata ? { metadata } : {}),
26
+ wallet,
40
27
  options: clientOptions
41
28
  });
42
29
  }
@@ -34,7 +34,9 @@ var createWalletInputSchema = import_wallet_schema_zod.walletTableSchema.pick({
34
34
  foreign: true,
35
35
  name: true,
36
36
  metadata: true,
37
- status: true
37
+ status: true,
38
+ default_allow_negative: true,
39
+ default_allow_positive: true
38
40
  }).partial().required({
39
41
  foreign: true
40
42
  });
@@ -9,7 +9,9 @@ var createWalletInputSchema = walletTableSchema.pick({
9
9
  foreign: true,
10
10
  name: true,
11
11
  metadata: true,
12
- status: true
12
+ status: true,
13
+ default_allow_negative: true,
14
+ default_allow_positive: true
13
15
  }).partial().required({
14
16
  foreign: true
15
17
  });
@@ -34,7 +34,9 @@ var createWalletInputSchema = import_wallet_schema_zod.walletTableSchema.pick({
34
34
  foreign: true,
35
35
  name: true,
36
36
  metadata: true,
37
- status: true
37
+ status: true,
38
+ default_allow_negative: true,
39
+ default_allow_positive: true
38
40
  }).partial().required({
39
41
  foreign: true
40
42
  });
@@ -9,7 +9,9 @@ var createWalletInputSchema = walletTableSchema.pick({
9
9
  foreign: true,
10
10
  name: true,
11
11
  metadata: true,
12
- status: true
12
+ status: true,
13
+ default_allow_negative: true,
14
+ default_allow_positive: true
13
15
  }).partial().required({
14
16
  foreign: true
15
17
  });
@@ -2,7 +2,21 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
+ var __objRest = (source, exclude) => {
9
+ var target = {};
10
+ for (var prop in source)
11
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
12
+ target[prop] = source[prop];
13
+ if (source != null && __getOwnPropSymbols)
14
+ for (var prop of __getOwnPropSymbols(source)) {
15
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
16
+ target[prop] = source[prop];
17
+ }
18
+ return target;
19
+ };
6
20
  var __export = (target, all) => {
7
21
  for (var name in all)
8
22
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -29,13 +43,10 @@ var zodValidator = (0, import_validation.getValidator)(import_update_wallet_sche
29
43
  function updateWallet(options, input, fnOptions) {
30
44
  const { client } = options;
31
45
  const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
46
+ const _a = inputCopy, { options: inputOptions, wallet } = _a, update = __objRest(_a, ["options", "wallet"]);
32
47
  return client.api.updateWallet({
33
- wallet: inputCopy.wallet,
34
- update: {
35
- metadata: inputCopy.metadata,
36
- status: inputCopy.status,
37
- name: inputCopy.name
38
- },
39
- options: inputCopy.options
48
+ wallet,
49
+ update,
50
+ options: inputOptions
40
51
  });
41
52
  }
@@ -1,3 +1,19 @@
1
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
3
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
4
+ var __objRest = (source, exclude) => {
5
+ var target = {};
6
+ for (var prop in source)
7
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
8
+ target[prop] = source[prop];
9
+ if (source != null && __getOwnPropSymbols)
10
+ for (var prop of __getOwnPropSymbols(source)) {
11
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
12
+ target[prop] = source[prop];
13
+ }
14
+ return target;
15
+ };
16
+
1
17
  // src/fns/update-wallet/update-wallet.ts
2
18
  import { getValidator } from "../../lib/validation.browser.js";
3
19
  import { updateWalletFnInputSchema } from "./update-wallet.schema.zod.browser.js";
@@ -5,14 +21,11 @@ var zodValidator = getValidator(updateWalletFnInputSchema);
5
21
  function updateWallet(options, input, fnOptions) {
6
22
  const { client } = options;
7
23
  const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
24
+ const _a = inputCopy, { options: inputOptions, wallet } = _a, update = __objRest(_a, ["options", "wallet"]);
8
25
  return client.api.updateWallet({
9
- wallet: inputCopy.wallet,
10
- update: {
11
- metadata: inputCopy.metadata,
12
- status: inputCopy.status,
13
- name: inputCopy.name
14
- },
15
- options: inputCopy.options
26
+ wallet,
27
+ update,
28
+ options: inputOptions
16
29
  });
17
30
  }
18
31
  export {
@@ -2,7 +2,21 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
+ var __objRest = (source, exclude) => {
9
+ var target = {};
10
+ for (var prop in source)
11
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
12
+ target[prop] = source[prop];
13
+ if (source != null && __getOwnPropSymbols)
14
+ for (var prop of __getOwnPropSymbols(source)) {
15
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
16
+ target[prop] = source[prop];
17
+ }
18
+ return target;
19
+ };
6
20
  var __export = (target, all) => {
7
21
  for (var name in all)
8
22
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -29,14 +43,11 @@ var zodValidator = (0, import_validation.getValidator)(import_update_wallet_sche
29
43
  function updateWallet(options, input, fnOptions) {
30
44
  const { client } = options;
31
45
  const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
46
+ const _a = inputCopy, { options: inputOptions, wallet } = _a, update = __objRest(_a, ["options", "wallet"]);
32
47
  return client.api.updateWallet({
33
- wallet: inputCopy.wallet,
34
- update: {
35
- metadata: inputCopy.metadata,
36
- status: inputCopy.status,
37
- name: inputCopy.name
38
- },
39
- options: inputCopy.options
48
+ wallet,
49
+ update,
50
+ options: inputOptions
40
51
  });
41
52
  }
42
53
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,3 +1,19 @@
1
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
3
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
4
+ var __objRest = (source, exclude) => {
5
+ var target = {};
6
+ for (var prop in source)
7
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
8
+ target[prop] = source[prop];
9
+ if (source != null && __getOwnPropSymbols)
10
+ for (var prop of __getOwnPropSymbols(source)) {
11
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
12
+ target[prop] = source[prop];
13
+ }
14
+ return target;
15
+ };
16
+
1
17
  // src/fns/update-wallet/update-wallet.ts
2
18
  import { getValidator } from "../../lib/validation.js";
3
19
  import { updateWalletFnInputSchema } from "./update-wallet.schema.zod.js";
@@ -5,14 +21,11 @@ var zodValidator = getValidator(updateWalletFnInputSchema);
5
21
  function updateWallet(options, input, fnOptions) {
6
22
  const { client } = options;
7
23
  const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
24
+ const _a = inputCopy, { options: inputOptions, wallet } = _a, update = __objRest(_a, ["options", "wallet"]);
8
25
  return client.api.updateWallet({
9
- wallet: inputCopy.wallet,
10
- update: {
11
- metadata: inputCopy.metadata,
12
- status: inputCopy.status,
13
- name: inputCopy.name
14
- },
15
- options: inputCopy.options
26
+ wallet,
27
+ update,
28
+ options: inputOptions
16
29
  });
17
30
  }
18
31
  export {
@@ -36,7 +36,9 @@ var updateWalletInputSchema = import_zod.z.object({
36
36
  wallet: import_consts.allowedStringIntSchema.describe("Wallet foreign"),
37
37
  metadata: import_wallet_schema_zod.walletTableSchema.shape.metadata,
38
38
  name: import_wallet_schema_zod.walletTableSchema.shape.name,
39
- status: import_wallet_schema_zod.walletTableSchema.shape.status
39
+ status: import_wallet_schema_zod.walletTableSchema.shape.status,
40
+ default_allow_positive: import_wallet_schema_zod.walletTableSchema.shape.default_allow_positive,
41
+ default_allow_negative: import_wallet_schema_zod.walletTableSchema.shape.default_allow_negative
40
42
  }).partial().required({
41
43
  wallet: true
42
44
  });
@@ -11,7 +11,9 @@ var updateWalletInputSchema = z.object({
11
11
  wallet: allowedStringIntSchema.describe("Wallet foreign"),
12
12
  metadata: walletTableSchema.shape.metadata,
13
13
  name: walletTableSchema.shape.name,
14
- status: walletTableSchema.shape.status
14
+ status: walletTableSchema.shape.status,
15
+ default_allow_positive: walletTableSchema.shape.default_allow_positive,
16
+ default_allow_negative: walletTableSchema.shape.default_allow_negative
15
17
  }).partial().required({
16
18
  wallet: true
17
19
  });
@@ -36,7 +36,9 @@ var updateWalletInputSchema = import_zod.z.object({
36
36
  wallet: import_consts.allowedStringIntSchema.describe("Wallet foreign"),
37
37
  metadata: import_wallet_schema_zod.walletTableSchema.shape.metadata,
38
38
  name: import_wallet_schema_zod.walletTableSchema.shape.name,
39
- status: import_wallet_schema_zod.walletTableSchema.shape.status
39
+ status: import_wallet_schema_zod.walletTableSchema.shape.status,
40
+ default_allow_positive: import_wallet_schema_zod.walletTableSchema.shape.default_allow_positive,
41
+ default_allow_negative: import_wallet_schema_zod.walletTableSchema.shape.default_allow_negative
40
42
  }).partial().required({
41
43
  wallet: true
42
44
  });
@@ -11,7 +11,9 @@ var updateWalletInputSchema = z.object({
11
11
  wallet: allowedStringIntSchema.describe("Wallet foreign"),
12
12
  metadata: walletTableSchema.shape.metadata,
13
13
  name: walletTableSchema.shape.name,
14
- status: walletTableSchema.shape.status
14
+ status: walletTableSchema.shape.status,
15
+ default_allow_positive: walletTableSchema.shape.default_allow_positive,
16
+ default_allow_negative: walletTableSchema.shape.default_allow_negative
15
17
  }).partial().required({
16
18
  wallet: true
17
19
  });
@@ -24,7 +24,7 @@ __export(env_exports, {
24
24
  getEnvConfig: () => getEnvConfig
25
25
  });
26
26
  module.exports = __toCommonJS(env_exports);
27
- var CLIENT_VERSION = "0.15.8";
27
+ var CLIENT_VERSION = "0.16.0-beta.2";
28
28
  function getEnvConfig(key, defaultValue) {
29
29
  const val = getVariable(key);
30
30
  if (val === void 0) {
@@ -1,5 +1,5 @@
1
1
  // src/lib/env.ts
2
- var CLIENT_VERSION = "0.15.8";
2
+ var CLIENT_VERSION = "0.16.0-beta.2";
3
3
  function getEnvConfig(key, defaultValue) {
4
4
  const val = getVariable(key);
5
5
  if (val === void 0) {