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.
- package/dist/api/base-client.browser.cjs +62 -41
- package/dist/api/base-client.browser.js +62 -41
- package/dist/api/base-client.cjs +62 -41
- package/dist/api/base-client.js +62 -41
- package/dist/api/http-client.browser.cjs +13 -13
- package/dist/api/http-client.browser.js +14 -14
- package/dist/api/http-client.cjs +13 -13
- package/dist/api/http-client.js +14 -14
- package/dist/api/ws-client.browser.cjs +2 -2
- package/dist/api/ws-client.browser.js +2 -2
- package/dist/api/ws-client.cjs +2 -2
- package/dist/api/ws-client.js +2 -2
- package/dist/client-options.schema.zod.browser.cjs +12 -17
- package/dist/client-options.schema.zod.browser.js +12 -17
- package/dist/client-options.schema.zod.cjs +15 -21
- package/dist/client-options.schema.zod.js +12 -17
- package/dist/client.browser.cjs +19 -5
- package/dist/client.browser.js +19 -5
- package/dist/client.cjs +19 -5
- package/dist/client.js +19 -5
- package/dist/fns/create-transfer/create-transfer.browser.cjs +2 -2
- package/dist/fns/create-transfer/create-transfer.browser.js +2 -2
- package/dist/fns/create-transfer/create-transfer.cjs +2 -2
- package/dist/fns/create-transfer/create-transfer.js +2 -2
- package/dist/fns/create-transfer/create-transfer.schema.zod.browser.cjs +2 -1
- package/dist/fns/create-transfer/create-transfer.schema.zod.browser.js +2 -1
- package/dist/fns/create-transfer/create-transfer.schema.zod.cjs +2 -1
- package/dist/fns/create-transfer/create-transfer.schema.zod.js +2 -1
- package/dist/fns/create-wallet/create-wallet.browser.cjs +2 -14
- package/dist/fns/create-wallet/create-wallet.browser.js +2 -15
- package/dist/fns/create-wallet/create-wallet.cjs +2 -14
- package/dist/fns/create-wallet/create-wallet.js +2 -15
- package/dist/fns/create-wallet/create-wallet.schema.zod.browser.cjs +3 -1
- package/dist/fns/create-wallet/create-wallet.schema.zod.browser.js +3 -1
- package/dist/fns/create-wallet/create-wallet.schema.zod.cjs +3 -1
- package/dist/fns/create-wallet/create-wallet.schema.zod.js +3 -1
- package/dist/fns/update-wallet/update-wallet.browser.cjs +18 -7
- package/dist/fns/update-wallet/update-wallet.browser.js +20 -7
- package/dist/fns/update-wallet/update-wallet.cjs +18 -7
- package/dist/fns/update-wallet/update-wallet.js +20 -7
- package/dist/fns/update-wallet/update-wallet.schema.zod.browser.cjs +3 -1
- package/dist/fns/update-wallet/update-wallet.schema.zod.browser.js +3 -1
- package/dist/fns/update-wallet/update-wallet.schema.zod.cjs +3 -1
- package/dist/fns/update-wallet/update-wallet.schema.zod.js +3 -1
- package/dist/lib/env.browser.cjs +1 -1
- package/dist/lib/env.browser.js +1 -1
- package/dist/lib/env.cjs +1 -1
- package/dist/lib/env.js +1 -1
- package/dist/lib/errors.browser.cjs +5 -0
- package/dist/lib/errors.browser.js +5 -0
- package/dist/lib/errors.cjs +5 -0
- package/dist/lib/errors.js +5 -0
- package/dist/lib/utils.browser.cjs +10 -4
- package/dist/lib/utils.browser.js +10 -4
- package/dist/lib/utils.cjs +11 -4
- package/dist/lib/utils.js +10 -4
- package/dist/txs/create-wallet/create-wallet.schema.zod.browser.cjs +3 -1
- package/dist/txs/create-wallet/create-wallet.schema.zod.browser.js +3 -1
- package/dist/txs/create-wallet/create-wallet.schema.zod.cjs +3 -1
- package/dist/txs/create-wallet/create-wallet.schema.zod.js +3 -1
- package/dist/txs/update-wallet/update-wallet.schema.zod.browser.cjs +3 -1
- package/dist/txs/update-wallet/update-wallet.schema.zod.browser.js +3 -1
- package/dist/txs/update-wallet/update-wallet.schema.zod.cjs +3 -1
- package/dist/txs/update-wallet/update-wallet.schema.zod.js +3 -1
- package/dist/types/wapi-client.d.ts +122 -52
- package/dist/wapi-client-web.iife.js +7 -7
- package/dist/wapi-client.browser.cjs +4 -6
- package/dist/wapi-client.browser.js +5 -10
- package/dist/wapi-client.cjs +4 -6
- package/dist/wapi-client.iife.js +7 -7
- package/dist/wapi-client.js +5 -10
- package/package.json +2 -2
|
@@ -224,6 +224,7 @@ declare module "wapi-client/lib/errors" {
|
|
|
224
224
|
TRANSACTION_TIMEOUT: ErrorSpec;
|
|
225
225
|
CONNECTION_TIMEOUT: ErrorSpec;
|
|
226
226
|
SENDING_TIMEOUT: ErrorSpec;
|
|
227
|
+
REQUEST_TIMEOUT: ErrorSpec;
|
|
227
228
|
CONFIG_INVALID: ErrorSpec;
|
|
228
229
|
};
|
|
229
230
|
};
|
|
@@ -322,6 +323,7 @@ declare module "wapi-client/lib/errors" {
|
|
|
322
323
|
TRANSACTION_TIMEOUT: ErrorSpec;
|
|
323
324
|
CONNECTION_TIMEOUT: ErrorSpec;
|
|
324
325
|
SENDING_TIMEOUT: ErrorSpec;
|
|
326
|
+
REQUEST_TIMEOUT: ErrorSpec;
|
|
325
327
|
CONFIG_INVALID: ErrorSpec;
|
|
326
328
|
AUTHENTICATION_ERROR: ErrorSpec;
|
|
327
329
|
AUTHORIZATION_ERROR: ErrorSpec;
|
|
@@ -418,6 +420,7 @@ declare module "wapi-client/lib/errors" {
|
|
|
418
420
|
TRANSACTION_TIMEOUT: "TRANSACTION_TIMEOUT";
|
|
419
421
|
CONNECTION_TIMEOUT: "CONNECTION_TIMEOUT";
|
|
420
422
|
SENDING_TIMEOUT: "SENDING_TIMEOUT";
|
|
423
|
+
REQUEST_TIMEOUT: "REQUEST_TIMEOUT";
|
|
421
424
|
CONFIG_INVALID: "CONFIG_INVALID";
|
|
422
425
|
AUTHENTICATION_ERROR: "AUTHENTICATION_ERROR";
|
|
423
426
|
AUTHORIZATION_ERROR: "AUTHORIZATION_ERROR";
|
|
@@ -1566,6 +1569,11 @@ declare module "wapi-client/lib/utils" {
|
|
|
1566
1569
|
[key: string]: string | undefined;
|
|
1567
1570
|
}): string;
|
|
1568
1571
|
export function getConnectionUrl(config: EWapiConnectionOptions): string;
|
|
1572
|
+
export function getBasicAuth({ apikey, apisecret, database, }: {
|
|
1573
|
+
apikey: string;
|
|
1574
|
+
apisecret: string;
|
|
1575
|
+
database?: string;
|
|
1576
|
+
}): string;
|
|
1569
1577
|
export function getConnectionParams(config: EWapiConnectionOptions): [string, {
|
|
1570
1578
|
rejectUnauthorized: boolean;
|
|
1571
1579
|
}?];
|
|
@@ -1666,18 +1674,18 @@ declare module "wapi-client/lib/stream-promise" {
|
|
|
1666
1674
|
}
|
|
1667
1675
|
}
|
|
1668
1676
|
declare module "wapi-client/api/http-client" {
|
|
1669
|
-
import { ConnectionConfig,
|
|
1677
|
+
import { ConnectionConfig, WapiConnectionOptions } from "wapi-client/api/index";
|
|
1670
1678
|
import { JSONRPCRequest, JSONRPCResponse } from "wapi-client/api/jsonrpc/jsonrpc.enums";
|
|
1671
1679
|
import { BaseClient } from "wapi-client/api/base-client";
|
|
1672
1680
|
export interface HttpConnectionClient {
|
|
1673
|
-
send: (data: string
|
|
1681
|
+
send: (data: string) => void;
|
|
1674
1682
|
onmessage: (response: JSONRPCResponse) => void;
|
|
1675
1683
|
$connect: Promise<undefined>;
|
|
1676
1684
|
}
|
|
1677
|
-
export function createHttpClient(opts:
|
|
1685
|
+
export function createHttpClient(opts: WapiConnectionOptions, config?: ConnectionConfig): HttpClient;
|
|
1678
1686
|
export class HttpClient extends BaseClient {
|
|
1679
1687
|
protected _connection: HttpConnectionClient;
|
|
1680
|
-
constructor(connection: HttpConnectionClient, opts:
|
|
1688
|
+
constructor(connection: HttpConnectionClient, opts: WapiConnectionOptions);
|
|
1681
1689
|
protected _send(input: JSONRPCRequest | JSONRPCResponse): void;
|
|
1682
1690
|
private _ready;
|
|
1683
1691
|
close(): Promise<void>;
|
|
@@ -9152,6 +9160,7 @@ declare module "wapi-client/fns/create-transfer/create-transfer.schema.zod" {
|
|
|
9152
9160
|
transfer_group: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
9153
9161
|
created_at: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>;
|
|
9154
9162
|
type: z.ZodLiteral<"transfer">;
|
|
9163
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
9155
9164
|
}, z.core.$strip>;
|
|
9156
9165
|
export const createTransferRegularInputSchema: z.ZodObject<{
|
|
9157
9166
|
identifier: z.ZodOptional<z.ZodString>;
|
|
@@ -9167,6 +9176,7 @@ declare module "wapi-client/fns/create-transfer/create-transfer.schema.zod" {
|
|
|
9167
9176
|
}>>;
|
|
9168
9177
|
transfer_group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
9169
9178
|
created_at: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>>;
|
|
9179
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9170
9180
|
type: z.ZodOptional<z.ZodLiteral<"transfer">>;
|
|
9171
9181
|
}, z.core.$strip>;
|
|
9172
9182
|
export const createTransferWithdrawalInputSchema: z.ZodObject<{
|
|
@@ -9179,6 +9189,7 @@ declare module "wapi-client/fns/create-transfer/create-transfer.schema.zod" {
|
|
|
9179
9189
|
finished: "finished";
|
|
9180
9190
|
}>>;
|
|
9181
9191
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9192
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9182
9193
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9183
9194
|
transfer_group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
9184
9195
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
@@ -9194,6 +9205,7 @@ declare module "wapi-client/fns/create-transfer/create-transfer.schema.zod" {
|
|
|
9194
9205
|
finished: "finished";
|
|
9195
9206
|
}>>;
|
|
9196
9207
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9208
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9197
9209
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9198
9210
|
transfer_group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
9199
9211
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
@@ -9213,6 +9225,7 @@ declare module "wapi-client/fns/create-transfer/create-transfer.schema.zod" {
|
|
|
9213
9225
|
}>>;
|
|
9214
9226
|
transfer_group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
9215
9227
|
created_at: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>>;
|
|
9228
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9216
9229
|
type: z.ZodOptional<z.ZodLiteral<"transfer">>;
|
|
9217
9230
|
}, z.core.$strip>, z.ZodObject<{
|
|
9218
9231
|
identifier: z.ZodOptional<z.ZodString>;
|
|
@@ -9224,6 +9237,7 @@ declare module "wapi-client/fns/create-transfer/create-transfer.schema.zod" {
|
|
|
9224
9237
|
finished: "finished";
|
|
9225
9238
|
}>>;
|
|
9226
9239
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9240
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9227
9241
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9228
9242
|
transfer_group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
9229
9243
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
@@ -9238,6 +9252,7 @@ declare module "wapi-client/fns/create-transfer/create-transfer.schema.zod" {
|
|
|
9238
9252
|
finished: "finished";
|
|
9239
9253
|
}>>;
|
|
9240
9254
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9255
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9241
9256
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9242
9257
|
transfer_group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
9243
9258
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
@@ -9257,6 +9272,7 @@ declare module "wapi-client/fns/create-transfer/create-transfer.schema.zod" {
|
|
|
9257
9272
|
}>>;
|
|
9258
9273
|
transfer_group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
9259
9274
|
created_at: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>>;
|
|
9275
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9260
9276
|
type: z.ZodOptional<z.ZodLiteral<"transfer">>;
|
|
9261
9277
|
}, z.core.$strip>, z.ZodObject<{
|
|
9262
9278
|
identifier: z.ZodOptional<z.ZodString>;
|
|
@@ -9268,6 +9284,7 @@ declare module "wapi-client/fns/create-transfer/create-transfer.schema.zod" {
|
|
|
9268
9284
|
finished: "finished";
|
|
9269
9285
|
}>>;
|
|
9270
9286
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9287
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9271
9288
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9272
9289
|
transfer_group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
9273
9290
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
@@ -9282,6 +9299,7 @@ declare module "wapi-client/fns/create-transfer/create-transfer.schema.zod" {
|
|
|
9282
9299
|
finished: "finished";
|
|
9283
9300
|
}>>;
|
|
9284
9301
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9302
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9285
9303
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9286
9304
|
transfer_group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
9287
9305
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
@@ -9385,6 +9403,7 @@ declare module "wapi-client/fns/create-transfer-group/create-transfer-group.sche
|
|
|
9385
9403
|
finished: "finished";
|
|
9386
9404
|
}>>;
|
|
9387
9405
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9406
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9388
9407
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9389
9408
|
from_wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
9390
9409
|
to_wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
@@ -9400,6 +9419,7 @@ declare module "wapi-client/fns/create-transfer-group/create-transfer-group.sche
|
|
|
9400
9419
|
finished: "finished";
|
|
9401
9420
|
}>>;
|
|
9402
9421
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9422
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9403
9423
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
9404
9424
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9405
9425
|
}, z.core.$strip>;
|
|
@@ -9414,6 +9434,7 @@ declare module "wapi-client/fns/create-transfer-group/create-transfer-group.sche
|
|
|
9414
9434
|
finished: "finished";
|
|
9415
9435
|
}>>;
|
|
9416
9436
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9437
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9417
9438
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
9418
9439
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9419
9440
|
}, z.core.$strip>;
|
|
@@ -9428,6 +9449,7 @@ declare module "wapi-client/fns/create-transfer-group/create-transfer-group.sche
|
|
|
9428
9449
|
finished: "finished";
|
|
9429
9450
|
}>>;
|
|
9430
9451
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9452
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9431
9453
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
9432
9454
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9433
9455
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -9441,6 +9463,7 @@ declare module "wapi-client/fns/create-transfer-group/create-transfer-group.sche
|
|
|
9441
9463
|
finished: "finished";
|
|
9442
9464
|
}>>;
|
|
9443
9465
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9466
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9444
9467
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9445
9468
|
from_wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
9446
9469
|
to_wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
@@ -9455,6 +9478,7 @@ declare module "wapi-client/fns/create-transfer-group/create-transfer-group.sche
|
|
|
9455
9478
|
finished: "finished";
|
|
9456
9479
|
}>>;
|
|
9457
9480
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9481
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9458
9482
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
9459
9483
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9460
9484
|
}, z.core.$strip>]>;
|
|
@@ -9481,6 +9505,7 @@ declare module "wapi-client/fns/create-transfer-group/create-transfer-group.sche
|
|
|
9481
9505
|
finished: "finished";
|
|
9482
9506
|
}>>;
|
|
9483
9507
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9508
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9484
9509
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
9485
9510
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9486
9511
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -9494,6 +9519,7 @@ declare module "wapi-client/fns/create-transfer-group/create-transfer-group.sche
|
|
|
9494
9519
|
finished: "finished";
|
|
9495
9520
|
}>>;
|
|
9496
9521
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9522
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9497
9523
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9498
9524
|
from_wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
9499
9525
|
to_wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
@@ -9508,6 +9534,7 @@ declare module "wapi-client/fns/create-transfer-group/create-transfer-group.sche
|
|
|
9508
9534
|
finished: "finished";
|
|
9509
9535
|
}>>;
|
|
9510
9536
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9537
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9511
9538
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
9512
9539
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9513
9540
|
}, z.core.$strip>]>>>;
|
|
@@ -9535,6 +9562,7 @@ declare module "wapi-client/fns/create-transfer-group/create-transfer-group.sche
|
|
|
9535
9562
|
finished: "finished";
|
|
9536
9563
|
}>>;
|
|
9537
9564
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9565
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9538
9566
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
9539
9567
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9540
9568
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -9548,6 +9576,7 @@ declare module "wapi-client/fns/create-transfer-group/create-transfer-group.sche
|
|
|
9548
9576
|
finished: "finished";
|
|
9549
9577
|
}>>;
|
|
9550
9578
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9579
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9551
9580
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9552
9581
|
from_wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
9553
9582
|
to_wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
@@ -9562,6 +9591,7 @@ declare module "wapi-client/fns/create-transfer-group/create-transfer-group.sche
|
|
|
9562
9591
|
finished: "finished";
|
|
9563
9592
|
}>>;
|
|
9564
9593
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
9594
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
9565
9595
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
9566
9596
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9567
9597
|
}, z.core.$strip>]>>>;
|
|
@@ -10012,6 +10042,7 @@ declare module "wapi-client/fns/create-transfers/create-transfers.schema.zod" {
|
|
|
10012
10042
|
}>>;
|
|
10013
10043
|
transfer_group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
10014
10044
|
created_at: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>>;
|
|
10045
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
10015
10046
|
type: z.ZodOptional<z.ZodLiteral<"transfer">>;
|
|
10016
10047
|
}, z.core.$strip>, z.ZodObject<{
|
|
10017
10048
|
identifier: z.ZodOptional<z.ZodString>;
|
|
@@ -10023,6 +10054,7 @@ declare module "wapi-client/fns/create-transfers/create-transfers.schema.zod" {
|
|
|
10023
10054
|
finished: "finished";
|
|
10024
10055
|
}>>;
|
|
10025
10056
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
10057
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
10026
10058
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10027
10059
|
transfer_group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
10028
10060
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
@@ -10037,6 +10069,7 @@ declare module "wapi-client/fns/create-transfers/create-transfers.schema.zod" {
|
|
|
10037
10069
|
finished: "finished";
|
|
10038
10070
|
}>>;
|
|
10039
10071
|
amount: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
10072
|
+
force: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
10040
10073
|
latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10041
10074
|
transfer_group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
10042
10075
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
@@ -10136,6 +10169,8 @@ declare module "wapi-client/txs/create-wallet/create-wallet.schema.zod" {
|
|
|
10136
10169
|
active: "active";
|
|
10137
10170
|
disabled: "disabled";
|
|
10138
10171
|
}>>;
|
|
10172
|
+
default_allow_positive: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
10173
|
+
default_allow_negative: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
10139
10174
|
}, z.core.$strip>;
|
|
10140
10175
|
export const createWalletTxInputOptionsSchema: z.ZodObject<{
|
|
10141
10176
|
tracking_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -10155,6 +10190,8 @@ declare module "wapi-client/txs/create-wallet/create-wallet.schema.zod" {
|
|
|
10155
10190
|
active: "active";
|
|
10156
10191
|
disabled: "disabled";
|
|
10157
10192
|
}>>;
|
|
10193
|
+
default_allow_positive: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
10194
|
+
default_allow_negative: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
10158
10195
|
}, z.core.$strip>>>;
|
|
10159
10196
|
options: z.ZodOptional<z.ZodObject<{
|
|
10160
10197
|
tracking_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -10194,6 +10231,8 @@ declare module "wapi-client/fns/create-wallet/create-wallet.schema.zod" {
|
|
|
10194
10231
|
foreign: import("zod").ZodNonOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
10195
10232
|
metadata: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodType<import("wapi-client/db/consts").Metadata, unknown, import("zod/v4/core").$ZodTypeInternals<import("wapi-client/db/consts").Metadata, unknown>>>>;
|
|
10196
10233
|
name: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>>;
|
|
10234
|
+
default_allow_negative: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
10235
|
+
default_allow_positive: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
10197
10236
|
status: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
10198
10237
|
active: "active";
|
|
10199
10238
|
disabled: "disabled";
|
|
@@ -10203,6 +10242,8 @@ declare module "wapi-client/fns/create-wallet/create-wallet.schema.zod" {
|
|
|
10203
10242
|
foreign: import("zod").ZodNonOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
10204
10243
|
metadata: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodType<import("wapi-client/db/consts").Metadata, unknown, import("zod/v4/core").$ZodTypeInternals<import("wapi-client/db/consts").Metadata, unknown>>>>;
|
|
10205
10244
|
name: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>>;
|
|
10245
|
+
default_allow_negative: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
10246
|
+
default_allow_positive: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
10206
10247
|
status: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
10207
10248
|
active: "active";
|
|
10208
10249
|
disabled: "disabled";
|
|
@@ -23235,6 +23276,8 @@ declare module "wapi-client/txs/update-wallet/update-wallet.schema.zod" {
|
|
|
23235
23276
|
export const updateWalletModificationsSchema: z.ZodObject<{
|
|
23236
23277
|
metadata: z.ZodOptional<z.ZodType<import("wapi-client/db/consts").Metadata, unknown, z.core.$ZodTypeInternals<import("wapi-client/db/consts").Metadata, unknown>>>;
|
|
23237
23278
|
name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
23279
|
+
default_allow_negative: z.ZodDefault<z.ZodBoolean>;
|
|
23280
|
+
default_allow_positive: z.ZodDefault<z.ZodBoolean>;
|
|
23238
23281
|
status: z.ZodEnum<{
|
|
23239
23282
|
active: "active";
|
|
23240
23283
|
disabled: "disabled";
|
|
@@ -23243,6 +23286,8 @@ declare module "wapi-client/txs/update-wallet/update-wallet.schema.zod" {
|
|
|
23243
23286
|
export const updateWalletFieldsSchema: z.ZodEnum<{
|
|
23244
23287
|
metadata: "metadata";
|
|
23245
23288
|
name: "name";
|
|
23289
|
+
default_allow_negative: "default_allow_negative";
|
|
23290
|
+
default_allow_positive: "default_allow_positive";
|
|
23246
23291
|
status: "status";
|
|
23247
23292
|
}>;
|
|
23248
23293
|
export const updateWalletTxInputSchema: z.ZodObject<{
|
|
@@ -23268,6 +23313,8 @@ declare module "wapi-client/txs/update-wallet/update-wallet.schema.zod" {
|
|
|
23268
23313
|
update: z.ZodObject<{
|
|
23269
23314
|
metadata: z.ZodOptional<z.ZodOptional<z.ZodType<import("wapi-client/db/consts").Metadata, unknown, z.core.$ZodTypeInternals<import("wapi-client/db/consts").Metadata, unknown>>>>;
|
|
23270
23315
|
name: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
23316
|
+
default_allow_negative: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
23317
|
+
default_allow_positive: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
23271
23318
|
status: z.ZodOptional<z.ZodEnum<{
|
|
23272
23319
|
active: "active";
|
|
23273
23320
|
disabled: "disabled";
|
|
@@ -23319,6 +23366,8 @@ declare module "wapi-client/fns/update-wallet/update-wallet.schema.zod" {
|
|
|
23319
23366
|
active: "active";
|
|
23320
23367
|
disabled: "disabled";
|
|
23321
23368
|
}>>;
|
|
23369
|
+
default_allow_positive: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
23370
|
+
default_allow_negative: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
23322
23371
|
}, z.core.$strip>;
|
|
23323
23372
|
export const updateWalletFnInputSchema: z.ZodObject<{
|
|
23324
23373
|
wallet: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
@@ -23328,6 +23377,8 @@ declare module "wapi-client/fns/update-wallet/update-wallet.schema.zod" {
|
|
|
23328
23377
|
active: "active";
|
|
23329
23378
|
disabled: "disabled";
|
|
23330
23379
|
}>>;
|
|
23380
|
+
default_allow_positive: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
23381
|
+
default_allow_negative: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
23331
23382
|
options: z.ZodOptional<z.ZodObject<{
|
|
23332
23383
|
tracking_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
23333
23384
|
transaction_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -26075,9 +26126,11 @@ declare module "wapi-client/txs/update-wallet/update-wallet.enums" {
|
|
|
26075
26126
|
export type UpdateWalletTxOutput = z.infer<typeof updateWalletTxOutputSchema>;
|
|
26076
26127
|
}
|
|
26077
26128
|
declare module "wapi-client/api/base-client" {
|
|
26129
|
+
import { WAPIError } from "wapi-client/lib/errors";
|
|
26078
26130
|
import WebSocket from 'modern-isomorphic-ws';
|
|
26079
26131
|
import { StreamPromise } from "wapi-client/lib/stream-promise";
|
|
26080
|
-
import {
|
|
26132
|
+
import { ReadStream } from "wapi-client/lib/streams";
|
|
26133
|
+
import { IJSONRPCError, JSONRPCRequest, JSONRPCResponse } from "wapi-client/api/jsonrpc/jsonrpc.enums";
|
|
26081
26134
|
import { WapiClientType } from "wapi-client";
|
|
26082
26135
|
import { HttpConnectionClient } from "wapi-client/api/http-client";
|
|
26083
26136
|
import { ValuesOf } from "wapi-client/lib/ts-utils";
|
|
@@ -26144,6 +26197,19 @@ declare module "wapi-client/api/base-client" {
|
|
|
26144
26197
|
message?: (msg: JSONRPCResponse) => void;
|
|
26145
26198
|
}
|
|
26146
26199
|
export type ISocketId = string | undefined;
|
|
26200
|
+
type BaseRequest = {
|
|
26201
|
+
stream: ReadStream;
|
|
26202
|
+
start: number;
|
|
26203
|
+
message: JSONRPCRequest;
|
|
26204
|
+
sendingTimeout?: ReturnType<typeof setTimeout>;
|
|
26205
|
+
requestTimeout?: ReturnType<typeof setTimeout>;
|
|
26206
|
+
};
|
|
26207
|
+
type OutboundRequest = BaseRequest | (BaseRequest & {
|
|
26208
|
+
handle?: (result: JSONRPCResponse) => void;
|
|
26209
|
+
error: (err: IJSONRPCError) => void;
|
|
26210
|
+
pause: () => void;
|
|
26211
|
+
resume: () => void;
|
|
26212
|
+
});
|
|
26147
26213
|
export class BaseClient {
|
|
26148
26214
|
type: ValuesOf<typeof WapiClientType>;
|
|
26149
26215
|
protected _connection: WebSocket | HttpConnectionClient;
|
|
@@ -26160,6 +26226,7 @@ declare module "wapi-client/api/base-client" {
|
|
|
26160
26226
|
timeout?: ReturnType<typeof setTimeout>;
|
|
26161
26227
|
}>;
|
|
26162
26228
|
sendingTimeout: number | undefined;
|
|
26229
|
+
requestTimeout: number | undefined;
|
|
26163
26230
|
constructor(connection: WebSocket | HttpConnectionClient, connectionType: ValuesOf<typeof WapiClientType>, $connect?: Promise<ISocketId>);
|
|
26164
26231
|
protected _setConnected(value: boolean): void;
|
|
26165
26232
|
protected _setErrored(err: Error): void;
|
|
@@ -26168,8 +26235,11 @@ declare module "wapi-client/api/base-client" {
|
|
|
26168
26235
|
protected _reconnect(nrOfAttempts?: number | undefined): void;
|
|
26169
26236
|
close(): Promise<void>;
|
|
26170
26237
|
protected _connectionLost(): void;
|
|
26238
|
+
protected _completeRequest(request: OutboundRequest, error?: WAPIError): void;
|
|
26239
|
+
protected _fireConnectionLost(requestInfo: OutboundRequest): void;
|
|
26240
|
+
protected _fireSendingTimeout(requestInfo: OutboundRequest): void;
|
|
26241
|
+
protected _fireRequestTimeout(requestInfo: OutboundRequest): void;
|
|
26171
26242
|
protected _handleMessage(incoming: JSONRPCResponse | JSONRPCRequest): void;
|
|
26172
|
-
private _setSending;
|
|
26173
26243
|
_sendRaw<Input, Output>(method: string, params: Input): StreamPromise<Output>;
|
|
26174
26244
|
/**
|
|
26175
26245
|
*
|
|
@@ -26571,11 +26641,11 @@ declare module "wapi-client/api/ws-client" {
|
|
|
26571
26641
|
ws: WebSocket;
|
|
26572
26642
|
$connect: Promise<ISocketId>;
|
|
26573
26643
|
}
|
|
26574
|
-
export
|
|
26644
|
+
export type EWapiConnectionOptions = WapiConnectionOptions & {
|
|
26575
26645
|
rejectUnauthorized: boolean;
|
|
26576
26646
|
clientVersion: string;
|
|
26577
26647
|
connectionName?: string;
|
|
26578
|
-
}
|
|
26648
|
+
};
|
|
26579
26649
|
export class WsClient extends BaseClient {
|
|
26580
26650
|
private _pingTimeout;
|
|
26581
26651
|
private _opts;
|
|
@@ -26597,16 +26667,19 @@ declare module "wapi-client/api/index" {
|
|
|
26597
26667
|
import { BaseClient } from "wapi-client/api/base-client";
|
|
26598
26668
|
import { WsClient } from "wapi-client/api/ws-client";
|
|
26599
26669
|
import { HttpClient } from "wapi-client/api/http-client";
|
|
26600
|
-
export
|
|
26601
|
-
|
|
26602
|
-
database?: string;
|
|
26670
|
+
export type WapiConnectionOptions = WapiCredsConnectionOptions | WapiJWTConnectionOptions;
|
|
26671
|
+
export interface WapiCredsConnectionOptions {
|
|
26603
26672
|
apikey: string;
|
|
26604
26673
|
apisecret: string;
|
|
26674
|
+
host: string;
|
|
26675
|
+
database?: string;
|
|
26605
26676
|
rejectUnauthorized?: boolean;
|
|
26606
26677
|
}
|
|
26607
|
-
export interface
|
|
26608
|
-
host: string;
|
|
26678
|
+
export interface WapiJWTConnectionOptions {
|
|
26609
26679
|
jwt: string;
|
|
26680
|
+
host: string;
|
|
26681
|
+
database?: string;
|
|
26682
|
+
rejectUnauthorized?: boolean;
|
|
26610
26683
|
}
|
|
26611
26684
|
export interface ConnectionConfig {
|
|
26612
26685
|
connectingTimeout?: number;
|
|
@@ -31774,7 +31847,7 @@ declare module "wapi-client/fns/update-wallet/update-wallet" {
|
|
|
31774
31847
|
export function updateWallet(options: ClientFunctionOptions, input: UpdateWalletFnInput, fnOptions?: UpdateWalletFnOptions): StreamPromise<UpdateWalletFnOutput>;
|
|
31775
31848
|
}
|
|
31776
31849
|
declare module "client.js" {
|
|
31777
|
-
import { WapiConnectionOptions,
|
|
31850
|
+
import { WapiConnectionOptions, WsClient, HttpClient, ConnectionConfig } from "wapi-client/api/index";
|
|
31778
31851
|
import { ClientHooks, ISocketId } from "wapi-client/api/base-client";
|
|
31779
31852
|
import { StreamPromise } from "wapi-client/lib/stream-promise";
|
|
31780
31853
|
import { AggregateTransfersFnInput, AggregateTransfersFnOptions } from "wapi-client/fns/aggregate-transfers/aggregate-transfers.enums";
|
|
@@ -31824,6 +31897,7 @@ declare module "client.js" {
|
|
|
31824
31897
|
token?: number | string;
|
|
31825
31898
|
hooks?: ClientHooks;
|
|
31826
31899
|
sendingTimeout?: number;
|
|
31900
|
+
requestTimeout?: number;
|
|
31827
31901
|
}
|
|
31828
31902
|
export class Client {
|
|
31829
31903
|
/**
|
|
@@ -31881,7 +31955,10 @@ declare module "client.js" {
|
|
|
31881
31955
|
*
|
|
31882
31956
|
* wapiClient.configure({
|
|
31883
31957
|
* token: 'EURO',
|
|
31884
|
-
*
|
|
31958
|
+
* connectingTimeout: 45000,
|
|
31959
|
+
* reconnectingTimeout: 45000,
|
|
31960
|
+
* sendingTimeout: 10000,
|
|
31961
|
+
* requestTimeout: 120000,
|
|
31885
31962
|
* hooks: {
|
|
31886
31963
|
* disconnect: () => {}
|
|
31887
31964
|
* },
|
|
@@ -31900,7 +31977,8 @@ declare module "client.js" {
|
|
|
31900
31977
|
* ```
|
|
31901
31978
|
*/
|
|
31902
31979
|
getConfig(key: 'httpSkipInitialAuthConnection'): boolean | undefined;
|
|
31903
|
-
getConfig(key:
|
|
31980
|
+
getConfig(key: 'connectingTimeout' | 'reconnectingTimeout' | 'sendingTimeout' | 'requestTimeout'): number | undefined;
|
|
31981
|
+
getConfig(key: 'token'): number | string | undefined;
|
|
31904
31982
|
/**
|
|
31905
31983
|
*
|
|
31906
31984
|
* Aggregate Transfers using either a simple filter or queryBuilder
|
|
@@ -36610,7 +36688,7 @@ declare module "client.js" {
|
|
|
36610
36688
|
updateWallet(input: UpdateWalletFnInput, options?: UpdateWalletFnOptions): StreamPromise<UpdateWalletFnOutput>;
|
|
36611
36689
|
}
|
|
36612
36690
|
export function createClientWithWS(opts: WapiConnectionOptions, config?: ClientConfig): Client;
|
|
36613
|
-
export function createClientWithHttp(opts:
|
|
36691
|
+
export function createClientWithHttp(opts: WapiConnectionOptions, config?: ClientConfig): Client;
|
|
36614
36692
|
}
|
|
36615
36693
|
declare module "client-options.schema.zod.js" {
|
|
36616
36694
|
import { z } from "wapi-client/lib/zod";
|
|
@@ -36618,44 +36696,37 @@ declare module "client-options.schema.zod.js" {
|
|
|
36618
36696
|
ws: "ws";
|
|
36619
36697
|
https: "https";
|
|
36620
36698
|
}>;
|
|
36621
|
-
export const
|
|
36699
|
+
export const credsConnectionSchema: z.ZodObject<{
|
|
36622
36700
|
host: z.ZodString;
|
|
36623
36701
|
apikey: z.ZodString;
|
|
36624
36702
|
apisecret: z.ZodString;
|
|
36625
36703
|
}, z.core.$loose>;
|
|
36626
|
-
export const
|
|
36627
|
-
client: z.ZodLiteral<"ws">;
|
|
36628
|
-
connection: z.ZodObject<{
|
|
36629
|
-
host: z.ZodString;
|
|
36630
|
-
apikey: z.ZodString;
|
|
36631
|
-
apisecret: z.ZodString;
|
|
36632
|
-
}, z.core.$loose>;
|
|
36633
|
-
}, z.core.$strip>;
|
|
36634
|
-
export const httpsConnectionSchema: z.ZodObject<{
|
|
36704
|
+
export const jwtConnectionSchema: z.ZodObject<{
|
|
36635
36705
|
host: z.ZodString;
|
|
36636
36706
|
jwt: z.ZodString;
|
|
36637
36707
|
}, z.core.$loose>;
|
|
36638
|
-
export const
|
|
36639
|
-
|
|
36640
|
-
|
|
36708
|
+
export const connectionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
36709
|
+
host: z.ZodString;
|
|
36710
|
+
jwt: z.ZodString;
|
|
36711
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
36712
|
+
host: z.ZodString;
|
|
36713
|
+
apikey: z.ZodString;
|
|
36714
|
+
apisecret: z.ZodString;
|
|
36715
|
+
}, z.core.$loose>]>;
|
|
36716
|
+
export const clientOptionsSchema: z.ZodObject<{
|
|
36717
|
+
client: z.ZodEnum<{
|
|
36718
|
+
ws: "ws";
|
|
36719
|
+
https: "https";
|
|
36720
|
+
}>;
|
|
36721
|
+
connection: z.ZodUnion<readonly [z.ZodObject<{
|
|
36641
36722
|
host: z.ZodString;
|
|
36642
36723
|
jwt: z.ZodString;
|
|
36643
|
-
}, z.core.$loose
|
|
36644
|
-
}, z.core.$strip>;
|
|
36645
|
-
export const clientOptionsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
36646
|
-
client: z.ZodLiteral<"ws">;
|
|
36647
|
-
connection: z.ZodObject<{
|
|
36724
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
36648
36725
|
host: z.ZodString;
|
|
36649
36726
|
apikey: z.ZodString;
|
|
36650
36727
|
apisecret: z.ZodString;
|
|
36651
|
-
}, z.core.$loose>;
|
|
36652
|
-
}, z.core.$strip
|
|
36653
|
-
client: z.ZodLiteral<"https">;
|
|
36654
|
-
connection: z.ZodObject<{
|
|
36655
|
-
host: z.ZodString;
|
|
36656
|
-
jwt: z.ZodString;
|
|
36657
|
-
}, z.core.$loose>;
|
|
36658
|
-
}, z.core.$strip>], "client">;
|
|
36728
|
+
}, z.core.$loose>]>;
|
|
36729
|
+
}, z.core.$strip>;
|
|
36659
36730
|
}
|
|
36660
36731
|
declare module "wapi-client/lib/polyfill" {
|
|
36661
36732
|
export function initPolyfills(): void;
|
|
@@ -36886,7 +36957,7 @@ declare module "wapi-client/fns/fn-types" {
|
|
|
36886
36957
|
export * from "wapi-client/fns/update-wallet/update-wallet.enums";
|
|
36887
36958
|
}
|
|
36888
36959
|
declare module "wapi-client" {
|
|
36889
|
-
import { WapiConnectionOptions
|
|
36960
|
+
import { WapiConnectionOptions } from "wapi-client/api/index";
|
|
36890
36961
|
import { Client, ClientConfig } from "client.js";
|
|
36891
36962
|
import { ERROR_MESSAGES as ErrorMessage, ERROR_TYPES as ErrorType, ERROR_DESCRIPTIONS as ErrorDescription, ERRORS as Errors } from "wapi-client/lib/errors";
|
|
36892
36963
|
import { getIdentifier } from "wapi-client/lib/utils";
|
|
@@ -36895,17 +36966,11 @@ declare module "wapi-client" {
|
|
|
36895
36966
|
readonly ws: "ws";
|
|
36896
36967
|
readonly https: "https";
|
|
36897
36968
|
};
|
|
36898
|
-
export interface
|
|
36899
|
-
client?: 'ws';
|
|
36969
|
+
export interface WapiClientOptions {
|
|
36970
|
+
client?: 'ws' | 'https';
|
|
36900
36971
|
connection: WapiConnectionOptions;
|
|
36901
36972
|
config?: ClientConfig;
|
|
36902
36973
|
}
|
|
36903
|
-
export interface WapiClientHttpOptions {
|
|
36904
|
-
client: 'https';
|
|
36905
|
-
connection: WapiHttpConnectionOptions;
|
|
36906
|
-
config?: ClientConfig;
|
|
36907
|
-
}
|
|
36908
|
-
export type WapiClientOptions = WapiClientWsOptions | WapiClientHttpOptions;
|
|
36909
36974
|
/**
|
|
36910
36975
|
*
|
|
36911
36976
|
* Create a WAPI Client
|
|
@@ -36962,6 +37027,9 @@ declare module "wapi-client" {
|
|
|
36962
37027
|
* // NB! erroring on this timeout does not mean the command is not executed
|
|
36963
37028
|
* // as the command might have gotten through, but return ACK did not
|
|
36964
37029
|
* sendingTimeout: 60000;
|
|
37030
|
+
* // how long to wait for a request to finish
|
|
37031
|
+
* // NB! erroring on this timeout does not mean the command is not executed
|
|
37032
|
+
* requestTimeout: 120000;
|
|
36965
37033
|
* }
|
|
36966
37034
|
* });
|
|
36967
37035
|
* // this direct wait for connect is not required
|
|
@@ -37077,6 +37145,7 @@ declare module "wapi-client" {
|
|
|
37077
37145
|
TRANSACTION_TIMEOUT: "TRANSACTION_TIMEOUT";
|
|
37078
37146
|
CONNECTION_TIMEOUT: "CONNECTION_TIMEOUT";
|
|
37079
37147
|
SENDING_TIMEOUT: "SENDING_TIMEOUT";
|
|
37148
|
+
REQUEST_TIMEOUT: "REQUEST_TIMEOUT";
|
|
37080
37149
|
CONFIG_INVALID: "CONFIG_INVALID";
|
|
37081
37150
|
AUTHENTICATION_ERROR: "AUTHENTICATION_ERROR";
|
|
37082
37151
|
AUTHORIZATION_ERROR: "AUTHORIZATION_ERROR";
|
|
@@ -37180,6 +37249,7 @@ declare module "wapi-client" {
|
|
|
37180
37249
|
TRANSACTION_TIMEOUT: import("wapi-client/lib/errors").ErrorSpec;
|
|
37181
37250
|
CONNECTION_TIMEOUT: import("wapi-client/lib/errors").ErrorSpec;
|
|
37182
37251
|
SENDING_TIMEOUT: import("wapi-client/lib/errors").ErrorSpec;
|
|
37252
|
+
REQUEST_TIMEOUT: import("wapi-client/lib/errors").ErrorSpec;
|
|
37183
37253
|
CONFIG_INVALID: import("wapi-client/lib/errors").ErrorSpec;
|
|
37184
37254
|
AUTHENTICATION_ERROR: import("wapi-client/lib/errors").ErrorSpec;
|
|
37185
37255
|
AUTHORIZATION_ERROR: import("wapi-client/lib/errors").ErrorSpec;
|