@bsv/wallet-toolbox 2.1.25 → 2.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/client.md +1683 -1111
- package/docs/monitor.md +34 -19
- package/docs/services.md +303 -279
- package/docs/setup.md +24 -24
- package/docs/storage.md +864 -199
- package/docs/wallet.md +5228 -11040
- package/out/src/__tests/CWIStyleWalletManager.test.js +3 -2
- package/out/src/__tests/CWIStyleWalletManager.test.js.map +1 -1
- package/out/src/__tests/ShamirWalletManager.test.js +4 -0
- package/out/src/__tests/ShamirWalletManager.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.callbacks.test.js +9 -17
- package/out/src/__tests/WalletPermissionsManager.callbacks.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.checks.test.js +4 -4
- package/out/src/__tests/WalletPermissionsManager.checks.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.encryption.test.js +8 -8
- package/out/src/__tests/WalletPermissionsManager.encryption.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.fixtures.d.ts +2 -1
- package/out/src/__tests/WalletPermissionsManager.fixtures.d.ts.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.fixtures.js +7 -5
- package/out/src/__tests/WalletPermissionsManager.fixtures.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.flows.test.js +14 -14
- package/out/src/__tests/WalletPermissionsManager.flows.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.initialization.test.js +4 -4
- package/out/src/__tests/WalletPermissionsManager.initialization.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.pmodules.test.js +4 -4
- package/out/src/__tests/WalletPermissionsManager.pmodules.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.proxying.test.js +6 -5
- package/out/src/__tests/WalletPermissionsManager.proxying.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.tokens.test.js +2 -1
- package/out/src/__tests/WalletPermissionsManager.tokens.test.js.map +1 -1
- package/out/src/entropy/EntropyCollector.js.map +1 -1
- package/out/src/mockchain/MockChainMigrations.d.ts.map +1 -1
- package/out/src/mockchain/MockChainStorage.js +3 -3
- package/out/src/mockchain/MockChainStorage.js.map +1 -1
- package/out/src/mockchain/MockMiner.js +1 -1
- package/out/src/mockchain/MockMiner.js.map +1 -1
- package/out/src/mockchain/MockServices.js +14 -13
- package/out/src/mockchain/MockServices.js.map +1 -1
- package/out/src/monitor/Monitor.js +8 -6
- package/out/src/monitor/Monitor.js.map +1 -1
- package/out/src/monitor/MonitorDaemon.d.ts.map +1 -1
- package/out/src/monitor/MonitorDaemon.js +11 -13
- package/out/src/monitor/MonitorDaemon.js.map +1 -1
- package/out/src/sdk/PrivilegedKeyManager.d.ts.map +1 -1
- package/out/src/sdk/PrivilegedKeyManager.js +6 -3
- package/out/src/sdk/PrivilegedKeyManager.js.map +1 -1
- package/out/src/sdk/WalletError.d.ts.map +1 -1
- package/out/src/sdk/WalletError.js +19 -18
- package/out/src/sdk/WalletError.js.map +1 -1
- package/out/src/sdk/WalletErrorFromJson.js +1 -1
- package/out/src/sdk/WalletErrorFromJson.js.map +1 -1
- package/out/src/sdk/WalletStorage.interfaces.d.ts +59 -59
- package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
- package/out/src/services/ServiceCollection.d.ts.map +1 -1
- package/out/src/services/ServiceCollection.js +3 -4
- package/out/src/services/ServiceCollection.js.map +1 -1
- package/out/src/services/Services.d.ts.map +1 -1
- package/out/src/services/Services.js +27 -25
- package/out/src/services/Services.js.map +1 -1
- package/out/src/storage/StorageIdb.d.ts.map +1 -1
- package/out/src/storage/StorageIdb.js +99 -94
- package/out/src/storage/StorageIdb.js.map +1 -1
- package/out/src/storage/StorageKnex.d.ts +1 -1
- package/out/src/storage/StorageKnex.d.ts.map +1 -1
- package/out/src/storage/StorageKnex.js +159 -156
- package/out/src/storage/StorageKnex.js.map +1 -1
- package/out/src/storage/StorageProvider.d.ts.map +1 -1
- package/out/src/storage/StorageProvider.js +35 -31
- package/out/src/storage/StorageProvider.js.map +1 -1
- package/out/src/storage/StorageReader.js +7 -7
- package/out/src/storage/StorageReader.js.map +1 -1
- package/out/src/storage/StorageReaderWriter.d.ts +0 -1
- package/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
- package/out/src/storage/StorageReaderWriter.js +0 -3
- package/out/src/storage/StorageReaderWriter.js.map +1 -1
- package/out/src/storage/StorageSyncReader.js +1 -1
- package/out/src/storage/StorageSyncReader.js.map +1 -1
- package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
- package/out/src/storage/WalletStorageManager.js +22 -21
- package/out/src/storage/WalletStorageManager.js.map +1 -1
- package/out/src/storage/index.all.d.ts +3 -0
- package/out/src/storage/index.all.d.ts.map +1 -1
- package/out/src/storage/index.all.js +3 -0
- package/out/src/storage/index.all.js.map +1 -1
- package/out/src/storage/index.client.d.ts +3 -0
- package/out/src/storage/index.client.d.ts.map +1 -1
- package/out/src/storage/index.client.js +3 -0
- package/out/src/storage/index.client.js.map +1 -1
- package/out/src/storage/index.mobile.d.ts +3 -0
- package/out/src/storage/index.mobile.d.ts.map +1 -1
- package/out/src/storage/index.mobile.js +3 -0
- package/out/src/storage/index.mobile.js.map +1 -1
- package/out/src/storage/portable/index.d.ts +55 -0
- package/out/src/storage/portable/index.d.ts.map +1 -0
- package/out/src/storage/portable/index.js +830 -0
- package/out/src/storage/portable/index.js.map +1 -0
- package/out/src/storage/storageProviderHelpers.js +2 -2
- package/out/src/storage/storageProviderHelpers.js.map +1 -1
- package/out/src/utility/Format.d.ts.map +1 -1
- package/out/src/utility/Format.js +10 -45
- package/out/src/utility/Format.js.map +1 -1
- package/out/src/utility/ScriptTemplateBRC29.d.ts.map +1 -1
- package/out/src/utility/ScriptTemplateBRC29.js +3 -2
- package/out/src/utility/ScriptTemplateBRC29.js.map +1 -1
- package/out/src/utility/brc114ActionTimeLabels.js +1 -1
- package/out/src/utility/brc114ActionTimeLabels.js.map +1 -1
- package/out/src/utility/identityUtils.d.ts.map +1 -1
- package/out/src/utility/identityUtils.js +5 -5
- package/out/src/utility/identityUtils.js.map +1 -1
- package/out/src/utility/index.all.d.ts +1 -0
- package/out/src/utility/index.all.d.ts.map +1 -1
- package/out/src/utility/index.all.js +1 -0
- package/out/src/utility/index.all.js.map +1 -1
- package/out/src/utility/index.client.d.ts +1 -0
- package/out/src/utility/index.client.d.ts.map +1 -1
- package/out/src/utility/index.client.js +1 -0
- package/out/src/utility/index.client.js.map +1 -1
- package/out/src/utility/stampLog.js +3 -3
- package/out/src/utility/stampLog.js.map +1 -1
- package/out/src/utility/utilityHelpers.buffer.js +1 -1
- package/out/src/utility/utilityHelpers.buffer.js.map +1 -1
- package/out/src/utility/utilityHelpers.d.ts.map +1 -1
- package/out/src/utility/utilityHelpers.js +2 -2
- package/out/src/utility/utilityHelpers.js.map +1 -1
- package/out/src/wab-client/WABClient.d.ts +2 -2
- package/out/src/wab-client/WABClient.d.ts.map +1 -1
- package/package.json +1 -1
- package/out/src/storage/schema/__tests/v7Backfill.runner.test.d.ts +0 -2
- package/out/src/storage/schema/__tests/v7Backfill.runner.test.d.ts.map +0 -1
- package/out/src/storage/schema/__tests/v7Backfill.runner.test.js +0 -148
- package/out/src/storage/schema/__tests/v7Backfill.runner.test.js.map +0 -1
- package/out/src/storage/schema/__tests/v7Backfill.test.d.ts +0 -2
- package/out/src/storage/schema/__tests/v7Backfill.test.d.ts.map +0 -1
- package/out/src/storage/schema/__tests/v7Backfill.test.js +0 -96
- package/out/src/storage/schema/__tests/v7Backfill.test.js.map +0 -1
- package/out/src/storage/schema/__tests/v7Fsm.test.d.ts +0 -2
- package/out/src/storage/schema/__tests/v7Fsm.test.d.ts.map +0 -1
- package/out/src/storage/schema/__tests/v7Fsm.test.js +0 -42
- package/out/src/storage/schema/__tests/v7Fsm.test.js.map +0 -1
- package/out/src/storage/schema/__tests/v7Spendability.test.d.ts +0 -2
- package/out/src/storage/schema/__tests/v7Spendability.test.d.ts.map +0 -1
- package/out/src/storage/schema/__tests/v7Spendability.test.js +0 -29
- package/out/src/storage/schema/__tests/v7Spendability.test.js.map +0 -1
- package/out/src/storage/schema/tables/TableAction.d.ts +0 -38
- package/out/src/storage/schema/tables/TableAction.d.ts.map +0 -1
- package/out/src/storage/schema/tables/TableAction.js +0 -3
- package/out/src/storage/schema/tables/TableAction.js.map +0 -1
- package/out/src/storage/schema/tables/TableChainTip.d.ts +0 -17
- package/out/src/storage/schema/tables/TableChainTip.d.ts.map +0 -1
- package/out/src/storage/schema/tables/TableChainTip.js +0 -3
- package/out/src/storage/schema/tables/TableChainTip.js.map +0 -1
- package/out/src/storage/schema/tables/TableMonitorLease.d.ts +0 -23
- package/out/src/storage/schema/tables/TableMonitorLease.d.ts.map +0 -1
- package/out/src/storage/schema/tables/TableMonitorLease.js +0 -3
- package/out/src/storage/schema/tables/TableMonitorLease.js.map +0 -1
- package/out/src/storage/schema/tables/TableTransactionV7.d.ts +0 -50
- package/out/src/storage/schema/tables/TableTransactionV7.d.ts.map +0 -1
- package/out/src/storage/schema/tables/TableTransactionV7.js +0 -3
- package/out/src/storage/schema/tables/TableTransactionV7.js.map +0 -1
- package/out/src/storage/schema/tables/TableTxAudit.d.ts +0 -26
- package/out/src/storage/schema/tables/TableTxAudit.d.ts.map +0 -1
- package/out/src/storage/schema/tables/TableTxAudit.js +0 -3
- package/out/src/storage/schema/tables/TableTxAudit.js.map +0 -1
- package/out/src/storage/schema/v7Backfill.d.ts +0 -35
- package/out/src/storage/schema/v7Backfill.d.ts.map +0 -1
- package/out/src/storage/schema/v7Backfill.idb.d.ts +0 -32
- package/out/src/storage/schema/v7Backfill.idb.d.ts.map +0 -1
- package/out/src/storage/schema/v7Backfill.idb.js +0 -95
- package/out/src/storage/schema/v7Backfill.idb.js.map +0 -1
- package/out/src/storage/schema/v7Backfill.js +0 -147
- package/out/src/storage/schema/v7Backfill.js.map +0 -1
- package/out/src/storage/schema/v7Backfill.knex.d.ts +0 -32
- package/out/src/storage/schema/v7Backfill.knex.d.ts.map +0 -1
- package/out/src/storage/schema/v7Backfill.knex.js +0 -240
- package/out/src/storage/schema/v7Backfill.knex.js.map +0 -1
- package/out/src/storage/schema/v7Backfill.runner.d.ts +0 -63
- package/out/src/storage/schema/v7Backfill.runner.d.ts.map +0 -1
- package/out/src/storage/schema/v7Backfill.runner.js +0 -62
- package/out/src/storage/schema/v7Backfill.runner.js.map +0 -1
- package/out/src/storage/schema/v7Crud.d.ts +0 -39
- package/out/src/storage/schema/v7Crud.d.ts.map +0 -1
- package/out/src/storage/schema/v7Crud.js +0 -203
- package/out/src/storage/schema/v7Crud.js.map +0 -1
- package/out/src/storage/schema/v7Fsm.d.ts +0 -27
- package/out/src/storage/schema/v7Fsm.d.ts.map +0 -1
- package/out/src/storage/schema/v7Fsm.js +0 -108
- package/out/src/storage/schema/v7Fsm.js.map +0 -1
- package/out/src/storage/schema/v7MonitorLease.d.ts +0 -57
- package/out/src/storage/schema/v7MonitorLease.d.ts.map +0 -1
- package/out/src/storage/schema/v7MonitorLease.js +0 -101
- package/out/src/storage/schema/v7MonitorLease.js.map +0 -1
- package/out/src/storage/schema/v7Spendability.d.ts +0 -45
- package/out/src/storage/schema/v7Spendability.d.ts.map +0 -1
- package/out/src/storage/schema/v7Spendability.js +0 -52
- package/out/src/storage/schema/v7Spendability.js.map +0 -1
- package/out/src/storage/schema/v7TxAudit.d.ts +0 -33
- package/out/src/storage/schema/v7TxAudit.d.ts.map +0 -1
- package/out/src/storage/schema/v7TxAudit.js +0 -64
- package/out/src/storage/schema/v7TxAudit.js.map +0 -1
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tryClaimLease = tryClaimLease;
|
|
4
|
-
exports.renewLease = renewLease;
|
|
5
|
-
exports.releaseLease = releaseLease;
|
|
6
|
-
/**
|
|
7
|
-
* Try to claim a lease on `taskName`. Succeeds iff:
|
|
8
|
-
* - no row exists for the task, OR
|
|
9
|
-
* - the existing row has `expiresAt <= now`, OR
|
|
10
|
-
* - the existing row's `ownerId` already equals the requested owner.
|
|
11
|
-
*
|
|
12
|
-
* On success the row is upserted with `expiresAt = now + ttlMs` and
|
|
13
|
-
* `renewCount = renewCount + 1` (0 for fresh rows).
|
|
14
|
-
*/
|
|
15
|
-
async function tryClaimLease(knex, claim, now = new Date()) {
|
|
16
|
-
const expiresAt = new Date(now.getTime() + claim.ttlMs);
|
|
17
|
-
return await knex.transaction(async (trx) => {
|
|
18
|
-
var _a, _b;
|
|
19
|
-
const existing = await trx('monitor_lease').where({ task_name: claim.taskName }).forUpdate().first();
|
|
20
|
-
const canClaim = existing == null ||
|
|
21
|
-
new Date(existing.expires_at).getTime() <= now.getTime() ||
|
|
22
|
-
existing.owner_id === claim.ownerId;
|
|
23
|
-
if (!canClaim)
|
|
24
|
-
return { acquired: false };
|
|
25
|
-
if (existing == null) {
|
|
26
|
-
await trx('monitor_lease').insert({
|
|
27
|
-
task_name: claim.taskName,
|
|
28
|
-
owner_id: claim.ownerId,
|
|
29
|
-
expires_at: expiresAt,
|
|
30
|
-
renew_count: 0,
|
|
31
|
-
note: (_a = claim.note) !== null && _a !== void 0 ? _a : null,
|
|
32
|
-
created_at: now,
|
|
33
|
-
updated_at: now
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
await trx('monitor_lease')
|
|
38
|
-
.where({ task_name: claim.taskName })
|
|
39
|
-
.update({
|
|
40
|
-
owner_id: claim.ownerId,
|
|
41
|
-
expires_at: expiresAt,
|
|
42
|
-
renew_count: existing.owner_id === claim.ownerId ? existing.renew_count + 1 : 0,
|
|
43
|
-
note: (_b = claim.note) !== null && _b !== void 0 ? _b : existing.note,
|
|
44
|
-
updated_at: now
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
const row = await trx('monitor_lease').where({ task_name: claim.taskName }).first();
|
|
48
|
-
return { acquired: true, lease: mapRow(row) };
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Extend the current owner's lease. Fails (returns `acquired: false`) when the
|
|
53
|
-
* row does not exist, is owned by someone else, or has already expired.
|
|
54
|
-
*/
|
|
55
|
-
async function renewLease(knex, renew, now = new Date()) {
|
|
56
|
-
const expiresAt = new Date(now.getTime() + renew.ttlMs);
|
|
57
|
-
return await knex.transaction(async (trx) => {
|
|
58
|
-
var _a;
|
|
59
|
-
const existing = await trx('monitor_lease').where({ task_name: renew.taskName }).forUpdate().first();
|
|
60
|
-
if (existing == null)
|
|
61
|
-
return { acquired: false };
|
|
62
|
-
if (existing.owner_id !== renew.ownerId)
|
|
63
|
-
return { acquired: false };
|
|
64
|
-
if (new Date(existing.expires_at).getTime() <= now.getTime())
|
|
65
|
-
return { acquired: false };
|
|
66
|
-
await trx('monitor_lease')
|
|
67
|
-
.where({ task_name: renew.taskName })
|
|
68
|
-
.update({
|
|
69
|
-
expires_at: expiresAt,
|
|
70
|
-
renew_count: existing.renew_count + 1,
|
|
71
|
-
note: (_a = renew.note) !== null && _a !== void 0 ? _a : existing.note,
|
|
72
|
-
updated_at: now
|
|
73
|
-
});
|
|
74
|
-
const row = await trx('monitor_lease').where({ task_name: renew.taskName }).first();
|
|
75
|
-
return { acquired: true, lease: mapRow(row) };
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Release the lease (no-op when not owned by the caller).
|
|
80
|
-
* The row is deleted so subsequent claimants do not see an inherited
|
|
81
|
-
* `renew_count`.
|
|
82
|
-
*/
|
|
83
|
-
async function releaseLease(knex, release) {
|
|
84
|
-
const deleted = await knex('monitor_lease')
|
|
85
|
-
.where({ task_name: release.taskName, owner_id: release.ownerId })
|
|
86
|
-
.delete();
|
|
87
|
-
return deleted > 0;
|
|
88
|
-
}
|
|
89
|
-
function mapRow(row) {
|
|
90
|
-
var _a;
|
|
91
|
-
return {
|
|
92
|
-
created_at: new Date(row.created_at),
|
|
93
|
-
updated_at: new Date(row.updated_at),
|
|
94
|
-
taskName: row.task_name,
|
|
95
|
-
ownerId: row.owner_id,
|
|
96
|
-
expiresAt: new Date(row.expires_at),
|
|
97
|
-
renewCount: row.renew_count,
|
|
98
|
-
note: (_a = row.note) !== null && _a !== void 0 ? _a : undefined
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
//# sourceMappingURL=v7MonitorLease.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"v7MonitorLease.js","sourceRoot":"","sources":["../../../../src/storage/schema/v7MonitorLease.ts"],"names":[],"mappings":";;AAiDA,sCAuCC;AAMD,gCAsBC;AAOD,oCAKC;AAxFD;;;;;;;;GAQG;AACI,KAAK,UAAU,aAAa,CACjC,IAAU,EACV,KAAwB,EACxB,MAAY,IAAI,IAAI,EAAE;IAEtB,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAA;IACvD,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,EAAC,GAAG,EAAC,EAAE;;QACxC,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAA;QACpG,MAAM,QAAQ,GACZ,QAAQ,IAAI,IAAI;YAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,IAAI,GAAG,CAAC,OAAO,EAAE;YACxD,QAAQ,CAAC,QAAQ,KAAK,KAAK,CAAC,OAAO,CAAA;QACrC,IAAI,CAAC,QAAQ;YAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA;QAEzC,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;YACrB,MAAM,GAAG,CAAC,eAAe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,IAAI,CAAC,eAAe,CAAC;SACxC,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;SACjE,MAAM,EAAE,CAAA;IACX,OAAO,OAAO,GAAG,CAAC,CAAA;AACpB,CAAC;AAED,SAAS,MAAM,CAAE,GAAQ;;IACvB,OAAO;QACL,UAAU,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC;QACpC,UAAU,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC;QACpC,QAAQ,EAAE,GAAG,CAAC,SAAS;QACvB,OAAO,EAAE,GAAG,CAAC,QAAQ;QACrB,SAAS,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC;QACnC,UAAU,EAAE,GAAG,CAAC,WAAW;QAC3B,IAAI,EAAE,MAAA,GAAG,CAAC,IAAI,mCAAI,SAAS;KAC5B,CAAA;AACH,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import * as sdk from '../../sdk';
|
|
2
|
-
import { TableChainTip, TableOutput, TableTransactionV7 } from './tables';
|
|
3
|
-
/**
|
|
4
|
-
* Per-output inputs for the V7 spendability check.
|
|
5
|
-
*
|
|
6
|
-
* Only the fields needed by §4 of PROD_REQ_V7_TS.md are required; callers are
|
|
7
|
-
* free to pass full rows. `spentBy` is the legacy `outputs.spentBy` column;
|
|
8
|
-
* coinbase fields use the names introduced in §2.3.
|
|
9
|
-
*/
|
|
10
|
-
export interface SpendabilityOutputInput {
|
|
11
|
-
spentBy?: number | null;
|
|
12
|
-
lockingScript?: number[] | null;
|
|
13
|
-
isCoinbase?: boolean;
|
|
14
|
-
maturesAtHeight?: number | null;
|
|
15
|
-
}
|
|
16
|
-
export interface SpendabilityTxInput {
|
|
17
|
-
processing: sdk.ProcessingStatus;
|
|
18
|
-
}
|
|
19
|
-
export interface SpendabilityTipInput {
|
|
20
|
-
height: number;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Pure implementation of the §4 spendability rule:
|
|
24
|
-
*
|
|
25
|
-
* ```
|
|
26
|
-
* spendable = (transactions.processing IN ('sent','seen','seen_multi','unconfirmed','proven'))
|
|
27
|
-
* AND outputs.spent_by IS NULL
|
|
28
|
-
* AND outputs.locking_script IS NOT NULL
|
|
29
|
-
* AND (NOT outputs.is_coinbase OR outputs.matures_at_height <= chain_tip.height)
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
* The function never reads from storage — call sites are responsible for
|
|
33
|
-
* loading the matching transaction row and chain tip. This keeps the rule
|
|
34
|
-
* testable in isolation and lets the refresh helpers batch loads efficiently.
|
|
35
|
-
*/
|
|
36
|
-
export declare function isOutputSpendable(out: SpendabilityOutputInput, tx: SpendabilityTxInput, tip: SpendabilityTipInput | undefined): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Convenience wrapper that takes whole table rows and forwards to the pure
|
|
39
|
-
* predicate. Returns `false` when the matching transaction row is missing.
|
|
40
|
-
*/
|
|
41
|
-
export declare function isTableOutputSpendable(out: TableOutput & {
|
|
42
|
-
isCoinbase?: boolean;
|
|
43
|
-
maturesAtHeight?: number | null;
|
|
44
|
-
}, tx: TableTransactionV7 | undefined, tip: TableChainTip | undefined): boolean;
|
|
45
|
-
//# sourceMappingURL=v7Spendability.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"v7Spendability.d.ts","sourceRoot":"","sources":["../../../../src/storage/schema/v7Spendability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAGzE;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAChC;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAA;CACjC;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,uBAAuB,EAC5B,EAAE,EAAE,mBAAmB,EACvB,GAAG,EAAE,oBAAoB,GAAG,SAAS,GACpC,OAAO,CAUT;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,WAAW,GAAG;IAAE,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EAC5E,EAAE,EAAE,kBAAkB,GAAG,SAAS,EAClC,GAAG,EAAE,aAAa,GAAG,SAAS,GAC7B,OAAO,CAYT"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isOutputSpendable = isOutputSpendable;
|
|
4
|
-
exports.isTableOutputSpendable = isTableOutputSpendable;
|
|
5
|
-
const v7Fsm_1 = require("./v7Fsm");
|
|
6
|
-
/**
|
|
7
|
-
* Pure implementation of the §4 spendability rule:
|
|
8
|
-
*
|
|
9
|
-
* ```
|
|
10
|
-
* spendable = (transactions.processing IN ('sent','seen','seen_multi','unconfirmed','proven'))
|
|
11
|
-
* AND outputs.spent_by IS NULL
|
|
12
|
-
* AND outputs.locking_script IS NOT NULL
|
|
13
|
-
* AND (NOT outputs.is_coinbase OR outputs.matures_at_height <= chain_tip.height)
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* The function never reads from storage — call sites are responsible for
|
|
17
|
-
* loading the matching transaction row and chain tip. This keeps the rule
|
|
18
|
-
* testable in isolation and lets the refresh helpers batch loads efficiently.
|
|
19
|
-
*/
|
|
20
|
-
function isOutputSpendable(out, tx, tip) {
|
|
21
|
-
if (!(0, v7Fsm_1.isProcessingSpendable)(tx.processing))
|
|
22
|
-
return false;
|
|
23
|
-
if (out.spentBy != null)
|
|
24
|
-
return false;
|
|
25
|
-
if (out.lockingScript == null)
|
|
26
|
-
return false;
|
|
27
|
-
if (out.isCoinbase === true) {
|
|
28
|
-
if (tip == null)
|
|
29
|
-
return false;
|
|
30
|
-
if (out.maturesAtHeight == null)
|
|
31
|
-
return false;
|
|
32
|
-
if (out.maturesAtHeight > tip.height)
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Convenience wrapper that takes whole table rows and forwards to the pure
|
|
39
|
-
* predicate. Returns `false` when the matching transaction row is missing.
|
|
40
|
-
*/
|
|
41
|
-
function isTableOutputSpendable(out, tx, tip) {
|
|
42
|
-
var _a, _b, _c;
|
|
43
|
-
if (tx === undefined)
|
|
44
|
-
return false;
|
|
45
|
-
return isOutputSpendable({
|
|
46
|
-
spentBy: (_a = out.spentBy) !== null && _a !== void 0 ? _a : null,
|
|
47
|
-
lockingScript: (_b = out.lockingScript) !== null && _b !== void 0 ? _b : null,
|
|
48
|
-
isCoinbase: out.isCoinbase === true,
|
|
49
|
-
maturesAtHeight: (_c = out.maturesAtHeight) !== null && _c !== void 0 ? _c : null
|
|
50
|
-
}, { processing: tx.processing }, tip != null ? { height: tip.height } : undefined);
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=v7Spendability.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"v7Spendability.js","sourceRoot":"","sources":["../../../../src/storage/schema/v7Spendability.ts"],"names":[],"mappings":";;AAwCA,8CAcC;AAMD,wDAgBC;AA1ED,mCAA+C;AAwB/C;;;;;;;;;;;;;GAaG;AACH,SAAgB,iBAAi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udit } from './tables';
|
|
4
|
-
/**
|
|
5
|
-
* V7 append-only audit log writer.
|
|
6
|
-
*
|
|
7
|
-
* Each call inserts one `tx_audit` row. Events should be small, stable
|
|
8
|
-
* identifiers (e.g. `processing.changed`, `proof.acquired`, `lease.claimed`).
|
|
9
|
-
* Payload is stored as a JSON-encoded string so downstream consumers may add
|
|
10
|
-
* shape over time without a migration.
|
|
11
|
-
*/
|
|
12
|
-
export interface AuditEvent {
|
|
13
|
-
transactionId?: number;
|
|
14
|
-
actionId?: number;
|
|
15
|
-
event: string;
|
|
16
|
-
fromState?: sdk.ProcessingStatus;
|
|
17
|
-
toState?: sdk.ProcessingStatus;
|
|
18
|
-
details?: Record<string, unknown>;
|
|
19
|
-
}
|
|
20
|
-
export declare function appendTxAudit(knex: Knex, ev: AuditEvent, now?: Date): Promise<number>;
|
|
21
|
-
/**
|
|
22
|
-
* Convenience helper for processing transitions. Validates the move first;
|
|
23
|
-
* on rejection it still records the attempt with `event = 'processing.rejected'`
|
|
24
|
-
* so the audit trail captures impossible transitions for later diagnosis.
|
|
25
|
-
*
|
|
26
|
-
* Returns `true` when the transition is legal (audit row written with
|
|
27
|
-
* `processing.changed`) and `false` when rejected (audit row written with
|
|
28
|
-
* `processing.rejected`).
|
|
29
|
-
*/
|
|
30
|
-
export declare function auditProcessingTransition(knex: Knex, transactionId: number, from: sdk.ProcessingStatus, to: sdk.ProcessingStatus, details?: Record<string, unknown>, now?: Date): Promise<boolean>;
|
|
31
|
-
/** Read all audit rows for a transaction, oldest first. Useful for tests. */
|
|
32
|
-
export declare function listAuditForTransaction(knex: Knex, transactionId: number): Promise<TableTxAudit[]>;
|
|
33
|
-
//# sourceMappingURL=v7TxAudit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"v7TxAudit.d.ts","sourceRoot":"","sources":["../../../../src/storage/schema/v7TxAudit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,KAAK,GAAG,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAGvC;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAA;IAChC,OAAO,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAA;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;AAED,wBAAsB,aAAa,CACjC,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,UAAU,EACd,GAAG,GAAE,IAAiB,GACrB,OAAO,CAAC,MAAM,CAAC,CAejB;AAED;;;;;;;;GAQG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,GAAG,CAAC,gBAAgB,EAC1B,EAAE,EAAE,GAAG,CAAC,gBAAgB,EACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,GAAG,GAAE,IAAiB,GACrB,OAAO,CAAC,OAAO,CAAC,CAclB;AAED,6EAA6E;AAC7E,wBAAsB,uBAAuB,CAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAGzG"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appendTxAudit = appendTxAudit;
|
|
4
|
-
exports.auditProcessingTransition = auditProcessingTransition;
|
|
5
|
-
exports.listAuditForTransaction = listAuditForTransaction;
|
|
6
|
-
const v7Fsm_1 = require("./v7Fsm");
|
|
7
|
-
async function appendTxAudit(knex, ev, now = new Date()) {
|
|
8
|
-
var _a, _b, _c, _d;
|
|
9
|
-
const detailsJson = ev.details != null ? JSON.stringify(ev.details) : null;
|
|
10
|
-
const [id] = await knex('tx_audit').insert({
|
|
11
|
-
transactionId: (_a = ev.transactionId) !== null && _a !== void 0 ? _a : null,
|
|
12
|
-
actionId: (_b = ev.actionId) !== null && _b !== void 0 ? _b : null,
|
|
13
|
-
event: ev.event,
|
|
14
|
-
from_state: (_c = ev.fromState) !== null && _c !== void 0 ? _c : null,
|
|
15
|
-
to_state: (_d = ev.toState) !== null && _d !== void 0 ? _d : null,
|
|
16
|
-
details_json: detailsJson,
|
|
17
|
-
created_at: now,
|
|
18
|
-
updated_at: now
|
|
19
|
-
});
|
|
20
|
-
if (typeof id === 'number')
|
|
21
|
-
return id;
|
|
22
|
-
const row = await knex('tx_audit').orderBy('auditId', 'desc').first('auditId');
|
|
23
|
-
return row.auditId;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Convenience helper for processing transitions. Validates the move first;
|
|
27
|
-
* on rejection it still records the attempt with `event = 'processing.rejected'`
|
|
28
|
-
* so the audit trail captures impossible transitions for later diagnosis.
|
|
29
|
-
*
|
|
30
|
-
* Returns `true` when the transition is legal (audit row written with
|
|
31
|
-
* `processing.changed`) and `false` when rejected (audit row written with
|
|
32
|
-
* `processing.rejected`).
|
|
33
|
-
*/
|
|
34
|
-
async function auditProcessingTransition(knex, transactionId, from, to, details, now = new Date()) {
|
|
35
|
-
const v = (0, v7Fsm_1.validateProcessingTransition)(from, to);
|
|
36
|
-
await appendTxAudit(knex, {
|
|
37
|
-
transactionId,
|
|
38
|
-
event: v.ok ? 'processing.changed' : 'processing.rejected',
|
|
39
|
-
fromState: from,
|
|
40
|
-
toState: to,
|
|
41
|
-
details: v.ok ? details : { ...(details !== null && details !== void 0 ? details : {}), reason: v.reason }
|
|
42
|
-
}, now);
|
|
43
|
-
return v.ok;
|
|
44
|
-
}
|
|
45
|
-
/** Read all audit rows for a transaction, oldest first. Useful for tests. */
|
|
46
|
-
async function listAuditForTransaction(knex, transactionId) {
|
|
47
|
-
const rows = await knex('tx_audit').where({ transactionId }).orderBy('auditId');
|
|
48
|
-
return rows.map(mapRow);
|
|
49
|
-
}
|
|
50
|
-
function mapRow(row) {
|
|
51
|
-
var _a, _b, _c, _d, _e;
|
|
52
|
-
return {
|
|
53
|
-
created_at: new Date(row.created_at),
|
|
54
|
-
updated_at: new Date(row.updated_at),
|
|
55
|
-
auditId: row.auditId,
|
|
56
|
-
transactionId: (_a = row.transactionId) !== null && _a !== void 0 ? _a : undefined,
|
|
57
|
-
actionId: (_b = row.actionId) !== null && _b !== void 0 ? _b : undefined,
|
|
58
|
-
event: row.event,
|
|
59
|
-
fromState: (_c = row.from_state) !== null && _c !== void 0 ? _c : undefined,
|
|
60
|
-
toState: (_d = row.to_state) !== null && _d !== void 0 ? _d : undefined,
|
|
61
|
-
detailsJson: (_e = row.details_json) !== null && _e !== void 0 ? _e : undefined
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=v7TxAudit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"v7TxAudit.js","sourceRoot":"","sources":["../../../../src/storage/schema/v7TxAudit.ts"],"names":[],"mappings":";;AAsBA,sCAmBC;AAWD,8DAqBC;AAGD,0DAGC;AA5ED,mCAAsD;AAmB/C,KAAK,UAAU,aAAa,CACjC,IAAU,EACV,EAAc,EACd,MAAY,IAAI,IAAI,EAAE;;IAEtB,MAAM,WAAW,GAAG,EAAE,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IAC1E,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC;QACzC,aAAa,EAAE,MAAA,EAAE,CAAC,aAAa,mCAAI,IAAI;QACvC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