/** * @module Node * Node.js entry point for the Vana SDK. * * @remarks * Exposes the platform adapter, ECIES crypto, storage providers, smart-contract * helpers, ABIs, addresses, chain configurations, and shared types. */ export type * from "./types.js"; export * from "./errors.js"; export * from "./contracts/contractController.js"; export { getAbi } from "./generated/abi/index.js"; export type { VanaContract, VanaContract as VanaContractAbi, } from "./generated/abi/index.js"; export { getContractAddress, CONTRACTS } from "./generated/addresses.js"; export type { VanaContractAddress } from "./generated/addresses.js"; export { vanaMainnet, mokshaTestnet, moksha, type VanaChainConfig, getChainConfig, getAllChains, } from "./chains.js"; export * from "./chains.js"; export { chains } from "./config/chains.js"; export { type ServiceEndpoints, mainnetServices, mokshaServices, getServiceEndpoints, } from "./config/default-services.js"; export * from "./storage/index.js"; export { createVanaStorageProvider } from "./storage/default.js"; export type { VanaStorageProviderOptions } from "./storage/default.js"; export { NodePlatformAdapter } from "./platform/node.js"; export { BrowserPlatformAdapter } from "./platform/browser.js"; export { NodeECIESUint8Provider as NodeECIESProvider } from "./crypto/ecies/node.js"; export type { VanaPlatformAdapter } from "./platform/interface.js"; export { ECIESError, isECIESEncrypted, serializeECIES, deserializeECIES, } from "./crypto/ecies/index.js"; export type { ECIESProvider, ECIESEncrypted, ECIESOptions, } from "./crypto/ecies/index.js"; export { detectPlatform, createPlatformAdapter, createPlatformAdapterFor, isPlatformSupported, getPlatformCapabilities, } from "./platform/utils.js"; export { createNodePlatformAdapter, createBrowserPlatformAdapter, createPlatformAdapterSafe, } from "./platform/browser-safe.js"; export { deriveMasterKey, deriveScopeKey, recoverServerOwner, MASTER_KEY_MESSAGE, } from "./crypto/keys/derive.js"; export { encryptWithPassword, decryptWithPassword, } from "./crypto/envelope/openpgp.js"; export { parseWeb3SignedHeader, verifyWeb3Signed, type Web3SignedPayload, type VerifiedAuth, } from "./auth/web3-signed.js"; export { buildWeb3SignedHeader, computeBodyHash, type Web3SignedSignFn, } from "./auth/web3-signed-builder.js"; export { MissingAuthError, InvalidSignatureError, ExpiredTokenError, } from "./auth/errors.js"; export { generatePkceVerifier, computePkceChallenge, verifyPkceChallenge, assertValidPkceVerifier, PKCE_VERIFIER_PATTERN, PKCE_CHALLENGE_PATTERN, } from "./auth/pkce.js"; export { InMemoryTokenStore, type TokenStore, type TokenRecord, } from "./auth/token-store.js"; export { OAuthClient, type OAuthClientConfig, type AuthorizationUrlResult, } from "./auth/oauth-client.js"; export { NATIVE_VANA_ASSET, dataRegistryDomain, grantRegistrationDomain, grantRevocationDomain, serverRegistrationDomain, builderRegistrationDomain, escrowPaymentDomain, withdrawAuthorizationDomain, buildWithdrawAuthorizationTypedData, GRANT_REGISTRATION_TYPES, GRANT_REVOCATION_TYPES, SERVER_REGISTRATION_TYPES, BUILDER_REGISTRATION_TYPES, ADD_DATA_TYPES, RECORD_DATA_ACCESS_TYPES, WITHDRAW_AUTHORIZATION_TYPES, type DataPortabilityContracts, type DataPortabilityGatewayConfig, type GrantRegistrationMessage, type GrantRevocationMessage, type ServerRegistrationMessage, type BuilderRegistrationMessage, type AddDataMessage, type RecordDataAccessMessage, type WithdrawAuthorizationMessage, } from "./protocol/eip712.js"; export { ENCLAVE_IDENTITY_EVIDENCE_VERSION, USER_PS_ID_DOMAIN, ENCLAVE_WALLET_PURPOSE, MASTER_SIGNATURE_DELIVERY_VERSION, MASTER_SIGNATURE_DELIVERY_MAX_AGE_SECONDS, SEALED_ENVELOPE_VERSION, ENCLAVE_TRUST_ANCHORS, userPsId, appRootPreimage, kmsIssuedPreimage, verifyEnclaveIdentityEvidence, buildMasterSignatureDelivery, encryptMasterSignatureDelivery, type UserPsId, type EnclaveIdentityEvidence, type ExpectedIdentity, type IdentityRequest, type IdentityState, type IdentityResponse, type IdentityRegistrationRequest, type IdentityRegistrationResponse, type MasterSignatureDelivery, type SealedSecretSubmission, type SealedSecretResponse, type AesGcmBox, type SealedEnvelope, type EnclaveTrustAnchors, } from "./protocol/identity.js"; export { JOB_PROTOCOL_VERSION, JOB_OPERATIONS, JOB_STATES, DEFAULT_LEASE_SECONDS, MAX_LEASE_SECONDS, MAX_ATTEMPTS, MAX_WAIT_SECONDS, CLAIM_POLL_FLOOR_MS, DEFAULT_JOB_DEADLINE_SECONDS, MAX_JOB_DEADLINE_SECONDS, type JobOperation, type JobState, type PaymentState, type JobRequest, type JobRequestEnvelope, type JobAccessRecord, type JobPaymentAuthorization, type JobQuote, type JobSubmission, type ResultHandle, type JobStatus, type ClaimRequest, type ClaimResponse, type HeartbeatRequest, type CompleteRequest, type FailRequest, type FencedResponse, type JobResult, type TeeNodeState, type TeeNodeRegistration, type TeeNodeHeartbeat, type TeeNode, } from "./protocol/jobs.js"; export { createJobsClient, type JobsBuilderAccount, type JobsClientOptions, type SubmitRawReadParams, type SubmitRawReadResult, type WaitForJobOptions, type OpenJobResultOptions, type ReadRawParams, type JobsClient, } from "./protocol/jobs-client.js"; export { JobEnvelopeError, JOB_RESULT_FORMAT_VERSION, JOB_RESULT_CHUNK_BYTES, canonicalJobRequestBytes, sealJobRequest, openJobRequest, sealJobResultStream, openJobResultStream, sealJobResult, openJobResult, type JobResultMetadata, type JobResultExpectation, type SealedJobResultStream, type OpenedJobResultStream, } from "./crypto/envelope/job.js"; export { PERSONAL_SERVER_REGISTRATION_DEFAULT_CHAIN_ID, PERSONAL_SERVER_REGISTRATION_DEFAULT_VERIFYING_CONTRACT, personalServerRegistrationDomain, createViemPersonalServerRegistrationSigner, buildPersonalServerRegistrationTypedData, buildPersonalServerRegistrationSignature, registerPersonalServerSignature, type PersonalServerRegistrationTypedData, type PersonalServerRegistrationSigner, type PersonalServerRegistrationDomainInput, type ViemPersonalServerRegistrationWalletClient, type ViemPersonalServerRegistrationSignerSource, type BuildPersonalServerRegistrationTypedDataInput, type BuildPersonalServerRegistrationSignatureInput, type PersonalServerRegistrationSignature, } from "./protocol/personal-server-registration.js"; export { PERSONAL_SERVER_LITE_OWNER_BINDING_VERSION, PERSONAL_SERVER_LITE_OWNER_BINDING_PURPOSE, PERSONAL_SERVER_LITE_OWNER_BINDING_PREFIX, buildPersonalServerLiteOwnerBindingMessage, createViemPersonalServerLiteOwnerBindingSigner, buildPersonalServerLiteOwnerBindingSignature, signPersonalServerLiteOwnerBinding, type PersonalServerLiteOwnerBindingPurpose, type PersonalServerLiteOwnerBindingMessage, type PersonalServerLiteOwnerBindingSigner, type ViemPersonalServerLiteOwnerBindingWalletClient, type ViemPersonalServerLiteOwnerBindingSignerSource, type BuildPersonalServerLiteOwnerBindingSignatureInput, type PersonalServerLiteOwnerBindingSignature, } from "./personal-server-lite/owner-binding.js"; export { ACCOUNT_PERSONAL_SERVER_REGISTRATION_INTENT, AccountPersonalServerRegistrationError, signPersonalServerRegistrationWithAccount, type AccountPersonalServerRegistrationIntent, type AccountPersonalServerRegistrationSignature, type AccountPersonalServerRegistrationStatus, type AccountPersonalServerRegistrationRequest, type AccountPersonalServerRegistrationConfig, type AccountSignedPersonalServerRegistration, type AccountConfirmationRequiredPersonalServerRegistration, type AccountFallbackSignedPersonalServerRegistration, type AccountPersonalServerRegistrationResult, } from "./account/personal-server-registration.js"; export { AccountPersonalServerLiteOwnerBindingError, signPersonalServerLiteOwnerBindingWithAccountClient, type AccountPersonalServerLiteOwnerBindingClient, type SignPersonalServerLiteOwnerBindingWithAccountClientConfig, } from "./account/personal-server-lite-owner-binding.js"; export { isDataPortabilityGatewayConfig, verifyGrantRegistration, type VerifyGrantRegistrationInput, type VerifyGrantRegistrationResult, } from "./protocol/grants.js"; export { FEE_REGISTRY_ABI, REGISTRATION_KIND_FOR_OP, getFee, getOpFee, type FeeKind, type FeeEntry, type OpFee, type FeeRegistryOptions, } from "./protocol/fee-registry.js"; export { escrowContractAddress, encodeDepositNativeData, encodeDepositTokenData, buildDepositNativeRequest, buildDepositTokenRequest, type DepositNativeInput, type DepositTokenInput, type DepositTransactionRequest, } from "./protocol/escrow-deposit.js"; export { DATA_REGISTRY_STATUS_ABI, DataPointStatus, dataRegistryContractAddress, encodeSetDataPointStatusData, buildSetDataPointStatusRequest, buildMarkDataPointUnavailableRequest, type SetDataPointStatusInput, type DataPointStatusTransactionRequest, } from "./protocol/data-point-status.js"; export { TOMBSTONE_DATA_HASH, TOMBSTONE_METADATA_HASH, TOMBSTONE_DATA_HASH_PREIMAGE, TOMBSTONE_METADATA_HASH_PREIMAGE, computeTombstoneHash, isTombstoneHashes, isDataPointTombstone, tombstoneDeletedAt, createViemDataPointDeletionSigner, buildDataPointDeletionTypedData, buildDataPointDeletionSignature, deleteDataPoint, type DataPointDeletionTypedData, type DataPointDeletionSigner, type ViemDataPointDeletionWalletClient, type ViemDataPointDeletionSignerSource, type BuildDataPointDeletionTypedDataInput, type BuildDataPointDeletionSignatureInput, type DataPointDeletionSignature, type DataPointBlobDeleteResult, type DataPointBlobStore, type DeleteDataPointInput, type DataPointDeletedResult, type DataPointDeletionPartialResult, type DataPointDeletionResult, } from "./protocol/data-point-deletion.js"; export { personalServerDataReadPath, buildPersonalServerDataReadRequest, readPersonalServerData, type BuildPersonalServerDataReadRequestParams, type ReadPersonalServerDataParams, } from "./protocol/personal-server-data.js"; export { ScopeSchema, parseScope, scopeToPathSegments, scopeMatchesPattern, scopeCoveredByGrant, type Scope, type ParsedScope, } from "./protocol/scopes.js"; export { SCOPE_ACTIONS, InvalidScopeEntryError, parseScopeEntry, formatScopeEntry, grantPermissions, permissionsToScopes, tryGrantPermissions, hasAction, type ScopeAction, type ParsedScopeEntry, type GrantPermission, } from "./protocol/scope-actions.js"; export { WRITE_SESSION_PATH, WRITE_SIGNATURE_HEADER, WRITE_METADATA_HEADER, WRITE_FILENAME_HEADER, WRITE_CONTENT_DISPOSITION_HEADER, WRITER_ATTRIBUTION_KEY, LINEAGE_KEY, LINEAGE_FIELD, MAX_LINEAGE_SOURCES, RESERVED_WRITE_KEYS, openWriteSession, writeData, writePersonalServerData, sessionCoversScope, binaryWriteSignedBytes, normalizeBinaryMimeType, parseWriteMetadataHeader, encodeWriteMetadataHeader, type WriteTransportRetryOptions, type WriteSession, type OpenWriteSessionParams, type WriteBinaryPayload, type LineageSource, type WriteJsonDataParams, type WriteBinaryDataParams, type WriteDataParams, type WriteDataResult, type WritePersonalServerDataParams, type WritePersonalServerDataResult, type BinaryWriteSignedBytesInput, } from "./protocol/personal-server-write.js"; export { resolveWriteSigner, type WriteSigner, type WriteSignerSource, type ViemWriteAccount, type ViemWriteWalletClient, type ResolveWriteSignerOptions, } from "./protocol/write-signer.js"; export { DERIVATIVE_QUESTIONS_PATH, MAX_QUESTION_SOURCE_SCOPES, MAX_QUESTION_CHARS, MAX_QUESTION_MODEL_CHARS, DEFAULT_QUESTION_TIMEOUT_MS, DEFAULT_QUESTION_POLL_INTERVAL_MS, QUESTION_STATUSES, DERIVATIVE_ERROR_CODES, DerivativeErrorCodeSchema, type DerivativeErrorCode, registerQuestion, getQuestion, listQuestions, recomputeQuestion, deleteQuestion, waitForQuestion, askPersonalServer, QuestionStatusSchema, QuestionRegisteredBySchema, DerivativeQuestionSchema, QuestionRecomputeResultSchema, QuestionDeleteResultSchema, type QuestionStatus, type QuestionRegisteredBy, type DerivativeQuestion, type QuestionRecomputeResult, type QuestionDeleteResult, type DerivativeQuestionAuthParams, type RegisterQuestionParams, type GetQuestionParams, type ListQuestionsParams, type RecomputeQuestionParams, type DeleteQuestionParams, type WaitForQuestionParams, type AskPersonalServerParams, type AskPersonalServerResult, } from "./protocol/derivative-questions.js"; export { DERIVATIVE_STATUS_PATH, DEFAULT_DERIVATIVE_STATUS_TIMEOUT_MS, DEFAULT_DERIVATIVE_STATUS_POLL_INTERVAL_MS, derivativeStatusTarget, getDerivativeStatus, waitForDerivativeStatus, isDerivativeStatusSettled, DerivativeStatusSchema, type DerivativeStatus, type GetDerivativeStatusParams, type WaitForDerivativeStatusParams, } from "./protocol/derivative-status.js"; export { deriveDataPointId, isDataPointId, scopeNamespace, derivedScopeViolatesNaming, assertDerivedScopeNaming, isRedactedLineageNode, personalServerLineagePath, gatewayLineagePath, getLineage, getPersonalServerLineage, getGatewayLineage, LineageNodeSchema, RedactedLineageNodeSchema, LineageEntrySchema, LineageGraphSchema, type LineageNode, type RedactedLineageNode, type LineageEntry, type LineageGraph, type LineageReadResult, type PersonalServerLineageParams, type GatewayLineageParams, type GetLineageParams, } from "./protocol/lineage.js"; export { DataFileEnvelopeSchema, createDataFileEnvelope, IngestResponseSchema, type DataFileEnvelope, type IngestResponse, } from "./protocol/data-file.js"; export { createGatewayClient, type GatewayEnvelope, type GatewayProof, type Builder, type Schema, type ServerInfo, type OwnerServerRecord, type OwnerServersResult, type GatewayGrantFee, type GatewayGrantStatus, type GatewayGrantResponse, type GrantListItem, type DataPointRecord, type DataPointListResult, type ListDataPointsOptions, type RegisterServerParams, type RegisterServerResult, type RegisterBuilderParams, type RegisterBuilderResult, type RegisterDataPointParams, type RegisterDataPointResult, type GetDataPointOptions, type DeleteDataPointParams, type DeleteDataPointResult, type CreateGrantParams, type RevokeGrantParams, type AccessRecord, type PayForOperationParams, type PayForOperationResult, type SettleOpType, type SettleItem, type SettlePromoteResult, type SettleReconcileItem, type SettleParams, type SettleResult, type GatewayClient, } from "./protocol/gateway.js"; export { createEscrowGatewayClient, genericPaymentDomain, GENERIC_PAYMENT_TYPES, ESCROW_DEPOSIT_ABI, NATIVE_ASSET_ADDRESS, type GenericPaymentMessage, type EscrowBalanceEntry, type EscrowBalanceResult, type EscrowBalanceSyncResult, type DepositSubmissionResult, type PaymentBreakdown, type EscrowPayResult, EscrowWithdrawalLifecycleError, EscrowWithdrawalRejectionError, type EscrowPaymentClient, type EscrowWithdrawalFailureResult, type EscrowWithdrawalRejectedResult, type EscrowWithdrawalRejectionCode, type EscrowWithdrawalSubmittedResult, type EscrowWithdrawalSubmittedWithoutTransaction, type EscrowWithdrawalSubmittedWithTransaction, type EscrowWithdrawalSettledResult, type EscrowWithdrawalResult, type SubmitDepositParams, type PayForOpParams, type WithdrawFromEscrowParams, type WithdrawNonceResponse, type EscrowGatewayClient, type SubmittedDepositEntry, type FinalizedDepositEntry, type FailedDepositEntry, } from "./protocol/escrow.js"; export { authorizeEscrowPayment, authorizeGrantPayment, buildEscrowPaymentHeader, buildGrantPaymentHeader, createDefaultNonceSource, DATA_ACCESS_OP_TYPE, GRANT_OP_TYPE, paymentReceiptFromHeader, paymentResponseMetadataFromHeader, toDirectFeeBreakdown, toDirectPaymentReceipt, type EscrowPaymentConfig, type EscrowPaymentHeaderConfig, type PaymentNonceSource, type SignTypedDataFn, } from "./direct/escrow-payment.js"; export { parsePersonalServerPaymentRequired, type FetchResponseLike, } from "./direct/personal-server-read.js"; export type { ForegroundDelivery, DirectPaymentResponseMetadata, PersonalServerDataAccessPaymentOperation, PersonalServerGrantPaymentOperation, PersonalServerPaymentOperation, PersonalServerPaymentRequired, } from "./direct/types.js"; export { PSError, parsePSError, type PSErrorCode } from "./types/ps-errors.js";