@opendatalabs/vana-sdk 0.1.0-alpha.5e925dc → 0.1.0-alpha.e64ec83

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.
Files changed (44) hide show
  1. package/dist/chains.browser.cjs +93 -0
  2. package/dist/chains.browser.cjs.map +1 -0
  3. package/dist/chains.browser.d.cts +52 -0
  4. package/dist/chains.browser.d.ts +52 -0
  5. package/dist/chains.browser.js +63 -0
  6. package/dist/chains.browser.js.map +1 -0
  7. package/dist/chains.cjs +93 -0
  8. package/dist/chains.cjs.map +1 -0
  9. package/dist/chains.d.cts +2 -0
  10. package/dist/chains.d.ts +2 -0
  11. package/dist/chains.js +63 -0
  12. package/dist/chains.js.map +1 -0
  13. package/dist/chains.node.cjs +93 -0
  14. package/dist/chains.node.cjs.map +1 -0
  15. package/dist/chains.node.d.cts +2 -0
  16. package/dist/chains.node.d.ts +2 -0
  17. package/dist/chains.node.js +63 -0
  18. package/dist/chains.node.js.map +1 -0
  19. package/dist/index.browser.d.ts +50 -12
  20. package/dist/index.browser.js +458 -388
  21. package/dist/index.browser.js.map +1 -1
  22. package/dist/index.d.cts +236 -150
  23. package/dist/index.node.cjs +538 -51
  24. package/dist/index.node.cjs.map +1 -1
  25. package/dist/index.node.d.cts +79 -1
  26. package/dist/index.node.d.ts +79 -1
  27. package/dist/index.node.js +529 -51
  28. package/dist/index.node.js.map +1 -1
  29. package/dist/platform.browser.d.ts +224 -0
  30. package/dist/platform.browser.js +467 -0
  31. package/dist/platform.browser.js.map +1 -0
  32. package/dist/platform.cjs +809 -0
  33. package/dist/platform.cjs.map +1 -0
  34. package/dist/platform.d.cts +1 -0
  35. package/dist/platform.d.ts +1 -0
  36. package/dist/platform.js +772 -0
  37. package/dist/platform.js.map +1 -0
  38. package/dist/platform.node.cjs +809 -0
  39. package/dist/platform.node.cjs.map +1 -0
  40. package/dist/platform.node.d.cts +264 -0
  41. package/dist/platform.node.d.ts +264 -0
  42. package/dist/platform.node.js +772 -0
  43. package/dist/platform.node.js.map +1 -0
  44. package/package.json +36 -2
@@ -31011,22 +31011,60 @@ declare class BrowserPlatformAdapter implements VanaPlatformAdapter {
31011
31011
  }
31012
31012
 
31013
31013
  /**
31014
- * Node.js implementation of the Vana Platform Adapter
31014
+ * Browser-only exports for platform adapters
31015
31015
  *
31016
- * This implementation uses Node.js-specific libraries and configurations
31017
- * to provide crypto, PGP, and HTTP functionality.
31016
+ * This file provides browser-only exports that completely avoid Node.js imports
31017
+ * when bundling for browser environments. This is used by the browser entry point.
31018
31018
  */
31019
31019
 
31020
31020
  /**
31021
- * Complete Node.js platform adapter implementation
31021
+ * Creates a BrowserPlatformAdapter instance
31022
+ *
31023
+ * @returns A BrowserPlatformAdapter instance
31022
31024
  */
31023
- declare class NodePlatformAdapter implements VanaPlatformAdapter {
31024
- crypto: VanaCryptoAdapter;
31025
- pgp: VanaPGPAdapter;
31026
- http: VanaHttpAdapter;
31027
- platform: "node";
31028
- constructor();
31029
- }
31025
+ declare function createBrowserPlatformAdapter(): VanaPlatformAdapter;
31026
+ /**
31027
+ * Browser-only platform adapter factory
31028
+ * This version does not include Node.js imports at all
31029
+ *
31030
+ * @returns A BrowserPlatformAdapter instance
31031
+ */
31032
+ declare function createPlatformAdapterSafe(): VanaPlatformAdapter;
31033
+
31034
+ /**
31035
+ * Platform detection and adapter utilities
31036
+ *
31037
+ * This module provides utilities for detecting the current runtime environment
31038
+ * and creating appropriate platform adapters automatically.
31039
+ */
31040
+
31041
+ /**
31042
+ * Detects the current runtime environment
31043
+ *
31044
+ * @returns The detected platform type
31045
+ */
31046
+ declare function detectPlatform(): PlatformType;
31047
+ /**
31048
+ * Checks if the current environment supports the given platform adapter
31049
+ *
31050
+ * @param platformType - The platform type to check
31051
+ * @returns True if the platform is supported, false otherwise
31052
+ */
31053
+ declare function isPlatformSupported(platformType: PlatformType): boolean;
31054
+ /**
31055
+ * Gets platform-specific capabilities
31056
+ *
31057
+ * @returns Object describing available platform capabilities
31058
+ */
31059
+ declare function getPlatformCapabilities(): {
31060
+ platform: PlatformType;
31061
+ crypto: {
31062
+ webCrypto: false | SubtleCrypto;
31063
+ nodeCrypto: string | false;
31064
+ };
31065
+ fetch: boolean;
31066
+ streams: boolean;
31067
+ };
31030
31068
 
31031
31069
  /**
31032
31070
  * Configuration for the generic API client
@@ -31225,4 +31263,4 @@ declare class VanaBrowser extends VanaCore {
31225
31263
  constructor(config: VanaConfig);
31226
31264
  }
31227
31265
 
31228
- export { type APIResponse, type AddRefinerParams, type AddRefinerResult, type AddSchemaParams, type AddSchemaResult, type AllKeys, ApiClient, type ApiClientConfig, type ApiResponse, AsyncQueue, type AsyncResult, type Awaited, type BaseConfig, BaseController, type BatchServerInfoResult, type BatchUploadParams, type BatchUploadResult, type BlockRange, BlockchainError, type Brand, BrowserPlatformAdapter, type Cache, type CacheConfig, type ChainConfig, type CheckPermissionParams, CircuitBreaker, type ConditionalOptional, type ConfigValidationOptions, type ConfigValidationResult, type ContractAddresses, type ContractCall, type ContractDeployment, ContractFactory, type ContractInfo, type ContractMethodParams, type ContractMethodReturnType, ContractNotFoundError, type Controller, type ControllerContext$1 as ControllerContext, DEFAULT_ENCRYPTION_SEED, DEFAULT_IPFS_GATEWAY, DataController, type DataSchema, type DeepPartial, type DeepReadonly, type DeleteFileParams, type DeleteFileResult, type DownloadFileParams, type DownloadFileResult, type EncryptionInfo, EventEmitter, type EventFilter, type EventLog, type Factory, type FileAccessPermissions, type FileMetadata, type FileSharingConfig, type GasEstimate, type GenericRequest, type GenericResponse, type GenericTypedData, type GetFileParams, type GetUserFilesParams, type GetUserTrustedServersParams, type GetUserTrustedServersResult, GoogleDriveStorage, GrantExpiredError, type GrantFile, type GrantPermissionParams, GrantSchemaError, GrantValidationError, type GrantValidationOptions, type GrantValidationResult, type GrantedPermission, GranteeMismatchError, type HttpMethod, IPFS_GATEWAYS, type IdentityServerOutput, type IdentityServerResponse, type InitPersonalServerParams, InvalidConfigurationError, IpfsStorage, type MaybeArray, type MaybePromise, MemoryCache, type Middleware, MiddlewarePipeline, NetworkError, type NetworkInfo, NodePlatformAdapter, type Nominal, type NonNullable, NonceError, type Observable, type Observer, type OmitByType, OperationNotAllowedError, type OptionalKeys, type PaginatedTrustedServers, type PaginationParams, type PaginationResult, type PartialExcept, type PermissionAnalytics, type PermissionCheckResult, PermissionError, type PermissionEvent, type PermissionGrantDomain, type PermissionGrantMessage, type PermissionGrantTypedData, type PermissionInfo, type PermissionInputMessage, type PermissionOperation, type PermissionQueryResult, type PermissionStatus, PermissionsController, type PersonalServerResponse as PersonalServerAPIResponse, PersonalServerError, type PersonalServerOutput, type PersonalServerResponse$1 as PersonalServerResponse, type PickByType, type PinataListResponse, type PinataPin, PinataStorage, type PinataUploadResponse, type Plugin, type PostRequestParams, type PromiseResult, ProtocolController, type QueryPermissionsParams, type RateLimitInfo, RateLimiter, type RateLimiterConfig, type Refiner, type RelayerCallbacks, type RelayerConfig, RelayerError, type RelayerErrorResponse, type RelayerMetrics, type RelayerQueueInfo, type RelayerRequestOptions, type RelayerStatus, type RelayerStorageResponse, type RelayerStoreParams, type RelayerSubmitParams, type RelayerTransactionResponse, type RelayerTransactionStatus, type RelayerWebhookConfig, type RelayerWebhookPayload, type ReplicateAPIResponse, type ReplicatePredictionResponse, type ReplicateStatus, type Repository, type RequestOptions, type RequireKeys, type RequiredExcept, type RetryConfig, RetryUtility, type RevokePermissionInput, type RevokePermissionParams, type RuntimeConfig, type Schema, SchemaValidationError, SchemaValidator, SerializationError, type Server, ServerController, ServerProxyStorage, type ServerTrustStatus, ServerUrlMismatchError, type Service, SignatureError, type SimplifiedPermissionMessage, type StateMachine, type StatusInfo, type StorageConfig, StorageError, type StorageFile, type StorageListOptions, StorageManager, type StorageProvider, type StorageProviderConfig, type StorageUploadResult, type TimeRange, type TransactionOptions, type TransactionReceipt, type Transformer, type TrustServerInput, type TrustServerParams, type TrustServerTypedData, type TrustedServer, type TrustedServerInfo, type TrustedServerQueryMode, type TrustedServerQueryOptions, type UntrustServerInput, type UntrustServerParams, type UntrustServerTypedData, type UpdateSchemaIdParams, type UpdateSchemaIdResult, type UploadEncryptedFileResult, type UploadFileParams, type UploadFileResult, type UploadProgress, type UserFile, UserRejectedRequestError, type ValidationResult, type Validator, VanaBrowser as Vana, VanaBrowser, type VanaChain, type VanaChainConfig, type VanaChainId, type VanaConfig, type VanaContract, type VanaContract as VanaContractAbi, type VanaContractInstance, type VanaContractName, VanaError, type WalletConfig, __contractCache, chains, checkGrantAccess, clearContractCache, convertIpfsUrl, convertIpfsUrlWithFallbacks, createAndStoreGrant, createGrantFile, createValidatedGrant, decryptUserData, decryptWithPrivateKey, decryptWithWalletPrivateKey, VanaBrowser as default, encryptFileKey, encryptUserData, encryptWithWalletPublicKey, extractIpfsHash, fetchAndValidateSchema, fetchWithFallbacks, formatEth, formatNumber, formatToken, generateEncryptionKey, generateEncryptionKeyPair, generatePGPKeyPair, getAbi, getAllChains, getChainConfig, getContractAddress, getContractController, getContractInfo, getEncryptionParameters, getGatewayUrls, getGrantFileHash, getGrantTimeRemaining, isAPIResponse, isChainConfig, isGrantExpired, isIdentityServerOutput, isIpfsUrl, isPersonalServerOutput, isReplicateAPIResponse, isVanaChain, isVanaChainId, isWalletConfig, moksha, mokshaTestnet, parseReplicateOutput, retrieveAndValidateGrant, retrieveGrantFile, safeParseJSON, schemaValidator, shortenAddress, storeGrantFile, summarizeGrant, validateDataAgainstSchema, validateDataSchema, validateGrant, validateGrantExpiry, validateGrantFile, validateGranteeAccess, validateOperationAccess, vanaMainnet };
31266
+ export { type APIResponse, type AddRefinerParams, type AddRefinerResult, type AddSchemaParams, type AddSchemaResult, type AllKeys, ApiClient, type ApiClientConfig, type ApiResponse, AsyncQueue, type AsyncResult, type Awaited, type BaseConfig, BaseController, type BatchServerInfoResult, type BatchUploadParams, type BatchUploadResult, type BlockRange, BlockchainError, type Brand, BrowserPlatformAdapter, type Cache, type CacheConfig, type ChainConfig, type CheckPermissionParams, CircuitBreaker, type ConditionalOptional, type ConfigValidationOptions, type ConfigValidationResult, type ContractAddresses, type ContractCall, type ContractDeployment, ContractFactory, type ContractInfo, type ContractMethodParams, type ContractMethodReturnType, ContractNotFoundError, type Controller, type ControllerContext$1 as ControllerContext, DEFAULT_ENCRYPTION_SEED, DEFAULT_IPFS_GATEWAY, DataController, type DataSchema, type DeepPartial, type DeepReadonly, type DeleteFileParams, type DeleteFileResult, type DownloadFileParams, type DownloadFileResult, type EncryptionInfo, EventEmitter, type EventFilter, type EventLog, type Factory, type FileAccessPermissions, type FileMetadata, type FileSharingConfig, type GasEstimate, type GenericRequest, type GenericResponse, type GenericTypedData, type GetFileParams, type GetUserFilesParams, type GetUserTrustedServersParams, type GetUserTrustedServersResult, GoogleDriveStorage, GrantExpiredError, type GrantFile, type GrantPermissionParams, GrantSchemaError, GrantValidationError, type GrantValidationOptions, type GrantValidationResult, type GrantedPermission, GranteeMismatchError, type HttpMethod, IPFS_GATEWAYS, type IdentityServerOutput, type IdentityServerResponse, type InitPersonalServerParams, InvalidConfigurationError, IpfsStorage, type MaybeArray, type MaybePromise, MemoryCache, type Middleware, MiddlewarePipeline, NetworkError, type NetworkInfo, type Nominal, type NonNullable, NonceError, type Observable, type Observer, type OmitByType, OperationNotAllowedError, type OptionalKeys, type PaginatedTrustedServers, type PaginationParams, type PaginationResult, type PartialExcept, type PermissionAnalytics, type PermissionCheckResult, PermissionError, type PermissionEvent, type PermissionGrantDomain, type PermissionGrantMessage, type PermissionGrantTypedData, type PermissionInfo, type PermissionInputMessage, type PermissionOperation, type PermissionQueryResult, type PermissionStatus, PermissionsController, type PersonalServerResponse as PersonalServerAPIResponse, PersonalServerError, type PersonalServerOutput, type PersonalServerResponse$1 as PersonalServerResponse, type PickByType, type PinataListResponse, type PinataPin, PinataStorage, type PinataUploadResponse, type Plugin, type PostRequestParams, type PromiseResult, ProtocolController, type QueryPermissionsParams, type RateLimitInfo, RateLimiter, type RateLimiterConfig, type Refiner, type RelayerCallbacks, type RelayerConfig, RelayerError, type RelayerErrorResponse, type RelayerMetrics, type RelayerQueueInfo, type RelayerRequestOptions, type RelayerStatus, type RelayerStorageResponse, type RelayerStoreParams, type RelayerSubmitParams, type RelayerTransactionResponse, type RelayerTransactionStatus, type RelayerWebhookConfig, type RelayerWebhookPayload, type ReplicateAPIResponse, type ReplicatePredictionResponse, type ReplicateStatus, type Repository, type RequestOptions, type RequireKeys, type RequiredExcept, type RetryConfig, RetryUtility, type RevokePermissionInput, type RevokePermissionParams, type RuntimeConfig, type Schema, SchemaValidationError, SchemaValidator, SerializationError, type Server, ServerController, ServerProxyStorage, type ServerTrustStatus, ServerUrlMismatchError, type Service, SignatureError, type SimplifiedPermissionMessage, type StateMachine, type StatusInfo, type StorageConfig, StorageError, type StorageFile, type StorageListOptions, StorageManager, type StorageProvider, type StorageProviderConfig, type StorageUploadResult, type TimeRange, type TransactionOptions, type TransactionReceipt, type Transformer, type TrustServerInput, type TrustServerParams, type TrustServerTypedData, type TrustedServer, type TrustedServerInfo, type TrustedServerQueryMode, type TrustedServerQueryOptions, type UntrustServerInput, type UntrustServerParams, type UntrustServerTypedData, type UpdateSchemaIdParams, type UpdateSchemaIdResult, type UploadEncryptedFileResult, type UploadFileParams, type UploadFileResult, type UploadProgress, type UserFile, UserRejectedRequestError, type ValidationResult, type Validator, VanaBrowser as Vana, VanaBrowser, type VanaChain, type VanaChainConfig, type VanaChainId, type VanaConfig, type VanaContract, type VanaContract as VanaContractAbi, type VanaContractInstance, type VanaContractName, VanaError, type VanaPlatformAdapter, type WalletConfig, __contractCache, chains, checkGrantAccess, clearContractCache, convertIpfsUrl, convertIpfsUrlWithFallbacks, createAndStoreGrant, createBrowserPlatformAdapter, createGrantFile, createPlatformAdapterSafe, createValidatedGrant, decryptUserData, decryptWithPrivateKey, decryptWithWalletPrivateKey, VanaBrowser as default, detectPlatform, encryptFileKey, encryptUserData, encryptWithWalletPublicKey, extractIpfsHash, fetchAndValidateSchema, fetchWithFallbacks, formatEth, formatNumber, formatToken, generateEncryptionKey, generateEncryptionKeyPair, generatePGPKeyPair, getAbi, getAllChains, getChainConfig, getContractAddress, getContractController, getContractInfo, getEncryptionParameters, getGatewayUrls, getGrantFileHash, getGrantTimeRemaining, getPlatformCapabilities, isAPIResponse, isChainConfig, isGrantExpired, isIdentityServerOutput, isIpfsUrl, isPersonalServerOutput, isPlatformSupported, isReplicateAPIResponse, isVanaChain, isVanaChainId, isWalletConfig, moksha, mokshaTestnet, parseReplicateOutput, retrieveAndValidateGrant, retrieveGrantFile, safeParseJSON, schemaValidator, shortenAddress, storeGrantFile, summarizeGrant, validateDataAgainstSchema, validateDataSchema, validateGrant, validateGrantExpiry, validateGrantFile, validateGranteeAccess, validateOperationAccess, vanaMainnet };