@haven_ai/sdk 0.0.0-dev.202609270748.713570b → 0.0.0-dev.202609272032.679e797
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-B6FvBE-t.d.cts → base64-uq8A2tP_.d.cts} +38 -1
- package/dist/{base64-B6FvBE-t.d.ts → base64-uq8A2tP_.d.ts} +38 -1
- package/dist/{chunk-WVC4C3PP.js → chunk-BVNBYB7Q.js} +4 -4
- package/dist/{chunk-WVC4C3PP.js.map → chunk-BVNBYB7Q.js.map} +1 -1
- package/dist/{chunk-LKM2ARVR.cjs → chunk-U4DQ3APD.cjs} +29 -29
- package/dist/{chunk-LKM2ARVR.cjs.map → chunk-U4DQ3APD.cjs.map} +1 -1
- package/dist/{chunk-RCTIPKV2.js → chunk-USEZLMWK.js} +2 -2
- package/dist/chunk-USEZLMWK.js.map +1 -0
- package/dist/{chunk-ATGORH6P.cjs → chunk-VJA3OQWY.cjs} +2 -2
- package/dist/chunk-VJA3OQWY.cjs.map +1 -0
- package/dist/edge.cjs +64 -64
- package/dist/edge.d.cts +1 -1
- package/dist/edge.d.ts +1 -1
- package/dist/edge.js +3 -3
- package/dist/index.cjs +300 -289
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +16 -5
- 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-ATGORH6P.cjs.map +0 -1
- package/dist/chunk-RCTIPKV2.js.map +0 -1
|
@@ -835,6 +835,33 @@ interface PaymentParties {
|
|
|
835
835
|
delegate: string | null;
|
|
836
836
|
delegateAccount: string | null;
|
|
837
837
|
merchant: string | null;
|
|
838
|
+
/**
|
|
839
|
+
* #3332: the paying agent's owner's company details — additive, present
|
|
840
|
+
* only when the backend has `HAVEN_OWNER_COMPANY_DETAILS` on AND the owner
|
|
841
|
+
* saved details; absent (not `undefined`-valued, the KEY is absent)
|
|
842
|
+
* otherwise. `viesStatus: 'valid'` means VIES accepted the VAT number —
|
|
843
|
+
* never render that as "verified" (see Haven's agent-passport docs on the
|
|
844
|
+
* same naming discipline).
|
|
845
|
+
*
|
|
846
|
+
* Present only on the receipt surfaces — `GET /payments/:id/receipt` and
|
|
847
|
+
* `GET /machine-payments/receipts` (`HavenClient.getReceipt()`,
|
|
848
|
+
* `listReceipts()`/`listReceiptsPage()`) — never on `GET
|
|
849
|
+
* /machine-payments/:id/status` (`getPaymentStatus`) or the evidence-attach echo,
|
|
850
|
+
* even with the feature on: those report payment/settlement state, not the
|
|
851
|
+
* buyer's company details (out of scope for #3332, see
|
|
852
|
+
* docs/product/owner-company-details.md).
|
|
853
|
+
*/
|
|
854
|
+
buyer?: PaymentPartiesBuyer;
|
|
855
|
+
}
|
|
856
|
+
interface PaymentPartiesBuyer {
|
|
857
|
+
legalName: string;
|
|
858
|
+
/** ISO 3166-1 alpha-2. */
|
|
859
|
+
country: string;
|
|
860
|
+
/** For a sole trader this IS the personal identity number. */
|
|
861
|
+
orgNumber: string;
|
|
862
|
+
vatNumber: string | null;
|
|
863
|
+
viesStatus: 'pending' | 'valid' | 'invalid' | 'not_verifiable' | null;
|
|
864
|
+
viesCheckedAt: string | null;
|
|
838
865
|
}
|
|
839
866
|
/** @internal wire shape of {@link PaymentParties}. */
|
|
840
867
|
interface RawPaymentParties {
|
|
@@ -842,6 +869,16 @@ interface RawPaymentParties {
|
|
|
842
869
|
delegate: string | null;
|
|
843
870
|
delegate_account: string | null;
|
|
844
871
|
merchant: string | null;
|
|
872
|
+
buyer?: RawPaymentPartiesBuyer;
|
|
873
|
+
}
|
|
874
|
+
/** @internal wire shape of {@link PaymentPartiesBuyer}. */
|
|
875
|
+
interface RawPaymentPartiesBuyer {
|
|
876
|
+
legal_name: string;
|
|
877
|
+
country: string;
|
|
878
|
+
org_number: string;
|
|
879
|
+
vat_number: string | null;
|
|
880
|
+
vies_status: 'pending' | 'valid' | 'invalid' | 'not_verifiable' | null;
|
|
881
|
+
vies_checked_at: string | null;
|
|
845
882
|
}
|
|
846
883
|
/**
|
|
847
884
|
* #3132 (owner decision 3 on #3130): what population a list row came from and
|
|
@@ -1932,7 +1969,7 @@ declare function buildSweepAuthorizationMessage(auth: SweepAuthorization): strin
|
|
|
1932
1969
|
* This SDK's own version. Owned by `scripts/release-bump.mjs`, which rewrites
|
|
1933
1970
|
* it with the package version on every release — never hand-edit it.
|
|
1934
1971
|
*/
|
|
1935
|
-
declare const SDK_VERSION = "0.0.0-dev.
|
|
1972
|
+
declare const SDK_VERSION = "0.0.0-dev.202609272032.679e797";
|
|
1936
1973
|
/** The request header every published Haven client sends. */
|
|
1937
1974
|
declare const HAVEN_CLIENT_HEADER = "X-Haven-Client";
|
|
1938
1975
|
/** `<package>/<version>` — the value of {@link HAVEN_CLIENT_HEADER}. */
|
|
@@ -835,6 +835,33 @@ interface PaymentParties {
|
|
|
835
835
|
delegate: string | null;
|
|
836
836
|
delegateAccount: string | null;
|
|
837
837
|
merchant: string | null;
|
|
838
|
+
/**
|
|
839
|
+
* #3332: the paying agent's owner's company details — additive, present
|
|
840
|
+
* only when the backend has `HAVEN_OWNER_COMPANY_DETAILS` on AND the owner
|
|
841
|
+
* saved details; absent (not `undefined`-valued, the KEY is absent)
|
|
842
|
+
* otherwise. `viesStatus: 'valid'` means VIES accepted the VAT number —
|
|
843
|
+
* never render that as "verified" (see Haven's agent-passport docs on the
|
|
844
|
+
* same naming discipline).
|
|
845
|
+
*
|
|
846
|
+
* Present only on the receipt surfaces — `GET /payments/:id/receipt` and
|
|
847
|
+
* `GET /machine-payments/receipts` (`HavenClient.getReceipt()`,
|
|
848
|
+
* `listReceipts()`/`listReceiptsPage()`) — never on `GET
|
|
849
|
+
* /machine-payments/:id/status` (`getPaymentStatus`) or the evidence-attach echo,
|
|
850
|
+
* even with the feature on: those report payment/settlement state, not the
|
|
851
|
+
* buyer's company details (out of scope for #3332, see
|
|
852
|
+
* docs/product/owner-company-details.md).
|
|
853
|
+
*/
|
|
854
|
+
buyer?: PaymentPartiesBuyer;
|
|
855
|
+
}
|
|
856
|
+
interface PaymentPartiesBuyer {
|
|
857
|
+
legalName: string;
|
|
858
|
+
/** ISO 3166-1 alpha-2. */
|
|
859
|
+
country: string;
|
|
860
|
+
/** For a sole trader this IS the personal identity number. */
|
|
861
|
+
orgNumber: string;
|
|
862
|
+
vatNumber: string | null;
|
|
863
|
+
viesStatus: 'pending' | 'valid' | 'invalid' | 'not_verifiable' | null;
|
|
864
|
+
viesCheckedAt: string | null;
|
|
838
865
|
}
|
|
839
866
|
/** @internal wire shape of {@link PaymentParties}. */
|
|
840
867
|
interface RawPaymentParties {
|
|
@@ -842,6 +869,16 @@ interface RawPaymentParties {
|
|
|
842
869
|
delegate: string | null;
|
|
843
870
|
delegate_account: string | null;
|
|
844
871
|
merchant: string | null;
|
|
872
|
+
buyer?: RawPaymentPartiesBuyer;
|
|
873
|
+
}
|
|
874
|
+
/** @internal wire shape of {@link PaymentPartiesBuyer}. */
|
|
875
|
+
interface RawPaymentPartiesBuyer {
|
|
876
|
+
legal_name: string;
|
|
877
|
+
country: string;
|
|
878
|
+
org_number: string;
|
|
879
|
+
vat_number: string | null;
|
|
880
|
+
vies_status: 'pending' | 'valid' | 'invalid' | 'not_verifiable' | null;
|
|
881
|
+
vies_checked_at: string | null;
|
|
845
882
|
}
|
|
846
883
|
/**
|
|
847
884
|
* #3132 (owner decision 3 on #3130): what population a list row came from and
|
|
@@ -1932,7 +1969,7 @@ declare function buildSweepAuthorizationMessage(auth: SweepAuthorization): strin
|
|
|
1932
1969
|
* This SDK's own version. Owned by `scripts/release-bump.mjs`, which rewrites
|
|
1933
1970
|
* it with the package version on every release — never hand-edit it.
|
|
1934
1971
|
*/
|
|
1935
|
-
declare const SDK_VERSION = "0.0.0-dev.
|
|
1972
|
+
declare const SDK_VERSION = "0.0.0-dev.202609272032.679e797";
|
|
1936
1973
|
/** The request header every published Haven client sends. */
|
|
1937
1974
|
declare const HAVEN_CLIENT_HEADER = "X-Haven-Client";
|
|
1938
1975
|
/** `<package>/<version>` — the value of {@link HAVEN_CLIENT_HEADER}. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HavenSigningError, deriveDelegateAccountAddress, DELEGATION_MANAGER, assertRedeemsOwnBudgetDelegation, verifySettlementChild, REDEEM_DELEGATIONS_ABI, ROOT_AUTHORITY, CAVEAT_ENFORCERS, DELEGATION_TUPLE_COMPONENTS } from './chunk-
|
|
1
|
+
import { HavenSigningError, deriveDelegateAccountAddress, DELEGATION_MANAGER, assertRedeemsOwnBudgetDelegation, verifySettlementChild, REDEEM_DELEGATIONS_ABI, ROOT_AUTHORITY, CAVEAT_ENFORCERS, DELEGATION_TUPLE_COMPONENTS } from './chunk-USEZLMWK.js';
|
|
2
2
|
import { decodeFunctionData, encodeFunctionData, encodePacked, recoverTypedDataAddress, encodeAbiParameters, keccak256 } from 'viem';
|
|
3
3
|
import { createHash } from 'crypto';
|
|
4
4
|
|
|
@@ -777,7 +777,7 @@ function stableStringify2(value) {
|
|
|
777
777
|
}
|
|
778
778
|
|
|
779
779
|
// src/client-identity.ts
|
|
780
|
-
var SDK_VERSION = "0.0.0-dev.
|
|
780
|
+
var SDK_VERSION = "0.0.0-dev.202609272032.679e797";
|
|
781
781
|
var HAVEN_CLIENT_HEADER = "X-Haven-Client";
|
|
782
782
|
function havenClientIdentity(pkg, version) {
|
|
783
783
|
return `${pkg}/${version}`;
|
|
@@ -1207,5 +1207,5 @@ function hashDelegation(delegation) {
|
|
|
1207
1207
|
}
|
|
1208
1208
|
|
|
1209
1209
|
export { CAVEAT_TYPEHASH, DEFAULT_NEXT_TOOL_BY_ACTION, DELEGATION_TYPEHASH, DIRECT_PAYMENT_CHAIN_IDS, ERC7710_ASSET_TRANSFER_METHOD, EXECUTE_ABI, HAVEN_CLIENT_HEADER, HAVEN_MINIMUM_NODE_VERSION, HavenTypedDataRefusedError, MAX_TASK_BUDGET_TTL_SECONDS, NEXT_TOOL_SERVER_NAMES, NEXT_TOOL_SERVER_ROLES, SDK_CLIENT_IDENTITY, SDK_VERSION, SWEEP_BASE_CHAIN_ID, SWEEP_BASE_SEPOLIA_CHAIN_ID, SWEEP_BASE_SEPOLIA_USDC_ADDRESS, SWEEP_BASE_USDC_ADDRESS, TRANSFER_WITH_AUTHORIZATION_TYPES, TYPED_DATA_NOT_ALLOWED, X402PaymentHeaderValidationError, X402_LEGACY_PAYMENT_HEADER_NAME, X402_MAX_AUTHORIZATION_WINDOW_SECONDS, X402_PAYMENT_HEADER_NAME, X402_PAYMENT_HEADER_NAMES, X402_PAYMENT_HEADER_NAMES_SENT, X402_PAYMENT_REQUIRED_HEADER_NAME, X402_PAYMENT_RESPONSE_HEADER_NAME, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS, assertBoundDirectPaymentUserOp, assertFundingLegPaysDelegate, assertOwnSettlementChild, assertOwnTaskBudgetCloseUserOp, assertOwnTaskChild, buildSweepAuthorizationMessage, buildSweepTypedData, buildX402ExpectedMessage, buildX402IdempotencyKey, compareNodeVersions, createNextStepBuilder, decodeBase64Json, decodeBase64Utf8, defaultNextToolFor, encodeBase64Json, encodeBase64Utf8, encodePaymentProof, hashDelegation, havenClientIdentity, isErc7710Option, isSupportedNodeVersion, isSweepableChain, isTaskChildTypedData, normalizePaymentRequired, parseNextTool, parsePaymentRequired, parsePaymentRequiredResponse, readClientUpdate, renderNextTool, resolveTokenFromAddress, selectErc7710PaymentOption, selectPaymentOption, selectStandardPaymentOption, selectX402SettlementScheme, sweepUsdcAddress, sweepUsdcDomain, toStandardPaymentRequirements, unsupportedNodeVersionMessage, validateStandardX402PaymentHeader, x402AssetTransferMethod, x402AuthorizationAmount, x402FacilitatorAddresses, x402PaymentHeaderNamesFor, x402PaymentHeaderNamesSent, x402V2PaymentEnvelope };
|
|
1210
|
-
//# sourceMappingURL=chunk-
|
|
1211
|
-
//# sourceMappingURL=chunk-
|
|
1210
|
+
//# sourceMappingURL=chunk-BVNBYB7Q.js.map
|
|
1211
|
+
//# sourceMappingURL=chunk-BVNBYB7Q.js.map
|