@cubist-labs/cubesigner-sdk 0.4.254 → 0.4.260
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/package.json +1 -1
- package/dist/src/audit_log.d.ts +5 -5
- package/dist/src/client/api_client.d.ts +45 -3
- package/dist/src/client/api_client.d.ts.map +1 -1
- package/dist/src/client/api_client.js +70 -4
- package/dist/src/key.d.ts +5 -8
- package/dist/src/key.d.ts.map +1 -1
- package/dist/src/key.js +6 -2
- package/dist/src/org.d.ts +463 -25
- package/dist/src/org.d.ts.map +1 -1
- package/dist/src/org.js +66 -26
- package/dist/src/role.d.ts +41 -1
- package/dist/src/role.d.ts.map +1 -1
- package/dist/src/role.js +1 -1
- package/dist/src/schema.d.ts +941 -21
- package/dist/src/schema.d.ts.map +1 -1
- package/dist/src/schema.js +1 -1
- package/dist/src/schema_types.d.ts +7 -0
- package/dist/src/schema_types.d.ts.map +1 -1
- package/dist/src/schema_types.js +24 -3
- package/dist/src/scopes.d.ts.map +1 -1
- package/dist/src/scopes.js +12 -1
- package/package.json +1 -1
- package/src/client/api_client.ts +95 -4
- package/src/key.ts +8 -8
- package/src/org.ts +82 -28
- package/src/role.ts +47 -0
- package/src/schema.ts +1014 -20
- package/src/schema_types.ts +31 -2
- package/src/scopes.ts +11 -0
package/src/schema.ts
CHANGED
|
@@ -884,6 +884,12 @@ export interface paths {
|
|
|
884
884
|
* but extends the output with an `id_token`.
|
|
885
885
|
*
|
|
886
886
|
* This `id_token` can then be used with any CubeSigner endpoint that requires an OIDC token.
|
|
887
|
+
* Callers must request *at least* scopes `tweet.read` and `users.read` during auth with twitter.
|
|
888
|
+
*
|
|
889
|
+
* By default, the id token does not contain a confirmed email;
|
|
890
|
+
* callers can request this field be populated by requesting the `users.email` scope
|
|
891
|
+
* and adding `fetch_email` as a URL parameter to this route.
|
|
892
|
+
*
|
|
887
893
|
*
|
|
888
894
|
* > [!IMPORTANT]
|
|
889
895
|
* > This endpoint will fail unless the org is configured to allow the issuer `https://shim.oauth2.cubist.dev/twitter` and client ID being used for Twitter.
|
|
@@ -947,6 +953,33 @@ export interface paths {
|
|
|
947
953
|
*/
|
|
948
954
|
patch: operations["siweComplete"];
|
|
949
955
|
};
|
|
956
|
+
"/v0/org/{org_id}/oidc/siws": {
|
|
957
|
+
/**
|
|
958
|
+
* Initiate login via Sign-in With Solana (SIWS).
|
|
959
|
+
* @description Initiate login via Sign-in With Solana (SIWS).
|
|
960
|
+
*
|
|
961
|
+
* This endpoint generates a challenge which can be answered (via the corresponding PATCH endpoint)
|
|
962
|
+
* to obtain an OIDC token. The OIDC token can then be exchanged for a user session via the standard
|
|
963
|
+
* OIDC auth route.
|
|
964
|
+
*
|
|
965
|
+
* > [!IMPORTANT]
|
|
966
|
+
* > For this endpoint to succeed, the org must be configured to:
|
|
967
|
+
* > Allow the issuer `https://shim.oauth2.cubist.dev/siws` with the Org ID as the client ID
|
|
968
|
+
*/
|
|
969
|
+
post: operations["siwsInit"];
|
|
970
|
+
/**
|
|
971
|
+
* Complete login via Sign-in With Solana (SIWS)
|
|
972
|
+
* @description Complete login via Sign-in With Solana (SIWS)
|
|
973
|
+
*
|
|
974
|
+
* If the challenge (issued by the corresponding POST endpoint) is answered correctly, this endpoint
|
|
975
|
+
* generates an OIDC token that can then be exchanged for a user session via the standard OIDC auth route.
|
|
976
|
+
*
|
|
977
|
+
* > [!IMPORTANT]
|
|
978
|
+
* > For this endpoint to succeed, the org must be configured to:
|
|
979
|
+
* > Allow the issuer `https://shim.oauth2.cubist.dev/siws` with the Org ID as the client ID
|
|
980
|
+
*/
|
|
981
|
+
patch: operations["siwsComplete"];
|
|
982
|
+
};
|
|
950
983
|
"/v0/org/{org_id}/oidc/telegram": {
|
|
951
984
|
/**
|
|
952
985
|
* Allows a user to authenticate with the telegram API using the tgWebAppData value
|
|
@@ -1310,6 +1343,13 @@ export interface paths {
|
|
|
1310
1343
|
*
|
|
1311
1344
|
* If a `role` query parameter is provided, **ALL** session for **THAT ROLE** are revoked
|
|
1312
1345
|
* (if the current user has permissions to revoke sessions for the role).
|
|
1346
|
+
*
|
|
1347
|
+
* If a `role_created_by` query parameter is provided, **ROLE** sessions created by **THAT USER**
|
|
1348
|
+
* are revoked (gated by the same permissions as revoking that user's own sessions: the current
|
|
1349
|
+
* user must be that user or an org owner). User sessions are not affected. Unless the current
|
|
1350
|
+
* user is an org owner, only sessions for roles the current user is **still a member of** are
|
|
1351
|
+
* revoked (so a user cannot revoke sessions for a role they have since been removed from); org
|
|
1352
|
+
* owners revoke across all roles.
|
|
1313
1353
|
*/
|
|
1314
1354
|
delete: operations["revokeSessions"];
|
|
1315
1355
|
};
|
|
@@ -1760,6 +1800,9 @@ export interface components {
|
|
|
1760
1800
|
{
|
|
1761
1801
|
BinanceDryRun: components["schemas"]["BinanceDryRunArgs"];
|
|
1762
1802
|
},
|
|
1803
|
+
{
|
|
1804
|
+
BybitDryRun: components["schemas"]["BybitDryRunArgs"];
|
|
1805
|
+
},
|
|
1763
1806
|
{
|
|
1764
1807
|
CoinbaseDryRun: components["schemas"]["CoinbaseDryRunArgs"];
|
|
1765
1808
|
},
|
|
@@ -1769,7 +1812,12 @@ export interface components {
|
|
|
1769
1812
|
]
|
|
1770
1813
|
>;
|
|
1771
1814
|
/** @enum {string} */
|
|
1772
|
-
AcceptedValueCode:
|
|
1815
|
+
AcceptedValueCode:
|
|
1816
|
+
| "SignDryRun"
|
|
1817
|
+
| "BinanceDryRun"
|
|
1818
|
+
| "BybitDryRun"
|
|
1819
|
+
| "CoinbaseDryRun"
|
|
1820
|
+
| "MfaRequired";
|
|
1773
1821
|
/**
|
|
1774
1822
|
* @description Determines who controls the keys within an org
|
|
1775
1823
|
* @enum {string}
|
|
@@ -2862,6 +2910,8 @@ export interface components {
|
|
|
2862
2910
|
| "KeyNotFound"
|
|
2863
2911
|
| "SiweChallengeNotFound"
|
|
2864
2912
|
| "SiweInvalidRequest"
|
|
2913
|
+
| "SiwsChallengeNotFound"
|
|
2914
|
+
| "SiwsInvalidRequest"
|
|
2865
2915
|
| "UserExportDerivedKey"
|
|
2866
2916
|
| "UserExportPublicKeyInvalid"
|
|
2867
2917
|
| "NistP256PublicKeyInvalid"
|
|
@@ -2876,8 +2926,10 @@ export interface components {
|
|
|
2876
2926
|
| "InvalidPropertiesForKeyType"
|
|
2877
2927
|
| "MismatchedKeyPropertiesPatch"
|
|
2878
2928
|
| "MissingBinanceApiKey"
|
|
2929
|
+
| "MissingBybitApiKey"
|
|
2879
2930
|
| "MissingCoinbaseApiKey"
|
|
2880
2931
|
| "BinanceKeyMasterMismatch"
|
|
2932
|
+
| "BybitAccountMismatch"
|
|
2881
2933
|
| "InvalidKeyMaterial"
|
|
2882
2934
|
| "InvalidHexValue"
|
|
2883
2935
|
| "InvalidBase32Value"
|
|
@@ -2920,6 +2972,7 @@ export interface components {
|
|
|
2920
2972
|
| "LimitWindowTooLong"
|
|
2921
2973
|
| "Erc20ContractDisallowed"
|
|
2922
2974
|
| "EmptyRuleError"
|
|
2975
|
+
| "PolicyFieldValidationError"
|
|
2923
2976
|
| "OptionalListEmpty"
|
|
2924
2977
|
| "MultipleExclusiveFieldsProvided"
|
|
2925
2978
|
| "DuplicateFieldEntry"
|
|
@@ -3004,6 +3057,7 @@ export interface components {
|
|
|
3004
3057
|
| "InvalidPolicyReference"
|
|
3005
3058
|
| "PolicyEngineDisabled"
|
|
3006
3059
|
| "InvalidWasmPolicy"
|
|
3060
|
+
| "CelProgramTooLarge"
|
|
3007
3061
|
| "InvalidPolicy"
|
|
3008
3062
|
| "RedundantDerivationPath"
|
|
3009
3063
|
| "ImportKeyMissing"
|
|
@@ -3154,6 +3208,7 @@ export interface components {
|
|
|
3154
3208
|
| "BabylonStaking"
|
|
3155
3209
|
| "BabylonCovSign"
|
|
3156
3210
|
| "BinanceSign"
|
|
3211
|
+
| "BybitSign"
|
|
3157
3212
|
| "CoinbaseSign"
|
|
3158
3213
|
| "BlobSign"
|
|
3159
3214
|
| "BtcMessageSign"
|
|
@@ -3181,6 +3236,8 @@ export interface components {
|
|
|
3181
3236
|
| "EmailOtpAuth"
|
|
3182
3237
|
| "SiweInit"
|
|
3183
3238
|
| "SiweComplete"
|
|
3239
|
+
| "SiwsInit"
|
|
3240
|
+
| "SiwsComplete"
|
|
3184
3241
|
| "TelegramAuth"
|
|
3185
3242
|
| "CreateOidcUser"
|
|
3186
3243
|
| "DeleteOidcUser"
|
|
@@ -3201,7 +3258,9 @@ export interface components {
|
|
|
3201
3258
|
| "RpcGetTransaction"
|
|
3202
3259
|
| "RpcListTransactions"
|
|
3203
3260
|
| "RpcRetryTransaction"
|
|
3261
|
+
| "RpcCancelTransaction"
|
|
3204
3262
|
| "RpcBinance"
|
|
3263
|
+
| "RpcBybit"
|
|
3205
3264
|
| "RpcCoinbase"
|
|
3206
3265
|
| "CustomChainRpcCall"
|
|
3207
3266
|
| "EsploraApiCall"
|
|
@@ -3261,6 +3320,18 @@ export interface components {
|
|
|
3261
3320
|
recvWindow?: number | null;
|
|
3262
3321
|
};
|
|
3263
3322
|
/** @description Parameters envelope for all Binance RPC methods. */
|
|
3323
|
+
BinanceDepositHistoryParams: components["schemas"]["DepositHistoryRequest"] & {
|
|
3324
|
+
dryRun?: components["schemas"]["BinanceDryRunMode"] | null;
|
|
3325
|
+
keyId: components["schemas"]["Id"];
|
|
3326
|
+
/**
|
|
3327
|
+
* Format: float
|
|
3328
|
+
* @description Optional "receive window", i.e., for how long the request stays valid.
|
|
3329
|
+
* May only be specified in milliseconds, with up to three decimal places of precision.
|
|
3330
|
+
* If omitted, defaults to 10000. Must not be greater than 60000.
|
|
3331
|
+
*/
|
|
3332
|
+
recvWindow?: number | null;
|
|
3333
|
+
};
|
|
3334
|
+
/** @description Parameters envelope for all Binance RPC methods. */
|
|
3264
3335
|
BinanceDepositParams: components["schemas"]["DepositRequest"] & {
|
|
3265
3336
|
dryRun?: components["schemas"]["BinanceDryRunMode"] | null;
|
|
3266
3337
|
keyId: components["schemas"]["Id"];
|
|
@@ -3350,6 +3421,11 @@ export interface components {
|
|
|
3350
3421
|
method: "cs_binanceDeposit";
|
|
3351
3422
|
params: components["schemas"]["BinanceDepositParams"];
|
|
3352
3423
|
}
|
|
3424
|
+
| {
|
|
3425
|
+
/** @enum {string} */
|
|
3426
|
+
method: "cs_binanceDepositHistory";
|
|
3427
|
+
params: components["schemas"]["BinanceDepositHistoryParams"];
|
|
3428
|
+
}
|
|
3353
3429
|
| {
|
|
3354
3430
|
/** @enum {string} */
|
|
3355
3431
|
method: "cs_binanceListSubAccounts";
|
|
@@ -3754,9 +3830,495 @@ export interface components {
|
|
|
3754
3830
|
metadata?: unknown;
|
|
3755
3831
|
owner: components["schemas"]["Id"];
|
|
3756
3832
|
};
|
|
3833
|
+
/**
|
|
3834
|
+
* @description Wire-format patch payload for [`KeyProperties::BybitApi`].
|
|
3835
|
+
*
|
|
3836
|
+
* Every field follows the same per-field PATCH semantics: a missing field
|
|
3837
|
+
* leaves the existing value alone, a JSON `null` clears it, and a value sets it.
|
|
3838
|
+
*/
|
|
3839
|
+
BybitApiPropertiesPatch: {
|
|
3840
|
+
/** @description The Bybit-issued API key string. Encrypted server-side before storage. */
|
|
3841
|
+
api_key?: string | null;
|
|
3842
|
+
/** @description Arbitrary label. Useful for storing the corresponding API key label on the Bybit side. */
|
|
3843
|
+
label?: string | null;
|
|
3844
|
+
};
|
|
3845
|
+
/** @description One entry in [`BybitQueryCoinsBalanceResponse::balance`]. */
|
|
3846
|
+
BybitCoinBalance: {
|
|
3847
|
+
/** @description Bonus / promotional balance, as a decimal string. */
|
|
3848
|
+
bonus?: string | null;
|
|
3849
|
+
/** @description Coin symbol, uppercase (e.g. `USDT`, `BTC`). */
|
|
3850
|
+
coin: string;
|
|
3851
|
+
/** @description Portion of `wallet_balance` that can be transferred out. */
|
|
3852
|
+
transferBalance: string;
|
|
3853
|
+
/** @description Total wallet balance for `coin`, as a decimal string. */
|
|
3854
|
+
walletBalance: string;
|
|
3855
|
+
};
|
|
3856
|
+
/** @description One entry in [`BybitQueryDepositAddressResponse::chains`]. */
|
|
3857
|
+
BybitDepositChain: {
|
|
3858
|
+
/** @description Deposit address on this chain. */
|
|
3859
|
+
addressDeposit: string;
|
|
3860
|
+
/** @description Single-deposit cap for this coin on this chain; `"-1"` means no limit. */
|
|
3861
|
+
batchReleaseLimit?: string | null;
|
|
3862
|
+
/** @description Short chain code (e.g. `ETH`, `TRX`). */
|
|
3863
|
+
chain: string;
|
|
3864
|
+
/** @description Human-readable chain name (e.g. `Ethereum (ERC20)`). */
|
|
3865
|
+
chainType?: string | null;
|
|
3866
|
+
/**
|
|
3867
|
+
* @description Token contract address on this chain. Bybit only returns the last 6
|
|
3868
|
+
* characters; empty for native coins.
|
|
3869
|
+
*/
|
|
3870
|
+
contractAddress?: string | null;
|
|
3871
|
+
/**
|
|
3872
|
+
* @description Memo / tag required for chains that use one (e.g. XRP, EOS). Empty for
|
|
3873
|
+
* chains that don't.
|
|
3874
|
+
*/
|
|
3875
|
+
tagDeposit?: string | null;
|
|
3876
|
+
};
|
|
3877
|
+
BybitDryRunArgs: {
|
|
3878
|
+
/** @description The Bybit API method that would have been used */
|
|
3879
|
+
method: string;
|
|
3880
|
+
/** @description The request body (for POST endpoints) or query string (for GET endpoints). */
|
|
3881
|
+
payload: string;
|
|
3882
|
+
/** @description The Bybit API url that would have been called */
|
|
3883
|
+
url: string;
|
|
3884
|
+
};
|
|
3885
|
+
/**
|
|
3886
|
+
* @description "Dry run" modes for Bybit requests.
|
|
3887
|
+
* @enum {string}
|
|
3888
|
+
*/
|
|
3889
|
+
BybitDryRunMode: "NO_SIGN" | "NO_SUBMIT";
|
|
3890
|
+
/**
|
|
3891
|
+
* @description Parameters envelope for all Bybit RPC variants whose payload schema is
|
|
3892
|
+
* derived from a `*Request` struct. (`BybitQueryUserParams` and
|
|
3893
|
+
* `BybitQuerySubMembersParams` have no per-variant payload and are defined
|
|
3894
|
+
* directly below.)
|
|
3895
|
+
*/
|
|
3896
|
+
BybitQueryCoinsBalanceParams: components["schemas"]["BybitQueryCoinsBalanceRequest"] & {
|
|
3897
|
+
dryRun?: components["schemas"]["BybitDryRunMode"] | null;
|
|
3898
|
+
keyId: components["schemas"]["Id"];
|
|
3899
|
+
/**
|
|
3900
|
+
* Format: int32
|
|
3901
|
+
* @description Optional "receive window", i.e., for how long the request stays valid.
|
|
3902
|
+
* Specified in milliseconds. If omitted, defaults to 10000.
|
|
3903
|
+
*/
|
|
3904
|
+
recvWindow?: number | null;
|
|
3905
|
+
};
|
|
3906
|
+
/** @description Parameters for `GET /v5/asset/transfer/query-account-coins-balance`. */
|
|
3907
|
+
BybitQueryCoinsBalanceRequest: {
|
|
3908
|
+
/**
|
|
3909
|
+
* @description Wallet type. Common values: `"FUND"`, `"UNIFIED"`, `"CONTRACT"`. Bybit
|
|
3910
|
+
* expects this verbatim; we don't constrain it on our side.
|
|
3911
|
+
*/
|
|
3912
|
+
accountType: string;
|
|
3913
|
+
/**
|
|
3914
|
+
* @description Optional list of coin symbols, comma-separated (e.g. `"BTC,USDT"`).
|
|
3915
|
+
* Bybit returns balances for all coins when omitted.
|
|
3916
|
+
*/
|
|
3917
|
+
coin?: string | null;
|
|
3918
|
+
/**
|
|
3919
|
+
* @description Optional sub-account UID. When supplied, the master key queries the
|
|
3920
|
+
* named sub-account's balance.
|
|
3921
|
+
*/
|
|
3922
|
+
memberId?: string | null;
|
|
3923
|
+
/**
|
|
3924
|
+
* @description Optional flag: `"0"` query without conversion to USD (default),
|
|
3925
|
+
* `"1"` include USD valuation. Bybit accepts this as a string.
|
|
3926
|
+
*/
|
|
3927
|
+
withBonus?: string | null;
|
|
3928
|
+
};
|
|
3929
|
+
/** @description Response of `GET /v5/asset/transfer/query-account-coins-balance`. */
|
|
3930
|
+
BybitQueryCoinsBalanceResponse: {
|
|
3931
|
+
/** @description Account type the balances belong to (e.g. `UNIFIED`, `FUND`, `CONTRACT`). */
|
|
3932
|
+
accountType: string;
|
|
3933
|
+
/** @description Per-coin balances. */
|
|
3934
|
+
balance: components["schemas"]["BybitCoinBalance"][];
|
|
3935
|
+
/** @description UID of the (sub-)account whose balance is being reported. */
|
|
3936
|
+
memberId?: string | null;
|
|
3937
|
+
};
|
|
3938
|
+
/**
|
|
3939
|
+
* @description Parameters envelope for all Bybit RPC variants whose payload schema is
|
|
3940
|
+
* derived from a `*Request` struct. (`BybitQueryUserParams` and
|
|
3941
|
+
* `BybitQuerySubMembersParams` have no per-variant payload and are defined
|
|
3942
|
+
* directly below.)
|
|
3943
|
+
*/
|
|
3944
|
+
BybitQueryDepositAddressParams: components["schemas"]["BybitQueryDepositAddressRequest"] & {
|
|
3945
|
+
dryRun?: components["schemas"]["BybitDryRunMode"] | null;
|
|
3946
|
+
keyId: components["schemas"]["Id"];
|
|
3947
|
+
/**
|
|
3948
|
+
* Format: int32
|
|
3949
|
+
* @description Optional "receive window", i.e., for how long the request stays valid.
|
|
3950
|
+
* Specified in milliseconds. If omitted, defaults to 10000.
|
|
3951
|
+
*/
|
|
3952
|
+
recvWindow?: number | null;
|
|
3953
|
+
};
|
|
3954
|
+
/** @description Parameters for `GET /v5/asset/deposit/query-address`. */
|
|
3955
|
+
BybitQueryDepositAddressRequest: {
|
|
3956
|
+
/**
|
|
3957
|
+
* @description Optional network identifier (e.g. `"ETH"`, `"TRX"`). When omitted,
|
|
3958
|
+
* Bybit returns the deposit address on every supported chain.
|
|
3959
|
+
*/
|
|
3960
|
+
chainType?: string | null;
|
|
3961
|
+
/** @description Coin symbol (e.g. `"BTC"`, `"USDT"`). */
|
|
3962
|
+
coin: string;
|
|
3963
|
+
};
|
|
3964
|
+
/** @description Response of `GET /v5/asset/deposit/query-address`. */
|
|
3965
|
+
BybitQueryDepositAddressResponse: {
|
|
3966
|
+
/** @description One deposit address per supported chain. */
|
|
3967
|
+
chains: components["schemas"]["BybitDepositChain"][];
|
|
3968
|
+
/** @description Coin symbol the deposit addresses are for (e.g. `USDT`). */
|
|
3969
|
+
coin: string;
|
|
3970
|
+
};
|
|
3971
|
+
/**
|
|
3972
|
+
* @description Parameters for [`BybitRpc::QuerySubMembers`].
|
|
3973
|
+
*
|
|
3974
|
+
* Bybit endpoint: `GET /v5/user/query-sub-members`. Takes no inputs beyond
|
|
3975
|
+
* the common envelope.
|
|
3976
|
+
*/
|
|
3977
|
+
BybitQuerySubMembersParams: {
|
|
3978
|
+
dryRun?: components["schemas"]["BybitDryRunMode"] | null;
|
|
3979
|
+
keyId: components["schemas"]["Id"];
|
|
3980
|
+
/**
|
|
3981
|
+
* Format: int32
|
|
3982
|
+
* @description Optional receive window in milliseconds. Defaults to 10000.
|
|
3983
|
+
*/
|
|
3984
|
+
recvWindow?: number | null;
|
|
3985
|
+
};
|
|
3986
|
+
/** @description Response of `GET /v5/user/query-sub-members`. */
|
|
3987
|
+
BybitQuerySubMembersResponse: {
|
|
3988
|
+
/** @description The sub-accounts under the calling master account. */
|
|
3989
|
+
subMembers: components["schemas"]["BybitSubMember"][];
|
|
3990
|
+
};
|
|
3991
|
+
/**
|
|
3992
|
+
* @description Parameters for [`BybitRpc::QueryUser`].
|
|
3993
|
+
*
|
|
3994
|
+
* Bybit endpoint: `GET /v5/user/query-api`. Takes no inputs beyond the common
|
|
3995
|
+
* `recvWindow` / `timestamp` envelope; defined directly (instead of through
|
|
3996
|
+
* the [`BybitParams`] generic alias) so utoipa emits a non-empty schema.
|
|
3997
|
+
*/
|
|
3998
|
+
BybitQueryUserParams: {
|
|
3999
|
+
dryRun?: components["schemas"]["BybitDryRunMode"] | null;
|
|
4000
|
+
keyId: components["schemas"]["Id"];
|
|
4001
|
+
/**
|
|
4002
|
+
* Format: int32
|
|
4003
|
+
* @description Optional receive window in milliseconds. Defaults to 10000.
|
|
4004
|
+
*/
|
|
4005
|
+
recvWindow?: number | null;
|
|
4006
|
+
};
|
|
4007
|
+
/** @description Response of `GET /v5/user/query-api`. */
|
|
4008
|
+
BybitQueryUserResponse: {
|
|
4009
|
+
/** @description Bybit account KYC level (`"0"` = none). */
|
|
4010
|
+
kycLevel?: string | null;
|
|
4011
|
+
/** @description Optional free-text label set on the API key. */
|
|
4012
|
+
note?: string | null;
|
|
4013
|
+
/**
|
|
4014
|
+
* @description Master account UID for sub-accounts, `"0"` if the calling key is a
|
|
4015
|
+
* master account.
|
|
4016
|
+
*/
|
|
4017
|
+
parentUid: string;
|
|
4018
|
+
/** @description API permissions assigned to the key. */
|
|
4019
|
+
permissions?: unknown;
|
|
4020
|
+
/**
|
|
4021
|
+
* Format: int64
|
|
4022
|
+
* @description Bybit-assigned account UID of the API key.
|
|
4023
|
+
*/
|
|
4024
|
+
userID: number;
|
|
4025
|
+
/** @description VIP level. */
|
|
4026
|
+
vipLevel?: string | null;
|
|
4027
|
+
[key: string]: unknown;
|
|
4028
|
+
};
|
|
4029
|
+
/**
|
|
4030
|
+
* @description Bybit-family RPC methods. Each variant authenticates as the
|
|
4031
|
+
* [`KeyType::HmacSha256`] key in its `params.key_id` (which must carry
|
|
4032
|
+
* [`KeyProperties::BybitApi`]).
|
|
4033
|
+
*/
|
|
4034
|
+
BybitRpc:
|
|
4035
|
+
| {
|
|
4036
|
+
/** @enum {string} */
|
|
4037
|
+
method: "cs_bybitQueryUser";
|
|
4038
|
+
params: components["schemas"]["BybitQueryUserParams"];
|
|
4039
|
+
}
|
|
4040
|
+
| {
|
|
4041
|
+
/** @enum {string} */
|
|
4042
|
+
method: "cs_bybitQuerySubMembers";
|
|
4043
|
+
params: components["schemas"]["BybitQuerySubMembersParams"];
|
|
4044
|
+
}
|
|
4045
|
+
| {
|
|
4046
|
+
/** @enum {string} */
|
|
4047
|
+
method: "cs_bybitQueryCoinsBalance";
|
|
4048
|
+
params: components["schemas"]["BybitQueryCoinsBalanceParams"];
|
|
4049
|
+
}
|
|
4050
|
+
| {
|
|
4051
|
+
/** @enum {string} */
|
|
4052
|
+
method: "cs_bybitQueryDepositAddress";
|
|
4053
|
+
params: components["schemas"]["BybitQueryDepositAddressParams"];
|
|
4054
|
+
}
|
|
4055
|
+
| {
|
|
4056
|
+
/** @enum {string} */
|
|
4057
|
+
method: "cs_bybitUniversalTransfer";
|
|
4058
|
+
params: components["schemas"]["BybitUniversalTransferParams"];
|
|
4059
|
+
}
|
|
4060
|
+
| {
|
|
4061
|
+
/** @enum {string} */
|
|
4062
|
+
method: "cs_bybitWithdraw";
|
|
4063
|
+
params: components["schemas"]["BybitWithdrawParams"];
|
|
4064
|
+
}
|
|
4065
|
+
| {
|
|
4066
|
+
/** @enum {string} */
|
|
4067
|
+
method: "cs_bybitWithdrawals";
|
|
4068
|
+
params: components["schemas"]["BybitWithdrawalsParams"];
|
|
4069
|
+
};
|
|
4070
|
+
/** @description Response returned by the typed `bybit_sign` endpoint. */
|
|
4071
|
+
BybitSignResponse: {
|
|
4072
|
+
/** @description Optional policy evaluation tree. */
|
|
4073
|
+
policy_eval_tree?: unknown;
|
|
4074
|
+
} & {
|
|
4075
|
+
/**
|
|
4076
|
+
* @description The Bybit-bound payload (URL-encoded query for GET, JSON body for
|
|
4077
|
+
* POST). Submitted verbatim by the rpc-api lambda; the payload bytes are
|
|
4078
|
+
* also part of the signing input.
|
|
4079
|
+
*/
|
|
4080
|
+
payload: string;
|
|
4081
|
+
/**
|
|
4082
|
+
* Format: int32
|
|
4083
|
+
* @description Effective receive window in milliseconds.
|
|
4084
|
+
*/
|
|
4085
|
+
recv_window: number;
|
|
4086
|
+
/**
|
|
4087
|
+
* @description Hex-encoded HMAC-SHA256 signature of
|
|
4088
|
+
* `timestamp || apiKey || recvWindow || payload`. Goes into the
|
|
4089
|
+
* `X-BAPI-SIGN` header.
|
|
4090
|
+
*/
|
|
4091
|
+
signature_hex: string;
|
|
4092
|
+
/**
|
|
4093
|
+
* Format: int64
|
|
4094
|
+
* @description Signing timestamp (ms since epoch). Picked by the signer.
|
|
4095
|
+
*/
|
|
4096
|
+
timestamp_ms: number;
|
|
4097
|
+
};
|
|
4098
|
+
/** @description One entry in [`BybitQuerySubMembersResponse::sub_members`]. */
|
|
4099
|
+
BybitSubMember: {
|
|
4100
|
+
/**
|
|
4101
|
+
* Format: int32
|
|
4102
|
+
* @description Trading account configuration: `1` Classic, `3` UTA1.0, `4` UTA1.0 Pro,
|
|
4103
|
+
* `5` UTA2.0, `6` UTA2.0 Pro.
|
|
4104
|
+
*/
|
|
4105
|
+
accountMode?: number | null;
|
|
4106
|
+
/**
|
|
4107
|
+
* Format: int32
|
|
4108
|
+
* @description Sub-account category: `1` standard, `6` custodial.
|
|
4109
|
+
*/
|
|
4110
|
+
memberType?: number | null;
|
|
4111
|
+
/** @description Free-text remark associated with the sub-account. */
|
|
4112
|
+
remark?: string | null;
|
|
4113
|
+
/**
|
|
4114
|
+
* Format: int32
|
|
4115
|
+
* @description Account state: `1` active, `2` login-restricted, `4` frozen.
|
|
4116
|
+
*/
|
|
4117
|
+
status?: number | null;
|
|
4118
|
+
/** @description Sub-account UID. */
|
|
4119
|
+
uid: string;
|
|
4120
|
+
/** @description Display name of the sub-account. */
|
|
4121
|
+
username?: string | null;
|
|
4122
|
+
[key: string]: unknown;
|
|
4123
|
+
};
|
|
4124
|
+
/**
|
|
4125
|
+
* @description Parameters envelope for all Bybit RPC variants whose payload schema is
|
|
4126
|
+
* derived from a `*Request` struct. (`BybitQueryUserParams` and
|
|
4127
|
+
* `BybitQuerySubMembersParams` have no per-variant payload and are defined
|
|
4128
|
+
* directly below.)
|
|
4129
|
+
*/
|
|
4130
|
+
BybitUniversalTransferParams: components["schemas"]["BybitUniversalTransferRequest"] & {
|
|
4131
|
+
dryRun?: components["schemas"]["BybitDryRunMode"] | null;
|
|
4132
|
+
keyId: components["schemas"]["Id"];
|
|
4133
|
+
/**
|
|
4134
|
+
* Format: int32
|
|
4135
|
+
* @description Optional "receive window", i.e., for how long the request stays valid.
|
|
4136
|
+
* Specified in milliseconds. If omitted, defaults to 10000.
|
|
4137
|
+
*/
|
|
4138
|
+
recvWindow?: number | null;
|
|
4139
|
+
};
|
|
4140
|
+
/** @description Parameters for `POST /v5/asset/transfer/universal-transfer`. */
|
|
4141
|
+
BybitUniversalTransferRequest: {
|
|
4142
|
+
/** @description Amount as a decimal string (e.g. `"1.5"`). Sent verbatim. */
|
|
4143
|
+
amount: string;
|
|
4144
|
+
/** @description Coin symbol (e.g. `"USDT"`). */
|
|
4145
|
+
coin: string;
|
|
4146
|
+
/**
|
|
4147
|
+
* @description Source wallet type. Defaults to `"FUND"` if omitted; the signer
|
|
4148
|
+
* substitutes the default before signing so the signed and submitted
|
|
4149
|
+
* payloads match.
|
|
4150
|
+
*/
|
|
4151
|
+
fromAccountType?: string | null;
|
|
4152
|
+
/**
|
|
4153
|
+
* Format: int64
|
|
4154
|
+
* @description Source account UID. For "self", the manager substitutes the caller's
|
|
4155
|
+
* own UID before this struct reaches the signer.
|
|
4156
|
+
*/
|
|
4157
|
+
fromMemberId: number;
|
|
4158
|
+
/** @description Destination wallet type. Defaults to `"FUND"` if omitted. */
|
|
4159
|
+
toAccountType?: string | null;
|
|
4160
|
+
/**
|
|
4161
|
+
* Format: int64
|
|
4162
|
+
* @description Destination account UID.
|
|
4163
|
+
*/
|
|
4164
|
+
toMemberId: number;
|
|
4165
|
+
/**
|
|
4166
|
+
* @description Client-supplied transfer id (UUID). Bybit echoes it back as the
|
|
4167
|
+
* canonical reference for this transfer.
|
|
4168
|
+
*/
|
|
4169
|
+
transferId: string;
|
|
4170
|
+
};
|
|
4171
|
+
/** @description Response of `POST /v5/asset/transfer/universal-transfer`. */
|
|
4172
|
+
BybitUniversalTransferResponse: {
|
|
4173
|
+
/**
|
|
4174
|
+
* @description Transfer state: one of `SUCCESS`, `PENDING`, `FAILED`, or
|
|
4175
|
+
* `STATUS_UNKNOWN`.
|
|
4176
|
+
*/
|
|
4177
|
+
status?: string | null;
|
|
4178
|
+
/**
|
|
4179
|
+
* @description UUID Bybit assigned to the transfer; the caller-supplied `transferId`
|
|
4180
|
+
* echoed back.
|
|
4181
|
+
*/
|
|
4182
|
+
transferId: string;
|
|
4183
|
+
};
|
|
4184
|
+
/** @description One entry in [`BybitWithdrawalsResponse::rows`]. */
|
|
4185
|
+
BybitWithdrawEntry: {
|
|
4186
|
+
/** @description Withdrawal amount as a decimal string. */
|
|
4187
|
+
amount: string;
|
|
4188
|
+
/** @description Short chain code (e.g. `ETH`, `TRX`). */
|
|
4189
|
+
chain: string;
|
|
4190
|
+
/** @description Coin symbol, uppercase (e.g. `USDT`). */
|
|
4191
|
+
coin: string;
|
|
4192
|
+
/** @description Creation timestamp, in milliseconds since epoch (as a string). */
|
|
4193
|
+
createTime: string;
|
|
4194
|
+
/**
|
|
4195
|
+
* @description Withdrawal state, e.g. `success`, `pending`, `failed`, `cancelled`. See
|
|
4196
|
+
* the Bybit docs for the full set, which depends on `withdraw_type`.
|
|
4197
|
+
*/
|
|
4198
|
+
status: string;
|
|
4199
|
+
/** @description Memo / tag for chains that use one (e.g. XRP, EOS). */
|
|
4200
|
+
tag?: string | null;
|
|
4201
|
+
/** @description Destination: an on-chain address, or a Bybit UID for internal transfers. */
|
|
4202
|
+
toAddress: string;
|
|
4203
|
+
/**
|
|
4204
|
+
* @description On-chain transaction hash; empty for failed/cancelled withdrawals and
|
|
4205
|
+
* for in-flight on-chain withdrawals before broadcast.
|
|
4206
|
+
*/
|
|
4207
|
+
txId?: string | null;
|
|
4208
|
+
/** @description Timestamp of the most recent status change, in milliseconds since epoch. */
|
|
4209
|
+
updateTime: string;
|
|
4210
|
+
/** @description Network / processing fee charged for the withdrawal, as a decimal string. */
|
|
4211
|
+
withdrawFee: string;
|
|
4212
|
+
/** @description Bybit-assigned withdrawal id. */
|
|
4213
|
+
withdrawId: string;
|
|
4214
|
+
/**
|
|
4215
|
+
* Format: int32
|
|
4216
|
+
* @description Withdrawal classification: `0` on-chain, `1` off-chain (internal).
|
|
4217
|
+
*/
|
|
4218
|
+
withdrawType?: number | null;
|
|
4219
|
+
[key: string]: unknown;
|
|
4220
|
+
};
|
|
4221
|
+
/**
|
|
4222
|
+
* @description Parameters envelope for all Bybit RPC variants whose payload schema is
|
|
4223
|
+
* derived from a `*Request` struct. (`BybitQueryUserParams` and
|
|
4224
|
+
* `BybitQuerySubMembersParams` have no per-variant payload and are defined
|
|
4225
|
+
* directly below.)
|
|
4226
|
+
*/
|
|
4227
|
+
BybitWithdrawParams: components["schemas"]["BybitWithdrawRequest"] & {
|
|
4228
|
+
dryRun?: components["schemas"]["BybitDryRunMode"] | null;
|
|
4229
|
+
keyId: components["schemas"]["Id"];
|
|
4230
|
+
/**
|
|
4231
|
+
* Format: int32
|
|
4232
|
+
* @description Optional "receive window", i.e., for how long the request stays valid.
|
|
4233
|
+
* Specified in milliseconds. If omitted, defaults to 10000.
|
|
4234
|
+
*/
|
|
4235
|
+
recvWindow?: number | null;
|
|
4236
|
+
};
|
|
4237
|
+
/** @description Parameters for `POST /v5/asset/withdraw/create`. Master-only. */
|
|
4238
|
+
BybitWithdrawRequest: {
|
|
4239
|
+
/**
|
|
4240
|
+
* @description Source wallet (`"FUND"` or `"SPOT"`). Defaults to Bybit's account-level
|
|
4241
|
+
* default when omitted.
|
|
4242
|
+
*/
|
|
4243
|
+
accountType?: string | null;
|
|
4244
|
+
/** @description Destination address. Must already be in Bybit's address book. */
|
|
4245
|
+
address: string;
|
|
4246
|
+
/** @description Amount as a decimal string. Sent verbatim. */
|
|
4247
|
+
amount: string;
|
|
4248
|
+
/** @description Network identifier (e.g. `"ETH"`, `"TRX"`). Required by Bybit. */
|
|
4249
|
+
chain: string;
|
|
4250
|
+
/** @description Coin symbol (e.g. `"USDT"`, `"BTC"`). */
|
|
4251
|
+
coin: string;
|
|
4252
|
+
/**
|
|
4253
|
+
* Format: int32
|
|
4254
|
+
* @description Force-chain flag: `0` (default), `1`, or `2`. See Bybit docs.
|
|
4255
|
+
*/
|
|
4256
|
+
forceChain?: number | null;
|
|
4257
|
+
/** @description Client-supplied request id (UUID). Used by Bybit for idempotency. */
|
|
4258
|
+
requestId: string;
|
|
4259
|
+
/** @description Optional memo / tag (e.g. for XRP, XLM). */
|
|
4260
|
+
tag?: string | null;
|
|
4261
|
+
/**
|
|
4262
|
+
* Format: int64
|
|
4263
|
+
* @description Server-supplied timestamp (ms since epoch). Set by the signer just before
|
|
4264
|
+
* signing; clients leave this `None` (because the server will ignore it anyway).
|
|
4265
|
+
*/
|
|
4266
|
+
timestamp?: number | null;
|
|
4267
|
+
};
|
|
4268
|
+
/** @description Response of `POST /v5/asset/withdraw/create`. */
|
|
4269
|
+
BybitWithdrawResponse: {
|
|
4270
|
+
/** @description Bybit-assigned withdrawal id. */
|
|
4271
|
+
id: string;
|
|
4272
|
+
};
|
|
4273
|
+
/**
|
|
4274
|
+
* @description Parameters envelope for all Bybit RPC variants whose payload schema is
|
|
4275
|
+
* derived from a `*Request` struct. (`BybitQueryUserParams` and
|
|
4276
|
+
* `BybitQuerySubMembersParams` have no per-variant payload and are defined
|
|
4277
|
+
* directly below.)
|
|
4278
|
+
*/
|
|
4279
|
+
BybitWithdrawalsParams: components["schemas"]["BybitWithdrawalsRequest"] & {
|
|
4280
|
+
dryRun?: components["schemas"]["BybitDryRunMode"] | null;
|
|
4281
|
+
keyId: components["schemas"]["Id"];
|
|
4282
|
+
/**
|
|
4283
|
+
* Format: int32
|
|
4284
|
+
* @description Optional "receive window", i.e., for how long the request stays valid.
|
|
4285
|
+
* Specified in milliseconds. If omitted, defaults to 10000.
|
|
4286
|
+
*/
|
|
4287
|
+
recvWindow?: number | null;
|
|
4288
|
+
};
|
|
4289
|
+
/** @description Parameters for `GET /v5/asset/withdraw/query-record`. */
|
|
4290
|
+
BybitWithdrawalsRequest: {
|
|
4291
|
+
/** @description Filter by coin symbol. */
|
|
4292
|
+
coin?: string | null;
|
|
4293
|
+
/**
|
|
4294
|
+
* Format: int32
|
|
4295
|
+
* @description Page size.
|
|
4296
|
+
*/
|
|
4297
|
+
limit?: number | null;
|
|
4298
|
+
/**
|
|
4299
|
+
* @description Filter by Bybit-assigned withdrawal id (the `id` returned by
|
|
4300
|
+
* [`BybitRpc::Withdraw`]).
|
|
4301
|
+
*/
|
|
4302
|
+
withdrawID?: string | null;
|
|
4303
|
+
};
|
|
4304
|
+
/** @description Response of `GET /v5/asset/withdraw/query-record`. */
|
|
4305
|
+
BybitWithdrawalsResponse: {
|
|
4306
|
+
/**
|
|
4307
|
+
* @description Opaque cursor to pass back as `cursor` on the next request to fetch
|
|
4308
|
+
* the next page; absent on the last page.
|
|
4309
|
+
*/
|
|
4310
|
+
nextPageCursor?: string | null;
|
|
4311
|
+
/** @description Withdrawal records matching the query. */
|
|
4312
|
+
rows: components["schemas"]["BybitWithdrawEntry"][];
|
|
4313
|
+
};
|
|
3757
4314
|
CancelInvitationRequest: {
|
|
3758
4315
|
email: components["schemas"]["Email"];
|
|
3759
4316
|
};
|
|
4317
|
+
/** @description Parameters for the [`cs_cancelTransaction`](RpcMethod::CancelTransaction) method. */
|
|
4318
|
+
CancelTransactionRequest: {
|
|
4319
|
+
/** @description The transaction id. */
|
|
4320
|
+
id: string;
|
|
4321
|
+
};
|
|
3760
4322
|
/**
|
|
3761
4323
|
* @description Supported Canton environments.
|
|
3762
4324
|
* @enum {string}
|
|
@@ -3907,6 +4469,8 @@ export interface components {
|
|
|
3907
4469
|
withdrawFee?: string | null;
|
|
3908
4470
|
/** @description Step size for withdrawal amounts, as a decimal string. */
|
|
3909
4471
|
withdrawIntegerMultiple?: string | null;
|
|
4472
|
+
/** @description Minimum internal transfer amount */
|
|
4473
|
+
withdrawInternalMin?: string | null;
|
|
3910
4474
|
/** @description Maximum withdrawal amount, as a decimal string. */
|
|
3911
4475
|
withdrawMax?: string | null;
|
|
3912
4476
|
/** @description Minimum withdrawal amount, as a decimal string. */
|
|
@@ -4497,6 +5061,11 @@ export interface components {
|
|
|
4497
5061
|
method: "cs_retryTransaction";
|
|
4498
5062
|
params: components["schemas"]["RetryTransactionRequest"];
|
|
4499
5063
|
},
|
|
5064
|
+
{
|
|
5065
|
+
/** @enum {string} */
|
|
5066
|
+
method: "cs_cancelTransaction";
|
|
5067
|
+
params: components["schemas"]["CancelTransactionRequest"];
|
|
5068
|
+
},
|
|
4500
5069
|
{
|
|
4501
5070
|
/** @enum {string} */
|
|
4502
5071
|
method: "cs_getTransaction";
|
|
@@ -4541,6 +5110,121 @@ export interface components {
|
|
|
4541
5110
|
/** @description Custom EVM chains. */
|
|
4542
5111
|
evm: components["schemas"]["EvmCustomChain"][];
|
|
4543
5112
|
};
|
|
5113
|
+
/** @description One deposit entry in [`DepositHistoryResponse`]. */
|
|
5114
|
+
DepositHistoryEntry: {
|
|
5115
|
+
/** @description Destination address the deposit was sent to. */
|
|
5116
|
+
address: string;
|
|
5117
|
+
/**
|
|
5118
|
+
* @description Secondary address identifier (e.g. memo for XRP, tag for XLM). Empty
|
|
5119
|
+
* string when the asset does not use one.
|
|
5120
|
+
*/
|
|
5121
|
+
addressTag?: string | null;
|
|
5122
|
+
/** @description Deposit amount, as a decimal string. */
|
|
5123
|
+
amount: string;
|
|
5124
|
+
/** @description Asset symbol (e.g. `"USDT"`, `"BTC"`). */
|
|
5125
|
+
coin: string;
|
|
5126
|
+
/**
|
|
5127
|
+
* Format: int64
|
|
5128
|
+
* @description Represents deposit completion datetime, available for deposits after 6-Mar-2025.
|
|
5129
|
+
*/
|
|
5130
|
+
completeTime?: number | null;
|
|
5131
|
+
/** @description On-chain confirmation progress (e.g. `"1/1"`). */
|
|
5132
|
+
confirmTimes?: string | null;
|
|
5133
|
+
/** @description Binance-assigned deposit id. */
|
|
5134
|
+
id?: string | null;
|
|
5135
|
+
/**
|
|
5136
|
+
* Format: int64
|
|
5137
|
+
* @description Time the deposit record was created (ms since epoch).
|
|
5138
|
+
*/
|
|
5139
|
+
insertTime: number;
|
|
5140
|
+
/** @description Blockchain network identifier (e.g. `"BSC"`, `"ETH"`). */
|
|
5141
|
+
network: string;
|
|
5142
|
+
/** @description Returned when 'includeSource' in the request is set to true */
|
|
5143
|
+
sourceAddress?: string | null;
|
|
5144
|
+
/**
|
|
5145
|
+
* Format: int32
|
|
5146
|
+
* @description Deposit status. Binance values: `0` = pending, `6` = credited but
|
|
5147
|
+
* cannot withdraw, `7` = wrong deposit, `8` = waiting user confirm,
|
|
5148
|
+
* `1` = success. Left as `u8` for forward compatibility.
|
|
5149
|
+
*/
|
|
5150
|
+
status: number;
|
|
5151
|
+
/**
|
|
5152
|
+
* Format: int32
|
|
5153
|
+
* @description `0` = external transfer, `1` = internal (Binance↔Binance) transfer.
|
|
5154
|
+
*/
|
|
5155
|
+
transferType: number;
|
|
5156
|
+
/**
|
|
5157
|
+
* Format: int32
|
|
5158
|
+
* @description 0: travel rule not required OR info already provided and funds ready to use;
|
|
5159
|
+
* 1: travel rule required to provide deposit info
|
|
5160
|
+
*/
|
|
5161
|
+
travelRuleStatus: number;
|
|
5162
|
+
/** @description On-chain transaction hash of the deposit. */
|
|
5163
|
+
txId: string;
|
|
5164
|
+
/**
|
|
5165
|
+
* Format: int32
|
|
5166
|
+
* @description Confirmations after which the deposit is unlocked for trading.
|
|
5167
|
+
*/
|
|
5168
|
+
unlockConfirm?: number | null;
|
|
5169
|
+
/**
|
|
5170
|
+
* Format: int32
|
|
5171
|
+
* @description Destination wallet: `0` = spot wallet, `1` = funding wallet.
|
|
5172
|
+
*/
|
|
5173
|
+
walletType: number;
|
|
5174
|
+
};
|
|
5175
|
+
/**
|
|
5176
|
+
* @description Parameters for `GET /sapi/v1/capital/deposit/hisrec`.
|
|
5177
|
+
*
|
|
5178
|
+
* Returns the calling account's deposit history. All filters are optional;
|
|
5179
|
+
* if `start_time`/`end_time` are omitted, Binance returns the most recent 90
|
|
5180
|
+
* days. Use `tx_id` to look up a specific deposit by its on-chain
|
|
5181
|
+
* transaction hash, or `coin`/`status` to narrow the result set.
|
|
5182
|
+
*/
|
|
5183
|
+
DepositHistoryRequest: {
|
|
5184
|
+
/** @description Filter to a specific asset (e.g. `"USDT"`, `"BTC"`). */
|
|
5185
|
+
coin?: string | null;
|
|
5186
|
+
/**
|
|
5187
|
+
* Format: int64
|
|
5188
|
+
* @description Window end (ms since epoch, Binance default: present timestamp).
|
|
5189
|
+
*/
|
|
5190
|
+
endTime?: number | null;
|
|
5191
|
+
/**
|
|
5192
|
+
* @description If `true`, include the deposit's source address in each entry. Binance
|
|
5193
|
+
* defaults to `false`.
|
|
5194
|
+
*/
|
|
5195
|
+
includeSource?: boolean | null;
|
|
5196
|
+
/**
|
|
5197
|
+
* Format: int32
|
|
5198
|
+
* @description Page size (Binance default and max: 1000).
|
|
5199
|
+
*/
|
|
5200
|
+
limit?: number | null;
|
|
5201
|
+
/**
|
|
5202
|
+
* Format: int32
|
|
5203
|
+
* @description Pagination offset (Binance default: 0).
|
|
5204
|
+
*/
|
|
5205
|
+
offset?: number | null;
|
|
5206
|
+
/**
|
|
5207
|
+
* Format: int64
|
|
5208
|
+
* @description Window start (ms since epoch, Binance default: 90 days from current timestamp).
|
|
5209
|
+
*/
|
|
5210
|
+
startTime?: number | null;
|
|
5211
|
+
/**
|
|
5212
|
+
* Format: int32
|
|
5213
|
+
* @description Filter by deposit status. Binance values: `0` = pending, `6` = credited
|
|
5214
|
+
* but cannot withdraw, `7` = wrong deposit, `8` = waiting user confirm,
|
|
5215
|
+
* `1` = success, `2` = rejected. Left as `u8` for forward compatibility.
|
|
5216
|
+
*/
|
|
5217
|
+
status?: number | null;
|
|
5218
|
+
/** @description Look up a specific deposit by its on-chain transaction hash. */
|
|
5219
|
+
txId?: string | null;
|
|
5220
|
+
};
|
|
5221
|
+
/**
|
|
5222
|
+
* @description Response returned by `cs_binanceDepositHistory`.
|
|
5223
|
+
*
|
|
5224
|
+
* Binance returns a top-level JSON array; this newtype preserves that wire
|
|
5225
|
+
* format while giving the response a named type in the OpenAPI schema.
|
|
5226
|
+
*/
|
|
5227
|
+
DepositHistoryResponse: components["schemas"]["DepositHistoryEntry"][];
|
|
4544
5228
|
/**
|
|
4545
5229
|
* @description Parameters for `GET /sapi/v1/capital/deposit/address`.
|
|
4546
5230
|
*
|
|
@@ -4565,7 +5249,7 @@ export interface components {
|
|
|
4565
5249
|
DepositResponse: {
|
|
4566
5250
|
/** @description Deposit address. */
|
|
4567
5251
|
address: string;
|
|
4568
|
-
/** @description Asset symbol (echoes
|
|
5252
|
+
/** @description Asset symbol (echoes the request's `coin` field). */
|
|
4569
5253
|
coin: string;
|
|
4570
5254
|
/**
|
|
4571
5255
|
* @description Secondary address identifier required by some assets (e.g. memo for
|
|
@@ -5424,8 +6108,17 @@ export interface components {
|
|
|
5424
6108
|
| "sign:binance:withdraw"
|
|
5425
6109
|
| "sign:binance:withdrawHistory"
|
|
5426
6110
|
| "sign:binance:deposit"
|
|
6111
|
+
| "sign:binance:depositHistory"
|
|
5427
6112
|
| "sign:binance:listSubAccounts"
|
|
5428
6113
|
| "sign:binance:coinInfo"
|
|
6114
|
+
| "sign:bybit:*"
|
|
6115
|
+
| "sign:bybit:queryUser"
|
|
6116
|
+
| "sign:bybit:querySubMembers"
|
|
6117
|
+
| "sign:bybit:queryCoinsBalance"
|
|
6118
|
+
| "sign:bybit:queryDepositAddress"
|
|
6119
|
+
| "sign:bybit:universalTransfer"
|
|
6120
|
+
| "sign:bybit:withdraw"
|
|
6121
|
+
| "sign:bybit:withdrawals"
|
|
5429
6122
|
| "sign:coinbase:*"
|
|
5430
6123
|
| "sign:coinbase:accounts:list"
|
|
5431
6124
|
| "sign:coinbase:portfolios:list"
|
|
@@ -5660,9 +6353,11 @@ export interface components {
|
|
|
5660
6353
|
| "rpc:createTransaction:*"
|
|
5661
6354
|
| "rpc:createTransaction:evm"
|
|
5662
6355
|
| "rpc:retryTransaction"
|
|
6356
|
+
| "rpc:cancelTransaction"
|
|
5663
6357
|
| "rpc:getTransaction"
|
|
5664
6358
|
| "rpc:listTransactions"
|
|
5665
6359
|
| "rpc:binance"
|
|
6360
|
+
| "rpc:bybit"
|
|
5666
6361
|
| "rpc:coinbase";
|
|
5667
6362
|
/**
|
|
5668
6363
|
* @description This type specifies the interpretation of the `fee` field in Babylon
|
|
@@ -5811,6 +6506,8 @@ export interface components {
|
|
|
5811
6506
|
| "SiweChallengeExpired"
|
|
5812
6507
|
| "SiweMessageNotValid"
|
|
5813
6508
|
| "SiweMessageInvalidSignature"
|
|
6509
|
+
| "SiwsChallengeExpired"
|
|
6510
|
+
| "SiwsMessageInvalid"
|
|
5814
6511
|
| "Acl";
|
|
5815
6512
|
/**
|
|
5816
6513
|
* @description Specifies a fork of the `BeaconChain`, to prevent replay attacks.
|
|
@@ -6359,8 +7056,16 @@ export interface components {
|
|
|
6359
7056
|
| components["schemas"]["WithdrawResponse"]
|
|
6360
7057
|
| components["schemas"]["WithdrawHistoryResponse"]
|
|
6361
7058
|
| components["schemas"]["DepositResponse"]
|
|
7059
|
+
| components["schemas"]["DepositHistoryResponse"]
|
|
6362
7060
|
| components["schemas"]["ListSubAccountsResponse"]
|
|
6363
7061
|
| components["schemas"]["CoinInfoResponse"]
|
|
7062
|
+
| components["schemas"]["BybitQueryUserResponse"]
|
|
7063
|
+
| components["schemas"]["BybitQuerySubMembersResponse"]
|
|
7064
|
+
| components["schemas"]["BybitQueryCoinsBalanceResponse"]
|
|
7065
|
+
| components["schemas"]["BybitQueryDepositAddressResponse"]
|
|
7066
|
+
| components["schemas"]["BybitUniversalTransferResponse"]
|
|
7067
|
+
| components["schemas"]["BybitWithdrawResponse"]
|
|
7068
|
+
| components["schemas"]["BybitWithdrawalsResponse"]
|
|
6364
7069
|
| components["schemas"]["CoinbaseListAccountsResponse"]
|
|
6365
7070
|
| components["schemas"]["CoinbaseListPortfoliosResponse"]
|
|
6366
7071
|
| components["schemas"]["CoinbaseMoveFundsResponse"];
|
|
@@ -6512,6 +7217,10 @@ export interface components {
|
|
|
6512
7217
|
/** @enum {string} */
|
|
6513
7218
|
kind: "CoinbaseApi";
|
|
6514
7219
|
},
|
|
7220
|
+
components["schemas"]["BybitApiPropertiesPatch"] & {
|
|
7221
|
+
/** @enum {string} */
|
|
7222
|
+
kind: "BybitApi";
|
|
7223
|
+
},
|
|
6515
7224
|
]
|
|
6516
7225
|
>;
|
|
6517
7226
|
/** @enum {string} */
|
|
@@ -6558,7 +7267,8 @@ export interface components {
|
|
|
6558
7267
|
| "SecpLtcTest"
|
|
6559
7268
|
| "SecpXrpAddr"
|
|
6560
7269
|
| "Ed25519XrpAddr"
|
|
6561
|
-
| "BabyJubjub"
|
|
7270
|
+
| "BabyJubjub"
|
|
7271
|
+
| "HmacSha256";
|
|
6562
7272
|
KeyTypeAndDerivationPath: {
|
|
6563
7273
|
/**
|
|
6564
7274
|
* @description List of derivation paths for which to derive.
|
|
@@ -7066,11 +7776,32 @@ export interface components {
|
|
|
7066
7776
|
| "BabylonCovSign"
|
|
7067
7777
|
| "BabylonRegistration"
|
|
7068
7778
|
| "BabylonStaking"
|
|
7069
|
-
| "
|
|
7779
|
+
| "BinanceSubToMaster"
|
|
7780
|
+
| "BinanceSubToSub"
|
|
7781
|
+
| "BinanceUniversalTransfer"
|
|
7782
|
+
| "BinanceSubAccountAssets"
|
|
7783
|
+
| "BinanceAccountInfo"
|
|
7784
|
+
| "BinanceSubAccountTransferHistory"
|
|
7785
|
+
| "BinanceUniversalTransferHistory"
|
|
7786
|
+
| "BinanceWithdraw"
|
|
7787
|
+
| "BinanceWithdrawHistory"
|
|
7788
|
+
| "BinanceDeposit"
|
|
7789
|
+
| "BinanceDepositHistory"
|
|
7790
|
+
| "BinanceListSubAccounts"
|
|
7791
|
+
| "BinanceCoinInfo"
|
|
7070
7792
|
| "BlobSign"
|
|
7071
7793
|
| "BtcMessageSign"
|
|
7072
7794
|
| "BtcSign"
|
|
7073
|
-
| "
|
|
7795
|
+
| "BybitQueryUser"
|
|
7796
|
+
| "BybitQuerySubMembers"
|
|
7797
|
+
| "BybitQueryCoinsBalance"
|
|
7798
|
+
| "BybitQueryDepositAddress"
|
|
7799
|
+
| "BybitUniversalTransfer"
|
|
7800
|
+
| "BybitWithdraw"
|
|
7801
|
+
| "BybitWithdrawals"
|
|
7802
|
+
| "CoinbaseListAccounts"
|
|
7803
|
+
| "CoinbaseListPortfolios"
|
|
7804
|
+
| "CoinbaseMoveFunds"
|
|
7074
7805
|
| "DiffieHellman"
|
|
7075
7806
|
| "PsbtSign"
|
|
7076
7807
|
| "TaprootSign"
|
|
@@ -8095,6 +8826,7 @@ export interface components {
|
|
|
8095
8826
|
| "PsbtSigningDisallowed"
|
|
8096
8827
|
| "BabylonStakingDisallowed"
|
|
8097
8828
|
| "TimeLocked"
|
|
8829
|
+
| "CelPolicyDenied"
|
|
8098
8830
|
| "BabylonStakingNetwork"
|
|
8099
8831
|
| "BabylonStakingParamsVersion"
|
|
8100
8832
|
| "BabylonStakingExplicitParams"
|
|
@@ -8114,7 +8846,8 @@ export interface components {
|
|
|
8114
8846
|
| "WasmPolicyDenied"
|
|
8115
8847
|
| "WasmPolicyFailed"
|
|
8116
8848
|
| "WebhookPoliciesDisabled"
|
|
8117
|
-
| "DeniedByWebhook"
|
|
8849
|
+
| "DeniedByWebhook"
|
|
8850
|
+
| "ExplicitlyDenied";
|
|
8118
8851
|
/** @description A struct containing all the information about a specific version of a policy. */
|
|
8119
8852
|
PolicyInfo: {
|
|
8120
8853
|
/** @description The access-control entries for the policy. */
|
|
@@ -8867,24 +9600,21 @@ export interface components {
|
|
|
8867
9600
|
| components["schemas"]["SignerClientErrorCode"]
|
|
8868
9601
|
| components["schemas"]["RpcEvmErrorCode"];
|
|
8869
9602
|
/** @enum {string} */
|
|
8870
|
-
RpcApiErrorOwnCodes: "MfaRequired" | "ConcurrentTransactionFailed";
|
|
9603
|
+
RpcApiErrorOwnCodes: "MfaRequired" | "ConcurrentTransactionFailed" | "InvalidTxStatus";
|
|
8871
9604
|
/** @enum {string} */
|
|
8872
|
-
RpcEvmErrorCode:
|
|
8873
|
-
| "SubmissionFailed"
|
|
8874
|
-
| "FailedToReserveNonce"
|
|
8875
|
-
| "InvalidTxStatus"
|
|
8876
|
-
| "MissingTxFrom";
|
|
9605
|
+
RpcEvmErrorCode: "SubmissionFailed" | "FailedToReserveNonce" | "MissingTxField" | "Signer";
|
|
8877
9606
|
/**
|
|
8878
9607
|
* @description The RPC API method and matching parameters.
|
|
8879
9608
|
*
|
|
8880
9609
|
* Top-level dispatch. Wire format is preserved by `#[serde(untagged)]`: each
|
|
8881
9610
|
* inbound request is matched against one of the internally-tagged inner enums
|
|
8882
9611
|
* ([`CsRpc`] for the core methods, [`BinanceRpc`] for the Binance family,
|
|
8883
|
-
* [`CoinbaseRpc`] for the Coinbase family).
|
|
9612
|
+
* [`BybitRpc`] for the Bybit family, [`CoinbaseRpc`] for the Coinbase family).
|
|
8884
9613
|
*/
|
|
8885
9614
|
RpcMethod:
|
|
8886
9615
|
| components["schemas"]["CsRpc"]
|
|
8887
9616
|
| components["schemas"]["BinanceRpc"]
|
|
9617
|
+
| components["schemas"]["BybitRpc"]
|
|
8888
9618
|
| components["schemas"]["CoinbaseRpc"];
|
|
8889
9619
|
/** @description All scopes for accessing CubeSigner APIs */
|
|
8890
9620
|
Scope: components["schemas"]["ExplicitScope"] | string;
|
|
@@ -9043,6 +9773,37 @@ export interface components {
|
|
|
9043
9773
|
/** @description Optional policy evaluation tree, if requested */
|
|
9044
9774
|
policy_eval_tree?: unknown;
|
|
9045
9775
|
};
|
|
9776
|
+
/**
|
|
9777
|
+
* @description The structured input to a Sign-In With Solana request (`SolanaSignInInput` in the spec).
|
|
9778
|
+
*
|
|
9779
|
+
* The relying party fills in `domain`/`address`/`uri`/... and the wallet renders it into the
|
|
9780
|
+
* human-readable message (see [SignInInput::to_message_text]) that it signs.
|
|
9781
|
+
*/
|
|
9782
|
+
SignInInput: {
|
|
9783
|
+
/** @description The base58-encoded Solana (ed25519) public key performing the sign-in. */
|
|
9784
|
+
address: string;
|
|
9785
|
+
chainId?: components["schemas"]["SolanaNetwork"] | null;
|
|
9786
|
+
/** @description The RFC 3986 authority that is requesting the sign-in. */
|
|
9787
|
+
domain: string;
|
|
9788
|
+
/** @description The ISO 8601 datetime string after which the signed message is no longer valid. */
|
|
9789
|
+
expirationTime?: string | null;
|
|
9790
|
+
/** @description The ISO 8601 datetime string of the time the message was issued. */
|
|
9791
|
+
issuedAt?: string | null;
|
|
9792
|
+
/** @description A randomized token used to prevent replay attacks; at least 8 alphanumeric characters. */
|
|
9793
|
+
nonce?: string | null;
|
|
9794
|
+
/** @description The ISO 8601 datetime string before which the signed message is not yet valid. */
|
|
9795
|
+
notBefore?: string | null;
|
|
9796
|
+
/** @description A system-specific identifier that may be used to uniquely refer to the sign-in request. */
|
|
9797
|
+
requestId?: string | null;
|
|
9798
|
+
/** @description A list of RFC 3986 URIs the user wishes to have resolved as part of the authentication. */
|
|
9799
|
+
resources?: string[] | null;
|
|
9800
|
+
/** @description A human-readable ASCII assertion that the user will sign; must not contain a newline. */
|
|
9801
|
+
statement?: string | null;
|
|
9802
|
+
/** @description An RFC 3986 URI referring to the resource that is the subject of the sign-in. */
|
|
9803
|
+
uri?: string | null;
|
|
9804
|
+
/** @description The version of the message (currently always `1`). */
|
|
9805
|
+
version?: string | null;
|
|
9806
|
+
};
|
|
9046
9807
|
SignResponse: {
|
|
9047
9808
|
/** @description Optional policy evaluation tree. */
|
|
9048
9809
|
policy_eval_tree?: unknown;
|
|
@@ -9151,6 +9912,56 @@ export interface components {
|
|
|
9151
9912
|
/** @description The message to sign following the EIP-191 standard. */
|
|
9152
9913
|
message: string;
|
|
9153
9914
|
};
|
|
9915
|
+
/** @description Answer to a Sign-in with Solana challenge. */
|
|
9916
|
+
SiwsCompleteRequest: {
|
|
9917
|
+
challenge_id: components["schemas"]["Id"];
|
|
9918
|
+
/** @description The base58-encoded ed25519 signature of `signed_message`. */
|
|
9919
|
+
signature: string;
|
|
9920
|
+
/** @description The base58-encoded UTF-8 bytes of the message that was signed (the rendered `SignInInput`). */
|
|
9921
|
+
signed_message: string;
|
|
9922
|
+
};
|
|
9923
|
+
/** @description Returned upon a successful SIWS authentication. */
|
|
9924
|
+
SiwsCompleteResponse: {
|
|
9925
|
+
/** @description The OIDC token corresponding to the user with the requested SIWS identity. */
|
|
9926
|
+
id_token: string;
|
|
9927
|
+
};
|
|
9928
|
+
/**
|
|
9929
|
+
* @description Initialize the request to sign in with Solana. The response will contain a structured
|
|
9930
|
+
* `SignInInput` that the client must render to text, sign, and submit via the corresponding PATCH
|
|
9931
|
+
* endpoint within 5 minutes.
|
|
9932
|
+
*/
|
|
9933
|
+
SiwsInitRequest: {
|
|
9934
|
+
/** @description The base58-encoded Solana (ed25519) public key performing the signing. */
|
|
9935
|
+
address: string;
|
|
9936
|
+
chain_id?: components["schemas"]["SolanaNetwork"] | null;
|
|
9937
|
+
/** @description The RFC 3986 authority that is requesting the signing. */
|
|
9938
|
+
domain: string;
|
|
9939
|
+
/** @description The ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid. */
|
|
9940
|
+
expiration_time?: string | null;
|
|
9941
|
+
/** @description The ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid. */
|
|
9942
|
+
not_before?: string | null;
|
|
9943
|
+
/** @description A system-specific identifier that may be used to uniquely refer to the sign-in request. */
|
|
9944
|
+
request_id?: string | null;
|
|
9945
|
+
/** @description A list of RFC 3986 URIs the user wishes to have resolved as part of authentication by the relying party. */
|
|
9946
|
+
resources?: string[];
|
|
9947
|
+
/** @description A human-readable ASCII assertion that the user will sign, and it must not contain '\n' (the byte 0x0a). */
|
|
9948
|
+
statement?: string | null;
|
|
9949
|
+
/** @description An RFC 3986 URI referring to the resource that is the subject of the signing (as in the subject of a claim). */
|
|
9950
|
+
uri?: string | null;
|
|
9951
|
+
};
|
|
9952
|
+
/**
|
|
9953
|
+
* @description A challenge returned in response to a Sign-In with Solana request.
|
|
9954
|
+
*
|
|
9955
|
+
* Contains a structured [SignInInput] that the client must render to its canonical text and sign
|
|
9956
|
+
* (ed25519) with the requested key in order to complete authentication.
|
|
9957
|
+
*
|
|
9958
|
+
* The client has until the message expires (but no more than 5 minutes) to complete the challenge.
|
|
9959
|
+
*/
|
|
9960
|
+
SiwsInitResponse: {
|
|
9961
|
+
/** @description The ID of the challenge (to include in the request when calling the PATCH ('complete') endpoint) */
|
|
9962
|
+
challenge_id: string;
|
|
9963
|
+
sign_in_input: components["schemas"]["SignInInput"];
|
|
9964
|
+
};
|
|
9154
9965
|
/** @description A Solana address and the cluster it is on. */
|
|
9155
9966
|
SolanaAddressInfo: {
|
|
9156
9967
|
/**
|
|
@@ -9165,6 +9976,19 @@ export interface components {
|
|
|
9165
9976
|
* @enum {string}
|
|
9166
9977
|
*/
|
|
9167
9978
|
SolanaCluster: "mainnet" | "devnet";
|
|
9979
|
+
/**
|
|
9980
|
+
* @description The Solana network a SIWS message is bound to (the `Chain ID` field).
|
|
9981
|
+
* @enum {string}
|
|
9982
|
+
*/
|
|
9983
|
+
SolanaNetwork:
|
|
9984
|
+
| "mainnet"
|
|
9985
|
+
| "testnet"
|
|
9986
|
+
| "devnet"
|
|
9987
|
+
| "localnet"
|
|
9988
|
+
| "solana:mainnet"
|
|
9989
|
+
| "solana:testnet"
|
|
9990
|
+
| "solana:devnet"
|
|
9991
|
+
| "solana:localnet";
|
|
9168
9992
|
/**
|
|
9169
9993
|
* @description Solana signing request
|
|
9170
9994
|
* @example {
|
|
@@ -9957,8 +10781,8 @@ export interface components {
|
|
|
9957
10781
|
asset: string;
|
|
9958
10782
|
/**
|
|
9959
10783
|
* @description Optional client-supplied transfer id. If set, Binance echoes it back
|
|
9960
|
-
* on
|
|
9961
|
-
* as a filter on
|
|
10784
|
+
* as `client_tran_id` on the `UniversalTransferResponse` and lets it be
|
|
10785
|
+
* used as a filter on
|
|
9962
10786
|
* [`UniversalTransferHistoryRequest::client_tran_id`].
|
|
9963
10787
|
*/
|
|
9964
10788
|
clientTranId?: string | null;
|
|
@@ -10833,7 +11657,7 @@ export interface components {
|
|
|
10833
11657
|
endTime?: number | null;
|
|
10834
11658
|
/**
|
|
10835
11659
|
* @description Comma-separated list of Binance-assigned withdrawal ids (the `id`
|
|
10836
|
-
* field of
|
|
11660
|
+
* field of `WithdrawResponse`). Up to 45 ids per query, per Binance.
|
|
10837
11661
|
*/
|
|
10838
11662
|
idList?: string | null;
|
|
10839
11663
|
/**
|
|
@@ -11100,6 +11924,38 @@ export interface components {
|
|
|
11100
11924
|
};
|
|
11101
11925
|
};
|
|
11102
11926
|
};
|
|
11927
|
+
/** @description Response returned by the typed `bybit_sign` endpoint. */
|
|
11928
|
+
BybitSignResponse: {
|
|
11929
|
+
content: {
|
|
11930
|
+
"application/json": {
|
|
11931
|
+
/** @description Optional policy evaluation tree. */
|
|
11932
|
+
policy_eval_tree?: unknown;
|
|
11933
|
+
} & {
|
|
11934
|
+
/**
|
|
11935
|
+
* @description The Bybit-bound payload (URL-encoded query for GET, JSON body for
|
|
11936
|
+
* POST). Submitted verbatim by the rpc-api lambda; the payload bytes are
|
|
11937
|
+
* also part of the signing input.
|
|
11938
|
+
*/
|
|
11939
|
+
payload: string;
|
|
11940
|
+
/**
|
|
11941
|
+
* Format: int32
|
|
11942
|
+
* @description Effective receive window in milliseconds.
|
|
11943
|
+
*/
|
|
11944
|
+
recv_window: number;
|
|
11945
|
+
/**
|
|
11946
|
+
* @description Hex-encoded HMAC-SHA256 signature of
|
|
11947
|
+
* `timestamp || apiKey || recvWindow || payload`. Goes into the
|
|
11948
|
+
* `X-BAPI-SIGN` header.
|
|
11949
|
+
*/
|
|
11950
|
+
signature_hex: string;
|
|
11951
|
+
/**
|
|
11952
|
+
* Format: int64
|
|
11953
|
+
* @description Signing timestamp (ms since epoch). Picked by the signer.
|
|
11954
|
+
*/
|
|
11955
|
+
timestamp_ms: number;
|
|
11956
|
+
};
|
|
11957
|
+
};
|
|
11958
|
+
};
|
|
11103
11959
|
/** @description Response returned by the typed `coinbase_sign` endpoint. */
|
|
11104
11960
|
CoinbaseSignResponse: {
|
|
11105
11961
|
content: {
|
|
@@ -12429,6 +13285,32 @@ export interface components {
|
|
|
12429
13285
|
};
|
|
12430
13286
|
};
|
|
12431
13287
|
};
|
|
13288
|
+
/** @description Returned upon a successful SIWS authentication. */
|
|
13289
|
+
SiwsCompleteResponse: {
|
|
13290
|
+
content: {
|
|
13291
|
+
"application/json": {
|
|
13292
|
+
/** @description The OIDC token corresponding to the user with the requested SIWS identity. */
|
|
13293
|
+
id_token: string;
|
|
13294
|
+
};
|
|
13295
|
+
};
|
|
13296
|
+
};
|
|
13297
|
+
/**
|
|
13298
|
+
* @description A challenge returned in response to a Sign-In with Solana request.
|
|
13299
|
+
*
|
|
13300
|
+
* Contains a structured [SignInInput] that the client must render to its canonical text and sign
|
|
13301
|
+
* (ed25519) with the requested key in order to complete authentication.
|
|
13302
|
+
*
|
|
13303
|
+
* The client has until the message expires (but no more than 5 minutes) to complete the challenge.
|
|
13304
|
+
*/
|
|
13305
|
+
SiwsInitResponse: {
|
|
13306
|
+
content: {
|
|
13307
|
+
"application/json": {
|
|
13308
|
+
/** @description The ID of the challenge (to include in the request when calling the PATCH ('complete') endpoint) */
|
|
13309
|
+
challenge_id: string;
|
|
13310
|
+
sign_in_input: components["schemas"]["SignInInput"];
|
|
13311
|
+
};
|
|
13312
|
+
};
|
|
13313
|
+
};
|
|
12432
13314
|
StakeResponse: {
|
|
12433
13315
|
content: {
|
|
12434
13316
|
"application/json": ({
|
|
@@ -12928,6 +13810,11 @@ export interface operations {
|
|
|
12928
13810
|
};
|
|
12929
13811
|
responses: {
|
|
12930
13812
|
200: components["responses"]["UpdateOrgResponse"];
|
|
13813
|
+
202: {
|
|
13814
|
+
content: {
|
|
13815
|
+
"application/json": components["schemas"]["AcceptedResponse"];
|
|
13816
|
+
};
|
|
13817
|
+
};
|
|
12931
13818
|
default: {
|
|
12932
13819
|
content: {
|
|
12933
13820
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
@@ -15583,12 +16470,21 @@ export interface operations {
|
|
|
15583
16470
|
* but extends the output with an `id_token`.
|
|
15584
16471
|
*
|
|
15585
16472
|
* This `id_token` can then be used with any CubeSigner endpoint that requires an OIDC token.
|
|
16473
|
+
* Callers must request *at least* scopes `tweet.read` and `users.read` during auth with twitter.
|
|
16474
|
+
*
|
|
16475
|
+
* By default, the id token does not contain a confirmed email;
|
|
16476
|
+
* callers can request this field be populated by requesting the `users.email` scope
|
|
16477
|
+
* and adding `fetch_email` as a URL parameter to this route.
|
|
16478
|
+
*
|
|
15586
16479
|
*
|
|
15587
16480
|
* > [!IMPORTANT]
|
|
15588
16481
|
* > This endpoint will fail unless the org is configured to allow the issuer `https://shim.oauth2.cubist.dev/twitter` and client ID being used for Twitter.
|
|
15589
16482
|
*/
|
|
15590
16483
|
oauth2Twitter: {
|
|
15591
16484
|
parameters: {
|
|
16485
|
+
query?: {
|
|
16486
|
+
fetch_email?: boolean | null;
|
|
16487
|
+
};
|
|
15592
16488
|
path: {
|
|
15593
16489
|
/**
|
|
15594
16490
|
* @description Name or ID of the desired Org
|
|
@@ -15761,6 +16657,77 @@ export interface operations {
|
|
|
15761
16657
|
};
|
|
15762
16658
|
};
|
|
15763
16659
|
};
|
|
16660
|
+
/**
|
|
16661
|
+
* Initiate login via Sign-in With Solana (SIWS).
|
|
16662
|
+
* @description Initiate login via Sign-in With Solana (SIWS).
|
|
16663
|
+
*
|
|
16664
|
+
* This endpoint generates a challenge which can be answered (via the corresponding PATCH endpoint)
|
|
16665
|
+
* to obtain an OIDC token. The OIDC token can then be exchanged for a user session via the standard
|
|
16666
|
+
* OIDC auth route.
|
|
16667
|
+
*
|
|
16668
|
+
* > [!IMPORTANT]
|
|
16669
|
+
* > For this endpoint to succeed, the org must be configured to:
|
|
16670
|
+
* > Allow the issuer `https://shim.oauth2.cubist.dev/siws` with the Org ID as the client ID
|
|
16671
|
+
*/
|
|
16672
|
+
siwsInit: {
|
|
16673
|
+
parameters: {
|
|
16674
|
+
path: {
|
|
16675
|
+
/**
|
|
16676
|
+
* @description Name or ID of the desired Org
|
|
16677
|
+
* @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
|
|
16678
|
+
*/
|
|
16679
|
+
org_id: string;
|
|
16680
|
+
};
|
|
16681
|
+
};
|
|
16682
|
+
requestBody: {
|
|
16683
|
+
content: {
|
|
16684
|
+
"application/json": components["schemas"]["SiwsInitRequest"];
|
|
16685
|
+
};
|
|
16686
|
+
};
|
|
16687
|
+
responses: {
|
|
16688
|
+
200: components["responses"]["SiwsInitResponse"];
|
|
16689
|
+
default: {
|
|
16690
|
+
content: {
|
|
16691
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
16692
|
+
};
|
|
16693
|
+
};
|
|
16694
|
+
};
|
|
16695
|
+
};
|
|
16696
|
+
/**
|
|
16697
|
+
* Complete login via Sign-in With Solana (SIWS)
|
|
16698
|
+
* @description Complete login via Sign-in With Solana (SIWS)
|
|
16699
|
+
*
|
|
16700
|
+
* If the challenge (issued by the corresponding POST endpoint) is answered correctly, this endpoint
|
|
16701
|
+
* generates an OIDC token that can then be exchanged for a user session via the standard OIDC auth route.
|
|
16702
|
+
*
|
|
16703
|
+
* > [!IMPORTANT]
|
|
16704
|
+
* > For this endpoint to succeed, the org must be configured to:
|
|
16705
|
+
* > Allow the issuer `https://shim.oauth2.cubist.dev/siws` with the Org ID as the client ID
|
|
16706
|
+
*/
|
|
16707
|
+
siwsComplete: {
|
|
16708
|
+
parameters: {
|
|
16709
|
+
path: {
|
|
16710
|
+
/**
|
|
16711
|
+
* @description Name or ID of the desired Org
|
|
16712
|
+
* @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
|
|
16713
|
+
*/
|
|
16714
|
+
org_id: string;
|
|
16715
|
+
};
|
|
16716
|
+
};
|
|
16717
|
+
requestBody: {
|
|
16718
|
+
content: {
|
|
16719
|
+
"application/json": components["schemas"]["SiwsCompleteRequest"];
|
|
16720
|
+
};
|
|
16721
|
+
};
|
|
16722
|
+
responses: {
|
|
16723
|
+
200: components["responses"]["SiwsCompleteResponse"];
|
|
16724
|
+
default: {
|
|
16725
|
+
content: {
|
|
16726
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
16727
|
+
};
|
|
16728
|
+
};
|
|
16729
|
+
};
|
|
16730
|
+
};
|
|
15764
16731
|
/**
|
|
15765
16732
|
* Allows a user to authenticate with the telegram API using the tgWebAppData value
|
|
15766
16733
|
* @description Allows a user to authenticate with the telegram API using the tgWebAppData value
|
|
@@ -17105,16 +18072,23 @@ export interface operations {
|
|
|
17105
18072
|
"page.start"?: string | null;
|
|
17106
18073
|
/**
|
|
17107
18074
|
* @description If provided, the name or ID of a role to operate on.
|
|
17108
|
-
* Cannot be specified together with
|
|
18075
|
+
* Cannot be specified together with other selectors.
|
|
17109
18076
|
* @example my-role
|
|
17110
18077
|
*/
|
|
17111
18078
|
role?: string | null;
|
|
17112
18079
|
/**
|
|
17113
18080
|
* @description If provided, the ID of a user to operate on.
|
|
17114
|
-
* Cannot be specified together with
|
|
18081
|
+
* Cannot be specified together with other selectors.
|
|
17115
18082
|
* @example User#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
|
|
17116
18083
|
*/
|
|
17117
18084
|
user?: string | null;
|
|
18085
|
+
/**
|
|
18086
|
+
* @description If provided, the ID of the user whose created role sessions to operate on.
|
|
18087
|
+
* Selects all *role* sessions created by that user (user sessions are not affected).
|
|
18088
|
+
* Cannot be specified together with other selectors.
|
|
18089
|
+
* @example User#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
|
|
18090
|
+
*/
|
|
18091
|
+
role_created_by?: string | null;
|
|
17118
18092
|
};
|
|
17119
18093
|
path: {
|
|
17120
18094
|
/**
|
|
@@ -17177,22 +18151,36 @@ export interface operations {
|
|
|
17177
18151
|
*
|
|
17178
18152
|
* If a `role` query parameter is provided, **ALL** session for **THAT ROLE** are revoked
|
|
17179
18153
|
* (if the current user has permissions to revoke sessions for the role).
|
|
18154
|
+
*
|
|
18155
|
+
* If a `role_created_by` query parameter is provided, **ROLE** sessions created by **THAT USER**
|
|
18156
|
+
* are revoked (gated by the same permissions as revoking that user's own sessions: the current
|
|
18157
|
+
* user must be that user or an org owner). User sessions are not affected. Unless the current
|
|
18158
|
+
* user is an org owner, only sessions for roles the current user is **still a member of** are
|
|
18159
|
+
* revoked (so a user cannot revoke sessions for a role they have since been removed from); org
|
|
18160
|
+
* owners revoke across all roles.
|
|
17180
18161
|
*/
|
|
17181
18162
|
revokeSessions: {
|
|
17182
18163
|
parameters: {
|
|
17183
18164
|
query?: {
|
|
17184
18165
|
/**
|
|
17185
18166
|
* @description If provided, the name or ID of a role to operate on.
|
|
17186
|
-
* Cannot be specified together with
|
|
18167
|
+
* Cannot be specified together with other selectors.
|
|
17187
18168
|
* @example my-role
|
|
17188
18169
|
*/
|
|
17189
18170
|
role?: string | null;
|
|
17190
18171
|
/**
|
|
17191
18172
|
* @description If provided, the ID of a user to operate on.
|
|
17192
|
-
* Cannot be specified together with
|
|
18173
|
+
* Cannot be specified together with other selectors.
|
|
17193
18174
|
* @example User#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
|
|
17194
18175
|
*/
|
|
17195
18176
|
user?: string | null;
|
|
18177
|
+
/**
|
|
18178
|
+
* @description If provided, the ID of the user whose created role sessions to operate on.
|
|
18179
|
+
* Selects all *role* sessions created by that user (user sessions are not affected).
|
|
18180
|
+
* Cannot be specified together with other selectors.
|
|
18181
|
+
* @example User#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
|
|
18182
|
+
*/
|
|
18183
|
+
role_created_by?: string | null;
|
|
17196
18184
|
};
|
|
17197
18185
|
path: {
|
|
17198
18186
|
/**
|
|
@@ -18032,6 +19020,9 @@ export interface operations {
|
|
|
18032
19020
|
*/
|
|
18033
19021
|
deleteOidcUser: {
|
|
18034
19022
|
parameters: {
|
|
19023
|
+
query?: {
|
|
19024
|
+
revoke_role_sessions_they_created?: boolean | null;
|
|
19025
|
+
};
|
|
18035
19026
|
path: {
|
|
18036
19027
|
/**
|
|
18037
19028
|
* @description Name or ID of the desired Org
|
|
@@ -18173,6 +19164,9 @@ export interface operations {
|
|
|
18173
19164
|
*/
|
|
18174
19165
|
deleteUser: {
|
|
18175
19166
|
parameters: {
|
|
19167
|
+
query?: {
|
|
19168
|
+
revoke_role_sessions_they_created?: boolean | null;
|
|
19169
|
+
};
|
|
18176
19170
|
path: {
|
|
18177
19171
|
/**
|
|
18178
19172
|
* @description Name or ID of the desired Org
|