⚠️
Important! We’ve moved to V3! This documentation is for V2 only and will be updated in May.
Developer Hub
🔮 For applications
Toolkit
Cashout
getCashout

Returns the details of the created cashout order.

ℹ️

You can find more information Here.

Usage

import { getCashout } from '@azuro-org/toolkit'
 
 
const cashout = await getCashout({
  chainId: 137,
  orderId: '...',
})

Props

{
  chainId: ChainId
  orderId: string // created cashout order id
}
type ChainId = 
  | 100     // Gnosis
  | 137     // Polygon
  | 80002   // Polygon Amoy
  | 88888   // Chiliz
  | 88882   // Chiliz Spicy
  | 8453    // Base
  | 84532   // Base Sepolia

Return Value

type GetCashoutResponse = {
  txHash: string // transaction hash
} & CreateCashoutResponse
 
type CreateCashoutResponse = {
  id: string // cashout id
  state: CashoutState // cashout state
  errorMessage?: string
}
 
enum CashoutState {
  Processing = 'PROCESSING',
  Accepted = 'ACCEPTED',
  Rejected = 'REJECTED',
  Open = 'OPEN'
}