squarefi-bff-api-module 1.36.63 → 1.36.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/types/autogen/apiV1External.types.d.ts +157 -24
- package/dist/api/types/autogen/apiV1Frontend.types.d.ts +215 -110
- package/dist/api/types/autogen/apiV1Legacy.types.d.ts +207 -38
- package/dist/api/types/autogen/apiV1Tenant.types.d.ts +263 -273
- package/dist/api/types/autogen/apiV2.types.d.ts +7 -0
- package/package.json +1 -1
|
@@ -2538,6 +2538,10 @@ export interface paths {
|
|
|
2538
2538
|
sub_account_type?: "prepaid" | "balance";
|
|
2539
2539
|
/** @description Filter cards by status.
|
|
2540
2540
|
* Accepts a single value or a comma-separated list, e.g. `status=ACTIVE,CANCELED`.
|
|
2541
|
+
*
|
|
2542
|
+
* Cards whose creation was refused — FAILED with no card behind them — are left
|
|
2543
|
+
* out of the listing: they carry no number, no balance and nothing to act on.
|
|
2544
|
+
* Pass `status=FAILED` to get them back.
|
|
2541
2545
|
* */
|
|
2542
2546
|
status?: ("ACTIVE" | "INACTIVE" | "SUSPENDED" | "CANCELED")[];
|
|
2543
2547
|
/** @description Filter cards by last 4 digits of the card number (partial, case-insensitive match) */
|
|
@@ -4703,6 +4707,8 @@ export interface paths {
|
|
|
4703
4707
|
/**
|
|
4704
4708
|
* Calculate order
|
|
4705
4709
|
* @description Pre-calculates order amounts, fees and exchange rates without creating an order.
|
|
4710
|
+
* The quote is priced for the wallet bound to the API key; a `wallet_id` in the
|
|
4711
|
+
* query is ignored.
|
|
4706
4712
|
*
|
|
4707
4713
|
* **Authentication**: x-api-key header required
|
|
4708
4714
|
*
|
|
@@ -4716,6 +4722,9 @@ export interface paths {
|
|
|
4716
4722
|
to_currency_id: string;
|
|
4717
4723
|
/** @description If `true`, calculates inputs needed to receive the given amount. */
|
|
4718
4724
|
is_reverse?: "true" | "false";
|
|
4725
|
+
/** @description If `true` (default), the network fee is subtracted from `result_amount`. If `false`, the fee is added on top of `from_amount` and the recipient gets the full converted amount. Ignored for reverse calculations.
|
|
4726
|
+
* */
|
|
4727
|
+
is_subtract?: "true" | "false";
|
|
4719
4728
|
/** @description Destination address (for crypto withdrawals; affects network fee estimation). */
|
|
4720
4729
|
to_address?: string;
|
|
4721
4730
|
};
|
|
@@ -4734,30 +4743,7 @@ export interface paths {
|
|
|
4734
4743
|
"application/json": {
|
|
4735
4744
|
/** @example true */
|
|
4736
4745
|
success?: boolean;
|
|
4737
|
-
data?:
|
|
4738
|
-
from_amount?: number;
|
|
4739
|
-
to_amount?: number;
|
|
4740
|
-
rate?: number;
|
|
4741
|
-
fee?: number;
|
|
4742
|
-
/** Format: uuid */
|
|
4743
|
-
fee_currency?: string;
|
|
4744
|
-
network_fee?: number | null;
|
|
4745
|
-
/** Format: uuid */
|
|
4746
|
-
network_fee_currency?: string | null;
|
|
4747
|
-
total_amount?: number;
|
|
4748
|
-
from_currency?: {
|
|
4749
|
-
/** Format: uuid */
|
|
4750
|
-
uuid?: string;
|
|
4751
|
-
symbol?: string;
|
|
4752
|
-
name?: string;
|
|
4753
|
-
};
|
|
4754
|
-
to_currency?: {
|
|
4755
|
-
/** Format: uuid */
|
|
4756
|
-
uuid?: string;
|
|
4757
|
-
symbol?: string;
|
|
4758
|
-
name?: string;
|
|
4759
|
-
};
|
|
4760
|
-
};
|
|
4746
|
+
data?: components["schemas"]["OrderCalculation"];
|
|
4761
4747
|
};
|
|
4762
4748
|
};
|
|
4763
4749
|
};
|
|
@@ -4770,6 +4756,15 @@ export interface paths {
|
|
|
4770
4756
|
"application/json": components["schemas"]["ApiErrorResponse"];
|
|
4771
4757
|
};
|
|
4772
4758
|
};
|
|
4759
|
+
/** @description The wallet's KYC status does not allow the operation (`KYC_REQUIREMENTS_NOT_MET`) */
|
|
4760
|
+
403: {
|
|
4761
|
+
headers: {
|
|
4762
|
+
[name: string]: unknown;
|
|
4763
|
+
};
|
|
4764
|
+
content: {
|
|
4765
|
+
"application/json": components["schemas"]["ApiErrorResponse"];
|
|
4766
|
+
};
|
|
4767
|
+
};
|
|
4773
4768
|
};
|
|
4774
4769
|
};
|
|
4775
4770
|
put?: never;
|
|
@@ -7141,6 +7136,144 @@ export interface components {
|
|
|
7141
7136
|
* @enum {string}
|
|
7142
7137
|
*/
|
|
7143
7138
|
OrderTypeId: "EXCHANGE_OMNI" | "EXCHANGE_OMNI_ONRAMP" | "EXCHANGE_OMNI_OFFRAMP" | "EXCHANGE_OMNI_CRYPTO" | "EXCHANGE_CRYPTO_INTERNAL" | "L2F_ACH_ONRAMP" | "L2F_ACH_OFFRAMP" | "L2F_SEPA_ONRAMP" | "L2F_SEPA_OFFRAMP" | "L2F_SWIFT_ONRAMP" | "L2F_SWIFT_OFFRAMP" | "L2F_WIRE_ONRAMP" | "L2F_WIRE_OFFRAMP" | "L2F_CHAPS_ONRAMP" | "L2F_CHAPS_OFFRAMP" | "L2F_FPS_ONRAMP" | "L2F_FPS_OFFRAMP" | "BRL_WIRE_ONRAMP" | "BRL_WIRE_OFFRAMP" | "BRL_ACH_ONRAMP" | "BRL_ACH_OFFRAMP" | "BRL_RTP_OFFRAMP" | "DLS_WIRE_ONRAMP" | "DLS_WIRE_OFFRAMP" | "DLS_ACH_ONRAMP" | "DLS_ACH_OFFRAMP" | "DLS_SEPA_ONRAMP" | "DLS_SEPA_OFFRAMP" | "DLS_SWIFT_ONRAMP" | "DLS_SWIFT_OFFRAMP" | "BC1_SEPA_ONRAMP" | "BC1_SEPA_OFFRAMP" | "BC1_SWIFT_ONRAMP" | "BC1_SWIFT_OFFRAMP" | "BC3_SEPA_ONRAMP" | "BC3_SEPA_OFFRAMP" | "RPP_SWIFT_OFFRAMP" | "RPP_SEPA_OFFRAMP" | "RPP_FPS_OFFRAMP" | "RPP_ACH_OFFRAMP" | "OMNIBUS_CRYPTO_TRANSFER" | "OMNIBUS_CRYPTO_WITHDRAWAL" | "OMNIBUS_INTERNAL_TRANSFER" | "SEGREGATED_CRYPTO_TRANSFER" | "TRANSFER_INTERNAL" | "TRANSFER_CARD_PREPAID" | "TRANSFER_CARD_SUBACCOUNT" | "TRANSFER_CARD_WHOLESALE" | "WITHDRAW_CARD_PREPAID" | "WITHDRAW_CARD_SUBACCOUNT" | "REFUND_CARD_PREPAID" | "REFUND_CARD_SUBACCOUNT" | "RN_CARDS_OFFRAMP" | "CARD_ISSUING_FEE" | "MONTHLY_FEE";
|
|
7139
|
+
OrderCalculation: {
|
|
7140
|
+
/**
|
|
7141
|
+
* Format: uuid
|
|
7142
|
+
* @description Source currency UUID.
|
|
7143
|
+
*/
|
|
7144
|
+
from_currency: string;
|
|
7145
|
+
/**
|
|
7146
|
+
* Format: uuid
|
|
7147
|
+
* @description Destination currency UUID.
|
|
7148
|
+
*/
|
|
7149
|
+
to_currency: string;
|
|
7150
|
+
/**
|
|
7151
|
+
* @description Source currency symbol.
|
|
7152
|
+
* @example USDT
|
|
7153
|
+
*/
|
|
7154
|
+
from_symbol: string;
|
|
7155
|
+
/**
|
|
7156
|
+
* @description Destination currency symbol.
|
|
7157
|
+
* @example USD
|
|
7158
|
+
*/
|
|
7159
|
+
to_symbol: string;
|
|
7160
|
+
/**
|
|
7161
|
+
* @description Decimals the source-currency amounts are truncated to.
|
|
7162
|
+
* @example 6
|
|
7163
|
+
*/
|
|
7164
|
+
from_decimals: number;
|
|
7165
|
+
/**
|
|
7166
|
+
* @description Decimals the destination-currency amounts are truncated to.
|
|
7167
|
+
* @example 2
|
|
7168
|
+
*/
|
|
7169
|
+
to_decimals: number;
|
|
7170
|
+
/**
|
|
7171
|
+
* @description Amount to be spent in the source currency.
|
|
7172
|
+
* @example 100
|
|
7173
|
+
*/
|
|
7174
|
+
from_amount: number;
|
|
7175
|
+
/**
|
|
7176
|
+
* @description Amount to be received in the destination currency.
|
|
7177
|
+
* @example 98.5
|
|
7178
|
+
*/
|
|
7179
|
+
result_amount: number;
|
|
7180
|
+
/**
|
|
7181
|
+
* @description Amount converted before fees, in the destination currency.
|
|
7182
|
+
* @example 100
|
|
7183
|
+
*/
|
|
7184
|
+
net_amount: number;
|
|
7185
|
+
/**
|
|
7186
|
+
* @description Total fees (`comission` + `network_fee`), in the source currency.
|
|
7187
|
+
* @example 1.5
|
|
7188
|
+
*/
|
|
7189
|
+
fees: number;
|
|
7190
|
+
/**
|
|
7191
|
+
* @description Service commission excluding the network fee (wire name is intentionally `comission`).
|
|
7192
|
+
* @example 1.5
|
|
7193
|
+
*/
|
|
7194
|
+
comission: number;
|
|
7195
|
+
/**
|
|
7196
|
+
* Format: uuid
|
|
7197
|
+
* @description Currency UUID `comission` is denominated in. Omitted by older engines — then it is the same currency on both sides.
|
|
7198
|
+
*/
|
|
7199
|
+
commission_currency?: string;
|
|
7200
|
+
/**
|
|
7201
|
+
* @description Percentage part of the commission, in the commission currency.
|
|
7202
|
+
* @example 1
|
|
7203
|
+
*/
|
|
7204
|
+
percent_commission: number;
|
|
7205
|
+
/**
|
|
7206
|
+
* @description Fixed part of the commission, in the commission currency.
|
|
7207
|
+
* @example 0.5
|
|
7208
|
+
*/
|
|
7209
|
+
fixed_commission: number;
|
|
7210
|
+
/**
|
|
7211
|
+
* @description Markup applied, in whole percent.
|
|
7212
|
+
* @example 1.5
|
|
7213
|
+
*/
|
|
7214
|
+
base_markup: number;
|
|
7215
|
+
/**
|
|
7216
|
+
* @description Estimated blockchain network fee in the source currency (crypto withdrawals only, otherwise 0).
|
|
7217
|
+
* @example 0
|
|
7218
|
+
*/
|
|
7219
|
+
network_fee: number;
|
|
7220
|
+
/**
|
|
7221
|
+
* @description Network fee in the chain native currency (ETH, BNB, …), 18 decimals.
|
|
7222
|
+
* @example 0
|
|
7223
|
+
*/
|
|
7224
|
+
network_fee_native: number;
|
|
7225
|
+
/**
|
|
7226
|
+
* @description Network fee in USD, 8 decimals.
|
|
7227
|
+
* @example 0
|
|
7228
|
+
*/
|
|
7229
|
+
network_fee_usd: number;
|
|
7230
|
+
/**
|
|
7231
|
+
* @description Transaction fee. Always 0 for now.
|
|
7232
|
+
* @example 0
|
|
7233
|
+
*/
|
|
7234
|
+
transaction_fee: number;
|
|
7235
|
+
/**
|
|
7236
|
+
* @description Exchange rate applied (source → destination), 6 decimals. Includes the tenant FX spread.
|
|
7237
|
+
* @example 0.985
|
|
7238
|
+
*/
|
|
7239
|
+
rate: number;
|
|
7240
|
+
/**
|
|
7241
|
+
* @description Market rate before the tenant FX spread. Equal to `rate` when no spread applies.
|
|
7242
|
+
* @example 1
|
|
7243
|
+
*/
|
|
7244
|
+
base_rate: number;
|
|
7245
|
+
/**
|
|
7246
|
+
* @description Tenant FX spread already taken off `rate`, in whole percent.
|
|
7247
|
+
* @example 1.5
|
|
7248
|
+
*/
|
|
7249
|
+
fx_spread: number;
|
|
7250
|
+
/**
|
|
7251
|
+
* @description Percent markup of the applied tariff.
|
|
7252
|
+
* @example 1.5
|
|
7253
|
+
*/
|
|
7254
|
+
markup: number;
|
|
7255
|
+
/**
|
|
7256
|
+
* @description Fixed USD markup of the applied tariff.
|
|
7257
|
+
* @example 0.5
|
|
7258
|
+
*/
|
|
7259
|
+
markup_usd: number;
|
|
7260
|
+
/**
|
|
7261
|
+
* @description Percent markup on the network fee.
|
|
7262
|
+
* @example 0
|
|
7263
|
+
*/
|
|
7264
|
+
gas_markup: number;
|
|
7265
|
+
/**
|
|
7266
|
+
* @description Percent discount on the network fee.
|
|
7267
|
+
* @example 0
|
|
7268
|
+
*/
|
|
7269
|
+
gas_discount: number;
|
|
7270
|
+
/** @description Whether the order type is an internal (on-platform) operation. */
|
|
7271
|
+
is_internal: boolean;
|
|
7272
|
+
/** @description Whether the operation is allowed for the caller with these inputs. */
|
|
7273
|
+
allowed: boolean;
|
|
7274
|
+
/** @description Calculation error text, `null` on success. */
|
|
7275
|
+
error: string | null;
|
|
7276
|
+
};
|
|
7144
7277
|
/** @description Card object with all properties */
|
|
7145
7278
|
IssuingCard: {
|
|
7146
7279
|
/**
|
|
@@ -2696,6 +2696,10 @@ export interface paths {
|
|
|
2696
2696
|
sub_account_type?: "prepaid" | "balance";
|
|
2697
2697
|
/** @description Filter cards by status (matches issuing_cards.card_status).
|
|
2698
2698
|
* Accepts a single value or a comma-separated list, e.g. `status=ACTIVE,FROZEN`.
|
|
2699
|
+
*
|
|
2700
|
+
* Cards whose creation the vendor refused — FAILED with no card behind them —
|
|
2701
|
+
* are left out of the listing: they carry no number, no balance and nothing the
|
|
2702
|
+
* client can act on. Pass `status=FAILED` to get them back.
|
|
2699
2703
|
* */
|
|
2700
2704
|
status?: ("ACTIVE" | "INACTIVE" | "FROZEN" | "CANCELED" | "CLOSED" | "BLOCKED" | "FAILED" | "PENDING")[];
|
|
2701
2705
|
/** @description Filter cards by last 4 digits of the card number (partial, case-insensitive match) */
|
|
@@ -11661,9 +11665,14 @@ export interface paths {
|
|
|
11661
11665
|
*
|
|
11662
11666
|
* **Authentication**: Bearer token with x-tenant-id header required
|
|
11663
11667
|
*
|
|
11664
|
-
* **Access Control**: Any active wallet member. The
|
|
11665
|
-
*
|
|
11666
|
-
* `
|
|
11668
|
+
* **Access Control**: Any active wallet member. The response shape depends on the caller's role and
|
|
11669
|
+
* is told apart by `access_role`:
|
|
11670
|
+
* - `owner` / `admin` / `auditor` — the full wallet (`WalletDetails`): identity, KYC, `balance`,
|
|
11671
|
+
* `fiat_accounts`, `base_currency` and the totals.
|
|
11672
|
+
* - `user` — a shell-only wallet (`WalletDetailsScopedUser`): `uuid`, `id`, `name`, `display_name`,
|
|
11673
|
+
* `tenant_id`, `kyc_info`, `created_at` + the role fields. `logo_url`, `balance`, `fiat_accounts`,
|
|
11674
|
+
* `base_currency`, `fiat_total`, `crypto_total`, `pending_balance` and `total_amount` are absent
|
|
11675
|
+
* (not null) for that role — check `access_role` before reading them.
|
|
11667
11676
|
*
|
|
11668
11677
|
*/
|
|
11669
11678
|
get: {
|
|
@@ -11692,62 +11701,7 @@ export interface paths {
|
|
|
11692
11701
|
"application/json": {
|
|
11693
11702
|
/** @example true */
|
|
11694
11703
|
success: boolean;
|
|
11695
|
-
data:
|
|
11696
|
-
/** Format: uuid */
|
|
11697
|
-
uuid: string;
|
|
11698
|
-
name: string | null;
|
|
11699
|
-
/**
|
|
11700
|
-
* @description Computed label — wallet name, else KYC-derived (business_name / first+last), else "New account". Always present.
|
|
11701
|
-
* @example Acme LLC
|
|
11702
|
-
*/
|
|
11703
|
-
display_name?: string;
|
|
11704
|
-
logo_url: string | null;
|
|
11705
|
-
/** Format: uuid */
|
|
11706
|
-
tenant_id: string;
|
|
11707
|
-
/** Format: date-time */
|
|
11708
|
-
created_at: string;
|
|
11709
|
-
kyc_info: {
|
|
11710
|
-
type: string;
|
|
11711
|
-
status: string;
|
|
11712
|
-
business_name: string | null;
|
|
11713
|
-
first_name: string | null;
|
|
11714
|
-
last_name: string | null;
|
|
11715
|
-
email: string | null;
|
|
11716
|
-
phone: string | null;
|
|
11717
|
-
} | null;
|
|
11718
|
-
/** @description Aggregated crypto balances */
|
|
11719
|
-
balance: {
|
|
11720
|
-
symbol: string;
|
|
11721
|
-
icon?: string | null;
|
|
11722
|
-
name: string;
|
|
11723
|
-
is_crypto: boolean;
|
|
11724
|
-
decimal: number;
|
|
11725
|
-
amount: number;
|
|
11726
|
-
fiat_amount: number;
|
|
11727
|
-
details: components["schemas"]["AggregatedBalanceDetails"][];
|
|
11728
|
-
}[];
|
|
11729
|
-
fiat_accounts: Record<string, never>[];
|
|
11730
|
-
/** @description User's base currency */
|
|
11731
|
-
base_currency: string | null;
|
|
11732
|
-
fiat_total: number;
|
|
11733
|
-
crypto_total: number;
|
|
11734
|
-
pending_balance: number;
|
|
11735
|
-
total_amount: number;
|
|
11736
|
-
/**
|
|
11737
|
-
* @description Legacy alias of `access_role`. Always equals `access_role` when
|
|
11738
|
-
* present. Kept for backward compatibility — prefer `access_role`.
|
|
11739
|
-
* Only present when called via member access.
|
|
11740
|
-
*
|
|
11741
|
-
* @enum {string}
|
|
11742
|
-
*/
|
|
11743
|
-
role?: "owner" | "admin" | "user" | "auditor";
|
|
11744
|
-
/**
|
|
11745
|
-
* @description User's role for this wallet (only present when called via member access)
|
|
11746
|
-
* @enum {string}
|
|
11747
|
-
*/
|
|
11748
|
-
access_role?: "owner" | "admin" | "user" | "auditor";
|
|
11749
|
-
is_owner?: boolean;
|
|
11750
|
-
};
|
|
11704
|
+
data: components["schemas"]["WalletDetails"] | components["schemas"]["WalletDetailsScopedUser"];
|
|
11751
11705
|
};
|
|
11752
11706
|
};
|
|
11753
11707
|
};
|
|
@@ -12013,7 +11967,16 @@ export interface paths {
|
|
|
12013
11967
|
};
|
|
12014
11968
|
/**
|
|
12015
11969
|
* List crypto addresses
|
|
12016
|
-
* @description Retrieves
|
|
11970
|
+
* @description Retrieves the crypto addresses of a wallet, newest first.
|
|
11971
|
+
*
|
|
11972
|
+
* Every item embeds the full network object in `chain` (schema `Chain`) — read `chain.id`
|
|
11973
|
+
* for the numeric chain ID. The single-address endpoints
|
|
11974
|
+
* (`GET` / `POST /frontend/wallets/{wallet_id}/addresses/{chain}`) return the same row with
|
|
11975
|
+
* `chain` as that number instead. Match an address across endpoints by `uuid`.
|
|
11976
|
+
*
|
|
11977
|
+
* Without `is_active` only active addresses are returned. Creation is idempotent per chain,
|
|
11978
|
+
* so a wallet normally holds one active address per chain; should several be active, the
|
|
11979
|
+
* first item with a given `chain.id` is the one `GET …/addresses/{chain}` returns for it.
|
|
12017
11980
|
*
|
|
12018
11981
|
* **Authentication**: Bearer token with x-tenant-id header required
|
|
12019
11982
|
*
|
|
@@ -12023,9 +11986,9 @@ export interface paths {
|
|
|
12023
11986
|
get: {
|
|
12024
11987
|
parameters: {
|
|
12025
11988
|
query?: {
|
|
12026
|
-
/** @description Filter by
|
|
12027
|
-
chain?:
|
|
12028
|
-
/** @description Filter by active status */
|
|
11989
|
+
/** @description Filter by numeric chain ID (`chain.id` of the items) */
|
|
11990
|
+
chain?: number;
|
|
11991
|
+
/** @description Filter by active status. Omitted → active addresses only. */
|
|
12029
11992
|
is_active?: boolean;
|
|
12030
11993
|
/** @description Number of items to skip */
|
|
12031
11994
|
offset?: number;
|
|
@@ -12050,22 +12013,7 @@ export interface paths {
|
|
|
12050
12013
|
"application/json": {
|
|
12051
12014
|
/** @example true */
|
|
12052
12015
|
success: boolean;
|
|
12053
|
-
data:
|
|
12054
|
-
/** Format: uuid */
|
|
12055
|
-
uuid: string;
|
|
12056
|
-
/** @description The blockchain address */
|
|
12057
|
-
address: string;
|
|
12058
|
-
/** @description Numeric chain ID */
|
|
12059
|
-
chain: number;
|
|
12060
|
-
/** Format: uuid */
|
|
12061
|
-
wallet_uuid: string;
|
|
12062
|
-
is_active: boolean;
|
|
12063
|
-
label: string | null;
|
|
12064
|
-
/** @enum {string} */
|
|
12065
|
-
type: "utila" | "processing";
|
|
12066
|
-
/** Format: date-time */
|
|
12067
|
-
created_at: string;
|
|
12068
|
-
}[];
|
|
12016
|
+
data: components["schemas"]["CryptoAddressListItem"][];
|
|
12069
12017
|
pagination: {
|
|
12070
12018
|
offset: number;
|
|
12071
12019
|
limit: number;
|
|
@@ -12108,10 +12056,15 @@ export interface paths {
|
|
|
12108
12056
|
};
|
|
12109
12057
|
/**
|
|
12110
12058
|
* Get crypto address by chain
|
|
12111
|
-
* @description Returns the
|
|
12059
|
+
* @description Returns the active crypto address of the wallet on the given chain.
|
|
12112
12060
|
* Useful when the caller already knows which chain they need and wants
|
|
12113
12061
|
* to avoid paginated list traversal.
|
|
12114
12062
|
*
|
|
12063
|
+
* `chain` in the response is the numeric chain ID — no network object is embedded
|
|
12064
|
+
* (unlike the items of `GET /frontend/wallets/{wallet_id}/addresses`). Should the wallet
|
|
12065
|
+
* hold several active addresses on the chain, the newest is returned — the same row the
|
|
12066
|
+
* list shows first for that `chain.id`.
|
|
12067
|
+
*
|
|
12115
12068
|
* **Authentication**: Bearer token with x-tenant-id header required
|
|
12116
12069
|
*
|
|
12117
12070
|
* **Access Control**: Any owner/admin/auditor member of the wallet (the scoped `user` role is rejected with 403); wallet KYC must be APPROVED or HOLD
|
|
@@ -12140,20 +12093,7 @@ export interface paths {
|
|
|
12140
12093
|
"application/json": {
|
|
12141
12094
|
/** @example true */
|
|
12142
12095
|
success: boolean;
|
|
12143
|
-
data:
|
|
12144
|
-
/** Format: uuid */
|
|
12145
|
-
uuid: string;
|
|
12146
|
-
address: string;
|
|
12147
|
-
chain: number;
|
|
12148
|
-
/** Format: uuid */
|
|
12149
|
-
wallet_uuid: string;
|
|
12150
|
-
is_active: boolean;
|
|
12151
|
-
label: string | null;
|
|
12152
|
-
/** @enum {string} */
|
|
12153
|
-
type: "utila" | "processing";
|
|
12154
|
-
/** Format: date-time */
|
|
12155
|
-
created_at: string;
|
|
12156
|
-
};
|
|
12096
|
+
data: components["schemas"]["CryptoAddress"];
|
|
12157
12097
|
};
|
|
12158
12098
|
};
|
|
12159
12099
|
};
|
|
@@ -12183,7 +12123,11 @@ export interface paths {
|
|
|
12183
12123
|
put?: never;
|
|
12184
12124
|
/**
|
|
12185
12125
|
* Create crypto address
|
|
12186
|
-
* @description Creates a
|
|
12126
|
+
* @description Creates a crypto address for a specific blockchain. Idempotent per chain: if the wallet
|
|
12127
|
+
* already holds an active address on that chain, that address is returned (the same row
|
|
12128
|
+
* `GET /frontend/wallets/{wallet_id}/addresses/{chain}` gives) and nothing is provisioned.
|
|
12129
|
+
*
|
|
12130
|
+
* `chain` in the response is the numeric chain ID — no network object is embedded.
|
|
12187
12131
|
*
|
|
12188
12132
|
* **Authentication**: Bearer token with x-tenant-id header required
|
|
12189
12133
|
*
|
|
@@ -12225,21 +12169,7 @@ export interface paths {
|
|
|
12225
12169
|
"application/json": {
|
|
12226
12170
|
/** @example true */
|
|
12227
12171
|
success: boolean;
|
|
12228
|
-
data:
|
|
12229
|
-
/** Format: uuid */
|
|
12230
|
-
uuid: string;
|
|
12231
|
-
/** @description The blockchain address */
|
|
12232
|
-
address: string;
|
|
12233
|
-
chain: number;
|
|
12234
|
-
/** Format: uuid */
|
|
12235
|
-
wallet_uuid: string;
|
|
12236
|
-
is_active: boolean;
|
|
12237
|
-
label: string | null;
|
|
12238
|
-
/** @enum {string} */
|
|
12239
|
-
type: "utila" | "processing";
|
|
12240
|
-
/** Format: date-time */
|
|
12241
|
-
created_at: string;
|
|
12242
|
-
};
|
|
12172
|
+
data: components["schemas"]["CryptoAddress"];
|
|
12243
12173
|
/** @example Crypto address created successfully */
|
|
12244
12174
|
message: string;
|
|
12245
12175
|
};
|
|
@@ -14274,6 +14204,84 @@ export interface components {
|
|
|
14274
14204
|
/** Format: date-time */
|
|
14275
14205
|
created_at?: string;
|
|
14276
14206
|
};
|
|
14207
|
+
/** @description Blockchain network as stored in the `chain` reference table. Embedded whole into every item of `GET /frontend/wallets/{wallet_id}/addresses`; `GET /frontend/reference/chains` returns the `id` / `name` / `symbol` / `enabled` subset of the same rows. Rely on those four fields — the rest is the raw reference row and is not a stable contract. */
|
|
14208
|
+
Chain: {
|
|
14209
|
+
/**
|
|
14210
|
+
* @description Numeric chain ID — the value `chain` carries on the single-address endpoints and in the `{chain}` path parameter
|
|
14211
|
+
* @example 1
|
|
14212
|
+
*/
|
|
14213
|
+
id: number;
|
|
14214
|
+
/** @example Tron */
|
|
14215
|
+
name: string | null;
|
|
14216
|
+
/** @example TRON */
|
|
14217
|
+
symbol: string | null;
|
|
14218
|
+
/** @description Whether new addresses can be created on this network */
|
|
14219
|
+
enabled: boolean;
|
|
14220
|
+
is_beta?: boolean | null;
|
|
14221
|
+
is_testnet?: boolean | null;
|
|
14222
|
+
/** @description Public RPC endpoint of the network */
|
|
14223
|
+
rpc_url?: string | null;
|
|
14224
|
+
/** @description Network identifier at the custody provider (e.g. `tron-mainnet`) */
|
|
14225
|
+
utila_name?: string | null;
|
|
14226
|
+
/** @description Gas units of a token transfer */
|
|
14227
|
+
token_transfer_gas?: number | null;
|
|
14228
|
+
/** @description Gas units of a native-coin transfer */
|
|
14229
|
+
native_transfer_gas?: number | null;
|
|
14230
|
+
};
|
|
14231
|
+
/** @description Fields shared by every representation of a wallet crypto address (a `crypto_addresses` row). */
|
|
14232
|
+
CryptoAddressBase: {
|
|
14233
|
+
/**
|
|
14234
|
+
* @description Numeric row ID. Identify an address across endpoints by `uuid`, not by this number.
|
|
14235
|
+
* @example 2405
|
|
14236
|
+
*/
|
|
14237
|
+
id: number;
|
|
14238
|
+
/**
|
|
14239
|
+
* Format: uuid
|
|
14240
|
+
* @description Stable address identifier — the same value on the list and on the single-address endpoints. `null` only on a few legacy `processing` rows.
|
|
14241
|
+
*/
|
|
14242
|
+
uuid: string | null;
|
|
14243
|
+
/**
|
|
14244
|
+
* @description The on-chain address
|
|
14245
|
+
* @example TN3W4H6rK2ce4vX9YnFQhwKENnHjoxb3m9
|
|
14246
|
+
*/
|
|
14247
|
+
address: string;
|
|
14248
|
+
/**
|
|
14249
|
+
* Format: uuid
|
|
14250
|
+
* @description Owning wallet
|
|
14251
|
+
*/
|
|
14252
|
+
wallet_uuid: string;
|
|
14253
|
+
is_active: boolean;
|
|
14254
|
+
/**
|
|
14255
|
+
* @description Free-form label: the one passed on creation (clients send e.g. `default` or `VA`), otherwise `<chain name> Address`.
|
|
14256
|
+
* @example default
|
|
14257
|
+
*/
|
|
14258
|
+
label: string | null;
|
|
14259
|
+
/** @description Derivation index of the legacy `processing` provider; always `null` for `utila` addresses */
|
|
14260
|
+
index_id: number | null;
|
|
14261
|
+
/**
|
|
14262
|
+
* @description Provisioning provider. New addresses are always `utila`; `processing` rows are legacy and read-only.
|
|
14263
|
+
* @enum {string}
|
|
14264
|
+
*/
|
|
14265
|
+
type: "utila" | "processing";
|
|
14266
|
+
/** @description Provider bookkeeping (network name, integration and address IDs at the custody provider). Not a stable contract. */
|
|
14267
|
+
meta: {
|
|
14268
|
+
[key: string]: unknown;
|
|
14269
|
+
} | null;
|
|
14270
|
+
/** Format: date-time */
|
|
14271
|
+
created_at: string;
|
|
14272
|
+
};
|
|
14273
|
+
/** @description A single wallet crypto address as returned by `GET` and `POST /frontend/wallets/{wallet_id}/addresses/{chain}`. `chain` is the numeric chain ID; no network object is embedded. */
|
|
14274
|
+
CryptoAddress: components["schemas"]["CryptoAddressBase"] & {
|
|
14275
|
+
/**
|
|
14276
|
+
* @description Numeric chain ID (see `GET /frontend/reference/chains`)
|
|
14277
|
+
* @example 1
|
|
14278
|
+
*/
|
|
14279
|
+
chain: number;
|
|
14280
|
+
};
|
|
14281
|
+
/** @description An item of `GET /frontend/wallets/{wallet_id}/addresses`. The same row as `CryptoAddress`, but `chain` is the embedded network object — read `chain.id` to get the numeric chain ID used everywhere else. */
|
|
14282
|
+
CryptoAddressListItem: components["schemas"]["CryptoAddressBase"] & {
|
|
14283
|
+
chain: components["schemas"]["Chain"];
|
|
14284
|
+
};
|
|
14277
14285
|
CryptoWalletDeleteResponse: {
|
|
14278
14286
|
/**
|
|
14279
14287
|
* Format: uuid
|
|
@@ -15083,6 +15091,103 @@ export interface components {
|
|
|
15083
15091
|
/** Format: date-time */
|
|
15084
15092
|
created_at: string;
|
|
15085
15093
|
};
|
|
15094
|
+
/** @description KYC entity attached to the wallet. `null` when the wallet has no KYC entity yet. */
|
|
15095
|
+
WalletKycInfo: {
|
|
15096
|
+
type: string;
|
|
15097
|
+
status: string;
|
|
15098
|
+
business_name: string | null;
|
|
15099
|
+
first_name: string | null;
|
|
15100
|
+
last_name: string | null;
|
|
15101
|
+
email: string | null;
|
|
15102
|
+
phone: string | null;
|
|
15103
|
+
};
|
|
15104
|
+
/** @description One aggregated crypto balance of the wallet: every balance row sharing the same symbol is merged into a single entry, and `details[]` keeps the per-row breakdown. */
|
|
15105
|
+
WalletBalanceEntry: {
|
|
15106
|
+
symbol: string;
|
|
15107
|
+
icon?: string | null;
|
|
15108
|
+
name: string;
|
|
15109
|
+
is_crypto: boolean;
|
|
15110
|
+
decimal: number;
|
|
15111
|
+
amount: number;
|
|
15112
|
+
/** @description Amount converted to `base_currency` */
|
|
15113
|
+
fiat_amount: number;
|
|
15114
|
+
details: components["schemas"]["AggregatedBalanceDetails"][];
|
|
15115
|
+
};
|
|
15116
|
+
/** @description Full wallet read for the `owner`, `admin` and `auditor` roles: identity, KYC, aggregated balances, fiat accounts and the totals. The scoped `user` role never receives this shape — see `WalletDetailsScopedUser`; the two are told apart by `access_role`. */
|
|
15117
|
+
WalletDetails: {
|
|
15118
|
+
/** Format: uuid */
|
|
15119
|
+
uuid: string;
|
|
15120
|
+
/** @description Legacy wallet identifier. Address the wallet by `uuid`; `id` is informational only. */
|
|
15121
|
+
id: string | null;
|
|
15122
|
+
name: string | null;
|
|
15123
|
+
/**
|
|
15124
|
+
* @description Computed label — wallet name, else KYC-derived (business_name / first+last), else "New account". Always present.
|
|
15125
|
+
* @example Acme LLC
|
|
15126
|
+
*/
|
|
15127
|
+
display_name: string;
|
|
15128
|
+
logo_url: string | null;
|
|
15129
|
+
/** Format: uuid */
|
|
15130
|
+
tenant_id: string;
|
|
15131
|
+
/** Format: date-time */
|
|
15132
|
+
created_at: string;
|
|
15133
|
+
kyc_info: components["schemas"]["WalletKycInfo"] | null;
|
|
15134
|
+
/** @description Aggregated crypto balances */
|
|
15135
|
+
balance: components["schemas"]["WalletBalanceEntry"][];
|
|
15136
|
+
fiat_accounts: {
|
|
15137
|
+
[key: string]: unknown;
|
|
15138
|
+
}[];
|
|
15139
|
+
/** @description The caller's base currency; every `fiat_amount` and total is expressed in it. `null` when the caller has none. */
|
|
15140
|
+
base_currency: string | null;
|
|
15141
|
+
fiat_total: number;
|
|
15142
|
+
crypto_total: number;
|
|
15143
|
+
pending_balance: number;
|
|
15144
|
+
total_amount: number;
|
|
15145
|
+
/**
|
|
15146
|
+
* @description The caller's role for this wallet. Never `user` on this shape. (enum property replaced by openapi-typescript)
|
|
15147
|
+
* @enum {string}
|
|
15148
|
+
*/
|
|
15149
|
+
access_role: "owner" | "admin" | "auditor";
|
|
15150
|
+
/**
|
|
15151
|
+
* @description Legacy alias of `access_role`. Always equals `access_role`. Kept for backward compatibility — prefer `access_role`.
|
|
15152
|
+
* @enum {string}
|
|
15153
|
+
*/
|
|
15154
|
+
role: "owner" | "admin" | "auditor";
|
|
15155
|
+
/** @description `true` exactly when `access_role` is `owner`. */
|
|
15156
|
+
is_owner: boolean;
|
|
15157
|
+
};
|
|
15158
|
+
/** @description Shell-only wallet read for the scoped `user` role: identity, KYC and display name. No main-account financials are ever included — `logo_url`, `balance`, `fiat_accounts`, `base_currency`, `fiat_total`, `crypto_total`, `pending_balance` and `total_amount` are absent, not null. Check `access_role` before reading balances. */
|
|
15159
|
+
WalletDetailsScopedUser: {
|
|
15160
|
+
/** Format: uuid */
|
|
15161
|
+
uuid: string;
|
|
15162
|
+
/** @description Legacy wallet identifier. Address the wallet by `uuid`; `id` is informational only. */
|
|
15163
|
+
id: string | null;
|
|
15164
|
+
name: string | null;
|
|
15165
|
+
/**
|
|
15166
|
+
* @description Computed label — wallet name, else KYC-derived (business_name / first+last), else "New account". Always present.
|
|
15167
|
+
* @example Acme LLC
|
|
15168
|
+
*/
|
|
15169
|
+
display_name: string;
|
|
15170
|
+
/** Format: uuid */
|
|
15171
|
+
tenant_id: string;
|
|
15172
|
+
/** Format: date-time */
|
|
15173
|
+
created_at: string;
|
|
15174
|
+
kyc_info: components["schemas"]["WalletKycInfo"] | null;
|
|
15175
|
+
/**
|
|
15176
|
+
* @description Always `user` on this shape. (enum property replaced by openapi-typescript)
|
|
15177
|
+
* @enum {string}
|
|
15178
|
+
*/
|
|
15179
|
+
access_role: "user";
|
|
15180
|
+
/**
|
|
15181
|
+
* @description Legacy alias of `access_role`. Always equals `access_role`. Kept for backward compatibility — prefer `access_role`.
|
|
15182
|
+
* @enum {string}
|
|
15183
|
+
*/
|
|
15184
|
+
role: "user";
|
|
15185
|
+
/**
|
|
15186
|
+
* @description Always `false` on this shape.
|
|
15187
|
+
* @example false
|
|
15188
|
+
*/
|
|
15189
|
+
is_owner: boolean;
|
|
15190
|
+
};
|
|
15086
15191
|
/** @description Unified currency record. `is_crypto: true` identifies a blockchain asset, `false` a fiat one. The joined `meta` JSONB blob carries currency-specific details (e.g. `chain_id`/contract for crypto, ISO code/country for fiat). */
|
|
15087
15192
|
Currency: {
|
|
15088
15193
|
id?: number;
|