@cubist-labs/cubesigner-sdk 0.4.272 → 0.4.274

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/src/schema.ts CHANGED
@@ -3937,6 +3937,41 @@ export interface components {
3937
3937
  /** @description Total wallet balance for `coin`, as a decimal string. */
3938
3938
  walletBalance: string;
3939
3939
  };
3940
+ /** @description One entry in [`BybitCoinInfoEntry::chains`]. */
3941
+ BybitCoinInfoChain: {
3942
+ /** @description Short chain code (e.g. `ETH`, `TRX`). */
3943
+ chain: string;
3944
+ /** @description Whether deposits are enabled on this chain: `"0"` off, `"1"` on. */
3945
+ chainDeposit?: string | null;
3946
+ /** @description Human-readable chain name (e.g. `ERC20`). */
3947
+ chainType?: string | null;
3948
+ /** @description Whether withdrawals are enabled on this chain: `"0"` off, `"1"` on. */
3949
+ chainWithdraw?: string | null;
3950
+ /** @description Number of confirmations required for a deposit to be credited. */
3951
+ confirmation?: string | null;
3952
+ /** @description Minimum deposit amount, as a decimal string. */
3953
+ depositMin?: string | null;
3954
+ /** @description Withdrawal fee on this chain, as a decimal string. If empty string, this coin does not support withdrawal. */
3955
+ withdrawFee?: string | null;
3956
+ /** @description Minimum withdrawal amount, as a decimal string. */
3957
+ withdrawMin?: string | null;
3958
+ [key: string]: unknown;
3959
+ };
3960
+ /** @description One entry in [`BybitCoinInfoResponse::rows`]. */
3961
+ BybitCoinInfoEntry: {
3962
+ /** @description Per-chain configuration for this coin. */
3963
+ chains?: components["schemas"]["BybitCoinInfoChain"][];
3964
+ /** @description Coin symbol, uppercase (e.g. `USDT`). */
3965
+ coin: string;
3966
+ /** @description Full coin name (e.g. `Tether`). */
3967
+ name?: string | null;
3968
+ [key: string]: unknown;
3969
+ };
3970
+ /** @description Response of `GET /v5/asset/coin/query-info`. */
3971
+ BybitCoinInfoResponse: {
3972
+ /** @description Per-coin info entries. */
3973
+ rows: components["schemas"]["BybitCoinInfoEntry"][];
3974
+ };
3940
3975
  /** @description One entry in [`BybitQueryDepositAddressResponse::chains`]. */
3941
3976
  BybitDepositChain: {
3942
3977
  /** @description Deposit address on this chain. */
@@ -3958,6 +3993,93 @@ export interface components {
3958
3993
  */
3959
3994
  tagDeposit?: string | null;
3960
3995
  };
3996
+ /** @description One entry in [`BybitDepositHistoryResponse::rows`]. */
3997
+ BybitDepositEntry: {
3998
+ /** @description Deposit amount as a decimal string. */
3999
+ amount: string;
4000
+ /** @description Short chain code (e.g. `ETH`, `TRX`). */
4001
+ chain: string;
4002
+ /** @description Coin symbol, uppercase (e.g. `USDT`). */
4003
+ coin: string;
4004
+ /** @description Number of confirmations received so far. */
4005
+ confirmations?: string | null;
4006
+ /** @description Deposit fee charged, as a decimal string. */
4007
+ depositFee?: string | null;
4008
+ /**
4009
+ * Format: int32
4010
+ * @description Deposit state (e.g. `3` = deposit success). See the Bybit docs.
4011
+ */
4012
+ status?: number | null;
4013
+ /** @description Timestamp the deposit succeeded, in milliseconds since epoch (as a string). */
4014
+ successAt?: string | null;
4015
+ /** @description Memo / tag for chains that use one (e.g. XRP, EOS). */
4016
+ tag?: string | null;
4017
+ /** @description Destination deposit address. */
4018
+ toAddress?: string | null;
4019
+ /** @description On-chain transaction hash. */
4020
+ txID?: string | null;
4021
+ [key: string]: unknown;
4022
+ };
4023
+ /**
4024
+ * @description Parameters envelope for all Bybit RPC variants whose payload schema is
4025
+ * derived from a `*Request` struct. (`BybitQueryUserParams` and
4026
+ * `BybitQuerySubMembersParams` have no per-variant payload and are defined
4027
+ * directly below.)
4028
+ */
4029
+ BybitDepositHistoryParams: components["schemas"]["BybitDepositHistoryRequest"] & {
4030
+ dryRun?: components["schemas"]["BybitDryRunMode"] | null;
4031
+ keyId: components["schemas"]["Id"];
4032
+ /**
4033
+ * Format: int32
4034
+ * @description Optional "receive window", i.e., for how long the request stays valid.
4035
+ * Specified in milliseconds. If omitted, defaults to 10000.
4036
+ */
4037
+ recvWindow?: number | null;
4038
+ };
4039
+ /**
4040
+ * @description Parameters for `GET /v5/asset/deposit/query-record`.
4041
+ *
4042
+ * By default, queries records from the last 30 days; otherwise, `endTime` - `startTime` must be less than 30 days.
4043
+ */
4044
+ BybitDepositHistoryRequest: {
4045
+ /** @description Filter by coin symbol (uppercase). */
4046
+ coin?: string | null;
4047
+ /** @description Pagination cursor (the `nextPageCursor` from a prior response). */
4048
+ cursor?: string | null;
4049
+ /**
4050
+ * Format: int64
4051
+ * @description End timestamp (ms since epoch).
4052
+ */
4053
+ endTime?: number | null;
4054
+ /** @description Filter by Bybit-internal deposit id. */
4055
+ id?: string | null;
4056
+ /**
4057
+ * Format: int32
4058
+ * @description Page size, `[1, 50]`. Defaults to 50.
4059
+ */
4060
+ limit?: number | null;
4061
+ /**
4062
+ * Format: int64
4063
+ * @description Start timestamp (ms since epoch). The span between `start_time` and
4064
+ * `end_time` must not exceed 30 days.
4065
+ */
4066
+ startTime?: number | null;
4067
+ /**
4068
+ * @description Filter by on-chain transaction id. Data before 2024-01-01 is not
4069
+ * queryable via this field.
4070
+ */
4071
+ txID?: string | null;
4072
+ };
4073
+ /** @description Response of `GET /v5/asset/deposit/query-record`. */
4074
+ BybitDepositHistoryResponse: {
4075
+ /**
4076
+ * @description Opaque cursor to pass back as `cursor` on the next request; absent on
4077
+ * the last page.
4078
+ */
4079
+ nextPageCursor?: string | null;
4080
+ /** @description Deposit records matching the query. */
4081
+ rows: components["schemas"]["BybitDepositEntry"][];
4082
+ };
3961
4083
  BybitDryRunArgs: {
3962
4084
  /** @description The Bybit API method that would have been used */
3963
4085
  method: string;
@@ -3971,6 +4093,30 @@ export interface components {
3971
4093
  * @enum {string}
3972
4094
  */
3973
4095
  BybitDryRunMode: "NO_SIGN" | "NO_SUBMIT";
4096
+ /**
4097
+ * @description Parameters envelope for all Bybit RPC variants whose payload schema is
4098
+ * derived from a `*Request` struct. (`BybitQueryUserParams` and
4099
+ * `BybitQuerySubMembersParams` have no per-variant payload and are defined
4100
+ * directly below.)
4101
+ */
4102
+ BybitQueryCoinInfoParams: components["schemas"]["BybitQueryCoinInfoRequest"] & {
4103
+ dryRun?: components["schemas"]["BybitDryRunMode"] | null;
4104
+ keyId: components["schemas"]["Id"];
4105
+ /**
4106
+ * Format: int32
4107
+ * @description Optional "receive window", i.e., for how long the request stays valid.
4108
+ * Specified in milliseconds. If omitted, defaults to 10000.
4109
+ */
4110
+ recvWindow?: number | null;
4111
+ };
4112
+ /** @description Parameters for `GET /v5/asset/coin/query-info`. */
4113
+ BybitQueryCoinInfoRequest: {
4114
+ /**
4115
+ * @description Filter by coin symbol (uppercase, e.g. `"BTC"`). Bybit returns info for
4116
+ * all coins when omitted.
4117
+ */
4118
+ coin?: string | null;
4119
+ };
3974
4120
  /**
3975
4121
  * @description Parameters envelope for all Bybit RPC variants whose payload schema is
3976
4122
  * derived from a `*Request` struct. (`BybitQueryUserParams` and
@@ -4150,6 +4296,21 @@ export interface components {
4150
4296
  /** @enum {string} */
4151
4297
  method: "cs_bybitWithdrawals";
4152
4298
  params: components["schemas"]["BybitWithdrawalsParams"];
4299
+ }
4300
+ | {
4301
+ /** @enum {string} */
4302
+ method: "cs_bybitQueryCoinInfo";
4303
+ params: components["schemas"]["BybitQueryCoinInfoParams"];
4304
+ }
4305
+ | {
4306
+ /** @enum {string} */
4307
+ method: "cs_bybitDepositHistory";
4308
+ params: components["schemas"]["BybitDepositHistoryParams"];
4309
+ }
4310
+ | {
4311
+ /** @enum {string} */
4312
+ method: "cs_bybitUniversalTransferHistory";
4313
+ params: components["schemas"]["BybitUniversalTransferHistoryParams"];
4153
4314
  };
4154
4315
  /** @description Response returned by the typed `bybit_sign` endpoint. */
4155
4316
  BybitSignResponse: {
@@ -4205,6 +4366,94 @@ export interface components {
4205
4366
  username?: string | null;
4206
4367
  [key: string]: unknown;
4207
4368
  };
4369
+ /** @description One entry in [`BybitUniversalTransferHistoryResponse::list`]. */
4370
+ BybitTransferEntry: {
4371
+ /** @description Transfer amount as a decimal string. */
4372
+ amount: string;
4373
+ /** @description Coin symbol, uppercase (e.g. `USDT`). */
4374
+ coin: string;
4375
+ /** @description Source wallet type (e.g. `FUND`, `UNIFIED`). */
4376
+ fromAccountType?: string | null;
4377
+ /** @description Source account UID. */
4378
+ fromMemberId?: string | null;
4379
+ /** @description Transfer state: `SUCCESS`, `PENDING`, or `FAILED`. */
4380
+ status?: string | null;
4381
+ /** @description Creation timestamp, in milliseconds since epoch (as a string). */
4382
+ timestamp?: string | null;
4383
+ /** @description Destination wallet type. */
4384
+ toAccountType?: string | null;
4385
+ /** @description Destination account UID. */
4386
+ toMemberId?: string | null;
4387
+ /** @description UUID of the transfer (the caller-supplied `transferId`). */
4388
+ transferId: string;
4389
+ [key: string]: unknown;
4390
+ };
4391
+ /**
4392
+ * @description Parameters envelope for all Bybit RPC variants whose payload schema is
4393
+ * derived from a `*Request` struct. (`BybitQueryUserParams` and
4394
+ * `BybitQuerySubMembersParams` have no per-variant payload and are defined
4395
+ * directly below.)
4396
+ */
4397
+ BybitUniversalTransferHistoryParams: components["schemas"]["BybitUniversalTransferHistoryRequest"] & {
4398
+ dryRun?: components["schemas"]["BybitDryRunMode"] | null;
4399
+ keyId: components["schemas"]["Id"];
4400
+ /**
4401
+ * Format: int32
4402
+ * @description Optional "receive window", i.e., for how long the request stays valid.
4403
+ * Specified in milliseconds. If omitted, defaults to 10000.
4404
+ */
4405
+ recvWindow?: number | null;
4406
+ };
4407
+ /**
4408
+ * @description Parameters for `GET /v5/asset/transfer/query-universal-transfer-list`.
4409
+ *
4410
+ * If `startTime` and `endTime` are not provided, the API returns data from the past 7 days by default.
4411
+ * If only `startTime` is provided, the API returns records from `startTime` to `startTime` + 7 days.
4412
+ * If only `endTime` is provided, the API returns records from `endTime` - 7 days to `endTime`.
4413
+ * If both are provided, the maximum allowed range is 7 days (`endTime` - `startTime` ≤ 7 days).
4414
+ */
4415
+ BybitUniversalTransferHistoryRequest: {
4416
+ /** @description Filter by coin symbol (uppercase). */
4417
+ coin?: string | null;
4418
+ /** @description Pagination cursor (the `nextPageCursor` from a prior response). */
4419
+ cursor?: string | null;
4420
+ /**
4421
+ * Format: int64
4422
+ * @description End timestamp (ms since epoch).
4423
+ */
4424
+ endTime?: number | null;
4425
+ /**
4426
+ * Format: int32
4427
+ * @description Page size, `[1, 50]`. Defaults to 20.
4428
+ */
4429
+ limit?: number | null;
4430
+ /**
4431
+ * Format: int64
4432
+ * @description Start timestamp (ms since epoch). The span between `start_time` and
4433
+ * `end_time` must not exceed 7 days.
4434
+ */
4435
+ startTime?: number | null;
4436
+ /** @description Filter by transfer status: `"SUCCESS"`, `"FAILED"`, or `"PENDING"`. */
4437
+ status?: string | null;
4438
+ /**
4439
+ * @description Filter by the transfer's UUID (as supplied to
4440
+ * [`BybitRpc::UniversalTransfer`]).
4441
+ */
4442
+ transferId?: string | null;
4443
+ };
4444
+ /** @description Response of `GET /v5/asset/transfer/query-universal-transfer-list`. */
4445
+ BybitUniversalTransferHistoryResponse: {
4446
+ /**
4447
+ * @description Universal-transfer records matching the query. (Bybit names this field
4448
+ * `list`, unlike the `rows` used by other history endpoints.)
4449
+ */
4450
+ list: components["schemas"]["BybitTransferEntry"][];
4451
+ /**
4452
+ * @description Opaque cursor to pass back as `cursor` on the next request; absent on
4453
+ * the last page.
4454
+ */
4455
+ nextPageCursor?: string | null;
4456
+ };
4208
4457
  /**
4209
4458
  * @description Parameters envelope for all Bybit RPC variants whose payload schema is
4210
4459
  * derived from a `*Request` struct. (`BybitQueryUserParams` and
@@ -6250,6 +6499,9 @@ export interface components {
6250
6499
  | "sign:bybit:universalTransfer"
6251
6500
  | "sign:bybit:withdraw"
6252
6501
  | "sign:bybit:withdrawals"
6502
+ | "sign:bybit:queryCoinInfo"
6503
+ | "sign:bybit:depositHistory"
6504
+ | "sign:bybit:universalTransferHistory"
6253
6505
  | "sign:coinbase:*"
6254
6506
  | "sign:coinbase:accounts:list"
6255
6507
  | "sign:coinbase:portfolios:list"
@@ -6292,6 +6544,7 @@ export interface components {
6292
6544
  | "sign:sui"
6293
6545
  | "sign:tendermint"
6294
6546
  | "sign:mmi"
6547
+ | "sign:auto"
6295
6548
  | "manage:*"
6296
6549
  | "manage:readonly"
6297
6550
  | "manage:email:*"
@@ -6909,6 +7162,7 @@ export interface components {
6909
7162
  | "TsQueryError"
6910
7163
  | "DbQueryError"
6911
7164
  | "DbGetError"
7165
+ | "DbBatchGetError"
6912
7166
  | "DbDeleteError"
6913
7167
  | "DbPutError"
6914
7168
  | "DbUpdateError"
@@ -7201,6 +7455,9 @@ export interface components {
7201
7455
  | components["schemas"]["BybitUniversalTransferResponse"]
7202
7456
  | components["schemas"]["BybitWithdrawResponse"]
7203
7457
  | components["schemas"]["BybitWithdrawalsResponse"]
7458
+ | components["schemas"]["BybitCoinInfoResponse"]
7459
+ | components["schemas"]["BybitDepositHistoryResponse"]
7460
+ | components["schemas"]["BybitUniversalTransferHistoryResponse"]
7204
7461
  | components["schemas"]["CoinbaseListAccountsResponse"]
7205
7462
  | components["schemas"]["CoinbaseListPortfoliosResponse"]
7206
7463
  | components["schemas"]["CoinbaseMoveFundsResponse"]
@@ -7932,6 +8189,9 @@ export interface components {
7932
8189
  | "BybitUniversalTransfer"
7933
8190
  | "BybitWithdraw"
7934
8191
  | "BybitWithdrawals"
8192
+ | "BybitQueryCoinInfo"
8193
+ | "BybitDepositHistory"
8194
+ | "BybitUniversalTransferHistory"
7935
8195
  | "CoinbaseListAccounts"
7936
8196
  | "CoinbaseListPortfolios"
7937
8197
  | "CoinbaseMoveFunds"
@@ -8392,8 +8652,7 @@ export interface components {
8392
8652
  * is meaningless for organizations that use org-wide export.)
8393
8653
  */
8394
8654
  user_export_window: number;
8395
- /** @description If set, the official webapp origin is automatically allowed */
8396
- webapp_enabled?: boolean;
8655
+ webapp_enabled?: components["schemas"]["WebappEnabled"];
8397
8656
  };
8398
8657
  /** @description Supported org metrics. */
8399
8658
  OrgMetric: OneOf<
@@ -11677,6 +11936,8 @@ export interface components {
11677
11936
  /** @description The Id of the policy this wasm rule belongs to. */
11678
11937
  policy_id: string;
11679
11938
  };
11939
+ /** @description Whether the official webapp origin is automatically allowed. `"limited"` is treated the same as `true` by the back end, but reported as-is to clients */
11940
+ WebappEnabled: boolean | "limited";
11680
11941
  /**
11681
11942
  * @description Allowed webhook methods
11682
11943
  * @enum {string}
@@ -12802,8 +13063,7 @@ export interface components {
12802
13063
  * is meaningless for organizations that use org-wide export.)
12803
13064
  */
12804
13065
  user_export_window: number;
12805
- /** @description If set, the official webapp origin is automatically allowed */
12806
- webapp_enabled?: boolean;
13066
+ webapp_enabled?: components["schemas"]["WebappEnabled"];
12807
13067
  };
12808
13068
  };
12809
13069
  };
@@ -67,9 +67,12 @@ const AllOperationKinds: Record<OperationKind, true> = {
67
67
  BtcSign: true,
68
68
  BybitQueryUser: true,
69
69
  BybitQuerySubMembers: true,
70
+ BybitQueryCoinInfo: true,
70
71
  BybitQueryCoinsBalance: true,
71
72
  BybitQueryDepositAddress: true,
73
+ BybitDepositHistory: true,
72
74
  BybitUniversalTransfer: true,
75
+ BybitUniversalTransferHistory: true,
73
76
  BybitWithdraw: true,
74
77
  BybitWithdrawals: true,
75
78
  CoinbaseListAccounts: true,
package/src/scopes.ts CHANGED
@@ -59,8 +59,11 @@ export const AllScopes: Record<ExplicitScope, string> =
59
59
  "sign:bybit:queryUser" : "Allows access to the typed sign 'bybit' endpoint, but only for the 'QueryUser' operation.",
60
60
  "sign:bybit:querySubMembers" : "Allows access to the typed sign 'bybit' endpoint, but only for the 'QuerySubMembers' operation.",
61
61
  "sign:bybit:queryCoinsBalance" : "Allows access to the typed sign 'bybit' endpoint, but only for the 'QueryCoinsBalance' operation.",
62
+ "sign:bybit:queryCoinInfo" : "Allows access to the typed sign 'bybit' endpoint, but only for the 'QueryCoinInfo' operation.",
62
63
  "sign:bybit:queryDepositAddress" : "Allows access to the typed sign 'bybit' endpoint, but only for the 'QueryDepositAddress' operation.",
64
+ "sign:bybit:depositHistory" : "Allows access to the typed sign 'bybit' endpoint, but only for the 'DepositHistory' operation.",
63
65
  "sign:bybit:universalTransfer" : "Allows access to the typed sign 'bybit' endpoint, but only for the 'UniversalTransfer' operation.",
66
+ "sign:bybit:universalTransferHistory" : "Allows access to the typed sign 'bybit' endpoint, but only for the 'UniversalTransferHistory' operation.",
64
67
  "sign:bybit:withdraw" : "Allows access to the typed sign 'bybit' endpoint, but only for the 'Withdraw' operation.",
65
68
  "sign:bybit:withdrawals" : "Allows access to the typed sign 'bybit' endpoint, but only for the 'Withdrawals' operation.",
66
69
  "sign:coinbase:*" : "Allows access to the typed sign 'coinbase' endpoint (signs Coinbase RPC requests).",
@@ -80,6 +83,7 @@ export const AllScopes: Record<ExplicitScope, string> =
80
83
  "sign:sui" : "Allows access to the sign 'sui' endpoint",
81
84
  "sign:tendermint" : "Allows access to the sign 'tendermint' endpoint",
82
85
  "sign:mmi" : "Allows access to the sign 'mmi' endpoint",
86
+ "sign:auto" : "Allows MMI requests for keys with the 'AllowAutoSign' policy to be signed automatically.",
83
87
  "manage:*" : "Allows access to all management endpoints (e.g., create role, create key, add key to role, etc.)",
84
88
  "manage:readonly" : "Allows access to all management readonly endpoints",
85
89
  "manage:email:*" : "Allows access only to the email management endpoints",