@biconomy/abstractjs
Version:
SDK for Biconomy integration with support for account abstraction, smart accounts, ERC-4337.
28 lines • 912 B
JavaScript
import { waitForSupertransactionReceipt } from "../../clients/decorators/mee/index.js";
export const withdrawFromGasTank = async (mcNexus, parameters) => {
const { tokenAddress, chainId, amount, recipient, meeClient, confirmations } = parameters;
const withdrawal = mcNexus.buildComposable({
type: "withdrawal",
data: {
tokenAddress,
amount,
chainId,
recipient
}
});
const quote = await meeClient.getQuote({
instructions: [withdrawal],
feeToken: {
chainId,
address: tokenAddress
}
});
const { hash } = await meeClient.executeQuote({ quote });
await waitForSupertransactionReceipt(meeClient, {
hash,
confirmations: confirmations || 2
});
return { hash };
};
export default withdrawFromGasTank;
//# sourceMappingURL=withdrawFromGasTank.js.map