@argonprotocol/mainchain 1.6.0-dev.63af99c7 → 1.6.0-dev.b6758225
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/README.md +8 -0
- package/browser/index.d.ts +967 -426
- package/browser/index.js +32 -5
- package/browser/index.js.map +1 -1
- package/lib/index.cjs +45 -17
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +967 -426
- package/lib/index.d.ts +967 -426
- package/lib/index.js +36 -8
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
- package/src/interfaces/augment-api-consts.ts +54 -11
- package/src/interfaces/augment-api-errors.ts +65 -3
- package/src/interfaces/augment-api-events.ts +23 -11
- package/src/interfaces/augment-api-query.ts +74 -9
- package/src/interfaces/augment-api-tx.ts +28 -5
- package/src/interfaces/lookup.ts +691 -375
- package/src/interfaces/registry.ts +35 -2
- package/src/interfaces/types-lookup.ts +688 -379
package/README.md
CHANGED
|
@@ -103,11 +103,13 @@ locators or `buildGatewayActivityStorageProofs(...)` with captured locators. Cap
|
|
|
103
103
|
independent; a runtime may accept either format.
|
|
104
104
|
|
|
105
105
|
```ts
|
|
106
|
+
const cache = new Map<bigint, CapturedGatewayActivityStorageProof>();
|
|
106
107
|
const captures = await captureGatewayActivityStorageProofs({
|
|
107
108
|
executionClient,
|
|
108
109
|
executionBlock: await executionClient.getBlock({ blockTag: 'latest' }),
|
|
109
110
|
gatewayAddress,
|
|
110
111
|
locators,
|
|
112
|
+
cache,
|
|
111
113
|
});
|
|
112
114
|
// Persist captures in the app, then prepare relay transactions when anchors become available.
|
|
113
115
|
const result = await buildGatewayActivityProof(client, {
|
|
@@ -117,6 +119,12 @@ const result = await buildGatewayActivityProof(client, {
|
|
|
117
119
|
});
|
|
118
120
|
```
|
|
119
121
|
|
|
122
|
+
The optional `cache` is scoped to one Ethereum chain and gateway and keyed by locator index. Restore
|
|
123
|
+
it from persisted captures to refresh a witness without fetching historical logs again. Capture
|
|
124
|
+
always fetches a new storage witness and verifies the cached raw events against its locator
|
|
125
|
+
commitment; cache misses load logs normally. The map is updated only after every selected capture
|
|
126
|
+
verifies. Persist the updated captures in the app.
|
|
127
|
+
|
|
120
128
|
Storage proofs include the full locator's activity logs and its `activityRootSeed`, even when the
|
|
121
129
|
last proven nonce falls inside that locator. Only `payload.activities` and
|
|
122
130
|
`payload.gatewayActivityNonceRange` describe the newly applied suffix. No bootstrap call or stored
|