@provian/agent-sdk 1.12.4 → 1.12.5
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/CHANGELOG.md +4 -0
- package/dist/protocol-balance.d.ts.map +1 -1
- package/dist/protocol-balance.js +12 -9
- package/dist/protocol-balance.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 1.12.5
|
|
2
|
+
|
|
3
|
+
- Reserve balance confirmation before concurrent history reads while keeping speculative balances gated on fresh deployment confirmation.
|
|
4
|
+
|
|
1
5
|
## 1.12.4
|
|
2
6
|
|
|
3
7
|
- Ship a build-verified protocol proof so first use needs only fresh two-provider confirmation when the revision is unchanged. Keep full verification for newer revisions, canonical-block checks, retirement protection and rate-limit handling.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol-balance.d.ts","sourceRoot":"","sources":["../src/protocol-balance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,kFAAkF;AAClF,wBAAsB,4BAA4B,CAAC,CAAC,EAClD,SAAS,EAAE,MAAM,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,EACxD,OAAO,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,EAC1C,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GAClC,OAAO,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"protocol-balance.d.ts","sourceRoot":"","sources":["../src/protocol-balance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,kFAAkF;AAClF,wBAAsB,4BAA4B,CAAC,CAAC,EAClD,SAAS,EAAE,MAAM,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,EACxD,OAAO,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,EAC1C,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GAClC,OAAO,CAAC,CAAC,CAAC,CAgBZ"}
|
package/dist/protocol-balance.js
CHANGED
|
@@ -3,17 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.readConfirmedProtocolBalance = readConfirmedProtocolBalance;
|
|
4
4
|
/** Overlap a read with live confirmation, never its acceptance or a signature. */
|
|
5
5
|
async function readConfirmedProtocolBalance(candidate, current, read) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
// Reserve this operation's confirmation before yielding to other readers.
|
|
7
|
+
// Otherwise history reads started in the same render can jump ahead while
|
|
8
|
+
// the candidate is loading, adding several complete confirmation cycles.
|
|
9
|
+
const hintPromise = candidate();
|
|
10
|
+
const confirmation = current();
|
|
11
|
+
const speculativeRead = hintPromise.then(hint => hint
|
|
12
|
+
? Promise.resolve().then(() => read(hint.addresses.kernel.toLowerCase()))
|
|
13
|
+
.then(value => ({ ok: true, value }), () => ({ ok: false }))
|
|
14
|
+
: undefined);
|
|
15
|
+
const [hint, confirmed, speculative] = await Promise.all([hintPromise, confirmation, speculativeRead]);
|
|
16
|
+
if (!hint || hint.revision !== confirmed.revision || hint.manifestHash !== confirmed.manifestHash
|
|
14
17
|
|| hint.pointer !== confirmed.pointer || hint.addresses.kernel !== confirmed.addresses.kernel)
|
|
15
18
|
return read(confirmed.addresses.kernel.toLowerCase());
|
|
16
|
-
if (!speculative
|
|
19
|
+
if (!speculative?.ok)
|
|
17
20
|
throw Error('protocol_balance_read_failed');
|
|
18
21
|
return speculative.value;
|
|
19
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol-balance.js","sourceRoot":"","sources":["../src/protocol-balance.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"protocol-balance.js","sourceRoot":"","sources":["../src/protocol-balance.ts"],"names":[],"mappings":";;AAGA,oEAoBC;AArBD,kFAAkF;AAC3E,KAAK,UAAU,4BAA4B,CAChD,SAAwD,EACxD,OAA0C,EAC1C,IAAmC;IAEnC,0EAA0E;IAC1E,0EAA0E;IAC1E,yEAAyE;IACzE,MAAM,WAAW,GAAG,SAAS,EAAE,CAAC;IAChC,MAAM,YAAY,GAAG,OAAO,EAAE,CAAC;IAC/B,MAAM,eAAe,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI;QACnD,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;aACtE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAa,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAc,EAAE,CAAC,CAAC;QAChF,CAAC,CAAC,SAAS,CAAC,CAAC;IACf,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;IACvG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,CAAC,YAAY;WAC5F,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM;QAC7F,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;IACxD,IAAI,CAAC,WAAW,EAAE,EAAE;QAAE,MAAM,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClE,OAAO,WAAW,CAAC,KAAK,CAAC;AAC3B,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* the moment the two drift — so bumping the package version without bumping this
|
|
10
10
|
* is a build failure, not a silent skew.
|
|
11
11
|
*/
|
|
12
|
-
export declare const SDK_VERSION = "1.12.
|
|
12
|
+
export declare const SDK_VERSION = "1.12.5";
|
|
13
13
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -12,5 +12,5 @@ exports.SDK_VERSION = void 0;
|
|
|
12
12
|
* the moment the two drift — so bumping the package version without bumping this
|
|
13
13
|
* is a build failure, not a silent skew.
|
|
14
14
|
*/
|
|
15
|
-
exports.SDK_VERSION = '1.12.
|
|
15
|
+
exports.SDK_VERSION = '1.12.5';
|
|
16
16
|
//# sourceMappingURL=version.js.map
|