Sigma Library
A digital signature scheme for signing Bitcoin transaction data.
Library Usage
bun add sigma-protocol @bsv/sdkimport { Sigma } from "sigma-protocol";const outputScriptAsm = `OP_0 OP_RETURN ${Buffer.from(
"pushdata1",
"utf-8"
).toString("hex")} ${Buffer.from("pushdata2", "utf-8").toString("hex")}`;
const script = Script.from_asm_string(outputScriptAsm);
const tx = new Transaction(1, 0);
const txOut = new TxOut(BigInt(0), script);
tx.add_output(txOut);
const sigma = new Sigma(tx);
const { signedTx } = sigma.sign(privateKey);Remote Signatures
Building the Library:
Last updated