type Address = string type PositiveStringNumber = string export interface DelegationBaseRequest { chain: string token: string } export interface ApproveDelegationRequest extends DelegationBaseRequest { delegateAddress: Address amount: PositiveStringNumber } export interface RevokeDelegationRequest extends DelegationBaseRequest { delegateAddress: Address } export interface GetDelegationStatusRequest extends DelegationBaseRequest { delegateAddress: Address } export interface ConstructedEipTransaction { from: string to: string data?: string value?: string } export type ConstructedSolanaTransaction = string export interface ApproveDelegationMetadata { chainId: string delegateAmount: string delegateAmountRaw?: string delegateAddress: Address tokenSymbol: string tokenAddress?: string ownerAddress?: Address tokenAccount?: string tokenMint?: string tokenDecimals?: number lastValidBlockHeight?: string serializedTransactionBase64Encoded?: string serializedTransactionBase58Encoded?: string unsignedTransactionMessage?: unknown } export interface RevokeDelegationMetadata { chainId: string revokedAddress: Address tokenSymbol: string tokenAddress?: string ownerAddress?: Address tokenAccount?: string } export interface ApproveDelegationResponse { transactions?: ConstructedEipTransaction[] encodedTransactions?: ConstructedSolanaTransaction[] metadata?: ApproveDelegationMetadata } export interface RevokeDelegationResponse { transactions?: ConstructedEipTransaction[] encodedTransactions?: ConstructedSolanaTransaction[] metadata?: RevokeDelegationMetadata } export interface DelegationStatus { address: Address delegateAmount: string delegateAmountRaw: string } export interface DelegationStatusResponse { chainId: string token: string tokenAddress: string tokenAccount?: string balance?: string balanceRaw?: string delegations: DelegationStatus[] } export interface TransferFromRequest { chain: string token: string fromAddress: string toAddress: string amount: string } export interface TransferAsDelegateMetadata { amount: string amountRaw: string chainId: string delegateAddress?: Address lastValidBlockHeight?: string needsRecipientTokenAccount?: boolean ownerAddress?: Address recipientAddress?: Address serializedTransactionBase58Encoded?: string serializedTransactionBase64Encoded?: string tokenAddress?: string tokenSymbol?: string tokenDecimals?: number unsignedTransactionMessage?: unknown } export interface TransferFromResponse { transactions?: ConstructedEipTransaction[] encodedTransactions?: ConstructedSolanaTransaction[] metadata: TransferAsDelegateMetadata } /** * Progress event for delegation submit flows (`approveAndSubmit`, `revokeAndSubmit`, `transferAndSubmit`). */ export interface DelegationSubmitProgress { step: 'signing' | 'submitted' index: number total: number hash?: string }