@haven_ai/sdk 0.0.0-dev.202609241737.2d2b91b → 0.0.0-dev.202609241802.ea320de
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 +1 -1
- package/dist/{base64-fVc9Cnn-.d.cts → base64-CPxbmyU9.d.cts} +16 -16
- package/dist/{base64-fVc9Cnn-.d.ts → base64-CPxbmyU9.d.ts} +16 -16
- package/dist/{chunk-YGSM2WRP.js → chunk-FR5R26V3.js} +6 -6
- package/dist/chunk-FR5R26V3.js.map +1 -0
- package/dist/{chunk-CSWZXQ2L.cjs → chunk-M57KOLAN.cjs} +6 -6
- package/dist/chunk-M57KOLAN.cjs.map +1 -0
- package/dist/edge.cjs +32 -32
- package/dist/edge.d.cts +1 -1
- package/dist/edge.d.ts +1 -1
- package/dist/edge.js +2 -2
- package/dist/index.cjs +260 -259
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-CSWZXQ2L.cjs.map +0 -1
- package/dist/chunk-YGSM2WRP.js.map +0 -1
package/dist/edge.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkM57KOLAN_cjs = require('./chunk-M57KOLAN.cjs');
|
|
4
4
|
var secp256k1 = require('@noble/curves/secp256k1');
|
|
5
5
|
var accounts = require('viem/accounts');
|
|
6
6
|
var viem = require('viem');
|
|
@@ -16,7 +16,7 @@ function addressFromKey(privateKey) {
|
|
|
16
16
|
try {
|
|
17
17
|
return accounts.privateKeyToAddress(`0x${hexBytes(privateKey, 32, "private key")}`);
|
|
18
18
|
} catch (err) {
|
|
19
|
-
throw new
|
|
19
|
+
throw new chunkM57KOLAN_cjs.HavenSigningError(
|
|
20
20
|
`Invalid private key: ${err instanceof Error ? err.message : String(err)}`
|
|
21
21
|
);
|
|
22
22
|
}
|
|
@@ -30,7 +30,7 @@ function signHash(privateKey, hash) {
|
|
|
30
30
|
yParity: recovery
|
|
31
31
|
});
|
|
32
32
|
} catch (err) {
|
|
33
|
-
throw new
|
|
33
|
+
throw new chunkM57KOLAN_cjs.HavenSigningError(
|
|
34
34
|
`Failed to sign hash: ${err instanceof Error ? err.message : String(err)}`
|
|
35
35
|
);
|
|
36
36
|
}
|
|
@@ -53,119 +53,119 @@ function verifySignature(hash, signature, expectedAddress) {
|
|
|
53
53
|
|
|
54
54
|
Object.defineProperty(exports, "AgentPaymentFailureCode", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkM57KOLAN_cjs.AgentPaymentFailureCode; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "AgentPaymentNextAction", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkM57KOLAN_cjs.AgentPaymentNextAction; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "DIRECT_SIGN_CONTEXT_VERSION", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkM57KOLAN_cjs.DIRECT_SIGN_CONTEXT_VERSION; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "ENTRY_POINT_V07", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkM57KOLAN_cjs.ENTRY_POINT_V07; }
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "HAVEN_CONNECTOR_CHANNEL", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkM57KOLAN_cjs.HAVEN_CONNECTOR_CHANNEL; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "HAVEN_MINIMUM_NODE_VERSION", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkM57KOLAN_cjs.HAVEN_MINIMUM_NODE_VERSION; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "HavenApiError", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkM57KOLAN_cjs.HavenApiError; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "HavenError", {
|
|
83
83
|
enumerable: true,
|
|
84
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkM57KOLAN_cjs.HavenError; }
|
|
85
85
|
});
|
|
86
86
|
Object.defineProperty(exports, "HavenSigningError", {
|
|
87
87
|
enumerable: true,
|
|
88
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkM57KOLAN_cjs.HavenSigningError; }
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "HavenUnsupportedSignerVersionError", {
|
|
91
91
|
enumerable: true,
|
|
92
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkM57KOLAN_cjs.HavenUnsupportedSignerVersionError; }
|
|
93
93
|
});
|
|
94
94
|
Object.defineProperty(exports, "HavenUserOpBindingError", {
|
|
95
95
|
enumerable: true,
|
|
96
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkM57KOLAN_cjs.HavenUserOpBindingError; }
|
|
97
97
|
});
|
|
98
98
|
Object.defineProperty(exports, "SIGNER_UPDATE_FALLBACK", {
|
|
99
99
|
enumerable: true,
|
|
100
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkM57KOLAN_cjs.SIGNER_UPDATE_FALLBACK; }
|
|
101
101
|
});
|
|
102
102
|
Object.defineProperty(exports, "SignerRefusalCode", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkM57KOLAN_cjs.SignerRefusalCode; }
|
|
105
105
|
});
|
|
106
106
|
Object.defineProperty(exports, "assertUserOpTypedDataBinding", {
|
|
107
107
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkM57KOLAN_cjs.assertUserOpTypedDataBinding; }
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(exports, "buildSweepAuthorizationMessage", {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkM57KOLAN_cjs.buildSweepAuthorizationMessage; }
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "buildSweepTypedData", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkM57KOLAN_cjs.buildSweepTypedData; }
|
|
117
117
|
});
|
|
118
118
|
Object.defineProperty(exports, "buildX402ExpectedMessage", {
|
|
119
119
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkM57KOLAN_cjs.buildX402ExpectedMessage; }
|
|
121
121
|
});
|
|
122
122
|
Object.defineProperty(exports, "connectorRerunCommand", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkM57KOLAN_cjs.connectorRerunCommand; }
|
|
125
125
|
});
|
|
126
126
|
Object.defineProperty(exports, "createNextStepBuilder", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkM57KOLAN_cjs.createNextStepBuilder; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "decodeBase64Json", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkM57KOLAN_cjs.decodeBase64Json; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "encodeBase64Json", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkM57KOLAN_cjs.encodeBase64Json; }
|
|
137
137
|
});
|
|
138
138
|
Object.defineProperty(exports, "isPackedUserOperationTypedData", {
|
|
139
139
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkM57KOLAN_cjs.isPackedUserOperationTypedData; }
|
|
141
141
|
});
|
|
142
142
|
Object.defineProperty(exports, "isSupportedNodeVersion", {
|
|
143
143
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkM57KOLAN_cjs.isSupportedNodeVersion; }
|
|
145
145
|
});
|
|
146
146
|
Object.defineProperty(exports, "packedUserOperationHash", {
|
|
147
147
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkM57KOLAN_cjs.packedUserOperationHash; }
|
|
149
149
|
});
|
|
150
150
|
Object.defineProperty(exports, "selectStandardPaymentOption", {
|
|
151
151
|
enumerable: true,
|
|
152
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkM57KOLAN_cjs.selectStandardPaymentOption; }
|
|
153
153
|
});
|
|
154
154
|
Object.defineProperty(exports, "toStandardPaymentRequirements", {
|
|
155
155
|
enumerable: true,
|
|
156
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkM57KOLAN_cjs.toStandardPaymentRequirements; }
|
|
157
157
|
});
|
|
158
158
|
Object.defineProperty(exports, "unsupportedNodeVersionMessage", {
|
|
159
159
|
enumerable: true,
|
|
160
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkM57KOLAN_cjs.unsupportedNodeVersionMessage; }
|
|
161
161
|
});
|
|
162
162
|
Object.defineProperty(exports, "x402AuthorizationAmount", {
|
|
163
163
|
enumerable: true,
|
|
164
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkM57KOLAN_cjs.x402AuthorizationAmount; }
|
|
165
165
|
});
|
|
166
166
|
Object.defineProperty(exports, "x402V2PaymentEnvelope", {
|
|
167
167
|
enumerable: true,
|
|
168
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkM57KOLAN_cjs.x402V2PaymentEnvelope; }
|
|
169
169
|
});
|
|
170
170
|
exports.addressFromKey = addressFromKey;
|
|
171
171
|
exports.signHash = signHash;
|
package/dist/edge.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { L as AgentPaymentFailureCode, O as AgentPaymentNextAction, a6 as DIRECT_SIGN_CONTEXT_VERSION, a7 as ENTRY_POINT_V07, a9 as HAVEN_CONNECTOR_CHANNEL, aa as HAVEN_MINIMUM_NODE_VERSION, ag as HavenApiError, D as HavenError, ak as HavenSigningError, am as HavenUnsupportedSignerVersionError, an as HavenUserOpBindingError, at as NextStep, av as NextStepHandoff, ax as NextStepTarget, aF as SIGNER_UPDATE_FALLBACK, aK as SignerRefusalCode, i as SweepAuthorization, aO as SweepExpectedAuth, aV as X402ExpectedAuth, aZ as X402PaymentOption, X as X402PaymentRequired, b8 as assertUserOpTypedDataBinding, b9 as buildSweepAuthorizationMessage, ba as buildSweepTypedData, bb as buildX402ExpectedMessage, bd as connectorRerunCommand, bf as createNextStepBuilder, bg as decodeBase64Json, bj as encodeBase64Json, bo as isPackedUserOperationTypedData, bp as isSupportedNodeVersion, bs as packedUserOperationHash, bB as selectStandardPaymentOption, bG as toStandardPaymentRequirements, bH as unsupportedNodeVersionMessage, bK as x402AuthorizationAmount, bM as x402V2PaymentEnvelope } from './base64-
|
|
1
|
+
export { L as AgentPaymentFailureCode, O as AgentPaymentNextAction, a6 as DIRECT_SIGN_CONTEXT_VERSION, a7 as ENTRY_POINT_V07, a9 as HAVEN_CONNECTOR_CHANNEL, aa as HAVEN_MINIMUM_NODE_VERSION, ag as HavenApiError, D as HavenError, ak as HavenSigningError, am as HavenUnsupportedSignerVersionError, an as HavenUserOpBindingError, at as NextStep, av as NextStepHandoff, ax as NextStepTarget, aF as SIGNER_UPDATE_FALLBACK, aK as SignerRefusalCode, i as SweepAuthorization, aO as SweepExpectedAuth, aV as X402ExpectedAuth, aZ as X402PaymentOption, X as X402PaymentRequired, b8 as assertUserOpTypedDataBinding, b9 as buildSweepAuthorizationMessage, ba as buildSweepTypedData, bb as buildX402ExpectedMessage, bd as connectorRerunCommand, bf as createNextStepBuilder, bg as decodeBase64Json, bj as encodeBase64Json, bo as isPackedUserOperationTypedData, bp as isSupportedNodeVersion, bs as packedUserOperationHash, bB as selectStandardPaymentOption, bG as toStandardPaymentRequirements, bH as unsupportedNodeVersionMessage, bK as x402AuthorizationAmount, bM as x402V2PaymentEnvelope } from './base64-CPxbmyU9.cjs';
|
|
2
2
|
import 'x402/types';
|
|
3
3
|
import 'viem';
|
|
4
4
|
|
package/dist/edge.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { L as AgentPaymentFailureCode, O as AgentPaymentNextAction, a6 as DIRECT_SIGN_CONTEXT_VERSION, a7 as ENTRY_POINT_V07, a9 as HAVEN_CONNECTOR_CHANNEL, aa as HAVEN_MINIMUM_NODE_VERSION, ag as HavenApiError, D as HavenError, ak as HavenSigningError, am as HavenUnsupportedSignerVersionError, an as HavenUserOpBindingError, at as NextStep, av as NextStepHandoff, ax as NextStepTarget, aF as SIGNER_UPDATE_FALLBACK, aK as SignerRefusalCode, i as SweepAuthorization, aO as SweepExpectedAuth, aV as X402ExpectedAuth, aZ as X402PaymentOption, X as X402PaymentRequired, b8 as assertUserOpTypedDataBinding, b9 as buildSweepAuthorizationMessage, ba as buildSweepTypedData, bb as buildX402ExpectedMessage, bd as connectorRerunCommand, bf as createNextStepBuilder, bg as decodeBase64Json, bj as encodeBase64Json, bo as isPackedUserOperationTypedData, bp as isSupportedNodeVersion, bs as packedUserOperationHash, bB as selectStandardPaymentOption, bG as toStandardPaymentRequirements, bH as unsupportedNodeVersionMessage, bK as x402AuthorizationAmount, bM as x402V2PaymentEnvelope } from './base64-
|
|
1
|
+
export { L as AgentPaymentFailureCode, O as AgentPaymentNextAction, a6 as DIRECT_SIGN_CONTEXT_VERSION, a7 as ENTRY_POINT_V07, a9 as HAVEN_CONNECTOR_CHANNEL, aa as HAVEN_MINIMUM_NODE_VERSION, ag as HavenApiError, D as HavenError, ak as HavenSigningError, am as HavenUnsupportedSignerVersionError, an as HavenUserOpBindingError, at as NextStep, av as NextStepHandoff, ax as NextStepTarget, aF as SIGNER_UPDATE_FALLBACK, aK as SignerRefusalCode, i as SweepAuthorization, aO as SweepExpectedAuth, aV as X402ExpectedAuth, aZ as X402PaymentOption, X as X402PaymentRequired, b8 as assertUserOpTypedDataBinding, b9 as buildSweepAuthorizationMessage, ba as buildSweepTypedData, bb as buildX402ExpectedMessage, bd as connectorRerunCommand, bf as createNextStepBuilder, bg as decodeBase64Json, bj as encodeBase64Json, bo as isPackedUserOperationTypedData, bp as isSupportedNodeVersion, bs as packedUserOperationHash, bB as selectStandardPaymentOption, bG as toStandardPaymentRequirements, bH as unsupportedNodeVersionMessage, bK as x402AuthorizationAmount, bM as x402V2PaymentEnvelope } from './base64-CPxbmyU9.js';
|
|
2
2
|
import 'x402/types';
|
|
3
3
|
import 'viem';
|
|
4
4
|
|
package/dist/edge.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HavenSigningError } from './chunk-
|
|
2
|
-
export { AgentPaymentFailureCode, AgentPaymentNextAction, DIRECT_SIGN_CONTEXT_VERSION, ENTRY_POINT_V07, HAVEN_CONNECTOR_CHANNEL, HAVEN_MINIMUM_NODE_VERSION, HavenApiError, HavenError, HavenSigningError, HavenUnsupportedSignerVersionError, HavenUserOpBindingError, SIGNER_UPDATE_FALLBACK, SignerRefusalCode, assertUserOpTypedDataBinding, buildSweepAuthorizationMessage, buildSweepTypedData, buildX402ExpectedMessage, connectorRerunCommand, createNextStepBuilder, decodeBase64Json, encodeBase64Json, isPackedUserOperationTypedData, isSupportedNodeVersion, packedUserOperationHash, selectStandardPaymentOption, toStandardPaymentRequirements, unsupportedNodeVersionMessage, x402AuthorizationAmount, x402V2PaymentEnvelope } from './chunk-
|
|
1
|
+
import { HavenSigningError } from './chunk-FR5R26V3.js';
|
|
2
|
+
export { AgentPaymentFailureCode, AgentPaymentNextAction, DIRECT_SIGN_CONTEXT_VERSION, ENTRY_POINT_V07, HAVEN_CONNECTOR_CHANNEL, HAVEN_MINIMUM_NODE_VERSION, HavenApiError, HavenError, HavenSigningError, HavenUnsupportedSignerVersionError, HavenUserOpBindingError, SIGNER_UPDATE_FALLBACK, SignerRefusalCode, assertUserOpTypedDataBinding, buildSweepAuthorizationMessage, buildSweepTypedData, buildX402ExpectedMessage, connectorRerunCommand, createNextStepBuilder, decodeBase64Json, encodeBase64Json, isPackedUserOperationTypedData, isSupportedNodeVersion, packedUserOperationHash, selectStandardPaymentOption, toStandardPaymentRequirements, unsupportedNodeVersionMessage, x402AuthorizationAmount, x402V2PaymentEnvelope } from './chunk-FR5R26V3.js';
|
|
3
3
|
import { secp256k1 } from '@noble/curves/secp256k1';
|
|
4
4
|
import { privateKeyToAddress, publicKeyToAddress } from 'viem/accounts';
|
|
5
5
|
import { serializeSignature } from 'viem';
|