@renegade-fi/core
Version:
VanillaJS library for Renegade
20 lines • 747 B
JavaScript
import { WITHDRAW_BALANCE_ROUTE } from '../constants.js';
import { postRelayerWithAuth } from '../utils/http.js';
import { getWalletId } from './getWalletId.js';
export async function withdrawRequest(config, parameters) {
const { mint, request } = parameters;
const { getBaseUrl } = config;
const walletId = getWalletId(config);
try {
const res = await postRelayerWithAuth(config, getBaseUrl(WITHDRAW_BALANCE_ROUTE(walletId, mint)), request);
console.log(`task update-wallet(${res.task_id}): ${walletId}`);
return { taskId: res.task_id };
}
catch (error) {
console.error(`${walletId}`, {
error,
});
throw error;
}
}
//# sourceMappingURL=withdrawRequest.js.map