@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";
@@ -28967,7 +29022,7 @@ interface GranteeRegisterResult extends BaseTransactionResult {
28967
29022
  }
28968
29023
  /**
28969
29024
  * Result of a successful file addition operation.
28970
- * Contains data from the FileAdded blockchain event.
29025
+ * Contains data from the FileAddedV2 blockchain event.
28971
29026
  */
28972
29027
  interface FileAddedResult extends BaseTransactionResult {
28973
29028
  /** Unique file ID assigned by the registry */
@@ -28976,6 +29031,8 @@ interface FileAddedResult extends BaseTransactionResult {
28976
29031
  ownerAddress: Address;
28977
29032
  /** URL where the file is stored */
28978
29033
  url: string;
29034
+ /** Schema ID associated with the file (0 for no schema) */
29035
+ schemaId: bigint;
28979
29036
  }
28980
29037
  /**
28981
29038
  * Result of a successful file permission addition operation.
@@ -31642,16 +31699,16 @@ declare class SchemaValidationError extends Error {
31642
31699
  }>);
31643
31700
  }
31644
31701
  /**
31645
- * Schema validation utility class
31702
+ * Data schema validation utility class
31646
31703
  */
31647
31704
  declare class SchemaValidator {
31648
31705
  private ajv;
31649
31706
  private dataSchemaValidator;
31650
31707
  constructor();
31651
31708
  /**
31652
- * Validates a data schema against the Vana meta-schema
31709
+ * Validates a data schema definition against the Vana meta-schema
31653
31710
  *
31654
- * @param schema - The data schema to validate
31711
+ * @param schema - The data schema definition to validate
31655
31712
  * @throws SchemaValidationError if invalid
31656
31713
  * @example
31657
31714
  * ```typescript
@@ -31670,15 +31727,15 @@ declare class SchemaValidator {
31670
31727
  * }
31671
31728
  * };
31672
31729
  *
31673
- * validator.validateDataSchema(schema); // throws if invalid
31730
+ * validator.validateDataSchemaAgainstMetaSchema(schema); // throws if invalid
31674
31731
  * ```
31675
31732
  */
31676
- validateDataSchema(schema: unknown): asserts schema is DataSchema;
31733
+ validateDataSchemaAgainstMetaSchema(schema: unknown): asserts schema is DataSchema;
31677
31734
  /**
31678
- * Validates data against a JSON Schema from a schema
31735
+ * Validates data against a JSON Schema
31679
31736
  *
31680
31737
  * @param data - The data to validate
31681
- * @param schema - The schema containing the validation rules (DataSchema or Schema)
31738
+ * @param schema - The schema containing the validation rules (must have been validated or fetched from chain)
31682
31739
  * @throws SchemaValidationError if invalid
31683
31740
  * @example
31684
31741
  * ```typescript
@@ -31688,13 +31745,13 @@ declare class SchemaValidator {
31688
31745
  * const schema = await vana.schemas.get(1);
31689
31746
  * validator.validateDataAgainstSchema(userData, schema);
31690
31747
  *
31691
- * // Also works with DataSchema object
31692
- * const dataSchema: DataSchema = {
31748
+ * // Also works with pre-validated DataSchema object
31749
+ * const dataSchema = validator.validateDataSchemaAgainstMetaSchema({
31693
31750
  * name: "User Profile",
31694
31751
  * version: "1.0.0",
31695
31752
  * dialect: "json",
31696
31753
  * schema: { type: "object", properties: { name: { type: "string" } } }
31697
- * };
31754
+ * });
31698
31755
  * validator.validateDataAgainstSchema(userData, dataSchema);
31699
31756
  * ```
31700
31757
  */
@@ -31709,9 +31766,9 @@ declare class SchemaValidator {
31709
31766
  */
31710
31767
  validateSQLiteDDL(ddl: string, dialectVersion?: string): void;
31711
31768
  /**
31712
- * Fetches and validates a schema from a URL
31769
+ * Fetches and validates a data schema from a URL
31713
31770
  *
31714
- * @param url - The URL to fetch the schema from
31771
+ * @param url - The URL to fetch the data schema from
31715
31772
  * @returns The validated data schema
31716
31773
  * @throws SchemaValidationError if invalid or fetch fails
31717
31774
  * @example
@@ -31727,13 +31784,24 @@ declare class SchemaValidator {
31727
31784
  */
31728
31785
  declare const schemaValidator: SchemaValidator;
31729
31786
  /**
31730
- * Convenience function to validate a data schema
31787
+ * Convenience function to validate a data schema definition against the Vana meta-schema
31731
31788
  *
31732
- * @param schema - The data schema to validate
31733
- * @returns void - Assertion function that doesn't return a value
31789
+ * @param schema - The data schema definition to validate
31790
+ * @returns The validated DataSchema
31734
31791
  * @throws SchemaValidationError if invalid
31792
+ * @example
31793
+ * ```typescript
31794
+ * const schemaDefinition = {
31795
+ * name: "User Profile",
31796
+ * version: "1.0.0",
31797
+ * dialect: "json",
31798
+ * schema: { type: "object", properties: { name: { type: "string" } } }
31799
+ * };
31800
+ *
31801
+ * const validatedSchema = validateDataSchemaAgainstMetaSchema(schemaDefinition);
31802
+ * ```
31735
31803
  */
31736
- declare function validateDataSchema(schema: unknown): asserts schema is DataSchema;
31804
+ declare function validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
31737
31805
  /**
31738
31806
  * Convenience function to validate data against a schema
31739
31807
  *
@@ -31744,9 +31812,9 @@ declare function validateDataSchema(schema: unknown): asserts schema is DataSche
31744
31812
  */
31745
31813
  declare function validateDataAgainstSchema(data: unknown, schema: DataSchema | Schema): void;
31746
31814
  /**
31747
- * Convenience function to fetch and validate a schema from a URL
31815
+ * Convenience function to fetch and validate a data schema from a URL
31748
31816
  *
31749
- * @param url - The URL to fetch the schema from
31817
+ * @param url - The URL to fetch the data schema from
31750
31818
  * @returns The validated data schema
31751
31819
  * @throws SchemaValidationError if invalid or fetch fails
31752
31820
  */
@@ -34237,6 +34305,89 @@ declare class DataController {
34237
34305
  owner: Address;
34238
34306
  subgraphUrl?: string;
34239
34307
  }): Promise<UserFile$1[]>;
34308
+ /**
34309
+ * Fetches proof data for multiple files from the subgraph.
34310
+ *
34311
+ * @private
34312
+ * @param fileIds - Array of file IDs to fetch proofs for
34313
+ * @param subgraphUrl - The subgraph endpoint URL
34314
+ * @returns Map of file IDs to their associated DLP IDs
34315
+ */
34316
+ private _fetchProofsFromSubgraph;
34317
+ /**
34318
+ * Fetches proof data for multiple files from the blockchain.
34319
+ * Falls back to this when subgraph is unavailable.
34320
+ *
34321
+ * @private
34322
+ * @param fileIds - Array of file IDs to fetch proofs for
34323
+ * @returns Map of file IDs to their associated DLP IDs
34324
+ */
34325
+ private _fetchProofsFromChain;
34326
+ /**
34327
+ * Retrieves information about a specific Data Liquidity Pool (DLP).
34328
+ *
34329
+ * @remarks
34330
+ * DLPs are entities that process and verify data files in the Vana network.
34331
+ * This method fetches DLP metadata including name, status, and performance rating.
34332
+ * Uses subgraph first for efficiency, falls back to chain if unavailable.
34333
+ *
34334
+ * @param dlpId - The unique identifier of the DLP
34335
+ * @param options - Optional parameters
34336
+ * @param options.subgraphUrl - Custom subgraph URL to override default
34337
+ * @returns Promise resolving to DLP information
34338
+ * @throws {Error} When DLP cannot be found - "DLP not found: {dlpId}"
34339
+ * @throws {Error} When query fails - "Failed to fetch DLP: {error}"
34340
+ * @example
34341
+ * ```typescript
34342
+ * const dlp = await vana.data.getDLP(26);
34343
+ * console.log(`DLP ${dlp.name}: ${dlp.status}`);
34344
+ * ```
34345
+ */
34346
+ getDLP(dlpId: number, options?: {
34347
+ subgraphUrl?: string;
34348
+ }): Promise<{
34349
+ id: number;
34350
+ name: string;
34351
+ metadata?: string;
34352
+ status?: number;
34353
+ address?: Address;
34354
+ owner?: Address;
34355
+ }>;
34356
+ /**
34357
+ * Lists all Data Liquidity Pools (DLPs) with optional pagination.
34358
+ *
34359
+ * @remarks
34360
+ * Fetches a paginated list of all DLPs registered in the network.
34361
+ * Uses subgraph for efficient querying with fallback to chain multicall.
34362
+ *
34363
+ * @param options - Optional parameters for pagination and filtering
34364
+ * @param options.limit - Maximum number of DLPs to return (default: 100)
34365
+ * @param options.offset - Number of DLPs to skip (default: 0)
34366
+ * @param options.subgraphUrl - Custom subgraph URL to override default
34367
+ * @returns Promise resolving to array of DLP information
34368
+ * @throws {Error} When query fails - "Failed to list DLPs: {error}"
34369
+ * @example
34370
+ * ```typescript
34371
+ * // Get first 10 DLPs
34372
+ * const dlps = await vana.data.listDLPs({ limit: 10 });
34373
+ * dlps.forEach(dlp => console.log(`${dlp.id}: ${dlp.name}`));
34374
+ *
34375
+ * // Get next page
34376
+ * const nextPage = await vana.data.listDLPs({ limit: 10, offset: 10 });
34377
+ * ```
34378
+ */
34379
+ listDLPs(options?: {
34380
+ limit?: number;
34381
+ offset?: number;
34382
+ subgraphUrl?: string;
34383
+ }): Promise<Array<{
34384
+ id: number;
34385
+ name: string;
34386
+ metadata?: string;
34387
+ status?: number;
34388
+ address?: Address;
34389
+ owner?: Address;
34390
+ }>>;
34240
34391
  /**
34241
34392
  * Retrieves a list of permissions granted by a user.
34242
34393
  *
@@ -34740,10 +34891,10 @@ declare class DataController {
34740
34891
  gateways?: string[];
34741
34892
  }): Promise<Blob>;
34742
34893
  /**
34743
- * Validates a data schema against the Vana meta-schema.
34894
+ * Validates a data schema definition against the Vana meta-schema.
34744
34895
  *
34745
- * @param schema - The data schema to validate
34746
- * @returns Assertion that schema is valid (throws if invalid)
34896
+ * @param schema - The data schema definition to validate
34897
+ * @returns The validated DataSchema
34747
34898
  * @throws SchemaValidationError if invalid
34748
34899
  * @example
34749
34900
  * ```typescript
@@ -34760,10 +34911,10 @@ declare class DataController {
34760
34911
  * }
34761
34912
  * };
34762
34913
  *
34763
- * vana.data.validateDataSchema(schema);
34914
+ * const validatedSchema = vana.data.validateDataSchemaAgainstMetaSchema(schema);
34764
34915
  * ```
34765
34916
  */
34766
- validateDataSchema(schema: unknown): asserts schema is DataSchema;
34917
+ validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
34767
34918
  /**
34768
34919
  * Validates data against a JSON Schema from a data schema.
34769
34920
  *
@@ -34793,9 +34944,9 @@ declare class DataController {
34793
34944
  */
34794
34945
  validateDataAgainstSchema(data: unknown, schema: DataSchema): void;
34795
34946
  /**
34796
- * Fetches and validates a schema from a URL, then returns the parsed data schema.
34947
+ * Fetches and validates a data schema from a URL, then returns the parsed data schema.
34797
34948
  *
34798
- * @param url - The URL to fetch the schema from
34949
+ * @param url - The URL to fetch the data schema from
34799
34950
  * @returns The validated data schema
34800
34951
  * @throws SchemaValidationError if invalid or fetch fails
34801
34952
  * @example
@@ -36899,12 +37050,12 @@ declare class SignatureCache {
36899
37050
  * Generate a deterministic hash of a message object for cache key generation
36900
37051
  *
36901
37052
  * @remarks
36902
- * Creates a cryptographically secure hash from complex objects including EIP-712 typed data.
36903
- * Uses SHA-256 for collision resistance and deterministic key generation.
36904
- * Handles BigInt serialization and sorts object keys for consistency.
37053
+ * Creates a consistent hash from complex objects including EIP-712 typed data.
37054
+ * Handles BigInt serialization and produces a 32-character hash that balances
37055
+ * uniqueness with key length constraints.
36905
37056
  *
36906
37057
  * @param message - The message object to hash (typically EIP-712 typed data)
36907
- * @returns A hex string hash (SHA-256) suitable for cache keys
37058
+ * @returns A 32-character hash string suitable for cache keys
36908
37059
  * @example
36909
37060
  * ```typescript
36910
37061
  * const typedData = {
@@ -36913,19 +37064,19 @@ declare class SignatureCache {
36913
37064
  * };
36914
37065
  *
36915
37066
  * const hash = SignatureCache.hashMessage(typedData);
36916
- * // Returns SHA-256 hash like: "a1b2c3d4e5f6..."
37067
+ * // Returns something like: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
36917
37068
  * ```
36918
37069
  */
36919
37070
  static hashMessage(message: object): string;
36920
37071
  /**
36921
- * Deterministic JSON replacer that handles BigInt values and sorts object keys
36922
- * This ensures consistent cache key generation for EIP-712 typed data
37072
+ * Custom JSON replacer that converts BigInt values to strings for serialization
37073
+ * This ensures deterministic cache key generation for EIP-712 typed data
36923
37074
  *
36924
37075
  * @param _key - The object key being serialized (unused)
36925
37076
  * @param value - The value to serialize
36926
- * @returns The serialized value with sorted keys for objects
37077
+ * @returns The serialized value
36927
37078
  */
36928
- private static deterministicReplacer;
37079
+ private static bigIntReplacer;
36929
37080
  }
36930
37081
  /**
36931
37082
  * Wrapper function to cache signature operations
@@ -37258,73 +37409,26 @@ declare class NodePlatformAdapter implements VanaPlatformAdapter {
37258
37409
  }
37259
37410
 
37260
37411
  /**
37261
- * Browser implementation of the Vana Platform Adapter using Uint8Array
37412
+ * Browser implementation of the Vana Platform Adapter
37262
37413
  *
37263
- * This implementation uses browser-compatible libraries and native APIs
37264
- * without requiring Buffer or other Node.js polyfills.
37414
+ * This implementation uses browser-compatible libraries and configurations
37415
+ * to provide crypto, PGP, and HTTP functionality without Node.js dependencies.
37416
+ *
37417
+ * WARNING: Dependencies that access globals during init
37418
+ * MUST be dynamically imported to support Turbopack.
37419
+ * See: https://github.com/vercel/next.js/issues/82632
37265
37420
  */
37266
37421
 
37267
37422
  /**
37268
- * Browser implementation of crypto operations using Uint8Array
37269
- */
37270
- declare class BrowserCryptoAdapter implements VanaCryptoAdapter {
37271
- private eciesProvider;
37272
- private walletKeyEncryptionService;
37273
- encryptWithPublicKey(data: string, publicKeyHex: string): Promise<string>;
37274
- decryptWithPrivateKey(encryptedData: string, privateKeyHex: string): Promise<string>;
37275
- encryptWithWalletPublicKey(data: string, publicKey: string): Promise<string>;
37276
- decryptWithWalletPrivateKey(encryptedData: string, privateKey: string): Promise<string>;
37277
- generateKeyPair(): Promise<{
37278
- privateKey: string;
37279
- publicKey: string;
37280
- }>;
37281
- encryptWithPassword(data: Uint8Array, password: string): Promise<Uint8Array>;
37282
- decryptWithPassword(encryptedData: Uint8Array, password: string): Promise<Uint8Array>;
37283
- }
37284
- /**
37285
- * Browser implementation of PGP operations
37286
- */
37287
- declare class BrowserPGPAdapter implements VanaPGPAdapter {
37288
- encrypt(data: string, publicKeyArmored: string): Promise<string>;
37289
- decrypt(encryptedData: string, privateKeyArmored: string): Promise<string>;
37290
- generateKeyPair(options?: {
37291
- name?: string;
37292
- email?: string;
37293
- passphrase?: string;
37294
- }): Promise<{
37295
- publicKey: string;
37296
- privateKey: string;
37297
- }>;
37298
- }
37299
- /**
37300
- * Browser implementation of HTTP operations using Fetch API
37301
- */
37302
- declare class BrowserHttpAdapter implements VanaHttpAdapter {
37303
- fetch(url: string, options?: RequestInit): Promise<Response>;
37304
- }
37305
- /**
37306
- * Browser implementation of caching using sessionStorage for security
37307
- * SessionStorage is cleared when the tab closes, making it more secure for signature caching
37308
- */
37309
- declare class BrowserCacheAdapter implements VanaCacheAdapter {
37310
- private readonly prefix;
37311
- get(key: string): string | null;
37312
- set(key: string, value: string): void;
37313
- delete(key: string): void;
37314
- clear(): void;
37315
- }
37316
- /**
37317
- * Browser implementation of the Vana Platform Adapter
37318
- *
37319
- * This adapter provides all platform-specific functionality for browser environments
37320
- * without requiring any Node.js polyfills.
37423
+ * Complete browser platform adapter implementation
37321
37424
  */
37322
37425
  declare class BrowserPlatformAdapter implements VanaPlatformAdapter {
37323
- readonly crypto: BrowserCryptoAdapter;
37324
- readonly pgp: BrowserPGPAdapter;
37325
- readonly http: BrowserHttpAdapter;
37326
- readonly cache: BrowserCacheAdapter;
37327
- readonly platform: "browser";
37426
+ crypto: VanaCryptoAdapter;
37427
+ pgp: VanaPGPAdapter;
37428
+ http: VanaHttpAdapter;
37429
+ cache: VanaCacheAdapter;
37430
+ platform: "browser";
37431
+ constructor();
37328
37432
  }
37329
37433
 
37330
37434
  /**
@@ -37701,4 +37805,4 @@ declare function Vana(config: VanaConfig): VanaNodeImpl;
37701
37805
  */
37702
37806
  type VanaInstance = VanaNodeImpl;
37703
37807
 
37704
- 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, NodePlatformAdapter, 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 RelayerRequestPayload, 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, SchemaController, 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, 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, VanaNodeImpl, type VanaPlatformAdapter, type WalletConfig, type WalletConfigWithStorage, __contractCache, chains, checkGrantAccess, clearContractCache, type components, convertIpfsUrl, convertIpfsUrlWithFallbacks, createAndStoreGrant, createBrowserPlatformAdapter, createGrantFile, createNodePlatformAdapter, createPlatformAdapter, createPlatformAdapterFor, 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, handleRelayerRequest, 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 };
37808
+ 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, NodePlatformAdapter, 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 RelayerRequestPayload, 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, SchemaController, 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, 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, VanaNodeImpl, type VanaPlatformAdapter, type WalletConfig, type WalletConfigWithStorage, __contractCache, chains, checkGrantAccess, clearContractCache, type components, convertIpfsUrl, convertIpfsUrlWithFallbacks, createAndStoreGrant, createBrowserPlatformAdapter, createGrantFile, createNodePlatformAdapter, createPlatformAdapter, createPlatformAdapterFor, 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, handleRelayerRequest, 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 };