This method is used to send MINA.
// success data
type SendTransactionResult = {
hash: string;
};
// failed data
interface ProviderError extends Error {
message: string;
code: number;
data?: unknown;
}
let data: SendTransactionResult|ProviderError = await window.mina
?.sendPayment({
amount: amount,
to: receiveAddress,
fee: fee, // option
memo: memo, // option
})
.catch((err: any) => err);
This method is used to call stake delegation.
let data: SendTransactionResult|ProviderError = await window.mina
?.sendStakeDelegation({
to: vaildatorAddress,
fee: fee, // option
memo: memo, // option
}).catch((err: any) => err);