@bsv/wallet-toolbox-client
Version:
Client only Wallet Storage
286 lines • 6.79 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBeefForTxid = getBeefForTxid;
const StorageProvider_1 = require("../../storage/StorageProvider");
async function getBeefForTxid(services, txid) {
const storage = new ServicesOnlyStorageProvider(services);
const beef = await storage.getBeefForTxid(txid);
return beef;
}
/**
* The generalized implementation of getBeefForTransaction uses storage to
* avoid incurring the cost of redundant block chain data queries.
*
* This class makes the generalized implementation of getBeefForTransaction
* available in situations where there storage is not relevant.
*/
class ServicesOnlyStorageProvider extends StorageProvider_1.StorageProvider {
constructor(services) {
const o = StorageProvider_1.StorageProvider.createStorageBaseOptions(services.chain);
super(o);
this.nip = new Error('Method not implemented.');
this.setServices(services);
this.gbo = {
ignoreServices: false,
ignoreStorage: true,
ignoreNewProven: true
};
}
async getBeefForTxid(txid) {
const beef = await this.getBeefForTransaction(txid, this.gbo);
return beef;
}
reviewStatus(args) {
throw this.nip;
}
purgeData(params, trx) {
throw this.nip;
}
allocateChangeInput(userId, basketId, targetSatoshis, exactSatoshis, excludeSending, transactionId) {
throw this.nip;
}
getProvenOrRawTx(txid, trx) {
throw this.nip;
}
getRawTxOfKnownValidTransaction(txid, offset, length, trx) {
throw this.nip;
}
getLabelsForTransactionId(transactionId, trx) {
throw this.nip;
}
getTagsForOutputId(outputId, trx) {
throw this.nip;
}
listActions(auth, args) {
throw this.nip;
}
listOutputs(auth, args) {
throw this.nip;
}
countChangeInputs(userId, basketId, excludeSending) {
throw this.nip;
}
findCertificatesAuth(auth, args) {
throw this.nip;
}
findOutputBasketsAuth(auth, args) {
throw this.nip;
}
findOutputsAuth(auth, args) {
throw this.nip;
}
insertCertificateAuth(auth, certificate) {
throw this.nip;
}
dropAllData() {
throw this.nip;
}
migrate(storageName, storageIdentityKey) {
throw this.nip;
}
findOutputTagMaps(args) {
throw this.nip;
}
findProvenTxReqs(args) {
throw this.nip;
}
findProvenTxs(args) {
throw this.nip;
}
findTxLabelMaps(args) {
throw this.nip;
}
countOutputTagMaps(args) {
throw this.nip;
}
countProvenTxReqs(args) {
throw this.nip;
}
countProvenTxs(args) {
throw this.nip;
}
countTxLabelMaps(args) {
throw this.nip;
}
insertCertificate(certificate, trx) {
throw this.nip;
}
insertCertificateField(certificateField, trx) {
throw this.nip;
}
insertCommission(commission, trx) {
throw this.nip;
}
insertMonitorEvent(event, trx) {
throw this.nip;
}
insertOutput(output, trx) {
throw this.nip;
}
insertOutputBasket(basket, trx) {
throw this.nip;
}
insertOutputTag(tag, trx) {
throw this.nip;
}
insertOutputTagMap(tagMap, trx) {
throw this.nip;
}
insertProvenTx(tx, trx) {
throw this.nip;
}
insertProvenTxReq(tx, trx) {
throw this.nip;
}
insertSyncState(syncState, trx) {
throw this.nip;
}
insertTransaction(tx, trx) {
throw this.nip;
}
insertTxLabel(label, trx) {
throw this.nip;
}
insertTxLabelMap(labelMap, trx) {
throw this.nip;
}
insertUser(user, trx) {
throw this.nip;
}
updateCertificate(id, update, trx) {
throw this.nip;
}
updateCertificateField(certificateId, fieldName, update, trx) {
throw this.nip;
}
updateCommission(id, update, trx) {
throw this.nip;
}
updateMonitorEvent(id, update, trx) {
throw this.nip;
}
updateOutput(id, update, trx) {
throw this.nip;
}
updateOutputBasket(id, update, trx) {
throw this.nip;
}
updateOutputTag(id, update, trx) {
throw this.nip;
}
updateOutputTagMap(outputId, tagId, update, trx) {
throw this.nip;
}
updateProvenTx(id, update, trx) {
throw this.nip;
}
updateProvenTxReq(id, update, trx) {
throw this.nip;
}
updateSyncState(id, update, trx) {
throw this.nip;
}
updateTransaction(id, update, trx) {
throw this.nip;
}
updateTxLabel(id, update, trx) {
throw this.nip;
}
updateTxLabelMap(transactionId, txLabelId, update, trx) {
throw this.nip;
}
updateUser(id, update, trx) {
throw this.nip;
}
destroy() {
throw this.nip;
}
transaction(scope, trx) {
throw this.nip;
}
readSettings(trx) {
throw this.nip;
}
findCertificateFields(args) {
throw this.nip;
}
findCertificates(args) {
throw this.nip;
}
findCommissions(args) {
throw this.nip;
}
findMonitorEvents(args) {
throw this.nip;
}
findOutputBaskets(args) {
throw this.nip;
}
findOutputs(args) {
throw this.nip;
}
findOutputTags(args) {
throw this.nip;
}
findSyncStates(args) {
throw this.nip;
}
findTransactions(args) {
throw this.nip;
}
findTxLabels(args) {
throw this.nip;
}
findUsers(args) {
throw this.nip;
}
countCertificateFields(args) {
throw this.nip;
}
countCertificates(args) {
throw this.nip;
}
countCommissions(args) {
throw this.nip;
}
countMonitorEvents(args) {
throw this.nip;
}
countOutputBaskets(args) {
throw this.nip;
}
countOutputs(args) {
throw this.nip;
}
countOutputTags(args) {
throw this.nip;
}
countSyncStates(args) {
throw this.nip;
}
countTransactions(args) {
throw this.nip;
}
countTxLabels(args) {
throw this.nip;
}
countUsers(args) {
throw this.nip;
}
getProvenTxsForUser(args) {
throw this.nip;
}
getProvenTxReqsForUser(args) {
throw this.nip;
}
getTxLabelMapsForUser(args) {
throw this.nip;
}
getOutputTagMapsForUser(args) {
throw this.nip;
}
adminStats(adminIdentityKey) {
throw this.nip;
}
}
//# sourceMappingURL=getBeefForTxid.js.map