remove admin

This commit is contained in:
2026-06-10 18:34:41 +03:00
parent 6c4f9a97a6
commit bf8a57359c
11 changed files with 331 additions and 171 deletions

View File

@@ -79,3 +79,48 @@ export function getMyPurchaseRequests(
): Promise<B2bPurchaseRequestListResponse> {
return doB2bRequest(`/purchase-requests?limit=${limit}&offset=${offset}`, {}, true)
}
// --- Organizations (legal-entity wallets) ---
// Note: organizations endpoints live under /v1, unlike /purchase-requests.
export interface OrgWallet {
id: string
chain: string
address: string
derivation_path: string
created_at: string | null
}
export interface OrgAmountRaw {
raw: string
formatted: string
decimals: number
usd_price: string
usd_value: string
}
export interface OrgWalletBalance {
id: string
chain: string
address: string
derivation_path: string
native_symbol: string
native: OrgAmountRaw
tokens: Record<string, OrgAmountRaw>
total_usd: string
error: string | null
}
export interface OrgBalancesResponse {
items: OrgWalletBalance[]
total_usd: string
has_errors: boolean
}
export function getOrganizationWallets(): Promise<OrgWallet[]> {
return doB2bRequest('/v1/organizations/wallets', {}, true)
}
export function getOrganizationBalances(): Promise<OrgBalancesResponse> {
return doB2bRequest('/v1/organizations/wallets/balances', {}, true)
}