@haven_ai/signer 0.9.0-alpha.0 → 0.10.0-alpha.0
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/dist/cli.cjs +6 -3
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +7 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -135,11 +135,14 @@ function createEdgeSigner(delegateKey, options = {}) {
|
|
|
135
135
|
const requirements = edge.toStandardPaymentRequirements(paymentRequired, option);
|
|
136
136
|
const { exact } = await loadX402Schemes();
|
|
137
137
|
assertWindowOpenOrRetire();
|
|
138
|
-
const
|
|
139
|
-
account,
|
|
138
|
+
const unsigned = exact.evm.preparePaymentHeader(
|
|
139
|
+
account.address,
|
|
140
140
|
paymentRequired.x402Version,
|
|
141
141
|
requirements
|
|
142
142
|
);
|
|
143
|
+
unsigned.payload.authorization.nonce = edge.deriveX402PaymentNonce(expected.paymentId);
|
|
144
|
+
const signed = await exact.evm.signPaymentHeader(account, requirements, unsigned);
|
|
145
|
+
const header = exact.evm.encodePayment(signed);
|
|
143
146
|
if (paymentRequired.x402Version < 2) {
|
|
144
147
|
x402Bindings.delete(x402Binding);
|
|
145
148
|
retireX402Binding(x402Binding, "header_built");
|
|
@@ -1423,7 +1426,7 @@ function encodeSiwxHeader(payload) {
|
|
|
1423
1426
|
|
|
1424
1427
|
// src/tools.ts
|
|
1425
1428
|
var SIGNER_NAME = "@haven_ai/signer";
|
|
1426
|
-
var SIGNER_VERSION = "0.
|
|
1429
|
+
var SIGNER_VERSION = "0.10.0-alpha.0";
|
|
1427
1430
|
var UNSUPPORTED_ARGUMENT_MARKER = "HavenSignerUnsupportedArgument:";
|
|
1428
1431
|
var USEROP_BINDING_MISMATCH = "USEROP_BINDING_MISMATCH";
|
|
1429
1432
|
var HavenUserOpBindingRefusedError = class extends edge.HavenSigningError {
|