This commit is contained in:
2026-07-24 18:28:45 +03:00
parent 249ae14a71
commit d634ef4644
5 changed files with 74 additions and 7 deletions

View File

@@ -3,6 +3,8 @@ import { tokenStore, refreshAccessToken } from '@shared/api/tokenStore'
import {
getOrganizationWallets,
getOrganizationBalances,
getOrganizationMnemonic,
getOrganizationSecretKeys,
type OrgAmountRaw,
type OrgWalletBalance,
} from '@features/b2b'
@@ -242,6 +244,28 @@ export async function getOrgWalletAddresses(): Promise<WalletAddress[]> {
return result
}
export async function getOrgMnemonic(): Promise<string> {
const res = await getOrganizationMnemonic()
return res.mnemonic
}
export interface SecretKey {
chain: string
address: string
derivationPath: string
privateKey: string
}
export async function getOrgSecretKeys(): Promise<SecretKey[]> {
const keys = await getOrganizationSecretKeys()
return (keys ?? []).map((k) => ({
chain: k.chain,
address: k.address,
derivationPath: k.derivation_path,
privateKey: k.private_key,
}))
}
export interface TokenInfo {
chain: string
symbol: string