remove admin
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user