@opendatalabs/vana-sdk 0.1.0-alpha.606fa2d → 0.1.0-alpha.66768f7

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 +261 -342
  19. package/dist/index.browser.js +691 -861
  20. package/dist/index.browser.js.map +1 -1
  21. package/dist/index.node.cjs +729 -1010
  22. package/dist/index.node.cjs.map +1 -1
  23. package/dist/index.node.d.cts +265 -101
  24. package/dist/index.node.d.ts +265 -101
  25. package/dist/index.node.js +731 -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
@@ -1023,6 +1023,39 @@ interface ServerFilesAndPermissionTypedData extends GenericTypedData {
1023
1023
  filePermissions: Permission[][];
1024
1024
  };
1025
1025
  }
1026
+ /**
1027
+ * Input structure for FilePermission typed data
1028
+ *
1029
+ * @category Permissions
1030
+ */
1031
+ interface FilePermissionInput extends RecordCompatible {
1032
+ /** User nonce */
1033
+ nonce: bigint;
1034
+ /** File ID to grant permission for */
1035
+ fileId: number;
1036
+ /** Account address to grant permission to */
1037
+ account: Address;
1038
+ /** Encrypted key for the permission */
1039
+ encryptedKey: string;
1040
+ }
1041
+ /**
1042
+ * EIP-712 typed data for FilePermission
1043
+ *
1044
+ * @category Permissions
1045
+ */
1046
+ interface FilePermissionTypedData extends GenericTypedData {
1047
+ /** EIP-712 types */
1048
+ types: {
1049
+ FilePermission: Array<{
1050
+ name: string;
1051
+ type: string;
1052
+ }>;
1053
+ };
1054
+ /** Primary type */
1055
+ primaryType: "FilePermission";
1056
+ /** Message to sign */
1057
+ message: FilePermissionInput;
1058
+ }
1026
1059
 
1027
1060
  /**
1028
1061
  * Marker interface to indicate that a Vana instance has storage configured.
@@ -1247,6 +1280,22 @@ interface RelayerCallbacks {
1247
1280
  * @returns Promise resolving to the storage URL
1248
1281
  */
1249
1282
  storeGrantFile?: (grantData: GrantFile) => Promise<string>;
1283
+ /**
1284
+ * Submit a signed file permission transaction for relay
1285
+ *
1286
+ * @param params - Complete parameters for file permission
1287
+ * @param params.fileId - The file ID to grant permission for
1288
+ * @param params.account - The account address to grant permission to
1289
+ * @param params.encryptedKey - The encrypted key for the permission
1290
+ * @param params.userAddress - The user's address (owner of the file)
1291
+ * @returns Promise resolving to the transaction hash
1292
+ */
1293
+ submitFilePermission?: (params: {
1294
+ fileId: number;
1295
+ account: Address;
1296
+ encryptedKey: string;
1297
+ userAddress: Address;
1298
+ }) => Promise<Hash>;
1250
1299
  }
1251
1300
  /**
1252
1301
  * Storage callback functions for flexible storage operations.
@@ -1752,6 +1801,12 @@ interface UserFile$1 {
1752
1801
  transactionHash?: Address;
1753
1802
  /** Additional file properties and custom application data. */
1754
1803
  metadata?: FileMetadata;
1804
+ /**
1805
+ * Array of DLP IDs that have submitted proofs for this file.
1806
+ * Each proof represents verification or processing by a Data Liquidity Pool.
1807
+ * Obtain DLP details via `vana.data.getDLP(dlpId)`.
1808
+ */
1809
+ dlpIds?: number[];
1755
1810
  }
1756
1811
  /**
1757
1812
  * Provides optional metadata for uploaded files and content description.
@@ -5230,6 +5285,31 @@ declare const contractAbis: {
5230
5285
  }];
5231
5286
  readonly name: "FileAdded";
5232
5287
  readonly type: "event";
5288
+ }, {
5289
+ readonly anonymous: false;
5290
+ readonly inputs: readonly [{
5291
+ readonly indexed: true;
5292
+ readonly internalType: "uint256";
5293
+ readonly name: "fileId";
5294
+ readonly type: "uint256";
5295
+ }, {
5296
+ readonly indexed: true;
5297
+ readonly internalType: "address";
5298
+ readonly name: "ownerAddress";
5299
+ readonly type: "address";
5300
+ }, {
5301
+ readonly indexed: false;
5302
+ readonly internalType: "string";
5303
+ readonly name: "url";
5304
+ readonly type: "string";
5305
+ }, {
5306
+ readonly indexed: false;
5307
+ readonly internalType: "uint256";
5308
+ readonly name: "schemaId";
5309
+ readonly type: "uint256";
5310
+ }];
5311
+ readonly name: "FileAddedV2";
5312
+ readonly type: "event";
5233
5313
  }, {
5234
5314
  readonly anonymous: false;
5235
5315
  readonly inputs: readonly [{
@@ -5656,6 +5736,16 @@ declare const contractAbis: {
5656
5736
  }];
5657
5737
  readonly stateMutability: "view";
5658
5738
  readonly type: "function";
5739
+ }, {
5740
+ readonly inputs: readonly [];
5741
+ readonly name: "emitLegacyEvents";
5742
+ readonly outputs: readonly [{
5743
+ readonly internalType: "bool";
5744
+ readonly name: "";
5745
+ readonly type: "bool";
5746
+ }];
5747
+ readonly stateMutability: "view";
5748
+ readonly type: "function";
5659
5749
  }, {
5660
5750
  readonly inputs: readonly [{
5661
5751
  readonly internalType: "string";
@@ -5774,6 +5864,10 @@ declare const contractAbis: {
5774
5864
  readonly internalType: "string";
5775
5865
  readonly name: "url";
5776
5866
  readonly type: "string";
5867
+ }, {
5868
+ readonly internalType: "uint256";
5869
+ readonly name: "schemaId";
5870
+ readonly type: "uint256";
5777
5871
  }, {
5778
5872
  readonly internalType: "uint256";
5779
5873
  readonly name: "addedAtBlock";
@@ -5991,6 +6085,16 @@ declare const contractAbis: {
5991
6085
  readonly outputs: readonly [];
5992
6086
  readonly stateMutability: "nonpayable";
5993
6087
  readonly type: "function";
6088
+ }, {
6089
+ readonly inputs: readonly [{
6090
+ readonly internalType: "bool";
6091
+ readonly name: "newEmitLegacyEvents";
6092
+ readonly type: "bool";
6093
+ }];
6094
+ readonly name: "updateEmitLegacyEvents";
6095
+ readonly outputs: readonly [];
6096
+ readonly stateMutability: "nonpayable";
6097
+ readonly type: "function";
5994
6098
  }, {
5995
6099
  readonly inputs: readonly [{
5996
6100
  readonly internalType: "address";
@@ -28839,19 +28943,19 @@ declare const EVENT_MAPPINGS: {
28839
28943
  };
28840
28944
  readonly addFile: {
28841
28945
  readonly contract: "DataRegistry";
28842
- readonly event: "FileAdded";
28946
+ readonly event: "FileAddedV2";
28843
28947
  };
28844
28948
  readonly addFileWithPermissionsAndSchema: {
28845
28949
  readonly contract: "DataRegistry";
28846
- readonly event: "FileAdded";
28950
+ readonly event: "FileAddedV2";
28847
28951
  };
28848
28952
  readonly addFileWithSchema: {
28849
28953
  readonly contract: "DataRegistry";
28850
- readonly event: "FileAdded";
28954
+ readonly event: "FileAddedV2";
28851
28955
  };
28852
28956
  readonly addFileWithPermissions: {
28853
28957
  readonly contract: "DataRegistry";
28854
- readonly event: "FileAdded";
28958
+ readonly event: "FileAddedV2";
28855
28959
  };
28856
28960
  readonly addRefinement: {
28857
28961
  readonly contract: "DataRegistry";
@@ -31630,16 +31734,16 @@ declare class SchemaValidationError extends Error {
31630
31734
  }>);
31631
31735
  }
31632
31736
  /**
31633
- * Schema validation utility class
31737
+ * Data schema validation utility class
31634
31738
  */
31635
31739
  declare class SchemaValidator {
31636
31740
  private ajv;
31637
31741
  private dataSchemaValidator;
31638
31742
  constructor();
31639
31743
  /**
31640
- * Validates a data schema against the Vana meta-schema
31744
+ * Validates a data schema definition against the Vana meta-schema
31641
31745
  *
31642
- * @param schema - The data schema to validate
31746
+ * @param schema - The data schema definition to validate
31643
31747
  * @throws SchemaValidationError if invalid
31644
31748
  * @example
31645
31749
  * ```typescript
@@ -31658,15 +31762,15 @@ declare class SchemaValidator {
31658
31762
  * }
31659
31763
  * };
31660
31764
  *
31661
- * validator.validateDataSchema(schema); // throws if invalid
31765
+ * validator.validateDataSchemaAgainstMetaSchema(schema); // throws if invalid
31662
31766
  * ```
31663
31767
  */
31664
- validateDataSchema(schema: unknown): asserts schema is DataSchema;
31768
+ validateDataSchemaAgainstMetaSchema(schema: unknown): asserts schema is DataSchema;
31665
31769
  /**
31666
- * Validates data against a JSON Schema from a schema
31770
+ * Validates data against a JSON Schema
31667
31771
  *
31668
31772
  * @param data - The data to validate
31669
- * @param schema - The schema containing the validation rules (DataSchema or Schema)
31773
+ * @param schema - The schema containing the validation rules (must have been validated or fetched from chain)
31670
31774
  * @throws SchemaValidationError if invalid
31671
31775
  * @example
31672
31776
  * ```typescript
@@ -31676,13 +31780,13 @@ declare class SchemaValidator {
31676
31780
  * const schema = await vana.schemas.get(1);
31677
31781
  * validator.validateDataAgainstSchema(userData, schema);
31678
31782
  *
31679
- * // Also works with DataSchema object
31680
- * const dataSchema: DataSchema = {
31783
+ * // Also works with pre-validated DataSchema object
31784
+ * const dataSchema = validator.validateDataSchemaAgainstMetaSchema({
31681
31785
  * name: "User Profile",
31682
31786
  * version: "1.0.0",
31683
31787
  * dialect: "json",
31684
31788
  * schema: { type: "object", properties: { name: { type: "string" } } }
31685
- * };
31789
+ * });
31686
31790
  * validator.validateDataAgainstSchema(userData, dataSchema);
31687
31791
  * ```
31688
31792
  */
@@ -31697,9 +31801,9 @@ declare class SchemaValidator {
31697
31801
  */
31698
31802
  validateSQLiteDDL(ddl: string, dialectVersion?: string): void;
31699
31803
  /**
31700
- * Fetches and validates a schema from a URL
31804
+ * Fetches and validates a data schema from a URL
31701
31805
  *
31702
- * @param url - The URL to fetch the schema from
31806
+ * @param url - The URL to fetch the data schema from
31703
31807
  * @returns The validated data schema
31704
31808
  * @throws SchemaValidationError if invalid or fetch fails
31705
31809
  * @example
@@ -31715,13 +31819,24 @@ declare class SchemaValidator {
31715
31819
  */
31716
31820
  declare const schemaValidator: SchemaValidator;
31717
31821
  /**
31718
- * Convenience function to validate a data schema
31822
+ * Convenience function to validate a data schema definition against the Vana meta-schema
31719
31823
  *
31720
- * @param schema - The data schema to validate
31721
- * @returns void - Assertion function that doesn't return a value
31824
+ * @param schema - The data schema definition to validate
31825
+ * @returns The validated DataSchema
31722
31826
  * @throws SchemaValidationError if invalid
31827
+ * @example
31828
+ * ```typescript
31829
+ * const schemaDefinition = {
31830
+ * name: "User Profile",
31831
+ * version: "1.0.0",
31832
+ * dialect: "json",
31833
+ * schema: { type: "object", properties: { name: { type: "string" } } }
31834
+ * };
31835
+ *
31836
+ * const validatedSchema = validateDataSchemaAgainstMetaSchema(schemaDefinition);
31837
+ * ```
31723
31838
  */
31724
- declare function validateDataSchema(schema: unknown): asserts schema is DataSchema;
31839
+ declare function validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
31725
31840
  /**
31726
31841
  * Convenience function to validate data against a schema
31727
31842
  *
@@ -31732,9 +31847,9 @@ declare function validateDataSchema(schema: unknown): asserts schema is DataSche
31732
31847
  */
31733
31848
  declare function validateDataAgainstSchema(data: unknown, schema: DataSchema | Schema): void;
31734
31849
  /**
31735
- * Convenience function to fetch and validate a schema from a URL
31850
+ * Convenience function to fetch and validate a data schema from a URL
31736
31851
  *
31737
- * @param url - The URL to fetch the schema from
31852
+ * @param url - The URL to fetch the data schema from
31738
31853
  * @returns The validated data schema
31739
31854
  * @throws SchemaValidationError if invalid or fetch fails
31740
31855
  */
@@ -34225,6 +34340,89 @@ declare class DataController {
34225
34340
  owner: Address;
34226
34341
  subgraphUrl?: string;
34227
34342
  }): Promise<UserFile$1[]>;
34343
+ /**
34344
+ * Fetches proof data for multiple files from the subgraph.
34345
+ *
34346
+ * @private
34347
+ * @param fileIds - Array of file IDs to fetch proofs for
34348
+ * @param subgraphUrl - The subgraph endpoint URL
34349
+ * @returns Map of file IDs to their associated DLP IDs
34350
+ */
34351
+ private _fetchProofsFromSubgraph;
34352
+ /**
34353
+ * Fetches proof data for multiple files from the blockchain.
34354
+ * Falls back to this when subgraph is unavailable.
34355
+ *
34356
+ * @private
34357
+ * @param fileIds - Array of file IDs to fetch proofs for
34358
+ * @returns Map of file IDs to their associated DLP IDs
34359
+ */
34360
+ private _fetchProofsFromChain;
34361
+ /**
34362
+ * Retrieves information about a specific Data Liquidity Pool (DLP).
34363
+ *
34364
+ * @remarks
34365
+ * DLPs are entities that process and verify data files in the Vana network.
34366
+ * This method fetches DLP metadata including name, status, and performance rating.
34367
+ * Uses subgraph first for efficiency, falls back to chain if unavailable.
34368
+ *
34369
+ * @param dlpId - The unique identifier of the DLP
34370
+ * @param options - Optional parameters
34371
+ * @param options.subgraphUrl - Custom subgraph URL to override default
34372
+ * @returns Promise resolving to DLP information
34373
+ * @throws {Error} When DLP cannot be found - "DLP not found: {dlpId}"
34374
+ * @throws {Error} When query fails - "Failed to fetch DLP: {error}"
34375
+ * @example
34376
+ * ```typescript
34377
+ * const dlp = await vana.data.getDLP(26);
34378
+ * console.log(`DLP ${dlp.name}: ${dlp.status}`);
34379
+ * ```
34380
+ */
34381
+ getDLP(dlpId: number, options?: {
34382
+ subgraphUrl?: string;
34383
+ }): Promise<{
34384
+ id: number;
34385
+ name: string;
34386
+ metadata?: string;
34387
+ status?: number;
34388
+ address?: Address;
34389
+ owner?: Address;
34390
+ }>;
34391
+ /**
34392
+ * Lists all Data Liquidity Pools (DLPs) with optional pagination.
34393
+ *
34394
+ * @remarks
34395
+ * Fetches a paginated list of all DLPs registered in the network.
34396
+ * Uses subgraph for efficient querying with fallback to chain multicall.
34397
+ *
34398
+ * @param options - Optional parameters for pagination and filtering
34399
+ * @param options.limit - Maximum number of DLPs to return (default: 100)
34400
+ * @param options.offset - Number of DLPs to skip (default: 0)
34401
+ * @param options.subgraphUrl - Custom subgraph URL to override default
34402
+ * @returns Promise resolving to array of DLP information
34403
+ * @throws {Error} When query fails - "Failed to list DLPs: {error}"
34404
+ * @example
34405
+ * ```typescript
34406
+ * // Get first 10 DLPs
34407
+ * const dlps = await vana.data.listDLPs({ limit: 10 });
34408
+ * dlps.forEach(dlp => console.log(`${dlp.id}: ${dlp.name}`));
34409
+ *
34410
+ * // Get next page
34411
+ * const nextPage = await vana.data.listDLPs({ limit: 10, offset: 10 });
34412
+ * ```
34413
+ */
34414
+ listDLPs(options?: {
34415
+ limit?: number;
34416
+ offset?: number;
34417
+ subgraphUrl?: string;
34418
+ }): Promise<Array<{
34419
+ id: number;
34420
+ name: string;
34421
+ metadata?: string;
34422
+ status?: number;
34423
+ address?: Address;
34424
+ owner?: Address;
34425
+ }>>;
34228
34426
  /**
34229
34427
  * Retrieves a list of permissions granted by a user.
34230
34428
  *
@@ -34633,6 +34831,17 @@ declare class DataController {
34633
34831
  * ```
34634
34832
  */
34635
34833
  submitFilePermission(fileId: number, account: Address, publicKey: string): Promise<TransactionHandle<FilePermissionResult>>;
34834
+ /**
34835
+ * Composes the EIP-712 typed data for FilePermission.
34836
+ *
34837
+ * @param params - The parameters for composing the file permission message
34838
+ * @param params.nonce - The user's nonce for preventing replay attacks
34839
+ * @param params.fileId - The ID of the file to grant permission for
34840
+ * @param params.account - The account address to grant permission to
34841
+ * @param params.encryptedKey - The encrypted key for the permission
34842
+ * @returns Promise resolving to the typed data structure
34843
+ */
34844
+ private composeFilePermissionMessage;
34636
34845
  /**
34637
34846
  * Gets the encrypted key for a specific account's permission to access a file.
34638
34847
  *
@@ -34728,10 +34937,10 @@ declare class DataController {
34728
34937
  gateways?: string[];
34729
34938
  }): Promise<Blob>;
34730
34939
  /**
34731
- * Validates a data schema against the Vana meta-schema.
34940
+ * Validates a data schema definition against the Vana meta-schema.
34732
34941
  *
34733
- * @param schema - The data schema to validate
34734
- * @returns Assertion that schema is valid (throws if invalid)
34942
+ * @param schema - The data schema definition to validate
34943
+ * @returns The validated DataSchema
34735
34944
  * @throws SchemaValidationError if invalid
34736
34945
  * @example
34737
34946
  * ```typescript
@@ -34748,10 +34957,10 @@ declare class DataController {
34748
34957
  * }
34749
34958
  * };
34750
34959
  *
34751
- * vana.data.validateDataSchema(schema);
34960
+ * const validatedSchema = vana.data.validateDataSchemaAgainstMetaSchema(schema);
34752
34961
  * ```
34753
34962
  */
34754
- validateDataSchema(schema: unknown): asserts schema is DataSchema;
34963
+ validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
34755
34964
  /**
34756
34965
  * Validates data against a JSON Schema from a data schema.
34757
34966
  *
@@ -34781,9 +34990,9 @@ declare class DataController {
34781
34990
  */
34782
34991
  validateDataAgainstSchema(data: unknown, schema: DataSchema): void;
34783
34992
  /**
34784
- * Fetches and validates a schema from a URL, then returns the parsed data schema.
34993
+ * Fetches and validates a data schema from a URL, then returns the parsed data schema.
34785
34994
  *
34786
- * @param url - The URL to fetch the schema from
34995
+ * @param url - The URL to fetch the data schema from
34787
34996
  * @returns The validated data schema
34788
34997
  * @throws SchemaValidationError if invalid or fetch fails
34789
34998
  * @example
@@ -36887,12 +37096,12 @@ declare class SignatureCache {
36887
37096
  * Generate a deterministic hash of a message object for cache key generation
36888
37097
  *
36889
37098
  * @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.
37099
+ * Creates a consistent hash from complex objects including EIP-712 typed data.
37100
+ * Handles BigInt serialization and produces a 32-character hash that balances
37101
+ * uniqueness with key length constraints.
36893
37102
  *
36894
37103
  * @param message - The message object to hash (typically EIP-712 typed data)
36895
- * @returns A hex string hash (SHA-256) suitable for cache keys
37104
+ * @returns A 32-character hash string suitable for cache keys
36896
37105
  * @example
36897
37106
  * ```typescript
36898
37107
  * const typedData = {
@@ -36901,19 +37110,19 @@ declare class SignatureCache {
36901
37110
  * };
36902
37111
  *
36903
37112
  * const hash = SignatureCache.hashMessage(typedData);
36904
- * // Returns SHA-256 hash like: "a1b2c3d4e5f6..."
37113
+ * // Returns something like: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
36905
37114
  * ```
36906
37115
  */
36907
37116
  static hashMessage(message: object): string;
36908
37117
  /**
36909
- * Deterministic JSON replacer that handles BigInt values and sorts object keys
36910
- * This ensures consistent cache key generation for EIP-712 typed data
37118
+ * Custom JSON replacer that converts BigInt values to strings for serialization
37119
+ * This ensures deterministic cache key generation for EIP-712 typed data
36911
37120
  *
36912
37121
  * @param _key - The object key being serialized (unused)
36913
37122
  * @param value - The value to serialize
36914
- * @returns The serialized value with sorted keys for objects
37123
+ * @returns The serialized value
36915
37124
  */
36916
- private static deterministicReplacer;
37125
+ private static bigIntReplacer;
36917
37126
  }
36918
37127
  /**
36919
37128
  * Wrapper function to cache signature operations
@@ -37145,317 +37354,27 @@ declare class CircuitBreaker {
37145
37354
  reset(): void;
37146
37355
  }
37147
37356
 
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
37357
  /**
37205
37358
  * Browser implementation of the Vana Platform Adapter
37206
37359
  *
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.
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
-
37298
- /**
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)
37360
+ * This implementation uses browser-compatible libraries and configurations
37361
+ * to provide crypto, PGP, and HTTP functionality without Node.js dependencies.
37310
37362
  *
37311
- * @category Cryptography
37363
+ * WARNING: Dependencies that access globals during init
37364
+ * MUST be dynamically imported to support Turbopack.
37365
+ * See: https://github.com/vercel/next.js/issues/82632
37312
37366
  */
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
37367
 
37430
37368
  /**
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.
37369
+ * Complete browser platform adapter implementation
37436
37370
  */
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>;
37371
+ declare class BrowserPlatformAdapter implements VanaPlatformAdapter {
37372
+ crypto: VanaCryptoAdapter;
37373
+ pgp: VanaPGPAdapter;
37374
+ http: VanaHttpAdapter;
37375
+ cache: VanaCacheAdapter;
37376
+ platform: "browser";
37377
+ constructor();
37459
37378
  }
37460
37379
 
37461
37380
  /**
@@ -37783,4 +37702,4 @@ declare function Vana(config: VanaConfig): VanaBrowserImpl;
37783
37702
  */
37784
37703
  type VanaInstance = VanaBrowserImpl;
37785
37704
 
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 };
37705
+ 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 FilePermissionInput, type FilePermissionParams, type FilePermissionTypedData, 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 };