Users can unstake their sOADA tokens to convert them back to OADA tokens.
The UnstakeOadaRequest type defines the structure for unstaking requests:
// src/oada/actions.ts
// Type definition for sOADA unstaking requests
// Specifies the amount of sOADA tokens to unstake
type UnstakeOadaRequest = {
amount: bigint;
};
The unstakeOada action handles the unstaking process:
The OadaStakeOrderView and OadaUnstakeOrderView interfaces define the structure for stake and unstake orders:
// src/oada/actions.ts
// Interface for OADA stake order information
// Contains details about pending stake orders
export type OadaStakeOrderView = {
txOutRef: string; // Transaction reference
oadaAmount: number; // Amount of OADA to stake
adaAmount: number; // Amount of ADA involved
returnAddressBech32: string; // Return address for rewards
};
// Interface for OADA unstake order information
// Contains details about pending unstake orders
export type OadaUnstakeOrderView = {
txOutRef: string; // Transaction reference
soadaAmount: number; // Amount of sOADA to unstake
adaAmount: number; // Amount of ADA involved
returnAddressBech32: string; // Return address for rewards
};