@opendatalabs/vana-sdk 0.1.0-alpha.606fa2d → 0.1.0-alpha.61efc06

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/README.md +4 -13
  2. package/dist/{browser-Bb8gLWHp.d.ts → browser-DY8XDblx.d.ts} +14 -61
  3. package/dist/browser.d.ts +1 -1
  4. package/dist/browser.js +106 -723
  5. package/dist/browser.js.map +1 -1
  6. package/dist/chains.browser.cjs +2 -2
  7. package/dist/chains.browser.cjs.map +1 -1
  8. package/dist/chains.browser.js +2 -2
  9. package/dist/chains.browser.js.map +1 -1
  10. package/dist/chains.cjs +2 -2
  11. package/dist/chains.cjs.map +1 -1
  12. package/dist/chains.js +2 -2
  13. package/dist/chains.js.map +1 -1
  14. package/dist/chains.node.cjs +2 -2
  15. package/dist/chains.node.cjs.map +1 -1
  16. package/dist/chains.node.js +2 -2
  17. package/dist/chains.node.js.map +1 -1
  18. package/dist/index.browser.d.ts +201 -342
  19. package/dist/index.browser.js +628 -861
  20. package/dist/index.browser.js.map +1 -1
  21. package/dist/index.node.cjs +666 -1010
  22. package/dist/index.node.cjs.map +1 -1
  23. package/dist/index.node.d.cts +205 -101
  24. package/dist/index.node.d.ts +205 -101
  25. package/dist/index.node.js +668 -1024
  26. package/dist/index.node.js.map +1 -1
  27. package/dist/node.cjs +53 -692
  28. package/dist/node.cjs.map +1 -1
  29. package/dist/node.js +52 -704
  30. package/dist/node.js.map +1 -1
  31. package/dist/platform.browser.d.ts +2 -2
  32. package/dist/platform.browser.js +116 -780
  33. package/dist/platform.browser.js.map +1 -1
  34. package/dist/platform.cjs +156 -933
  35. package/dist/platform.cjs.map +1 -1
  36. package/dist/platform.js +156 -945
  37. package/dist/platform.js.map +1 -1
  38. package/dist/platform.node.cjs +156 -933
  39. package/dist/platform.node.cjs.map +1 -1
  40. package/dist/platform.node.d.cts +14 -61
  41. package/dist/platform.node.d.ts +14 -61
  42. package/dist/platform.node.js +156 -945
  43. package/dist/platform.node.js.map +1 -1
  44. package/package.json +15 -31
@@ -1752,6 +1752,12 @@ interface UserFile$1 {
1752
1752
  transactionHash?: Address;
1753
1753
  /** Additional file properties and custom application data. */
1754
1754
  metadata?: FileMetadata;
1755
+ /**
1756
+ * Array of DLP IDs that have submitted proofs for this file.
1757
+ * Each proof represents verification or processing by a Data Liquidity Pool.
1758
+ * Obtain DLP details via `vana.data.getDLP(dlpId)`.
1759
+ */
1760
+ dlpIds?: number[];
1755
1761
  }
1756
1762
  /**
1757
1763
  * Provides optional metadata for uploaded files and content description.
@@ -5230,6 +5236,31 @@ declare const contractAbis: {
5230
5236
  }];
5231
5237
  readonly name: "FileAdded";
5232
5238
  readonly type: "event";
5239
+ }, {
5240
+ readonly anonymous: false;
5241
+ readonly inputs: readonly [{
5242
+ readonly indexed: true;
5243
+ readonly internalType: "uint256";
5244
+ readonly name: "fileId";
5245
+ readonly type: "uint256";
5246
+ }, {
5247
+ readonly indexed: true;
5248
+ readonly internalType: "address";
5249
+ readonly name: "ownerAddress";
5250
+ readonly type: "address";
5251
+ }, {
5252
+ readonly indexed: false;
5253
+ readonly internalType: "string";
5254
+ readonly name: "url";
5255
+ readonly type: "string";
5256
+ }, {
5257
+ readonly indexed: false;
5258
+ readonly internalType: "uint256";
5259
+ readonly name: "schemaId";
5260
+ readonly type: "uint256";
5261
+ }];
5262
+ readonly name: "FileAddedV2";
5263
+ readonly type: "event";
5233
5264
  }, {
5234
5265
  readonly anonymous: false;
5235
5266
  readonly inputs: readonly [{
@@ -5656,6 +5687,16 @@ declare const contractAbis: {
5656
5687
  }];
5657
5688
  readonly stateMutability: "view";
5658
5689
  readonly type: "function";
5690
+ }, {
5691
+ readonly inputs: readonly [];
5692
+ readonly name: "emitLegacyEvents";
5693
+ readonly outputs: readonly [{
5694
+ readonly internalType: "bool";
5695
+ readonly name: "";
5696
+ readonly type: "bool";
5697
+ }];
5698
+ readonly stateMutability: "view";
5699
+ readonly type: "function";
5659
5700
  }, {
5660
5701
  readonly inputs: readonly [{
5661
5702
  readonly internalType: "string";
@@ -5774,6 +5815,10 @@ declare const contractAbis: {
5774
5815
  readonly internalType: "string";
5775
5816
  readonly name: "url";
5776
5817
  readonly type: "string";
5818
+ }, {
5819
+ readonly internalType: "uint256";
5820
+ readonly name: "schemaId";
5821
+ readonly type: "uint256";
5777
5822
  }, {
5778
5823
  readonly internalType: "uint256";
5779
5824
  readonly name: "addedAtBlock";
@@ -5991,6 +6036,16 @@ declare const contractAbis: {
5991
6036
  readonly outputs: readonly [];
5992
6037
  readonly stateMutability: "nonpayable";
5993
6038
  readonly type: "function";
6039
+ }, {
6040
+ readonly inputs: readonly [{
6041
+ readonly internalType: "bool";
6042
+ readonly name: "newEmitLegacyEvents";
6043
+ readonly type: "bool";
6044
+ }];
6045
+ readonly name: "updateEmitLegacyEvents";
6046
+ readonly outputs: readonly [];
6047
+ readonly stateMutability: "nonpayable";
6048
+ readonly type: "function";
5994
6049
  }, {
5995
6050
  readonly inputs: readonly [{
5996
6051
  readonly internalType: "address";
@@ -28839,19 +28894,19 @@ declare const EVENT_MAPPINGS: {
28839
28894
  };
28840
28895
  readonly addFile: {
28841
28896
  readonly contract: "DataRegistry";
28842
- readonly event: "FileAdded";
28897
+ readonly event: "FileAddedV2";
28843
28898
  };
28844
28899
  readonly addFileWithPermissionsAndSchema: {
28845
28900
  readonly contract: "DataRegistry";
28846
- readonly event: "FileAdded";
28901
+ readonly event: "FileAddedV2";
28847
28902
  };
28848
28903
  readonly addFileWithSchema: {
28849
28904
  readonly contract: "DataRegistry";
28850
- readonly event: "FileAdded";
28905
+ readonly event: "FileAddedV2";
28851
28906
  };
28852
28907
  readonly addFileWithPermissions: {
28853
28908
  readonly contract: "DataRegistry";
28854
- readonly event: "FileAdded";
28909
+ readonly event: "FileAddedV2";
28855
28910
  };
28856
28911
  readonly addRefinement: {
28857
28912
  readonly contract: "DataRegistry";
@@ -31630,16 +31685,16 @@ declare class SchemaValidationError extends Error {
31630
31685
  }>);
31631
31686
  }
31632
31687
  /**
31633
- * Schema validation utility class
31688
+ * Data schema validation utility class
31634
31689
  */
31635
31690
  declare class SchemaValidator {
31636
31691
  private ajv;
31637
31692
  private dataSchemaValidator;
31638
31693
  constructor();
31639
31694
  /**
31640
- * Validates a data schema against the Vana meta-schema
31695
+ * Validates a data schema definition against the Vana meta-schema
31641
31696
  *
31642
- * @param schema - The data schema to validate
31697
+ * @param schema - The data schema definition to validate
31643
31698
  * @throws SchemaValidationError if invalid
31644
31699
  * @example
31645
31700
  * ```typescript
@@ -31658,15 +31713,15 @@ declare class SchemaValidator {
31658
31713
  * }
31659
31714
  * };
31660
31715
  *
31661
- * validator.validateDataSchema(schema); // throws if invalid
31716
+ * validator.validateDataSchemaAgainstMetaSchema(schema); // throws if invalid
31662
31717
  * ```
31663
31718
  */
31664
- validateDataSchema(schema: unknown): asserts schema is DataSchema;
31719
+ validateDataSchemaAgainstMetaSchema(schema: unknown): asserts schema is DataSchema;
31665
31720
  /**
31666
- * Validates data against a JSON Schema from a schema
31721
+ * Validates data against a JSON Schema
31667
31722
  *
31668
31723
  * @param data - The data to validate
31669
- * @param schema - The schema containing the validation rules (DataSchema or Schema)
31724
+ * @param schema - The schema containing the validation rules (must have been validated or fetched from chain)
31670
31725
  * @throws SchemaValidationError if invalid
31671
31726
  * @example
31672
31727
  * ```typescript
@@ -31676,13 +31731,13 @@ declare class SchemaValidator {
31676
31731
  * const schema = await vana.schemas.get(1);
31677
31732
  * validator.validateDataAgainstSchema(userData, schema);
31678
31733
  *
31679
- * // Also works with DataSchema object
31680
- * const dataSchema: DataSchema = {
31734
+ * // Also works with pre-validated DataSchema object
31735
+ * const dataSchema = validator.validateDataSchemaAgainstMetaSchema({
31681
31736
  * name: "User Profile",
31682
31737
  * version: "1.0.0",
31683
31738
  * dialect: "json",
31684
31739
  * schema: { type: "object", properties: { name: { type: "string" } } }
31685
- * };
31740
+ * });
31686
31741
  * validator.validateDataAgainstSchema(userData, dataSchema);
31687
31742
  * ```
31688
31743
  */
@@ -31697,9 +31752,9 @@ declare class SchemaValidator {
31697
31752
  */
31698
31753
  validateSQLiteDDL(ddl: string, dialectVersion?: string): void;
31699
31754
  /**
31700
- * Fetches and validates a schema from a URL
31755
+ * Fetches and validates a data schema from a URL
31701
31756
  *
31702
- * @param url - The URL to fetch the schema from
31757
+ * @param url - The URL to fetch the data schema from
31703
31758
  * @returns The validated data schema
31704
31759
  * @throws SchemaValidationError if invalid or fetch fails
31705
31760
  * @example
@@ -31715,13 +31770,24 @@ declare class SchemaValidator {
31715
31770
  */
31716
31771
  declare const schemaValidator: SchemaValidator;
31717
31772
  /**
31718
- * Convenience function to validate a data schema
31773
+ * Convenience function to validate a data schema definition against the Vana meta-schema
31719
31774
  *
31720
- * @param schema - The data schema to validate
31721
- * @returns void - Assertion function that doesn't return a value
31775
+ * @param schema - The data schema definition to validate
31776
+ * @returns The validated DataSchema
31722
31777
  * @throws SchemaValidationError if invalid
31778
+ * @example
31779
+ * ```typescript
31780
+ * const schemaDefinition = {
31781
+ * name: "User Profile",
31782
+ * version: "1.0.0",
31783
+ * dialect: "json",
31784
+ * schema: { type: "object", properties: { name: { type: "string" } } }
31785
+ * };
31786
+ *
31787
+ * const validatedSchema = validateDataSchemaAgainstMetaSchema(schemaDefinition);
31788
+ * ```
31723
31789
  */
31724
- declare function validateDataSchema(schema: unknown): asserts schema is DataSchema;
31790
+ declare function validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
31725
31791
  /**
31726
31792
  * Convenience function to validate data against a schema
31727
31793
  *
@@ -31732,9 +31798,9 @@ declare function validateDataSchema(schema: unknown): asserts schema is DataSche
31732
31798
  */
31733
31799
  declare function validateDataAgainstSchema(data: unknown, schema: DataSchema | Schema): void;
31734
31800
  /**
31735
- * Convenience function to fetch and validate a schema from a URL
31801
+ * Convenience function to fetch and validate a data schema from a URL
31736
31802
  *
31737
- * @param url - The URL to fetch the schema from
31803
+ * @param url - The URL to fetch the data schema from
31738
31804
  * @returns The validated data schema
31739
31805
  * @throws SchemaValidationError if invalid or fetch fails
31740
31806
  */
@@ -34225,6 +34291,89 @@ declare class DataController {
34225
34291
  owner: Address;
34226
34292
  subgraphUrl?: string;
34227
34293
  }): Promise<UserFile$1[]>;
34294
+ /**
34295
+ * Fetches proof data for multiple files from the subgraph.
34296
+ *
34297
+ * @private
34298
+ * @param fileIds - Array of file IDs to fetch proofs for
34299
+ * @param subgraphUrl - The subgraph endpoint URL
34300
+ * @returns Map of file IDs to their associated DLP IDs
34301
+ */
34302
+ private _fetchProofsFromSubgraph;
34303
+ /**
34304
+ * Fetches proof data for multiple files from the blockchain.
34305
+ * Falls back to this when subgraph is unavailable.
34306
+ *
34307
+ * @private
34308
+ * @param fileIds - Array of file IDs to fetch proofs for
34309
+ * @returns Map of file IDs to their associated DLP IDs
34310
+ */
34311
+ private _fetchProofsFromChain;
34312
+ /**
34313
+ * Retrieves information about a specific Data Liquidity Pool (DLP).
34314
+ *
34315
+ * @remarks
34316
+ * DLPs are entities that process and verify data files in the Vana network.
34317
+ * This method fetches DLP metadata including name, status, and performance rating.
34318
+ * Uses subgraph first for efficiency, falls back to chain if unavailable.
34319
+ *
34320
+ * @param dlpId - The unique identifier of the DLP
34321
+ * @param options - Optional parameters
34322
+ * @param options.subgraphUrl - Custom subgraph URL to override default
34323
+ * @returns Promise resolving to DLP information
34324
+ * @throws {Error} When DLP cannot be found - "DLP not found: {dlpId}"
34325
+ * @throws {Error} When query fails - "Failed to fetch DLP: {error}"
34326
+ * @example
34327
+ * ```typescript
34328
+ * const dlp = await vana.data.getDLP(26);
34329
+ * console.log(`DLP ${dlp.name}: ${dlp.status}`);
34330
+ * ```
34331
+ */
34332
+ getDLP(dlpId: number, options?: {
34333
+ subgraphUrl?: string;
34334
+ }): Promise<{
34335
+ id: number;
34336
+ name: string;
34337
+ metadata?: string;
34338
+ status?: number;
34339
+ address?: Address;
34340
+ owner?: Address;
34341
+ }>;
34342
+ /**
34343
+ * Lists all Data Liquidity Pools (DLPs) with optional pagination.
34344
+ *
34345
+ * @remarks
34346
+ * Fetches a paginated list of all DLPs registered in the network.
34347
+ * Uses subgraph for efficient querying with fallback to chain multicall.
34348
+ *
34349
+ * @param options - Optional parameters for pagination and filtering
34350
+ * @param options.limit - Maximum number of DLPs to return (default: 100)
34351
+ * @param options.offset - Number of DLPs to skip (default: 0)
34352
+ * @param options.subgraphUrl - Custom subgraph URL to override default
34353
+ * @returns Promise resolving to array of DLP information
34354
+ * @throws {Error} When query fails - "Failed to list DLPs: {error}"
34355
+ * @example
34356
+ * ```typescript
34357
+ * // Get first 10 DLPs
34358
+ * const dlps = await vana.data.listDLPs({ limit: 10 });
34359
+ * dlps.forEach(dlp => console.log(`${dlp.id}: ${dlp.name}`));
34360
+ *
34361
+ * // Get next page
34362
+ * const nextPage = await vana.data.listDLPs({ limit: 10, offset: 10 });
34363
+ * ```
34364
+ */
34365
+ listDLPs(options?: {
34366
+ limit?: number;
34367
+ offset?: number;
34368
+ subgraphUrl?: string;
34369
+ }): Promise<Array<{
34370
+ id: number;
34371
+ name: string;
34372
+ metadata?: string;
34373
+ status?: number;
34374
+ address?: Address;
34375
+ owner?: Address;
34376
+ }>>;
34228
34377
  /**
34229
34378
  * Retrieves a list of permissions granted by a user.
34230
34379
  *
@@ -34728,10 +34877,10 @@ declare class DataController {
34728
34877
  gateways?: string[];
34729
34878
  }): Promise<Blob>;
34730
34879
  /**
34731
- * Validates a data schema against the Vana meta-schema.
34880
+ * Validates a data schema definition against the Vana meta-schema.
34732
34881
  *
34733
- * @param schema - The data schema to validate
34734
- * @returns Assertion that schema is valid (throws if invalid)
34882
+ * @param schema - The data schema definition to validate
34883
+ * @returns The validated DataSchema
34735
34884
  * @throws SchemaValidationError if invalid
34736
34885
  * @example
34737
34886
  * ```typescript
@@ -34748,10 +34897,10 @@ declare class DataController {
34748
34897
  * }
34749
34898
  * };
34750
34899
  *
34751
- * vana.data.validateDataSchema(schema);
34900
+ * const validatedSchema = vana.data.validateDataSchemaAgainstMetaSchema(schema);
34752
34901
  * ```
34753
34902
  */
34754
- validateDataSchema(schema: unknown): asserts schema is DataSchema;
34903
+ validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
34755
34904
  /**
34756
34905
  * Validates data against a JSON Schema from a data schema.
34757
34906
  *
@@ -34781,9 +34930,9 @@ declare class DataController {
34781
34930
  */
34782
34931
  validateDataAgainstSchema(data: unknown, schema: DataSchema): void;
34783
34932
  /**
34784
- * Fetches and validates a schema from a URL, then returns the parsed data schema.
34933
+ * Fetches and validates a data schema from a URL, then returns the parsed data schema.
34785
34934
  *
34786
- * @param url - The URL to fetch the schema from
34935
+ * @param url - The URL to fetch the data schema from
34787
34936
  * @returns The validated data schema
34788
34937
  * @throws SchemaValidationError if invalid or fetch fails
34789
34938
  * @example
@@ -36887,12 +37036,12 @@ declare class SignatureCache {
36887
37036
  * Generate a deterministic hash of a message object for cache key generation
36888
37037
  *
36889
37038
  * @remarks
36890
- * Creates a cryptographically secure hash from complex objects including EIP-712 typed data.
36891
- * Uses SHA-256 for collision resistance and deterministic key generation.
36892
- * Handles BigInt serialization and sorts object keys for consistency.
37039
+ * Creates a consistent hash from complex objects including EIP-712 typed data.
37040
+ * Handles BigInt serialization and produces a 32-character hash that balances
37041
+ * uniqueness with key length constraints.
36893
37042
  *
36894
37043
  * @param message - The message object to hash (typically EIP-712 typed data)
36895
- * @returns A hex string hash (SHA-256) suitable for cache keys
37044
+ * @returns A 32-character hash string suitable for cache keys
36896
37045
  * @example
36897
37046
  * ```typescript
36898
37047
  * const typedData = {
@@ -36901,19 +37050,19 @@ declare class SignatureCache {
36901
37050
  * };
36902
37051
  *
36903
37052
  * const hash = SignatureCache.hashMessage(typedData);
36904
- * // Returns SHA-256 hash like: "a1b2c3d4e5f6..."
37053
+ * // Returns something like: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
36905
37054
  * ```
36906
37055
  */
36907
37056
  static hashMessage(message: object): string;
36908
37057
  /**
36909
- * Deterministic JSON replacer that handles BigInt values and sorts object keys
36910
- * This ensures consistent cache key generation for EIP-712 typed data
37058
+ * Custom JSON replacer that converts BigInt values to strings for serialization
37059
+ * This ensures deterministic cache key generation for EIP-712 typed data
36911
37060
  *
36912
37061
  * @param _key - The object key being serialized (unused)
36913
37062
  * @param value - The value to serialize
36914
- * @returns The serialized value with sorted keys for objects
37063
+ * @returns The serialized value
36915
37064
  */
36916
- private static deterministicReplacer;
37065
+ private static bigIntReplacer;
36917
37066
  }
36918
37067
  /**
36919
37068
  * Wrapper function to cache signature operations
@@ -37145,317 +37294,27 @@ declare class CircuitBreaker {
37145
37294
  reset(): void;
37146
37295
  }
37147
37296
 
37148
- /**
37149
- * Browser implementation of the Vana Platform Adapter using Uint8Array
37150
- *
37151
- * This implementation uses browser-compatible libraries and native APIs
37152
- * without requiring Buffer or other Node.js polyfills.
37153
- */
37154
-
37155
- /**
37156
- * Browser implementation of crypto operations using Uint8Array
37157
- */
37158
- declare class BrowserCryptoAdapter implements VanaCryptoAdapter {
37159
- private eciesProvider;
37160
- private walletKeyEncryptionService;
37161
- encryptWithPublicKey(data: string, publicKeyHex: string): Promise<string>;
37162
- decryptWithPrivateKey(encryptedData: string, privateKeyHex: string): Promise<string>;
37163
- encryptWithWalletPublicKey(data: string, publicKey: string): Promise<string>;
37164
- decryptWithWalletPrivateKey(encryptedData: string, privateKey: string): Promise<string>;
37165
- generateKeyPair(): Promise<{
37166
- privateKey: string;
37167
- publicKey: string;
37168
- }>;
37169
- encryptWithPassword(data: Uint8Array, password: string): Promise<Uint8Array>;
37170
- decryptWithPassword(encryptedData: Uint8Array, password: string): Promise<Uint8Array>;
37171
- }
37172
- /**
37173
- * Browser implementation of PGP operations
37174
- */
37175
- declare class BrowserPGPAdapter implements VanaPGPAdapter {
37176
- encrypt(data: string, publicKeyArmored: string): Promise<string>;
37177
- decrypt(encryptedData: string, privateKeyArmored: string): Promise<string>;
37178
- generateKeyPair(options?: {
37179
- name?: string;
37180
- email?: string;
37181
- passphrase?: string;
37182
- }): Promise<{
37183
- publicKey: string;
37184
- privateKey: string;
37185
- }>;
37186
- }
37187
- /**
37188
- * Browser implementation of HTTP operations using Fetch API
37189
- */
37190
- declare class BrowserHttpAdapter implements VanaHttpAdapter {
37191
- fetch(url: string, options?: RequestInit): Promise<Response>;
37192
- }
37193
- /**
37194
- * Browser implementation of caching using sessionStorage for security
37195
- * SessionStorage is cleared when the tab closes, making it more secure for signature caching
37196
- */
37197
- declare class BrowserCacheAdapter implements VanaCacheAdapter {
37198
- private readonly prefix;
37199
- get(key: string): string | null;
37200
- set(key: string, value: string): void;
37201
- delete(key: string): void;
37202
- clear(): void;
37203
- }
37204
37297
  /**
37205
37298
  * Browser implementation of the Vana Platform Adapter
37206
37299
  *
37207
- * This adapter provides all platform-specific functionality for browser environments
37208
- * without requiring any Node.js polyfills.
37209
- */
37210
- declare class BrowserPlatformAdapter implements VanaPlatformAdapter {
37211
- readonly crypto: BrowserCryptoAdapter;
37212
- readonly pgp: BrowserPGPAdapter;
37213
- readonly http: BrowserHttpAdapter;
37214
- readonly cache: BrowserCacheAdapter;
37215
- readonly platform: "browser";
37216
- }
37217
-
37218
- /**
37219
- * ECIES (Elliptic Curve Integrated Encryption Scheme) Interface
37220
- *
37221
- * @remarks
37222
- * Defines the contract for platform-specific ECIES implementations.
37223
- * All implementations maintain compatibility with the eccrypto format to ensure
37224
- * backward compatibility with existing encrypted data.
37225
- *
37226
- * **Format specification:**
37227
- * `[iv (16 bytes)][ephemPublicKey (65 bytes)][ciphertext (variable)][mac (32 bytes)]`
37300
+ * This implementation uses browser-compatible libraries and configurations
37301
+ * to provide crypto, PGP, and HTTP functionality without Node.js dependencies.
37228
37302
  *
37229
- * @category Cryptography
37303
+ * WARNING: Dependencies that access globals during init
37304
+ * MUST be dynamically imported to support Turbopack.
37305
+ * See: https://github.com/vercel/next.js/issues/82632
37230
37306
  */
37231
- /**
37232
- * Represents ECIES encrypted data in eccrypto-compatible format.
37233
- *
37234
- * @remarks
37235
- * This structure maintains backward compatibility with data encrypted using
37236
- * the legacy eccrypto library.
37237
- */
37238
- interface ECIESEncrypted {
37239
- /** Initialization vector (16 bytes) */
37240
- iv: Uint8Array;
37241
- /** Ephemeral public key (65 bytes uncompressed) */
37242
- ephemPublicKey: Uint8Array;
37243
- /** Encrypted data */
37244
- ciphertext: Uint8Array;
37245
- /** Message authentication code (32 bytes) */
37246
- mac: Uint8Array;
37247
- }
37248
- /**
37249
- * Provides ECIES encryption and decryption operations.
37250
- *
37251
- * @remarks
37252
- * Platform-specific implementations handle the underlying cryptographic primitives
37253
- * while maintaining consistent data format across environments.
37254
- *
37255
- * @category Cryptography
37256
- */
37257
- interface ECIESProvider {
37258
- /**
37259
- * Encrypts data using ECIES with secp256k1.
37260
- *
37261
- * @param publicKey - Recipient's public key (65 bytes uncompressed or 33 bytes compressed).
37262
- * Obtain via `vana.server.getIdentity(userAddress).public_key`.
37263
- * @param message - Data to encrypt.
37264
- * @returns Encrypted data structure compatible with eccrypto format.
37265
- * @throws {ECIESError} When public key is invalid.
37266
- * Verify key format matches secp256k1 requirements.
37267
- *
37268
- * @example
37269
- * ```typescript
37270
- * const encrypted = await provider.encrypt(
37271
- * hexToBytes(publicKey),
37272
- * new TextEncoder().encode('sensitive data')
37273
- * );
37274
- * ```
37275
- */
37276
- encrypt(publicKey: Uint8Array, message: Uint8Array): Promise<ECIESEncrypted>;
37277
- /**
37278
- * Decrypts ECIES encrypted data.
37279
- *
37280
- * @param privateKey - Recipient's private key (32 bytes).
37281
- * @param encrypted - Encrypted data structure from `encrypt()` or legacy eccrypto.
37282
- * @returns Decrypted message as Uint8Array.
37283
- * @throws {ECIESError} When MAC verification fails.
37284
- * Ensure the private key matches the public key used for encryption.
37285
- *
37286
- * @example
37287
- * ```typescript
37288
- * const decrypted = await provider.decrypt(
37289
- * hexToBytes(privateKey),
37290
- * encrypted
37291
- * );
37292
- * const message = new TextDecoder().decode(decrypted);
37293
- * ```
37294
- */
37295
- decrypt(privateKey: Uint8Array, encrypted: ECIESEncrypted): Promise<Uint8Array>;
37296
- }
37297
37307
 
37298
37308
  /**
37299
- * Provides shared ECIES encryption logic across platforms using Uint8Array.
37300
- *
37301
- * @remarks
37302
- * Platform implementations extend this class and provide crypto primitives.
37303
- * The base class handles the ECIES protocol flow while maintaining
37304
- * compatibility with the eccrypto data format.
37305
- *
37306
- * **Implementation details:**
37307
- * - KDF: SHA-512(shared_secret) → encKey (32B) || macKey (32B)
37308
- * - Cipher: AES-256-CBC with random 16-byte IV
37309
- * - MAC: HMAC-SHA256(macKey, iv || ephemPublicKey || ciphertext)
37310
- *
37311
- * @category Cryptography
37309
+ * Complete browser platform adapter implementation
37312
37310
  */
37313
- declare abstract class BaseECIESUint8 implements ECIESProvider {
37314
- private static readonly validatedKeys;
37315
- /**
37316
- * Generates cryptographically secure random bytes.
37317
- *
37318
- * @param length - Number of random bytes to generate.
37319
- * @returns Random bytes array.
37320
- */
37321
- protected abstract generateRandomBytes(length: number): Uint8Array;
37322
- /**
37323
- * Verifies a private key is valid for secp256k1.
37324
- *
37325
- * @param privateKey - Private key to verify (32 bytes).
37326
- * @returns `true` if valid private key.
37327
- */
37328
- protected abstract verifyPrivateKey(privateKey: Uint8Array): boolean;
37329
- /**
37330
- * Creates a public key from a private key.
37331
- *
37332
- * @param privateKey - Source private key (32 bytes).
37333
- * @param compressed - Generate compressed (33B) or uncompressed (65B) format.
37334
- * @returns Public key or `null` if creation failed.
37335
- */
37336
- protected abstract createPublicKey(privateKey: Uint8Array, compressed: boolean): Uint8Array | null;
37337
- /**
37338
- * Validates a public key on the secp256k1 curve.
37339
- *
37340
- * @param publicKey - Public key to validate.
37341
- * @returns `true` if valid public key.
37342
- */
37343
- protected abstract validatePublicKey(publicKey: Uint8Array): boolean;
37344
- /**
37345
- * Decompresses a compressed public key.
37346
- *
37347
- * @param publicKey - Compressed public key (33 bytes).
37348
- * @returns Uncompressed public key (65 bytes) or `null` if decompression failed.
37349
- */
37350
- protected abstract decompressPublicKey(publicKey: Uint8Array): Uint8Array | null;
37351
- /**
37352
- * Performs ECDH key agreement.
37353
- *
37354
- * @param publicKey - Other party's public key.
37355
- * @param privateKey - Your private key.
37356
- * @returns Raw X coordinate of shared point (32 bytes).
37357
- */
37358
- protected abstract performECDH(publicKey: Uint8Array, privateKey: Uint8Array): Uint8Array;
37359
- /**
37360
- * Computes SHA-512 hash.
37361
- *
37362
- * @param data - Data to hash.
37363
- * @returns SHA-512 hash (64 bytes).
37364
- */
37365
- protected abstract sha512(data: Uint8Array): Uint8Array;
37366
- /**
37367
- * Computes HMAC-SHA256 authentication tag.
37368
- *
37369
- * @param key - HMAC key.
37370
- * @param data - Data to authenticate.
37371
- * @returns HMAC-SHA256 (32 bytes).
37372
- */
37373
- protected abstract hmacSha256(key: Uint8Array, data: Uint8Array): Uint8Array;
37374
- /**
37375
- * Encrypts data using AES-256-CBC.
37376
- *
37377
- * @param key - Encryption key (32 bytes).
37378
- * @param iv - Initialization vector (16 bytes).
37379
- * @param plaintext - Data to encrypt.
37380
- * @returns Ciphertext with PKCS#7 padding.
37381
- */
37382
- protected abstract aesEncrypt(key: Uint8Array, iv: Uint8Array, plaintext: Uint8Array): Promise<Uint8Array>;
37383
- /**
37384
- * Decrypts data using AES-256-CBC.
37385
- *
37386
- * @param key - Decryption key (32 bytes).
37387
- * @param iv - Initialization vector (16 bytes).
37388
- * @param ciphertext - Data to decrypt.
37389
- * @returns Plaintext with padding removed.
37390
- */
37391
- protected abstract aesDecrypt(key: Uint8Array, iv: Uint8Array, ciphertext: Uint8Array): Promise<Uint8Array>;
37392
- /**
37393
- * Normalizes a public key to uncompressed format.
37394
- *
37395
- * @param publicKey - Public key in any format.
37396
- * @returns Uncompressed public key (65 bytes).
37397
- * @throws {ECIESError} If key format is invalid.
37398
- */
37399
- protected normalizePublicKey(publicKey: Uint8Array): Uint8Array;
37400
- /**
37401
- * Encrypts data using ECIES.
37402
- *
37403
- * @param publicKey - The recipient's public key (compressed or uncompressed)
37404
- * @param message - The data to encrypt
37405
- * @returns Promise resolving to encrypted data structure
37406
- */
37407
- encrypt(publicKey: Uint8Array, message: Uint8Array): Promise<ECIESEncrypted>;
37408
- /**
37409
- * Decrypts ECIES encrypted data.
37410
- *
37411
- * @param privateKey - The recipient's private key (32 bytes)
37412
- * @param encrypted - The encrypted data structure from encrypt()
37413
- * @returns Promise resolving to the original plaintext
37414
- */
37415
- decrypt(privateKey: Uint8Array, encrypted: ECIESEncrypted): Promise<Uint8Array>;
37416
- /**
37417
- * Clears sensitive data from memory using multi-pass overwrite.
37418
- *
37419
- * @remarks
37420
- * Uses multiple passes with different patterns to make it harder
37421
- * for JIT compilers to optimize away the operation. While not
37422
- * guaranteed in JavaScript, this is a best-effort approach to
37423
- * clear sensitive data from memory.
37424
- *
37425
- * @param buffer - The buffer to clear
37426
- */
37427
- protected clearBuffer(buffer: Uint8Array): void;
37428
- }
37429
-
37430
- /**
37431
- * Browser implementation of ECIES using @noble/secp256k1 with Uint8Array
37432
- *
37433
- * @remarks
37434
- * Uses native browser crypto APIs and @noble/secp256k1 for elliptic curve operations.
37435
- * This implementation is polyfill-free and works in all modern browsers.
37436
- */
37437
-
37438
- /**
37439
- * Browser-specific ECIES provider using @noble/secp256k1
37440
- *
37441
- * @remarks
37442
- * This implementation uses:
37443
- * - Web Crypto API for AES operations
37444
- * - @noble/secp256k1 for elliptic curve operations
37445
- * - @noble/hashes for SHA and HMAC operations
37446
- * - No Buffer or Node.js dependencies
37447
- */
37448
- declare class BrowserECIESUint8Provider extends BaseECIESUint8 {
37449
- protected generateRandomBytes(length: number): Uint8Array;
37450
- protected verifyPrivateKey(privateKey: Uint8Array): boolean;
37451
- protected createPublicKey(privateKey: Uint8Array, compressed: boolean): Uint8Array | null;
37452
- protected validatePublicKey(publicKey: Uint8Array): boolean;
37453
- protected decompressPublicKey(publicKey: Uint8Array): Uint8Array | null;
37454
- protected performECDH(publicKey: Uint8Array, privateKey: Uint8Array): Uint8Array;
37455
- protected sha512(data: Uint8Array): Uint8Array;
37456
- protected hmacSha256(key: Uint8Array, data: Uint8Array): Uint8Array;
37457
- protected aesEncrypt(key: Uint8Array, iv: Uint8Array, plaintext: Uint8Array): Promise<Uint8Array>;
37458
- protected aesDecrypt(key: Uint8Array, iv: Uint8Array, ciphertext: Uint8Array): Promise<Uint8Array>;
37311
+ declare class BrowserPlatformAdapter implements VanaPlatformAdapter {
37312
+ crypto: VanaCryptoAdapter;
37313
+ pgp: VanaPGPAdapter;
37314
+ http: VanaHttpAdapter;
37315
+ cache: VanaCacheAdapter;
37316
+ platform: "browser";
37317
+ constructor();
37459
37318
  }
37460
37319
 
37461
37320
  /**
@@ -37783,4 +37642,4 @@ declare function Vana(config: VanaConfig): VanaBrowserImpl;
37783
37642
  */
37784
37643
  type VanaInstance = VanaBrowserImpl;
37785
37644
 
37786
- export { type $defs, type APIResponse, type AddAndTrustServerInput, type AddAndTrustServerParams, type AddAndTrustServerTypedData, type AddRefinerParams, type AddRefinerResult, type AddSchemaParams, type AddSchemaResult, type AllKeys, ApiClient, type ApiClientConfig, type ApiResponse, AsyncQueue, type AsyncResult, type AuthenticationErrorResponse, type Awaited, type BaseConfig, type BaseConfigWithStorage, BaseController, type BatchServerInfoResult, type BatchUploadParams, type BatchUploadResult, type BlockRange, BlockchainError, type BlockchainErrorResponse, type Brand, BrowserECIESUint8Provider as BrowserECIESProvider, BrowserPlatformAdapter, type Cache, type CacheConfig, CallbackStorage, type ChainConfig, type ChainConfigWithStorage, type CheckPermissionParams, CircuitBreaker, type CompleteSchema, type ComputeErrorResponse, type ConditionalOptional, type ConfigValidationOptions, type ConfigValidationResult, type ContractAddresses, type ContractCall, type ContractDeployment, ContractFactory, type ContractInfo, type ContractMethodParams, type ContractMethodReturnType, ContractNotFoundError, type Controller, type ControllerContext, type CreateOperationParams, type CreateOperationRequest, type CreateOperationResponse, type CreateSchemaParams, type CreateSchemaResult, DEFAULT_ENCRYPTION_SEED, DEFAULT_IPFS_GATEWAY, DataController, type DataSchema, type DecryptionErrorResponse, type DeepPartial, type DeepReadonly, type DeleteFileParams, type DeleteFileResult, type DownloadFileParams, type DownloadFileResult, type EncryptedUploadParams, type EncryptionInfo, type ErrorResponse, EventEmitter, type EventFilter, type EventLog, type Factory, type FileAccessErrorResponse, type FileAccessPermissions, type FileMetadata, type FilePermissionParams, type FileSharingConfig, type GasEstimate, type GenericRequest, type GenericResponse, type GenericTypedData, type GetFileParams, type GetOperationResponse, type GetUserFilesParams, type GetUserPermissionsOptions, type GetUserTrustedServersParams, GoogleDriveStorage, GrantExpiredError, type GrantFile, type GrantPermissionParams, GrantSchemaError, GrantValidationError, type GrantValidationErrorResponse, type GrantValidationOptions, type GrantValidationResult, type GrantedPermission, type Grantee, type GranteeInfo, GranteeMismatchError, type GranteeQueryOptions, type HttpMethod, IPFS_GATEWAYS, type IdentityResponseModel, type InitPersonalServerParams, type InternalServerErrorResponse, InvalidConfigurationError, IpfsStorage, type LegacyPermissionParams, type MaybeArray, type MaybePromise, MemoryCache, type Middleware, MiddlewarePipeline, NetworkError, type NetworkInfo, type Nominal, type NonNullable, NonceError, type NotFoundErrorResponse, type Observable, type Observer, type OmitByType, type OnChainPermissionGrant, type OperationErrorResponse, OperationNotAllowedError, type OptionalKeys, type PaginatedGrantees, type PaginatedTrustedServers, type PaginationParams, type PaginationResult, type PartialExcept, type Permission, type PermissionAnalytics, type PermissionCheckResult, PermissionError, type PermissionEvent, type PermissionGrantDomain, type PermissionGrantMessage, type PermissionGrantTypedData, type PermissionInfo, type PermissionInputMessage, type PermissionOperation, type PermissionQueryResult, type PermissionStatus, PermissionsController, PersonalServerError, type PersonalServerIdentity, type PersonalServerModel, 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 RegisterGranteeInput, type RegisterGranteeParams, type RegisterGranteeTypedData, 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 ReplicateStatus, type Repository, type RequestOptions, type RequireKeys, type RequiredExcept, type RetryConfig, RetryUtility, type RevokePermissionInput, type RevokePermissionParams, type RuntimeConfig, type Schema, type SchemaMetadata, SchemaValidationError, SchemaValidator, SerializationError, type Server, type components as ServerComponents, ServerController, type $defs as ServerDefs, type ServerFilesAndPermissionParams, type ServerFilesAndPermissionTypedData, type ServerInfo, type operations as ServerOperations, type paths as ServerPaths, type ServerTrustStatus, ServerUrlMismatchError, type webhooks as ServerWebhooks, type Service, SignatureCache, SignatureError, type SimplifiedPermissionMessage, type StateMachine, type StatusInfo, type StorageCallbacks, type StorageConfig, type StorageDownloadOptions, StorageError, type StorageFile, type StorageListOptions, type StorageListResult, StorageManager, type StorageProvider, type StorageProviderConfig, type StorageRequiredMarker, type StorageUploadResult, type TimeRange, TransactionHandle, type TransactionOptions, type TransactionReceipt, type Transformer, type TrustServerInput, type TrustServerParams, type TrustServerTypedData, type TrustedServer, type TrustedServerInfo, type TrustedServerQueryOptions, type UnencryptedUploadParams, type UntrustServerInput, type UntrustServerParams, type UntrustServerTypedData, type UpdateSchemaIdParams, type UpdateSchemaIdResult, type UploadEncryptedFileResult, type UploadFileParams, type UploadFileResult, type UploadParams, type UploadProgress, type UploadResult, type UserFile, UserRejectedRequestError, type ValidationErrorResponse, type ValidationResult, type Validator, Vana, VanaBrowserImpl, type VanaChain, type VanaChainConfig, type VanaChainId, type VanaConfig, type VanaConfigWithStorage, type VanaContract, type VanaContract as VanaContractAbi, type VanaContractInstance, type VanaContractName, VanaCore, VanaCoreFactory, VanaError, type VanaInstance, type VanaPlatformAdapter, type WalletConfig, type WalletConfigWithStorage, __contractCache, chains, checkGrantAccess, clearContractCache, type components, convertIpfsUrl, convertIpfsUrlWithFallbacks, createAndStoreGrant, createBrowserPlatformAdapter, createGrantFile, createPlatformAdapterSafe, createValidatedGrant, decryptBlobWithSignedKey, decryptWithPrivateKey, decryptWithWalletPrivateKey, Vana as default, detectPlatform, encryptBlobWithSignedKey, encryptFileKey, encryptWithWalletPublicKey, extractIpfsHash, fetchAndValidateSchema, fetchWithFallbacks, formatEth, formatNumber, formatToken, generateEncryptionKey, generateEncryptionKeyPair, generatePGPKeyPair, getAbi, getAllChains, getChainConfig, getContractAddress, getContractController, getContractInfo, getEncryptionParameters, getGatewayUrls, getGrantFileHash, getGrantTimeRemaining, getPlatformCapabilities, hasStorageConfig, isAPIResponse, isChainConfig, isGrantExpired, isIpfsUrl, isPlatformSupported, isReplicateAPIResponse, isVanaChain, isVanaChainId, isWalletConfig, moksha, mokshaTestnet, type operations, parseReplicateOutput, type paths, retrieveAndValidateGrant, retrieveGrantFile, safeParseJSON, schemaValidator, shortenAddress, storeGrantFile, summarizeGrant, validateDataAgainstSchema, validateDataSchema, validateGrant, validateGrantExpiry, validateGrantFile, validateGranteeAccess, validateOperationAccess, vanaMainnet, type webhooks, withSignatureCache };
37645
+ export { type $defs, type APIResponse, type AddAndTrustServerInput, type AddAndTrustServerParams, type AddAndTrustServerTypedData, type AddRefinerParams, type AddRefinerResult, type AddSchemaParams, type AddSchemaResult, type AllKeys, ApiClient, type ApiClientConfig, type ApiResponse, AsyncQueue, type AsyncResult, type AuthenticationErrorResponse, type Awaited, type BaseConfig, type BaseConfigWithStorage, BaseController, type BatchServerInfoResult, type BatchUploadParams, type BatchUploadResult, type BlockRange, BlockchainError, type BlockchainErrorResponse, type Brand, BrowserPlatformAdapter, type Cache, type CacheConfig, CallbackStorage, type ChainConfig, type ChainConfigWithStorage, type CheckPermissionParams, CircuitBreaker, type CompleteSchema, type ComputeErrorResponse, type ConditionalOptional, type ConfigValidationOptions, type ConfigValidationResult, type ContractAddresses, type ContractCall, type ContractDeployment, ContractFactory, type ContractInfo, type ContractMethodParams, type ContractMethodReturnType, ContractNotFoundError, type Controller, type ControllerContext, type CreateOperationParams, type CreateOperationRequest, type CreateOperationResponse, type CreateSchemaParams, type CreateSchemaResult, DEFAULT_ENCRYPTION_SEED, DEFAULT_IPFS_GATEWAY, DataController, type DataSchema, type DecryptionErrorResponse, type DeepPartial, type DeepReadonly, type DeleteFileParams, type DeleteFileResult, type DownloadFileParams, type DownloadFileResult, type EncryptedUploadParams, type EncryptionInfo, type ErrorResponse, EventEmitter, type EventFilter, type EventLog, type Factory, type FileAccessErrorResponse, type FileAccessPermissions, type FileMetadata, type FilePermissionParams, type FileSharingConfig, type GasEstimate, type GenericRequest, type GenericResponse, type GenericTypedData, type GetFileParams, type GetOperationResponse, type GetUserFilesParams, type GetUserPermissionsOptions, type GetUserTrustedServersParams, GoogleDriveStorage, GrantExpiredError, type GrantFile, type GrantPermissionParams, GrantSchemaError, GrantValidationError, type GrantValidationErrorResponse, type GrantValidationOptions, type GrantValidationResult, type GrantedPermission, type Grantee, type GranteeInfo, GranteeMismatchError, type GranteeQueryOptions, type HttpMethod, IPFS_GATEWAYS, type IdentityResponseModel, type InitPersonalServerParams, type InternalServerErrorResponse, InvalidConfigurationError, IpfsStorage, type LegacyPermissionParams, type MaybeArray, type MaybePromise, MemoryCache, type Middleware, MiddlewarePipeline, NetworkError, type NetworkInfo, type Nominal, type NonNullable, NonceError, type NotFoundErrorResponse, type Observable, type Observer, type OmitByType, type OnChainPermissionGrant, type OperationErrorResponse, OperationNotAllowedError, type OptionalKeys, type PaginatedGrantees, type PaginatedTrustedServers, type PaginationParams, type PaginationResult, type PartialExcept, type Permission, type PermissionAnalytics, type PermissionCheckResult, PermissionError, type PermissionEvent, type PermissionGrantDomain, type PermissionGrantMessage, type PermissionGrantTypedData, type PermissionInfo, type PermissionInputMessage, type PermissionOperation, type PermissionQueryResult, type PermissionStatus, PermissionsController, PersonalServerError, type PersonalServerIdentity, type PersonalServerModel, 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 RegisterGranteeInput, type RegisterGranteeParams, type RegisterGranteeTypedData, 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 ReplicateStatus, type Repository, type RequestOptions, type RequireKeys, type RequiredExcept, type RetryConfig, RetryUtility, type RevokePermissionInput, type RevokePermissionParams, type RuntimeConfig, type Schema, type SchemaMetadata, SchemaValidationError, SchemaValidator, SerializationError, type Server, type components as ServerComponents, ServerController, type $defs as ServerDefs, type ServerFilesAndPermissionParams, type ServerFilesAndPermissionTypedData, type ServerInfo, type operations as ServerOperations, type paths as ServerPaths, type ServerTrustStatus, ServerUrlMismatchError, type webhooks as ServerWebhooks, type Service, SignatureCache, SignatureError, type SimplifiedPermissionMessage, type StateMachine, type StatusInfo, type StorageCallbacks, type StorageConfig, type StorageDownloadOptions, StorageError, type StorageFile, type StorageListOptions, type StorageListResult, StorageManager, type StorageProvider, type StorageProviderConfig, type StorageRequiredMarker, type StorageUploadResult, type TimeRange, TransactionHandle, type TransactionOptions, type TransactionReceipt, type Transformer, type TrustServerInput, type TrustServerParams, type TrustServerTypedData, type TrustedServer, type TrustedServerInfo, type TrustedServerQueryOptions, type UnencryptedUploadParams, type UntrustServerInput, type UntrustServerParams, type UntrustServerTypedData, type UpdateSchemaIdParams, type UpdateSchemaIdResult, type UploadEncryptedFileResult, type UploadFileParams, type UploadFileResult, type UploadParams, type UploadProgress, type UploadResult, type UserFile, UserRejectedRequestError, type ValidationErrorResponse, type ValidationResult, type Validator, Vana, VanaBrowserImpl, type VanaChain, type VanaChainConfig, type VanaChainId, type VanaConfig, type VanaConfigWithStorage, type VanaContract, type VanaContract as VanaContractAbi, type VanaContractInstance, type VanaContractName, VanaCore, VanaCoreFactory, VanaError, type VanaInstance, type VanaPlatformAdapter, type WalletConfig, type WalletConfigWithStorage, __contractCache, chains, checkGrantAccess, clearContractCache, type components, convertIpfsUrl, convertIpfsUrlWithFallbacks, createAndStoreGrant, createBrowserPlatformAdapter, createGrantFile, createPlatformAdapterSafe, createValidatedGrant, decryptBlobWithSignedKey, decryptWithPrivateKey, decryptWithWalletPrivateKey, Vana as default, detectPlatform, encryptBlobWithSignedKey, encryptFileKey, encryptWithWalletPublicKey, extractIpfsHash, fetchAndValidateSchema, fetchWithFallbacks, formatEth, formatNumber, formatToken, generateEncryptionKey, generateEncryptionKeyPair, generatePGPKeyPair, getAbi, getAllChains, getChainConfig, getContractAddress, getContractController, getContractInfo, getEncryptionParameters, getGatewayUrls, getGrantFileHash, getGrantTimeRemaining, getPlatformCapabilities, hasStorageConfig, isAPIResponse, isChainConfig, isGrantExpired, isIpfsUrl, isPlatformSupported, isReplicateAPIResponse, isVanaChain, isVanaChainId, isWalletConfig, moksha, mokshaTestnet, type operations, parseReplicateOutput, type paths, retrieveAndValidateGrant, retrieveGrantFile, safeParseJSON, schemaValidator, shortenAddress, storeGrantFile, summarizeGrant, validateDataAgainstSchema, validateDataSchemaAgainstMetaSchema, validateGrant, validateGrantExpiry, validateGrantFile, validateGranteeAccess, validateOperationAccess, vanaMainnet, type webhooks, withSignatureCache };