@sighash-dev/core
v0.1.0
Published
Framework-agnostic Bitcoin wallet connector core for Xverse, UniSat, and OKX.
Readme
@sighash-dev/core
Framework-agnostic Bitcoin wallet connector for the ordinals ecosystem. Targets Xverse, UniSat, and OKX — the three actively-maintained wallets — and ships a first-class bulk PSBT signing primitive.
pnpm add @sighash-dev/core nanostoresimport {
SighashClient,
createStores,
unisatProvider,
xverseProvider,
okxProvider,
UNISAT,
} from '@sighash-dev/core';
const stores = createStores({ network: 'mainnet' });
const client = new SighashClient(stores, {
providers: [unisatProvider(), xverseProvider(), okxProvider()],
});
client.initialize();
await client.connect(UNISAT);
const { signedPsbts } = await client.signPsbts({ psbts: [psbt1, psbt2, psbt3] });For React, prefer @sighash-dev/react.
Key features
- Native bulk-sign where supported: UniSat (
signPsbts), Xverse (signMultipleTransactions), OKX (per-PSBT options array). One wallet prompt for N PSBTs. - Transparent sequential fallback when bulk RPCs throw — your call still resolves.
autoFinalized: falseby default forsignPsbt/signPsbts— partial-sign flows (marketplace listings) work out of the box.InputToSignwidening withpublicKey+sighashTypes(e.g. SIGHASH_SINGLE|ACP at0x83) for advanced flows.- Auto-derive
inputsToSignfrom a PSBT against the connected wallet's addresses, including taproot (ECC initialized at module load). - TypeScript-first, strict types, minimal public surface.
