UNPKG

@opendatalabs/vana-sdk

Version:

A TypeScript library for interacting with Vana Network smart contracts.

48 lines (47 loc) 6.46 kB
/** * @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"; export * from "./errors"; export * from "./contracts/contractController"; export { getAbi } from "./generated/abi"; export type { VanaContract, VanaContract as VanaContractAbi, } from "./generated/abi"; export { getContractAddress, CONTRACTS } from "./generated/addresses"; export { vanaMainnet, mokshaTestnet, moksha, type VanaChainConfig, getChainConfig, getAllChains, } from "./chains"; export * from "./chains"; export { chains } from "./config/chains"; export { type ServiceEndpoints, mainnetServices, mokshaServices, getServiceEndpoints, } from "./config/default-services"; export * from "./storage/index"; export { createVanaStorageProvider } from "./storage/default"; export type { VanaStorageProviderOptions } from "./storage/default"; export { NodePlatformAdapter } from "./platform/node"; export { BrowserPlatformAdapter } from "./platform/browser"; export { NodeECIESUint8Provider as NodeECIESProvider } from "./crypto/ecies/node"; export type { VanaPlatformAdapter } from "./platform/interface"; export { ECIESError, isECIESEncrypted, serializeECIES, deserializeECIES, } from "./crypto/ecies"; export type { ECIESProvider, ECIESEncrypted, ECIESOptions, } from "./crypto/ecies"; export { detectPlatform, createPlatformAdapter, createPlatformAdapterFor, isPlatformSupported, getPlatformCapabilities, } from "./platform/utils"; export { createNodePlatformAdapter, createBrowserPlatformAdapter, createPlatformAdapterSafe, } from "./platform/browser-safe"; export { deriveMasterKey, deriveScopeKey, recoverServerOwner, MASTER_KEY_MESSAGE, } from "./crypto/keys/derive"; export { encryptWithPassword, decryptWithPassword, } from "./crypto/envelope/openpgp"; export { parseWeb3SignedHeader, verifyWeb3Signed, type Web3SignedPayload, type VerifiedAuth, } from "./auth/web3-signed"; export { buildWeb3SignedHeader, computeBodyHash, type Web3SignedSignFn, } from "./auth/web3-signed-builder"; export { MissingAuthError, InvalidSignatureError, ExpiredTokenError, } from "./auth/errors"; export { generatePkceVerifier, computePkceChallenge, verifyPkceChallenge, assertValidPkceVerifier, PKCE_VERIFIER_PATTERN, PKCE_CHALLENGE_PATTERN, } from "./auth/pkce"; export { InMemoryTokenStore, type TokenStore, type TokenRecord, } from "./auth/token-store"; export { OAuthClient, type OAuthClientConfig, type AuthorizationUrlResult, } from "./auth/oauth-client"; export { fileRegistrationDomain, grantRegistrationDomain, grantRevocationDomain, serverRegistrationDomain, builderRegistrationDomain, FILE_REGISTRATION_TYPES, GRANT_REGISTRATION_TYPES, GRANT_REVOCATION_TYPES, SERVER_REGISTRATION_TYPES, BUILDER_REGISTRATION_TYPES, type DataPortabilityContracts, type DataPortabilityGatewayConfig, type FileRegistrationMessage, type GrantRegistrationMessage, type GrantRevocationMessage, type ServerRegistrationMessage, type BuilderRegistrationMessage, } from "./protocol/eip712"; 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"; 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 "./protocol/personal-server-lite-owner-binding"; 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"; export { AccountPersonalServerLiteOwnerBindingError, signPersonalServerLiteOwnerBindingWithAccountClient, type AccountPersonalServerLiteOwnerBindingClient, type SignPersonalServerLiteOwnerBindingWithAccountClientConfig, } from "./account/personal-server-lite-owner-binding"; export { isDataPortabilityGatewayConfig, parseGrantRegistrationPayload, verifyGrantRegistration, type DataPortabilityGrantPayload, type VerifyGrantRegistrationInput, type VerifyGrantRegistrationResult, } from "./protocol/grants"; export { ScopeSchema, parseScope, scopeToPathSegments, scopeMatchesPattern, scopeCoveredByGrant, type Scope, type ParsedScope, } from "./protocol/scopes"; export { DataFileEnvelopeSchema, createDataFileEnvelope, IngestResponseSchema, type DataFileEnvelope, type IngestResponse, } from "./protocol/data-file"; export { createGatewayClient, type GatewayEnvelope, type GatewayProof, type Builder, type Schema, type ServerInfo, type GatewayGrantResponse, type GrantListItem, type FileRecord, type FileListResult, type RegisterServerParams, type RegisterServerResult, type RegisterFileParams, type CreateGrantParams, type RevokeGrantParams, type GatewayClient, } from "./protocol/gateway"; export { PSError, parsePSError, type PSErrorCode } from "./types/ps-errors";