@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/cli.cjs
CHANGED
|
@@ -909,7 +909,7 @@ function encodeSiwxHeader(payload) {
|
|
|
909
909
|
|
|
910
910
|
// src/tools.ts
|
|
911
911
|
var SIGNER_NAME = "@haven_ai/signer";
|
|
912
|
-
var SIGNER_VERSION = "0.
|
|
912
|
+
var SIGNER_VERSION = "0.10.0-alpha.0";
|
|
913
913
|
var UNSUPPORTED_ARGUMENT_MARKER = "HavenSignerUnsupportedArgument:";
|
|
914
914
|
var USEROP_BINDING_MISMATCH = "USEROP_BINDING_MISMATCH";
|
|
915
915
|
var HavenUserOpBindingRefusedError = class extends edge.HavenSigningError {
|
|
@@ -2116,11 +2116,14 @@ function createEdgeSigner(delegateKey, options = {}) {
|
|
|
2116
2116
|
const requirements = edge.toStandardPaymentRequirements(paymentRequired, option);
|
|
2117
2117
|
const { exact } = await loadX402Schemes();
|
|
2118
2118
|
assertWindowOpenOrRetire();
|
|
2119
|
-
const
|
|
2120
|
-
account,
|
|
2119
|
+
const unsigned = exact.evm.preparePaymentHeader(
|
|
2120
|
+
account.address,
|
|
2121
2121
|
paymentRequired.x402Version,
|
|
2122
2122
|
requirements
|
|
2123
2123
|
);
|
|
2124
|
+
unsigned.payload.authorization.nonce = edge.deriveX402PaymentNonce(expected.paymentId);
|
|
2125
|
+
const signed = await exact.evm.signPaymentHeader(account, requirements, unsigned);
|
|
2126
|
+
const header = exact.evm.encodePayment(signed);
|
|
2124
2127
|
if (paymentRequired.x402Version < 2) {
|
|
2125
2128
|
x402Bindings.delete(x402Binding);
|
|
2126
2129
|
retireX402Binding(x402Binding, "header_built");
|