@haven_ai/sdk 0.0.0-dev.202609302232.fc07bd1 → 0.0.0-dev.202609302323.7ff7df0
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/{base64-ChRk2kJ4.d.cts → base64-BXtuto0G.d.cts} +48 -1
- package/dist/{base64-ChRk2kJ4.d.ts → base64-BXtuto0G.d.ts} +48 -1
- package/dist/{chunk-ANJUPDH2.js → chunk-AD26YHAN.js} +2 -2
- package/dist/chunk-AD26YHAN.js.map +1 -0
- package/dist/{chunk-RNTPG2AE.js → chunk-CCGIQYYW.js} +4 -4
- package/dist/{chunk-RNTPG2AE.js.map → chunk-CCGIQYYW.js.map} +1 -1
- package/dist/{chunk-FZB5XARP.cjs → chunk-OSGNL57N.cjs} +2 -2
- package/dist/chunk-OSGNL57N.cjs.map +1 -0
- package/dist/{chunk-7FMJACHX.cjs → chunk-PTIGFW65.cjs} +35 -35
- package/dist/{chunk-7FMJACHX.cjs.map → chunk-PTIGFW65.cjs.map} +1 -1
- package/dist/edge.cjs +89 -89
- package/dist/edge.d.cts +2 -2
- package/dist/edge.d.ts +2 -2
- package/dist/edge.js +4 -4
- package/dist/index.cjs +327 -307
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +26 -6
- package/dist/index.js.map +1 -1
- package/dist/test-support.cjs +18 -18
- package/dist/test-support.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-ANJUPDH2.js.map +0 -1
- package/dist/chunk-FZB5XARP.cjs.map +0 -1
|
@@ -808,6 +808,22 @@ interface HavenTaskBudget {
|
|
|
808
808
|
delegationHash: string;
|
|
809
809
|
label: string | null;
|
|
810
810
|
maxAtomic: string;
|
|
811
|
+
/**
|
|
812
|
+
* #3501: camelCase form of `spent_atomic` — the live enforcer figure.
|
|
813
|
+
* Present on GET reads of an open task budget; null when the read failed;
|
|
814
|
+
* absent when the response did not read the chain.
|
|
815
|
+
*/
|
|
816
|
+
spentAtomic?: string | null;
|
|
817
|
+
/**
|
|
818
|
+
* #3501: what the chain will still allow through this child (cap minus
|
|
819
|
+
* spent, clamped at zero). A failed read is null — never the full cap.
|
|
820
|
+
*/
|
|
821
|
+
remainingAtomic?: string | null;
|
|
822
|
+
/**
|
|
823
|
+
* #3501: provenance of `remainingAtomic`, the parent allowance's honesty
|
|
824
|
+
* flag (`onchain.remainingIsFromChain`, #1319) on the task-budget surface.
|
|
825
|
+
*/
|
|
826
|
+
remainingIsFromChain?: boolean;
|
|
811
827
|
status: HavenTaskBudgetStatus;
|
|
812
828
|
expiresAt: number;
|
|
813
829
|
isExpired: boolean;
|
|
@@ -820,6 +836,15 @@ interface HavenTaskBudget {
|
|
|
820
836
|
* #3329: the condensed row `getAgentSummary()` carries per open, unexpired
|
|
821
837
|
* task budget — enough to render a "reserved by open task budgets" line and
|
|
822
838
|
* a task-budget list without a second read.
|
|
839
|
+
*
|
|
840
|
+
* #3501: each row also carries the budget-visibility figure the issue asks
|
|
841
|
+
* for — what the chain will still allow through this child — so an agent
|
|
842
|
+
* reading `haven_get_agent` can tell BEFORE its next payment whether the
|
|
843
|
+
* task budget will refuse it. `remainingAtomic` is null when the on-chain
|
|
844
|
+
* read failed (never the full cap as remaining), and
|
|
845
|
+
* `remainingIsFromChain` is the same honesty flag the parent allowance's
|
|
846
|
+
* `onchain.remainingIsFromChain` carries (#1319): true = live enforcer
|
|
847
|
+
* read, false = the read failed and the figures are null.
|
|
823
848
|
*/
|
|
824
849
|
interface HavenTaskBudgetSummary {
|
|
825
850
|
id: string;
|
|
@@ -827,6 +852,28 @@ interface HavenTaskBudgetSummary {
|
|
|
827
852
|
tokenAddress: string;
|
|
828
853
|
maxAtomic: string;
|
|
829
854
|
maxDisplay: string;
|
|
855
|
+
/**
|
|
856
|
+
* #3501: spent so far through this child, from the enforcer's `spentMap`.
|
|
857
|
+
* Null when the on-chain read failed; also null for a budget whose
|
|
858
|
+
* delegation the read could not speak for.
|
|
859
|
+
*/
|
|
860
|
+
spentAtomic: string | null;
|
|
861
|
+
/**
|
|
862
|
+
* #3501: `maxAtomic` minus spent, clamped at zero. Null — never the full
|
|
863
|
+
* cap — when the on-chain read failed.
|
|
864
|
+
*/
|
|
865
|
+
remainingAtomic: string | null;
|
|
866
|
+
/**
|
|
867
|
+
* #3501: true when `remainingAtomic` came from the live enforcer read,
|
|
868
|
+
* false when that read failed (spent/remaining are then null).
|
|
869
|
+
*/
|
|
870
|
+
remainingIsFromChain: boolean;
|
|
871
|
+
/**
|
|
872
|
+
* #3501: human form of `remainingAtomic` ("0.001 USDC"), derived by the
|
|
873
|
+
* same formatter as `maxDisplay`. Null exactly when `remainingAtomic` is
|
|
874
|
+
* null — a failed read never renders as an amount.
|
|
875
|
+
*/
|
|
876
|
+
remainingDisplay: string | null;
|
|
830
877
|
recipientAddress: string | null;
|
|
831
878
|
expiresAt: number;
|
|
832
879
|
}
|
|
@@ -2090,7 +2137,7 @@ declare function buildSweepAuthorizationMessage(auth: SweepAuthorization): strin
|
|
|
2090
2137
|
* This SDK's own version. Owned by `scripts/release-bump.mjs`, which rewrites
|
|
2091
2138
|
* it with the package version on every release — never hand-edit it.
|
|
2092
2139
|
*/
|
|
2093
|
-
declare const SDK_VERSION = "0.0.0-dev.
|
|
2140
|
+
declare const SDK_VERSION = "0.0.0-dev.202609302323.7ff7df0";
|
|
2094
2141
|
/** The request header every published Haven client sends. */
|
|
2095
2142
|
declare const HAVEN_CLIENT_HEADER = "X-Haven-Client";
|
|
2096
2143
|
/** `<package>/<version>` — the value of {@link HAVEN_CLIENT_HEADER}. */
|
|
@@ -808,6 +808,22 @@ interface HavenTaskBudget {
|
|
|
808
808
|
delegationHash: string;
|
|
809
809
|
label: string | null;
|
|
810
810
|
maxAtomic: string;
|
|
811
|
+
/**
|
|
812
|
+
* #3501: camelCase form of `spent_atomic` — the live enforcer figure.
|
|
813
|
+
* Present on GET reads of an open task budget; null when the read failed;
|
|
814
|
+
* absent when the response did not read the chain.
|
|
815
|
+
*/
|
|
816
|
+
spentAtomic?: string | null;
|
|
817
|
+
/**
|
|
818
|
+
* #3501: what the chain will still allow through this child (cap minus
|
|
819
|
+
* spent, clamped at zero). A failed read is null — never the full cap.
|
|
820
|
+
*/
|
|
821
|
+
remainingAtomic?: string | null;
|
|
822
|
+
/**
|
|
823
|
+
* #3501: provenance of `remainingAtomic`, the parent allowance's honesty
|
|
824
|
+
* flag (`onchain.remainingIsFromChain`, #1319) on the task-budget surface.
|
|
825
|
+
*/
|
|
826
|
+
remainingIsFromChain?: boolean;
|
|
811
827
|
status: HavenTaskBudgetStatus;
|
|
812
828
|
expiresAt: number;
|
|
813
829
|
isExpired: boolean;
|
|
@@ -820,6 +836,15 @@ interface HavenTaskBudget {
|
|
|
820
836
|
* #3329: the condensed row `getAgentSummary()` carries per open, unexpired
|
|
821
837
|
* task budget — enough to render a "reserved by open task budgets" line and
|
|
822
838
|
* a task-budget list without a second read.
|
|
839
|
+
*
|
|
840
|
+
* #3501: each row also carries the budget-visibility figure the issue asks
|
|
841
|
+
* for — what the chain will still allow through this child — so an agent
|
|
842
|
+
* reading `haven_get_agent` can tell BEFORE its next payment whether the
|
|
843
|
+
* task budget will refuse it. `remainingAtomic` is null when the on-chain
|
|
844
|
+
* read failed (never the full cap as remaining), and
|
|
845
|
+
* `remainingIsFromChain` is the same honesty flag the parent allowance's
|
|
846
|
+
* `onchain.remainingIsFromChain` carries (#1319): true = live enforcer
|
|
847
|
+
* read, false = the read failed and the figures are null.
|
|
823
848
|
*/
|
|
824
849
|
interface HavenTaskBudgetSummary {
|
|
825
850
|
id: string;
|
|
@@ -827,6 +852,28 @@ interface HavenTaskBudgetSummary {
|
|
|
827
852
|
tokenAddress: string;
|
|
828
853
|
maxAtomic: string;
|
|
829
854
|
maxDisplay: string;
|
|
855
|
+
/**
|
|
856
|
+
* #3501: spent so far through this child, from the enforcer's `spentMap`.
|
|
857
|
+
* Null when the on-chain read failed; also null for a budget whose
|
|
858
|
+
* delegation the read could not speak for.
|
|
859
|
+
*/
|
|
860
|
+
spentAtomic: string | null;
|
|
861
|
+
/**
|
|
862
|
+
* #3501: `maxAtomic` minus spent, clamped at zero. Null — never the full
|
|
863
|
+
* cap — when the on-chain read failed.
|
|
864
|
+
*/
|
|
865
|
+
remainingAtomic: string | null;
|
|
866
|
+
/**
|
|
867
|
+
* #3501: true when `remainingAtomic` came from the live enforcer read,
|
|
868
|
+
* false when that read failed (spent/remaining are then null).
|
|
869
|
+
*/
|
|
870
|
+
remainingIsFromChain: boolean;
|
|
871
|
+
/**
|
|
872
|
+
* #3501: human form of `remainingAtomic` ("0.001 USDC"), derived by the
|
|
873
|
+
* same formatter as `maxDisplay`. Null exactly when `remainingAtomic` is
|
|
874
|
+
* null — a failed read never renders as an amount.
|
|
875
|
+
*/
|
|
876
|
+
remainingDisplay: string | null;
|
|
830
877
|
recipientAddress: string | null;
|
|
831
878
|
expiresAt: number;
|
|
832
879
|
}
|
|
@@ -2090,7 +2137,7 @@ declare function buildSweepAuthorizationMessage(auth: SweepAuthorization): strin
|
|
|
2090
2137
|
* This SDK's own version. Owned by `scripts/release-bump.mjs`, which rewrites
|
|
2091
2138
|
* it with the package version on every release — never hand-edit it.
|
|
2092
2139
|
*/
|
|
2093
|
-
declare const SDK_VERSION = "0.0.0-dev.
|
|
2140
|
+
declare const SDK_VERSION = "0.0.0-dev.202609302323.7ff7df0";
|
|
2094
2141
|
/** The request header every published Haven client sends. */
|
|
2095
2142
|
declare const HAVEN_CLIENT_HEADER = "X-Haven-Client";
|
|
2096
2143
|
/** `<package>/<version>` — the value of {@link HAVEN_CLIENT_HEADER}. */
|
|
@@ -1016,5 +1016,5 @@ function assertRedeemsOwnBudgetDelegation(redeemCalldata, ownAccount) {
|
|
|
1016
1016
|
}
|
|
1017
1017
|
|
|
1018
1018
|
export { AGENT_PAYMENT_FAILURE_CODE_VALUES, AGENT_PAYMENT_NEXT_ACTION_VALUES, AGENT_PAYMENT_PHASE_VALUES, AGENT_PAYMENT_RAIL_VALUES, AgentPaymentFailureCode, AgentPaymentFailureCodeDescriptions, AgentPaymentFailureCodeSchema, AgentPaymentNextAction, AgentPaymentNextActionDescriptions, AgentPaymentNextActionSchema, AgentPaymentPhase, AgentPaymentPhaseDescriptions, AgentPaymentPhaseSchema, AgentPaymentRail, AgentPaymentRailDescriptions, AgentPaymentRailSchema, AgentPaymentWarningCode, CAVEAT_ENFORCERS, CONNECTOR_PACKAGE_NAME, DEFAULT_CONFIRMATION_TIMEOUT_MS, DELEGATION_MANAGER, DELEGATION_TUPLE_COMPONENTS, DIRECT_SIGN_CONTEXT_VERSION, ENTRY_POINT_V07, HAVEN_CONNECTOR_CHANNEL, HYBRID_DELEGATOR_DOMAIN_NAME, HYBRID_DELEGATOR_DOMAIN_VERSION, HYBRID_DELEGATOR_IMPLEMENTATION, HavenApiError, HavenError, HavenPaymentStateError, HavenSigningError, HavenTimeoutError, HavenUnsupportedSignerVersionError, HavenUserOpBindingError, HavenZeroSettlementHashError, MAX_SETTLEMENT_WINDOW_SECONDS, MerchantTimeoutError, PACKED_USER_OPERATION_FIELDS, REDEEM_DELEGATIONS_ABI, ROOT_AUTHORITY, SIGNER_UPDATE_FALLBACK, SIMPLE_FACTORY_ADDRESS, SINGLE_DEFAULT_MODE, SignerRefusalCode, TASK_SIGN_CONTEXT_VERSION, X402AlreadySettledError, X402Erc7710AlreadySettledError, X402TaskBudgetMismatchError, X402UnexpectedStatusError, assertRedeemsOwnBudgetDelegation, assertUserOpTypedDataBinding, chainIdForNetwork, connectorRerunCommand, connectorSpec, connectorUpgradeCommand, deriveDelegateAccountAddress, isConnectorChannel, isPackedUserOperationTypedData, isSettlementChildTypedData, packedUserOperationHash, resolveConnectorChannel, signerUpdateFallback, verifySettlementChild };
|
|
1019
|
-
//# sourceMappingURL=chunk-
|
|
1020
|
-
//# sourceMappingURL=chunk-
|
|
1019
|
+
//# sourceMappingURL=chunk-AD26YHAN.js.map
|
|
1020
|
+
//# sourceMappingURL=chunk-AD26YHAN.js.map
|