@xlink-network/xlink-sdk
Version:
29 lines (27 loc) • 739 B
JavaScript
import {
requestAPI
} from "./chunk-3OBVOHLZ.mjs";
// src/bitcoinUtils/apiHelpers/createRevealTx.ts
import { toHex } from "viem";
async function createRevealTx(sdkContext, info) {
const resp = await requestAPI(sdkContext, {
path: `/2024-10-01/bitcoin/reveal-txs`,
method: "POST",
body: {
fromChain: info.fromChain,
txId: info.txId,
vout: info.vout,
satsAmount: info.satsAmount,
orderDataHex: toHex(info.orderData),
xlinkPegInAddress: {
address: info.xlinkPegInAddress.address,
scriptPubKeyHex: toHex(info.xlinkPegInAddress.scriptPubKey)
}
}
});
return { txHex: resp.revealTxHex };
}
export {
createRevealTx
};
//# sourceMappingURL=chunk-LAKQU47C.mjs.map