@opendatalabs/vana-sdk 0.1.0-alpha.606fa2d → 0.1.0-alpha.64b26ef

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 +258 -350
  19. package/dist/index.browser.js +696 -869
  20. package/dist/index.browser.js.map +1 -1
  21. package/dist/index.node.cjs +734 -1018
  22. package/dist/index.node.cjs.map +1 -1
  23. package/dist/index.node.d.cts +262 -109
  24. package/dist/index.node.d.ts +262 -109
  25. package/dist/index.node.js +736 -1032
  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 [{
@@ -5420,6 +5451,16 @@ declare const contractAbis: {
5420
5451
  }];
5421
5452
  readonly name: "Upgraded";
5422
5453
  readonly type: "event";
5454
+ }, {
5455
+ readonly inputs: readonly [];
5456
+ readonly name: "DATA_PORTABILITY_ROLE";
5457
+ readonly outputs: readonly [{
5458
+ readonly internalType: "bytes32";
5459
+ readonly name: "";
5460
+ readonly type: "bytes32";
5461
+ }];
5462
+ readonly stateMutability: "view";
5463
+ readonly type: "function";
5423
5464
  }, {
5424
5465
  readonly inputs: readonly [];
5425
5466
  readonly name: "DEFAULT_ADMIN_ROLE";
@@ -5492,6 +5533,33 @@ declare const contractAbis: {
5492
5533
  readonly outputs: readonly [];
5493
5534
  readonly stateMutability: "nonpayable";
5494
5535
  readonly type: "function";
5536
+ }, {
5537
+ readonly inputs: readonly [{
5538
+ readonly internalType: "uint256";
5539
+ readonly name: "fileId";
5540
+ readonly type: "uint256";
5541
+ }, {
5542
+ readonly components: readonly [{
5543
+ readonly internalType: "address";
5544
+ readonly name: "account";
5545
+ readonly type: "address";
5546
+ }, {
5547
+ readonly internalType: "string";
5548
+ readonly name: "key";
5549
+ readonly type: "string";
5550
+ }];
5551
+ readonly internalType: "struct IDataRegistry.Permission[]";
5552
+ readonly name: "permissions";
5553
+ readonly type: "tuple[]";
5554
+ }, {
5555
+ readonly internalType: "uint256";
5556
+ readonly name: "schemaId";
5557
+ readonly type: "uint256";
5558
+ }];
5559
+ readonly name: "addFilePermissionsAndSchema";
5560
+ readonly outputs: readonly [];
5561
+ readonly stateMutability: "nonpayable";
5562
+ readonly type: "function";
5495
5563
  }, {
5496
5564
  readonly inputs: readonly [{
5497
5565
  readonly internalType: "string";
@@ -5656,6 +5724,16 @@ declare const contractAbis: {
5656
5724
  }];
5657
5725
  readonly stateMutability: "view";
5658
5726
  readonly type: "function";
5727
+ }, {
5728
+ readonly inputs: readonly [];
5729
+ readonly name: "emitLegacyEvents";
5730
+ readonly outputs: readonly [{
5731
+ readonly internalType: "bool";
5732
+ readonly name: "";
5733
+ readonly type: "bool";
5734
+ }];
5735
+ readonly stateMutability: "view";
5736
+ readonly type: "function";
5659
5737
  }, {
5660
5738
  readonly inputs: readonly [{
5661
5739
  readonly internalType: "string";
@@ -5774,6 +5852,10 @@ declare const contractAbis: {
5774
5852
  readonly internalType: "string";
5775
5853
  readonly name: "url";
5776
5854
  readonly type: "string";
5855
+ }, {
5856
+ readonly internalType: "uint256";
5857
+ readonly name: "schemaId";
5858
+ readonly type: "uint256";
5777
5859
  }, {
5778
5860
  readonly internalType: "uint256";
5779
5861
  readonly name: "addedAtBlock";
@@ -5991,6 +6073,16 @@ declare const contractAbis: {
5991
6073
  readonly outputs: readonly [];
5992
6074
  readonly stateMutability: "nonpayable";
5993
6075
  readonly type: "function";
6076
+ }, {
6077
+ readonly inputs: readonly [{
6078
+ readonly internalType: "bool";
6079
+ readonly name: "newEmitLegacyEvents";
6080
+ readonly type: "bool";
6081
+ }];
6082
+ readonly name: "updateEmitLegacyEvents";
6083
+ readonly outputs: readonly [];
6084
+ readonly stateMutability: "nonpayable";
6085
+ readonly type: "function";
5994
6086
  }, {
5995
6087
  readonly inputs: readonly [{
5996
6088
  readonly internalType: "address";
@@ -28839,19 +28931,19 @@ declare const EVENT_MAPPINGS: {
28839
28931
  };
28840
28932
  readonly addFile: {
28841
28933
  readonly contract: "DataRegistry";
28842
- readonly event: "FileAdded";
28934
+ readonly event: "FileAddedV2";
28843
28935
  };
28844
28936
  readonly addFileWithPermissionsAndSchema: {
28845
28937
  readonly contract: "DataRegistry";
28846
- readonly event: "FileAdded";
28938
+ readonly event: "FileAddedV2";
28847
28939
  };
28848
28940
  readonly addFileWithSchema: {
28849
28941
  readonly contract: "DataRegistry";
28850
- readonly event: "FileAdded";
28942
+ readonly event: "FileAddedV2";
28851
28943
  };
28852
28944
  readonly addFileWithPermissions: {
28853
28945
  readonly contract: "DataRegistry";
28854
- readonly event: "FileAdded";
28946
+ readonly event: "FileAddedV2";
28855
28947
  };
28856
28948
  readonly addRefinement: {
28857
28949
  readonly contract: "DataRegistry";
@@ -31630,16 +31722,16 @@ declare class SchemaValidationError extends Error {
31630
31722
  }>);
31631
31723
  }
31632
31724
  /**
31633
- * Schema validation utility class
31725
+ * Data schema validation utility class
31634
31726
  */
31635
31727
  declare class SchemaValidator {
31636
31728
  private ajv;
31637
31729
  private dataSchemaValidator;
31638
31730
  constructor();
31639
31731
  /**
31640
- * Validates a data schema against the Vana meta-schema
31732
+ * Validates a data schema definition against the Vana meta-schema
31641
31733
  *
31642
- * @param schema - The data schema to validate
31734
+ * @param schema - The data schema definition to validate
31643
31735
  * @throws SchemaValidationError if invalid
31644
31736
  * @example
31645
31737
  * ```typescript
@@ -31658,15 +31750,15 @@ declare class SchemaValidator {
31658
31750
  * }
31659
31751
  * };
31660
31752
  *
31661
- * validator.validateDataSchema(schema); // throws if invalid
31753
+ * validator.validateDataSchemaAgainstMetaSchema(schema); // throws if invalid
31662
31754
  * ```
31663
31755
  */
31664
- validateDataSchema(schema: unknown): asserts schema is DataSchema;
31756
+ validateDataSchemaAgainstMetaSchema(schema: unknown): asserts schema is DataSchema;
31665
31757
  /**
31666
- * Validates data against a JSON Schema from a schema
31758
+ * Validates data against a JSON Schema
31667
31759
  *
31668
31760
  * @param data - The data to validate
31669
- * @param schema - The schema containing the validation rules (DataSchema or Schema)
31761
+ * @param schema - The schema containing the validation rules (must have been validated or fetched from chain)
31670
31762
  * @throws SchemaValidationError if invalid
31671
31763
  * @example
31672
31764
  * ```typescript
@@ -31676,13 +31768,13 @@ declare class SchemaValidator {
31676
31768
  * const schema = await vana.schemas.get(1);
31677
31769
  * validator.validateDataAgainstSchema(userData, schema);
31678
31770
  *
31679
- * // Also works with DataSchema object
31680
- * const dataSchema: DataSchema = {
31771
+ * // Also works with pre-validated DataSchema object
31772
+ * const dataSchema = validator.validateDataSchemaAgainstMetaSchema({
31681
31773
  * name: "User Profile",
31682
31774
  * version: "1.0.0",
31683
31775
  * dialect: "json",
31684
31776
  * schema: { type: "object", properties: { name: { type: "string" } } }
31685
- * };
31777
+ * });
31686
31778
  * validator.validateDataAgainstSchema(userData, dataSchema);
31687
31779
  * ```
31688
31780
  */
@@ -31697,9 +31789,9 @@ declare class SchemaValidator {
31697
31789
  */
31698
31790
  validateSQLiteDDL(ddl: string, dialectVersion?: string): void;
31699
31791
  /**
31700
- * Fetches and validates a schema from a URL
31792
+ * Fetches and validates a data schema from a URL
31701
31793
  *
31702
- * @param url - The URL to fetch the schema from
31794
+ * @param url - The URL to fetch the data schema from
31703
31795
  * @returns The validated data schema
31704
31796
  * @throws SchemaValidationError if invalid or fetch fails
31705
31797
  * @example
@@ -31715,13 +31807,24 @@ declare class SchemaValidator {
31715
31807
  */
31716
31808
  declare const schemaValidator: SchemaValidator;
31717
31809
  /**
31718
- * Convenience function to validate a data schema
31810
+ * Convenience function to validate a data schema definition against the Vana meta-schema
31719
31811
  *
31720
- * @param schema - The data schema to validate
31721
- * @returns void - Assertion function that doesn't return a value
31812
+ * @param schema - The data schema definition to validate
31813
+ * @returns The validated DataSchema
31722
31814
  * @throws SchemaValidationError if invalid
31815
+ * @example
31816
+ * ```typescript
31817
+ * const schemaDefinition = {
31818
+ * name: "User Profile",
31819
+ * version: "1.0.0",
31820
+ * dialect: "json",
31821
+ * schema: { type: "object", properties: { name: { type: "string" } } }
31822
+ * };
31823
+ *
31824
+ * const validatedSchema = validateDataSchemaAgainstMetaSchema(schemaDefinition);
31825
+ * ```
31723
31826
  */
31724
- declare function validateDataSchema(schema: unknown): asserts schema is DataSchema;
31827
+ declare function validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
31725
31828
  /**
31726
31829
  * Convenience function to validate data against a schema
31727
31830
  *
@@ -31732,9 +31835,9 @@ declare function validateDataSchema(schema: unknown): asserts schema is DataSche
31732
31835
  */
31733
31836
  declare function validateDataAgainstSchema(data: unknown, schema: DataSchema | Schema): void;
31734
31837
  /**
31735
- * Convenience function to fetch and validate a schema from a URL
31838
+ * Convenience function to fetch and validate a data schema from a URL
31736
31839
  *
31737
- * @param url - The URL to fetch the schema from
31840
+ * @param url - The URL to fetch the data schema from
31738
31841
  * @returns The validated data schema
31739
31842
  * @throws SchemaValidationError if invalid or fetch fails
31740
31843
  */
@@ -34225,6 +34328,89 @@ declare class DataController {
34225
34328
  owner: Address;
34226
34329
  subgraphUrl?: string;
34227
34330
  }): Promise<UserFile$1[]>;
34331
+ /**
34332
+ * Fetches proof data for multiple files from the subgraph.
34333
+ *
34334
+ * @private
34335
+ * @param fileIds - Array of file IDs to fetch proofs for
34336
+ * @param subgraphUrl - The subgraph endpoint URL
34337
+ * @returns Map of file IDs to their associated DLP IDs
34338
+ */
34339
+ private _fetchProofsFromSubgraph;
34340
+ /**
34341
+ * Fetches proof data for multiple files from the blockchain.
34342
+ * Falls back to this when subgraph is unavailable.
34343
+ *
34344
+ * @private
34345
+ * @param fileIds - Array of file IDs to fetch proofs for
34346
+ * @returns Map of file IDs to their associated DLP IDs
34347
+ */
34348
+ private _fetchProofsFromChain;
34349
+ /**
34350
+ * Retrieves information about a specific Data Liquidity Pool (DLP).
34351
+ *
34352
+ * @remarks
34353
+ * DLPs are entities that process and verify data files in the Vana network.
34354
+ * This method fetches DLP metadata including name, status, and performance rating.
34355
+ * Uses subgraph first for efficiency, falls back to chain if unavailable.
34356
+ *
34357
+ * @param dlpId - The unique identifier of the DLP
34358
+ * @param options - Optional parameters
34359
+ * @param options.subgraphUrl - Custom subgraph URL to override default
34360
+ * @returns Promise resolving to DLP information
34361
+ * @throws {Error} When DLP cannot be found - "DLP not found: {dlpId}"
34362
+ * @throws {Error} When query fails - "Failed to fetch DLP: {error}"
34363
+ * @example
34364
+ * ```typescript
34365
+ * const dlp = await vana.data.getDLP(26);
34366
+ * console.log(`DLP ${dlp.name}: ${dlp.status}`);
34367
+ * ```
34368
+ */
34369
+ getDLP(dlpId: number, options?: {
34370
+ subgraphUrl?: string;
34371
+ }): Promise<{
34372
+ id: number;
34373
+ name: string;
34374
+ metadata?: string;
34375
+ status?: number;
34376
+ address?: Address;
34377
+ owner?: Address;
34378
+ }>;
34379
+ /**
34380
+ * Lists all Data Liquidity Pools (DLPs) with optional pagination.
34381
+ *
34382
+ * @remarks
34383
+ * Fetches a paginated list of all DLPs registered in the network.
34384
+ * Uses subgraph for efficient querying with fallback to chain multicall.
34385
+ *
34386
+ * @param options - Optional parameters for pagination and filtering
34387
+ * @param options.limit - Maximum number of DLPs to return (default: 100)
34388
+ * @param options.offset - Number of DLPs to skip (default: 0)
34389
+ * @param options.subgraphUrl - Custom subgraph URL to override default
34390
+ * @returns Promise resolving to array of DLP information
34391
+ * @throws {Error} When query fails - "Failed to list DLPs: {error}"
34392
+ * @example
34393
+ * ```typescript
34394
+ * // Get first 10 DLPs
34395
+ * const dlps = await vana.data.listDLPs({ limit: 10 });
34396
+ * dlps.forEach(dlp => console.log(`${dlp.id}: ${dlp.name}`));
34397
+ *
34398
+ * // Get next page
34399
+ * const nextPage = await vana.data.listDLPs({ limit: 10, offset: 10 });
34400
+ * ```
34401
+ */
34402
+ listDLPs(options?: {
34403
+ limit?: number;
34404
+ offset?: number;
34405
+ subgraphUrl?: string;
34406
+ }): Promise<Array<{
34407
+ id: number;
34408
+ name: string;
34409
+ metadata?: string;
34410
+ status?: number;
34411
+ address?: Address;
34412
+ owner?: Address;
34413
+ }>>;
34228
34414
  /**
34229
34415
  * Retrieves a list of permissions granted by a user.
34230
34416
  *
@@ -34617,19 +34803,31 @@ declare class DataController {
34617
34803
  */
34618
34804
  addPermissionToFile(fileId: number, account: Address, publicKey: string): Promise<TransactionHandle<FilePermissionResult>>;
34619
34805
  /**
34620
- * Submits a file permission transaction and returns the transaction hash immediately.
34806
+ * Submits a file permission transaction to the blockchain.
34621
34807
  *
34622
- * This is the lower-level method that provides maximum control over transaction timing.
34808
+ * @remarks
34809
+ * This method supports gasless transactions via relayer callbacks when configured.
34810
+ * It encrypts the user's encryption key with the recipient's public key before submission.
34623
34811
  * Use this when you want to handle transaction confirmation and event parsing separately.
34624
34812
  *
34625
- * @param fileId - The ID of the file to add permissions for
34626
- * @param account - The address of the account to grant permission to
34627
- * @param publicKey - The public key to encrypt the user's encryption key with
34628
- * @returns Promise resolving to the transaction hash
34813
+ * @param fileId - The ID of the file to grant permission for
34814
+ * @param account - The recipient's wallet address that will access the file
34815
+ * @param publicKey - The recipient's public key for encryption.
34816
+ * Obtain via `vana.server.getIdentity(account).public_key`
34817
+ * @returns Promise resolving to TransactionHandle for tracking the transaction
34818
+ * @throws {Error} When chain ID is not available
34819
+ * @throws {Error} When encryption key generation fails
34820
+ * @throws {Error} When public key encryption fails
34821
+ *
34629
34822
  * @example
34630
34823
  * ```typescript
34631
- * const txHash = await vana.data.submitFilePermission(fileId, account, publicKey);
34632
- * console.log(`Transaction submitted: ${txHash}`);
34824
+ * const tx = await vana.data.submitFilePermission(
34825
+ * fileId,
34826
+ * "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36",
34827
+ * recipientPublicKey
34828
+ * );
34829
+ * const result = await tx.waitForEvents();
34830
+ * console.log(`Permission granted with ID: ${result.permissionId}`);
34633
34831
  * ```
34634
34832
  */
34635
34833
  submitFilePermission(fileId: number, account: Address, publicKey: string): Promise<TransactionHandle<FilePermissionResult>>;
@@ -34728,10 +34926,10 @@ declare class DataController {
34728
34926
  gateways?: string[];
34729
34927
  }): Promise<Blob>;
34730
34928
  /**
34731
- * Validates a data schema against the Vana meta-schema.
34929
+ * Validates a data schema definition against the Vana meta-schema.
34732
34930
  *
34733
- * @param schema - The data schema to validate
34734
- * @returns Assertion that schema is valid (throws if invalid)
34931
+ * @param schema - The data schema definition to validate
34932
+ * @returns The validated DataSchema
34735
34933
  * @throws SchemaValidationError if invalid
34736
34934
  * @example
34737
34935
  * ```typescript
@@ -34748,10 +34946,10 @@ declare class DataController {
34748
34946
  * }
34749
34947
  * };
34750
34948
  *
34751
- * vana.data.validateDataSchema(schema);
34949
+ * const validatedSchema = vana.data.validateDataSchemaAgainstMetaSchema(schema);
34752
34950
  * ```
34753
34951
  */
34754
- validateDataSchema(schema: unknown): asserts schema is DataSchema;
34952
+ validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
34755
34953
  /**
34756
34954
  * Validates data against a JSON Schema from a data schema.
34757
34955
  *
@@ -34781,9 +34979,9 @@ declare class DataController {
34781
34979
  */
34782
34980
  validateDataAgainstSchema(data: unknown, schema: DataSchema): void;
34783
34981
  /**
34784
- * Fetches and validates a schema from a URL, then returns the parsed data schema.
34982
+ * Fetches and validates a data schema from a URL, then returns the parsed data schema.
34785
34983
  *
34786
- * @param url - The URL to fetch the schema from
34984
+ * @param url - The URL to fetch the data schema from
34787
34985
  * @returns The validated data schema
34788
34986
  * @throws SchemaValidationError if invalid or fetch fails
34789
34987
  * @example
@@ -36887,12 +37085,12 @@ declare class SignatureCache {
36887
37085
  * Generate a deterministic hash of a message object for cache key generation
36888
37086
  *
36889
37087
  * @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.
37088
+ * Creates a consistent hash from complex objects including EIP-712 typed data.
37089
+ * Handles BigInt serialization and produces a 32-character hash that balances
37090
+ * uniqueness with key length constraints.
36893
37091
  *
36894
37092
  * @param message - The message object to hash (typically EIP-712 typed data)
36895
- * @returns A hex string hash (SHA-256) suitable for cache keys
37093
+ * @returns A 32-character hash string suitable for cache keys
36896
37094
  * @example
36897
37095
  * ```typescript
36898
37096
  * const typedData = {
@@ -36901,19 +37099,19 @@ declare class SignatureCache {
36901
37099
  * };
36902
37100
  *
36903
37101
  * const hash = SignatureCache.hashMessage(typedData);
36904
- * // Returns SHA-256 hash like: "a1b2c3d4e5f6..."
37102
+ * // Returns something like: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
36905
37103
  * ```
36906
37104
  */
36907
37105
  static hashMessage(message: object): string;
36908
37106
  /**
36909
- * Deterministic JSON replacer that handles BigInt values and sorts object keys
36910
- * This ensures consistent cache key generation for EIP-712 typed data
37107
+ * Custom JSON replacer that converts BigInt values to strings for serialization
37108
+ * This ensures deterministic cache key generation for EIP-712 typed data
36911
37109
  *
36912
37110
  * @param _key - The object key being serialized (unused)
36913
37111
  * @param value - The value to serialize
36914
- * @returns The serialized value with sorted keys for objects
37112
+ * @returns The serialized value
36915
37113
  */
36916
- private static deterministicReplacer;
37114
+ private static bigIntReplacer;
36917
37115
  }
36918
37116
  /**
36919
37117
  * Wrapper function to cache signature operations
@@ -37145,317 +37343,27 @@ declare class CircuitBreaker {
37145
37343
  reset(): void;
37146
37344
  }
37147
37345
 
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
37346
  /**
37205
37347
  * Browser implementation of the Vana Platform Adapter
37206
37348
  *
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)]`
37228
- *
37229
- * @category Cryptography
37230
- */
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.
37349
+ * This implementation uses browser-compatible libraries and configurations
37350
+ * to provide crypto, PGP, and HTTP functionality without Node.js dependencies.
37254
37351
  *
37255
- * @category Cryptography
37352
+ * WARNING: Dependencies that access globals during init
37353
+ * MUST be dynamically imported to support Turbopack.
37354
+ * See: https://github.com/vercel/next.js/issues/82632
37256
37355
  */
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
37356
 
37298
37357
  /**
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
37358
+ * Complete browser platform adapter implementation
37312
37359
  */
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>;
37360
+ declare class BrowserPlatformAdapter implements VanaPlatformAdapter {
37361
+ crypto: VanaCryptoAdapter;
37362
+ pgp: VanaPGPAdapter;
37363
+ http: VanaHttpAdapter;
37364
+ cache: VanaCacheAdapter;
37365
+ platform: "browser";
37366
+ constructor();
37459
37367
  }
37460
37368
 
37461
37369
  /**
@@ -37783,4 +37691,4 @@ declare function Vana(config: VanaConfig): VanaBrowserImpl;
37783
37691
  */
37784
37692
  type VanaInstance = VanaBrowserImpl;
37785
37693
 
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 };
37694
+ 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 };