Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
**SPV-Store** is a modular engine to used to locally store and index Bitcoin transaction history with pluggable support for custom indexers, persistance layers, and API providers.
SPV-Store is a modular engine to used to locally store and index Bitcoin transaction history with pluggable support for custom indexers, persistance layers, and API providers.
npm install spv-store
Initialize for use in web browser with OneSat API provider
import {
Bsv21Indexer,
FundIndexer,
Indexer,
IndexMode,
InscriptionIndexer,
LockIndexer,
MapIndexer,
OneSatWebSPV,
OrdLockIndexer,
OriginIndexer,
} from 'spv-store';
const owners = new Set<string>([bsvAddress, identityAddress, ordAddress, /*...other owners */]);
const indexers: Indexer[] = [
new FundIndexer(owners, IndexMode.TrustAndVerify),
new LockIndexer(owners, IndexMode.TrustAndVerify),
new OrdLockIndexer(owners, IndexMode.TrustAndVerify),
new InscriptionIndexer(owners, IndexMode.TrustAndVerify),
new MapIndexer(owners, IndexMode.Verify),
new OriginIndexer(owners, IndexMode.TrustAndVerify),
new Bsv21Indexer(owners, IndexMode.Trust),
];
const startSync = true
const oneSatSPV = await OneSatWebSPV.init(
'accountId',
indexers,
owners,
startSync,
);
const tx = Transaction.fromHex('010000....')
const txResponse = await oneSatSPV.broadcast(tx)
// funding utxos
const fundResults = await oneSatSPV.search(new TxoLookup('fund'));
// lock utxo
const lockTxos = await oneSatSPV.search(new TxoLookup('lock'));
// load all jpeg inscriptions
const ordinals = await oneSatSPV.search(new TxoLookup('origin', 'type', 'image/jpeg'), TxoSort.DESC, 0);
Indexers parse transactions and identify if a transaction output fits a specified set of rules. If a match is identified, the indexer can extract pertinant data from the transaction and save that data in a fashion where it can be retrieved and searched.
FAQs
**SPV-Store** is a modular engine to used to locally store and index Bitcoin transaction history with pluggable support for custom indexers, persistance layers, and API providers.
The npm package spv-store receives a total of 6 weekly downloads. As such, spv-store popularity was classified as not popular.
We found that spv-store demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.