@haven_ai/sdk 0.0.0-dev.202609232125.72f3d20 → 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/dist/edge.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkAS6BCA42_cjs = require('./chunk-AS6BCA42.cjs');
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 chunkAS6BCA42_cjs.HavenSigningError(
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 chunkAS6BCA42_cjs.HavenSigningError(
33
+ throw new chunkM57KOLAN_cjs.HavenSigningError(
34
34
  `Failed to sign hash: ${err instanceof Error ? err.message : String(err)}`
35
35
  );
36
36
  }
@@ -53,95 +53,119 @@ function verifySignature(hash, signature, expectedAddress) {
53
53
 
54
54
  Object.defineProperty(exports, "AgentPaymentFailureCode", {
55
55
  enumerable: true,
56
- get: function () { return chunkAS6BCA42_cjs.AgentPaymentFailureCode; }
56
+ get: function () { return chunkM57KOLAN_cjs.AgentPaymentFailureCode; }
57
57
  });
58
58
  Object.defineProperty(exports, "AgentPaymentNextAction", {
59
59
  enumerable: true,
60
- get: function () { return chunkAS6BCA42_cjs.AgentPaymentNextAction; }
60
+ get: function () { return chunkM57KOLAN_cjs.AgentPaymentNextAction; }
61
+ });
62
+ Object.defineProperty(exports, "DIRECT_SIGN_CONTEXT_VERSION", {
63
+ enumerable: true,
64
+ get: function () { return chunkM57KOLAN_cjs.DIRECT_SIGN_CONTEXT_VERSION; }
65
+ });
66
+ Object.defineProperty(exports, "ENTRY_POINT_V07", {
67
+ enumerable: true,
68
+ get: function () { return chunkM57KOLAN_cjs.ENTRY_POINT_V07; }
61
69
  });
62
70
  Object.defineProperty(exports, "HAVEN_CONNECTOR_CHANNEL", {
63
71
  enumerable: true,
64
- get: function () { return chunkAS6BCA42_cjs.HAVEN_CONNECTOR_CHANNEL; }
72
+ get: function () { return chunkM57KOLAN_cjs.HAVEN_CONNECTOR_CHANNEL; }
65
73
  });
66
74
  Object.defineProperty(exports, "HAVEN_MINIMUM_NODE_VERSION", {
67
75
  enumerable: true,
68
- get: function () { return chunkAS6BCA42_cjs.HAVEN_MINIMUM_NODE_VERSION; }
76
+ get: function () { return chunkM57KOLAN_cjs.HAVEN_MINIMUM_NODE_VERSION; }
69
77
  });
70
78
  Object.defineProperty(exports, "HavenApiError", {
71
79
  enumerable: true,
72
- get: function () { return chunkAS6BCA42_cjs.HavenApiError; }
80
+ get: function () { return chunkM57KOLAN_cjs.HavenApiError; }
73
81
  });
74
82
  Object.defineProperty(exports, "HavenError", {
75
83
  enumerable: true,
76
- get: function () { return chunkAS6BCA42_cjs.HavenError; }
84
+ get: function () { return chunkM57KOLAN_cjs.HavenError; }
77
85
  });
78
86
  Object.defineProperty(exports, "HavenSigningError", {
79
87
  enumerable: true,
80
- get: function () { return chunkAS6BCA42_cjs.HavenSigningError; }
88
+ get: function () { return chunkM57KOLAN_cjs.HavenSigningError; }
81
89
  });
82
90
  Object.defineProperty(exports, "HavenUnsupportedSignerVersionError", {
83
91
  enumerable: true,
84
- get: function () { return chunkAS6BCA42_cjs.HavenUnsupportedSignerVersionError; }
92
+ get: function () { return chunkM57KOLAN_cjs.HavenUnsupportedSignerVersionError; }
93
+ });
94
+ Object.defineProperty(exports, "HavenUserOpBindingError", {
95
+ enumerable: true,
96
+ get: function () { return chunkM57KOLAN_cjs.HavenUserOpBindingError; }
85
97
  });
86
98
  Object.defineProperty(exports, "SIGNER_UPDATE_FALLBACK", {
87
99
  enumerable: true,
88
- get: function () { return chunkAS6BCA42_cjs.SIGNER_UPDATE_FALLBACK; }
100
+ get: function () { return chunkM57KOLAN_cjs.SIGNER_UPDATE_FALLBACK; }
89
101
  });
90
102
  Object.defineProperty(exports, "SignerRefusalCode", {
91
103
  enumerable: true,
92
- get: function () { return chunkAS6BCA42_cjs.SignerRefusalCode; }
104
+ get: function () { return chunkM57KOLAN_cjs.SignerRefusalCode; }
105
+ });
106
+ Object.defineProperty(exports, "assertUserOpTypedDataBinding", {
107
+ enumerable: true,
108
+ get: function () { return chunkM57KOLAN_cjs.assertUserOpTypedDataBinding; }
93
109
  });
94
110
  Object.defineProperty(exports, "buildSweepAuthorizationMessage", {
95
111
  enumerable: true,
96
- get: function () { return chunkAS6BCA42_cjs.buildSweepAuthorizationMessage; }
112
+ get: function () { return chunkM57KOLAN_cjs.buildSweepAuthorizationMessage; }
97
113
  });
98
114
  Object.defineProperty(exports, "buildSweepTypedData", {
99
115
  enumerable: true,
100
- get: function () { return chunkAS6BCA42_cjs.buildSweepTypedData; }
116
+ get: function () { return chunkM57KOLAN_cjs.buildSweepTypedData; }
101
117
  });
102
118
  Object.defineProperty(exports, "buildX402ExpectedMessage", {
103
119
  enumerable: true,
104
- get: function () { return chunkAS6BCA42_cjs.buildX402ExpectedMessage; }
120
+ get: function () { return chunkM57KOLAN_cjs.buildX402ExpectedMessage; }
105
121
  });
106
122
  Object.defineProperty(exports, "connectorRerunCommand", {
107
123
  enumerable: true,
108
- get: function () { return chunkAS6BCA42_cjs.connectorRerunCommand; }
124
+ get: function () { return chunkM57KOLAN_cjs.connectorRerunCommand; }
109
125
  });
110
126
  Object.defineProperty(exports, "createNextStepBuilder", {
111
127
  enumerable: true,
112
- get: function () { return chunkAS6BCA42_cjs.createNextStepBuilder; }
128
+ get: function () { return chunkM57KOLAN_cjs.createNextStepBuilder; }
113
129
  });
114
130
  Object.defineProperty(exports, "decodeBase64Json", {
115
131
  enumerable: true,
116
- get: function () { return chunkAS6BCA42_cjs.decodeBase64Json; }
132
+ get: function () { return chunkM57KOLAN_cjs.decodeBase64Json; }
117
133
  });
118
134
  Object.defineProperty(exports, "encodeBase64Json", {
119
135
  enumerable: true,
120
- get: function () { return chunkAS6BCA42_cjs.encodeBase64Json; }
136
+ get: function () { return chunkM57KOLAN_cjs.encodeBase64Json; }
137
+ });
138
+ Object.defineProperty(exports, "isPackedUserOperationTypedData", {
139
+ enumerable: true,
140
+ get: function () { return chunkM57KOLAN_cjs.isPackedUserOperationTypedData; }
121
141
  });
122
142
  Object.defineProperty(exports, "isSupportedNodeVersion", {
123
143
  enumerable: true,
124
- get: function () { return chunkAS6BCA42_cjs.isSupportedNodeVersion; }
144
+ get: function () { return chunkM57KOLAN_cjs.isSupportedNodeVersion; }
145
+ });
146
+ Object.defineProperty(exports, "packedUserOperationHash", {
147
+ enumerable: true,
148
+ get: function () { return chunkM57KOLAN_cjs.packedUserOperationHash; }
125
149
  });
126
150
  Object.defineProperty(exports, "selectStandardPaymentOption", {
127
151
  enumerable: true,
128
- get: function () { return chunkAS6BCA42_cjs.selectStandardPaymentOption; }
152
+ get: function () { return chunkM57KOLAN_cjs.selectStandardPaymentOption; }
129
153
  });
130
154
  Object.defineProperty(exports, "toStandardPaymentRequirements", {
131
155
  enumerable: true,
132
- get: function () { return chunkAS6BCA42_cjs.toStandardPaymentRequirements; }
156
+ get: function () { return chunkM57KOLAN_cjs.toStandardPaymentRequirements; }
133
157
  });
134
158
  Object.defineProperty(exports, "unsupportedNodeVersionMessage", {
135
159
  enumerable: true,
136
- get: function () { return chunkAS6BCA42_cjs.unsupportedNodeVersionMessage; }
160
+ get: function () { return chunkM57KOLAN_cjs.unsupportedNodeVersionMessage; }
137
161
  });
138
162
  Object.defineProperty(exports, "x402AuthorizationAmount", {
139
163
  enumerable: true,
140
- get: function () { return chunkAS6BCA42_cjs.x402AuthorizationAmount; }
164
+ get: function () { return chunkM57KOLAN_cjs.x402AuthorizationAmount; }
141
165
  });
142
166
  Object.defineProperty(exports, "x402V2PaymentEnvelope", {
143
167
  enumerable: true,
144
- get: function () { return chunkAS6BCA42_cjs.x402V2PaymentEnvelope; }
168
+ get: function () { return chunkM57KOLAN_cjs.x402V2PaymentEnvelope; }
145
169
  });
146
170
  exports.addressFromKey = addressFromKey;
147
171
  exports.signHash = signHash;
package/dist/edge.d.cts CHANGED
@@ -1,5 +1,6 @@
1
- export { L as AgentPaymentFailureCode, O as AgentPaymentNextAction, a7 as HAVEN_CONNECTOR_CHANNEL, a8 as HAVEN_MINIMUM_NODE_VERSION, ac as HavenApiError, D as HavenError, ag as HavenSigningError, ai as HavenUnsupportedSignerVersionError, ao as NextStep, aq as NextStepHandoff, as as NextStepTarget, az as SIGNER_UPDATE_FALLBACK, aE as SignerRefusalCode, i as SweepAuthorization, aI as SweepExpectedAuth, aP as X402ExpectedAuth, aT as X402PaymentOption, X as X402PaymentRequired, b2 as buildSweepAuthorizationMessage, b3 as buildSweepTypedData, b4 as buildX402ExpectedMessage, b6 as connectorRerunCommand, b8 as createNextStepBuilder, b9 as decodeBase64Json, bc as encodeBase64Json, bh as isSupportedNodeVersion, bs as selectStandardPaymentOption, bx as toStandardPaymentRequirements, by as unsupportedNodeVersionMessage, bB as x402AuthorizationAmount, bD as x402V2PaymentEnvelope } from './base64-CNakwKE8.cjs';
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
+ import 'viem';
3
4
 
4
5
  declare function addressFromKey(privateKey: string): string;
5
6
  declare function signHash(privateKey: string, hash: string): string;
package/dist/edge.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- export { L as AgentPaymentFailureCode, O as AgentPaymentNextAction, a7 as HAVEN_CONNECTOR_CHANNEL, a8 as HAVEN_MINIMUM_NODE_VERSION, ac as HavenApiError, D as HavenError, ag as HavenSigningError, ai as HavenUnsupportedSignerVersionError, ao as NextStep, aq as NextStepHandoff, as as NextStepTarget, az as SIGNER_UPDATE_FALLBACK, aE as SignerRefusalCode, i as SweepAuthorization, aI as SweepExpectedAuth, aP as X402ExpectedAuth, aT as X402PaymentOption, X as X402PaymentRequired, b2 as buildSweepAuthorizationMessage, b3 as buildSweepTypedData, b4 as buildX402ExpectedMessage, b6 as connectorRerunCommand, b8 as createNextStepBuilder, b9 as decodeBase64Json, bc as encodeBase64Json, bh as isSupportedNodeVersion, bs as selectStandardPaymentOption, bx as toStandardPaymentRequirements, by as unsupportedNodeVersionMessage, bB as x402AuthorizationAmount, bD as x402V2PaymentEnvelope } from './base64-CNakwKE8.js';
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
+ import 'viem';
3
4
 
4
5
  declare function addressFromKey(privateKey: string): string;
5
6
  declare function signHash(privateKey: string, hash: string): string;
package/dist/edge.js CHANGED
@@ -1,5 +1,5 @@
1
- import { HavenSigningError } from './chunk-7FXW3IKZ.js';
2
- export { AgentPaymentFailureCode, AgentPaymentNextAction, HAVEN_CONNECTOR_CHANNEL, HAVEN_MINIMUM_NODE_VERSION, HavenApiError, HavenError, HavenSigningError, HavenUnsupportedSignerVersionError, SIGNER_UPDATE_FALLBACK, SignerRefusalCode, buildSweepAuthorizationMessage, buildSweepTypedData, buildX402ExpectedMessage, connectorRerunCommand, createNextStepBuilder, decodeBase64Json, encodeBase64Json, isSupportedNodeVersion, selectStandardPaymentOption, toStandardPaymentRequirements, unsupportedNodeVersionMessage, x402AuthorizationAmount, x402V2PaymentEnvelope } from './chunk-7FXW3IKZ.js';
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';