|
4 | 4 | /* eslint-disable */ |
5 | 5 | import type { BlockchainWithdrawal } from '../models/BlockchainWithdrawal'; |
6 | 6 | import type { BlockchainWithdrawalRequest } from '../models/BlockchainWithdrawalRequest'; |
| 7 | +import type { DepositAddress } from '../models/DepositAddress'; |
| 8 | +import type { DepositAddressCreationRequest } from '../models/DepositAddressCreationRequest'; |
7 | 9 |
|
8 | 10 | import type { CancelablePromise } from '../core/CancelablePromise'; |
9 | 11 | import type { BaseHttpRequest } from '../core/BaseHttpRequest'; |
@@ -156,4 +158,265 @@ export class TransfersBlockchainService { |
156 | 158 | }); |
157 | 159 | } |
158 | 160 |
|
| 161 | + /** |
| 162 | + * Create new deposit address |
| 163 | + * Creates a new deposit address for the specified account and asset. The generated address can be used to receive deposits for the specified cryptocurrency or token. |
| 164 | + * |
| 165 | + * @returns DepositAddress New deposit address created. |
| 166 | + * @throws ApiError |
| 167 | + */ |
| 168 | + public createDepositAddress({ |
| 169 | + xFbapiKey, |
| 170 | + xFbapiNonce, |
| 171 | + xFbapiSignature, |
| 172 | + xFbapiTimestamp, |
| 173 | + accountId, |
| 174 | + requestBody, |
| 175 | + }: { |
| 176 | + /** |
| 177 | + * API authentication key. |
| 178 | + */ |
| 179 | + xFbapiKey: string, |
| 180 | + /** |
| 181 | + * Unique identifier of the request. |
| 182 | + */ |
| 183 | + xFbapiNonce: string, |
| 184 | + /** |
| 185 | + * Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order: |
| 186 | + * - `X-FBAPI-TIMESTAMP` - `X-FBAPI-NONCE` - HTTP request method in upper case - Endpoint path, including the query parameters - Request body |
| 187 | + */ |
| 188 | + xFbapiSignature: string, |
| 189 | + /** |
| 190 | + * Request timestamp in milliseconds since Unix epoch. |
| 191 | + */ |
| 192 | + xFbapiTimestamp: number, |
| 193 | + /** |
| 194 | + * Sub-account identifier. |
| 195 | + */ |
| 196 | + accountId: string, |
| 197 | + /** |
| 198 | + * Deposit address details |
| 199 | + */ |
| 200 | + requestBody: DepositAddressCreationRequest, |
| 201 | + }): CancelablePromise<DepositAddress> { |
| 202 | + return this.httpRequest.request({ |
| 203 | + method: 'POST', |
| 204 | + url: '/accounts/{accountId}/transfers/deposits/addresses', |
| 205 | + path: { |
| 206 | + 'accountId': accountId, |
| 207 | + }, |
| 208 | + headers: { |
| 209 | + 'X-FBAPI-KEY': xFbapiKey, |
| 210 | + 'X-FBAPI-NONCE': xFbapiNonce, |
| 211 | + 'X-FBAPI-SIGNATURE': xFbapiSignature, |
| 212 | + 'X-FBAPI-TIMESTAMP': xFbapiTimestamp, |
| 213 | + }, |
| 214 | + body: requestBody, |
| 215 | + mediaType: 'application/json', |
| 216 | + errors: { |
| 217 | + 400: `Request could not be processed due to a client error.`, |
| 218 | + 401: `Request is unauthorized`, |
| 219 | + }, |
| 220 | + }); |
| 221 | + } |
| 222 | + |
| 223 | + /** |
| 224 | + * Get list of existing deposit addresses |
| 225 | + * Retrieves a paginated list of all deposit addresses associated with the specified account. Shows addresses for different cryptocurrencies and networks that can receive deposits. |
| 226 | + * |
| 227 | + * @returns any List of existing deposit addresses. |
| 228 | + * @throws ApiError |
| 229 | + */ |
| 230 | + public getDepositAddresses({ |
| 231 | + xFbapiKey, |
| 232 | + xFbapiNonce, |
| 233 | + xFbapiSignature, |
| 234 | + xFbapiTimestamp, |
| 235 | + accountId, |
| 236 | + limit = 10, |
| 237 | + startingAfter, |
| 238 | + endingBefore, |
| 239 | + }: { |
| 240 | + /** |
| 241 | + * API authentication key. |
| 242 | + */ |
| 243 | + xFbapiKey: string, |
| 244 | + /** |
| 245 | + * Unique identifier of the request. |
| 246 | + */ |
| 247 | + xFbapiNonce: string, |
| 248 | + /** |
| 249 | + * Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order: |
| 250 | + * - `X-FBAPI-TIMESTAMP` - `X-FBAPI-NONCE` - HTTP request method in upper case - Endpoint path, including the query parameters - Request body |
| 251 | + */ |
| 252 | + xFbapiSignature: string, |
| 253 | + /** |
| 254 | + * Request timestamp in milliseconds since Unix epoch. |
| 255 | + */ |
| 256 | + xFbapiTimestamp: number, |
| 257 | + /** |
| 258 | + * Sub-account identifier. |
| 259 | + */ |
| 260 | + accountId: string, |
| 261 | + /** |
| 262 | + * Maximum number of returned items. |
| 263 | + */ |
| 264 | + limit?: number, |
| 265 | + /** |
| 266 | + * Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with `endingBefore`. |
| 267 | + */ |
| 268 | + startingAfter?: string, |
| 269 | + /** |
| 270 | + * Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with `startingAfter`. |
| 271 | + */ |
| 272 | + endingBefore?: string, |
| 273 | + }): CancelablePromise<{ |
| 274 | + addresses: Array<DepositAddress>; |
| 275 | + }> { |
| 276 | + return this.httpRequest.request({ |
| 277 | + method: 'GET', |
| 278 | + url: '/accounts/{accountId}/transfers/deposits/addresses', |
| 279 | + path: { |
| 280 | + 'accountId': accountId, |
| 281 | + }, |
| 282 | + headers: { |
| 283 | + 'X-FBAPI-KEY': xFbapiKey, |
| 284 | + 'X-FBAPI-NONCE': xFbapiNonce, |
| 285 | + 'X-FBAPI-SIGNATURE': xFbapiSignature, |
| 286 | + 'X-FBAPI-TIMESTAMP': xFbapiTimestamp, |
| 287 | + }, |
| 288 | + query: { |
| 289 | + 'limit': limit, |
| 290 | + 'startingAfter': startingAfter, |
| 291 | + 'endingBefore': endingBefore, |
| 292 | + }, |
| 293 | + errors: { |
| 294 | + 400: `Request could not be processed due to a client error.`, |
| 295 | + 401: `Request is unauthorized`, |
| 296 | + }, |
| 297 | + }); |
| 298 | + } |
| 299 | + |
| 300 | + /** |
| 301 | + * Get details of a deposit address |
| 302 | + * Retrieves detailed information about a specific deposit address, including the address string, associated network, asset type, and usage metadata. |
| 303 | + * |
| 304 | + * @returns DepositAddress New deposit address created. |
| 305 | + * @throws ApiError |
| 306 | + */ |
| 307 | + public getDepositAddressDetails({ |
| 308 | + xFbapiKey, |
| 309 | + xFbapiNonce, |
| 310 | + xFbapiSignature, |
| 311 | + xFbapiTimestamp, |
| 312 | + id, |
| 313 | + accountId, |
| 314 | + }: { |
| 315 | + /** |
| 316 | + * API authentication key. |
| 317 | + */ |
| 318 | + xFbapiKey: string, |
| 319 | + /** |
| 320 | + * Unique identifier of the request. |
| 321 | + */ |
| 322 | + xFbapiNonce: string, |
| 323 | + /** |
| 324 | + * Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order: |
| 325 | + * - `X-FBAPI-TIMESTAMP` - `X-FBAPI-NONCE` - HTTP request method in upper case - Endpoint path, including the query parameters - Request body |
| 326 | + */ |
| 327 | + xFbapiSignature: string, |
| 328 | + /** |
| 329 | + * Request timestamp in milliseconds since Unix epoch. |
| 330 | + */ |
| 331 | + xFbapiTimestamp: number, |
| 332 | + /** |
| 333 | + * Entity unique identifier. |
| 334 | + */ |
| 335 | + id: string, |
| 336 | + /** |
| 337 | + * Sub-account identifier. |
| 338 | + */ |
| 339 | + accountId: string, |
| 340 | + }): CancelablePromise<DepositAddress> { |
| 341 | + return this.httpRequest.request({ |
| 342 | + method: 'GET', |
| 343 | + url: '/accounts/{accountId}/transfers/deposits/addresses/{id}', |
| 344 | + path: { |
| 345 | + 'id': id, |
| 346 | + 'accountId': accountId, |
| 347 | + }, |
| 348 | + headers: { |
| 349 | + 'X-FBAPI-KEY': xFbapiKey, |
| 350 | + 'X-FBAPI-NONCE': xFbapiNonce, |
| 351 | + 'X-FBAPI-SIGNATURE': xFbapiSignature, |
| 352 | + 'X-FBAPI-TIMESTAMP': xFbapiTimestamp, |
| 353 | + }, |
| 354 | + errors: { |
| 355 | + 400: `Request could not be processed due to a client error.`, |
| 356 | + 401: `Request is unauthorized`, |
| 357 | + }, |
| 358 | + }); |
| 359 | + } |
| 360 | + |
| 361 | + /** |
| 362 | + * Disable a deposit address |
| 363 | + * Disables a specific deposit address, preventing it from receiving new deposits. Existing funds sent to the address may still be processed depending on timing and confirmation status. |
| 364 | + * |
| 365 | + * @returns any Deposit address disabled. |
| 366 | + * @throws ApiError |
| 367 | + */ |
| 368 | + public disableDepositAddress({ |
| 369 | + xFbapiKey, |
| 370 | + xFbapiNonce, |
| 371 | + xFbapiSignature, |
| 372 | + xFbapiTimestamp, |
| 373 | + id, |
| 374 | + accountId, |
| 375 | + }: { |
| 376 | + /** |
| 377 | + * API authentication key. |
| 378 | + */ |
| 379 | + xFbapiKey: string, |
| 380 | + /** |
| 381 | + * Unique identifier of the request. |
| 382 | + */ |
| 383 | + xFbapiNonce: string, |
| 384 | + /** |
| 385 | + * Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order: |
| 386 | + * - `X-FBAPI-TIMESTAMP` - `X-FBAPI-NONCE` - HTTP request method in upper case - Endpoint path, including the query parameters - Request body |
| 387 | + */ |
| 388 | + xFbapiSignature: string, |
| 389 | + /** |
| 390 | + * Request timestamp in milliseconds since Unix epoch. |
| 391 | + */ |
| 392 | + xFbapiTimestamp: number, |
| 393 | + /** |
| 394 | + * Entity unique identifier. |
| 395 | + */ |
| 396 | + id: string, |
| 397 | + /** |
| 398 | + * Sub-account identifier. |
| 399 | + */ |
| 400 | + accountId: string, |
| 401 | + }): CancelablePromise<any> { |
| 402 | + return this.httpRequest.request({ |
| 403 | + method: 'DELETE', |
| 404 | + url: '/accounts/{accountId}/transfers/deposits/addresses/{id}', |
| 405 | + path: { |
| 406 | + 'id': id, |
| 407 | + 'accountId': accountId, |
| 408 | + }, |
| 409 | + headers: { |
| 410 | + 'X-FBAPI-KEY': xFbapiKey, |
| 411 | + 'X-FBAPI-NONCE': xFbapiNonce, |
| 412 | + 'X-FBAPI-SIGNATURE': xFbapiSignature, |
| 413 | + 'X-FBAPI-TIMESTAMP': xFbapiTimestamp, |
| 414 | + }, |
| 415 | + errors: { |
| 416 | + 400: `Request could not be processed due to a client error.`, |
| 417 | + 401: `Request is unauthorized`, |
| 418 | + }, |
| 419 | + }); |
| 420 | + } |
| 421 | + |
159 | 422 | } |
0 commit comments