@opendatalabs/vana-sdk 0.1.0-alpha.e569cae → 0.1.0-alpha.e9cead7
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.
- package/dist/chains.browser.cjs +2 -2
- package/dist/chains.browser.cjs.map +1 -1
- package/dist/chains.browser.js +2 -2
- package/dist/chains.browser.js.map +1 -1
- package/dist/chains.cjs +2 -2
- package/dist/chains.cjs.map +1 -1
- package/dist/chains.js +2 -2
- package/dist/chains.js.map +1 -1
- package/dist/chains.node.cjs +2 -2
- package/dist/chains.node.cjs.map +1 -1
- package/dist/chains.node.js +2 -2
- package/dist/chains.node.js.map +1 -1
- package/dist/index.browser.d.ts +408 -135
- package/dist/index.browser.js +1985 -1341
- package/dist/index.browser.js.map +1 -1
- package/dist/index.node.cjs +1988 -1341
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.cts +411 -136
- package/dist/index.node.d.ts +411 -136
- package/dist/index.node.js +1987 -1341
- package/dist/index.node.js.map +1 -1
- package/package.json +1 -1
package/dist/index.browser.d.ts
CHANGED
|
@@ -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.
|
|
@@ -2163,33 +2169,84 @@ interface BatchUploadResult {
|
|
|
2163
2169
|
errors?: string[];
|
|
2164
2170
|
}
|
|
2165
2171
|
/**
|
|
2166
|
-
*
|
|
2172
|
+
* Schema metadata from the blockchain (without fetched definition).
|
|
2173
|
+
*
|
|
2174
|
+
* This represents the on-chain schema registration data before the
|
|
2175
|
+
* definition has been fetched from the storage URL.
|
|
2176
|
+
*
|
|
2177
|
+
* @category Data Management
|
|
2178
|
+
*/
|
|
2179
|
+
interface SchemaMetadata {
|
|
2180
|
+
/** Schema ID */
|
|
2181
|
+
id: number;
|
|
2182
|
+
/** Schema name */
|
|
2183
|
+
name: string;
|
|
2184
|
+
/** Schema dialect ('json' or 'sqlite') */
|
|
2185
|
+
dialect: "json" | "sqlite";
|
|
2186
|
+
/** URL containing the schema definition */
|
|
2187
|
+
definitionUrl: string;
|
|
2188
|
+
}
|
|
2189
|
+
/**
|
|
2190
|
+
* Complete schema with all definition fields populated.
|
|
2191
|
+
* This is what schemas.get() returns - a schema with the definition fetched.
|
|
2192
|
+
*/
|
|
2193
|
+
interface CompleteSchema extends SchemaMetadata {
|
|
2194
|
+
/** Version of the schema */
|
|
2195
|
+
version: string;
|
|
2196
|
+
/** Optional description of the schema */
|
|
2197
|
+
description?: string;
|
|
2198
|
+
/** Optional version of the dialect */
|
|
2199
|
+
dialectVersion?: string;
|
|
2200
|
+
/** The actual schema - JSON Schema object for 'json' dialect, DDL string for 'sqlite' */
|
|
2201
|
+
schema: object | string;
|
|
2202
|
+
}
|
|
2203
|
+
/**
|
|
2204
|
+
* Schema with optional definition fields.
|
|
2167
2205
|
*
|
|
2168
2206
|
* Schemas define the structure and validation rules for user data processed by refiners.
|
|
2169
2207
|
* They ensure data quality and consistency across the Vana network by specifying how
|
|
2170
2208
|
* raw user data should be formatted, validated, and processed.
|
|
2171
2209
|
*
|
|
2210
|
+
* When the definition has been fetched (via schemas.get() or schemas.list() with includeDefinitions),
|
|
2211
|
+
* the version and schema fields will be populated. Otherwise, only the metadata fields are present.
|
|
2212
|
+
*
|
|
2172
2213
|
* @category Data Management
|
|
2173
2214
|
* @example
|
|
2174
2215
|
* ```typescript
|
|
2175
|
-
*
|
|
2216
|
+
* // Complete schema from schemas.get()
|
|
2217
|
+
* const completeSchema: Schema = {
|
|
2218
|
+
* id: 5,
|
|
2219
|
+
* name: 'Social Media Profile',
|
|
2220
|
+
* dialect: 'json',
|
|
2221
|
+
* definitionUrl: 'ipfs://QmSchema...',
|
|
2222
|
+
* version: '1.0.0',
|
|
2223
|
+
* description: 'Schema for validating social media profile data',
|
|
2224
|
+
* schema: { // JSON Schema object
|
|
2225
|
+
* type: 'object',
|
|
2226
|
+
* properties: {
|
|
2227
|
+
* username: { type: 'string' }
|
|
2228
|
+
* }
|
|
2229
|
+
* }
|
|
2230
|
+
* };
|
|
2231
|
+
*
|
|
2232
|
+
* // Metadata-only schema from schemas.list() without includeDefinitions
|
|
2233
|
+
* const metadataSchema: Schema = {
|
|
2176
2234
|
* id: 5,
|
|
2177
2235
|
* name: 'Social Media Profile',
|
|
2178
|
-
*
|
|
2179
|
-
*
|
|
2180
|
-
* description: 'Schema for validating social media profile data'
|
|
2236
|
+
* dialect: 'json',
|
|
2237
|
+
* definitionUrl: 'ipfs://QmSchema...'
|
|
2181
2238
|
* };
|
|
2182
2239
|
* ```
|
|
2183
2240
|
*/
|
|
2184
|
-
interface Schema {
|
|
2185
|
-
/**
|
|
2186
|
-
|
|
2187
|
-
/**
|
|
2188
|
-
|
|
2189
|
-
/**
|
|
2190
|
-
|
|
2191
|
-
/**
|
|
2192
|
-
|
|
2241
|
+
interface Schema extends SchemaMetadata {
|
|
2242
|
+
/** Version of the schema (present when definition is fetched) */
|
|
2243
|
+
version?: string;
|
|
2244
|
+
/** Optional description of the schema */
|
|
2245
|
+
description?: string;
|
|
2246
|
+
/** Optional version of the dialect */
|
|
2247
|
+
dialectVersion?: string;
|
|
2248
|
+
/** The actual schema - JSON Schema object for 'json' dialect, DDL string for 'sqlite' (present when definition is fetched) */
|
|
2249
|
+
schema?: object | string;
|
|
2193
2250
|
}
|
|
2194
2251
|
/**
|
|
2195
2252
|
* Represents a refiner with schema information
|
|
@@ -5179,6 +5236,31 @@ declare const contractAbis: {
|
|
|
5179
5236
|
}];
|
|
5180
5237
|
readonly name: "FileAdded";
|
|
5181
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";
|
|
5182
5264
|
}, {
|
|
5183
5265
|
readonly anonymous: false;
|
|
5184
5266
|
readonly inputs: readonly [{
|
|
@@ -5369,6 +5451,16 @@ declare const contractAbis: {
|
|
|
5369
5451
|
}];
|
|
5370
5452
|
readonly name: "Upgraded";
|
|
5371
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";
|
|
5372
5464
|
}, {
|
|
5373
5465
|
readonly inputs: readonly [];
|
|
5374
5466
|
readonly name: "DEFAULT_ADMIN_ROLE";
|
|
@@ -5441,6 +5533,33 @@ declare const contractAbis: {
|
|
|
5441
5533
|
readonly outputs: readonly [];
|
|
5442
5534
|
readonly stateMutability: "nonpayable";
|
|
5443
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";
|
|
5444
5563
|
}, {
|
|
5445
5564
|
readonly inputs: readonly [{
|
|
5446
5565
|
readonly internalType: "string";
|
|
@@ -5605,6 +5724,16 @@ declare const contractAbis: {
|
|
|
5605
5724
|
}];
|
|
5606
5725
|
readonly stateMutability: "view";
|
|
5607
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";
|
|
5608
5737
|
}, {
|
|
5609
5738
|
readonly inputs: readonly [{
|
|
5610
5739
|
readonly internalType: "string";
|
|
@@ -5723,6 +5852,10 @@ declare const contractAbis: {
|
|
|
5723
5852
|
readonly internalType: "string";
|
|
5724
5853
|
readonly name: "url";
|
|
5725
5854
|
readonly type: "string";
|
|
5855
|
+
}, {
|
|
5856
|
+
readonly internalType: "uint256";
|
|
5857
|
+
readonly name: "schemaId";
|
|
5858
|
+
readonly type: "uint256";
|
|
5726
5859
|
}, {
|
|
5727
5860
|
readonly internalType: "uint256";
|
|
5728
5861
|
readonly name: "addedAtBlock";
|
|
@@ -5940,6 +6073,16 @@ declare const contractAbis: {
|
|
|
5940
6073
|
readonly outputs: readonly [];
|
|
5941
6074
|
readonly stateMutability: "nonpayable";
|
|
5942
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";
|
|
5943
6086
|
}, {
|
|
5944
6087
|
readonly inputs: readonly [{
|
|
5945
6088
|
readonly internalType: "address";
|
|
@@ -28788,19 +28931,19 @@ declare const EVENT_MAPPINGS: {
|
|
|
28788
28931
|
};
|
|
28789
28932
|
readonly addFile: {
|
|
28790
28933
|
readonly contract: "DataRegistry";
|
|
28791
|
-
readonly event: "
|
|
28934
|
+
readonly event: "FileAddedV2";
|
|
28792
28935
|
};
|
|
28793
28936
|
readonly addFileWithPermissionsAndSchema: {
|
|
28794
28937
|
readonly contract: "DataRegistry";
|
|
28795
|
-
readonly event: "
|
|
28938
|
+
readonly event: "FileAddedV2";
|
|
28796
28939
|
};
|
|
28797
28940
|
readonly addFileWithSchema: {
|
|
28798
28941
|
readonly contract: "DataRegistry";
|
|
28799
|
-
readonly event: "
|
|
28942
|
+
readonly event: "FileAddedV2";
|
|
28800
28943
|
};
|
|
28801
28944
|
readonly addFileWithPermissions: {
|
|
28802
28945
|
readonly contract: "DataRegistry";
|
|
28803
|
-
readonly event: "
|
|
28946
|
+
readonly event: "FileAddedV2";
|
|
28804
28947
|
};
|
|
28805
28948
|
readonly addRefinement: {
|
|
28806
28949
|
readonly contract: "DataRegistry";
|
|
@@ -31307,10 +31450,10 @@ declare class PermissionsController {
|
|
|
31307
31450
|
interface CreateSchemaParams {
|
|
31308
31451
|
/** The name of the schema */
|
|
31309
31452
|
name: string;
|
|
31310
|
-
/** The
|
|
31311
|
-
|
|
31453
|
+
/** The dialect of the schema (e.g., 'json' or 'sqlite') */
|
|
31454
|
+
dialect: "json" | "sqlite";
|
|
31312
31455
|
/** The schema definition object or JSON string */
|
|
31313
|
-
|
|
31456
|
+
schema: object | string;
|
|
31314
31457
|
}
|
|
31315
31458
|
/**
|
|
31316
31459
|
* Result of creating a new schema.
|
|
@@ -31355,8 +31498,8 @@ interface CreateSchemaResult {
|
|
|
31355
31498
|
* // Create a new schema with automatic IPFS upload
|
|
31356
31499
|
* const result = await vana.schemas.create({
|
|
31357
31500
|
* name: "User Profile",
|
|
31358
|
-
*
|
|
31359
|
-
*
|
|
31501
|
+
* dialect: "json",
|
|
31502
|
+
* schema: {
|
|
31360
31503
|
* type: "object",
|
|
31361
31504
|
* properties: {
|
|
31362
31505
|
* name: { type: "string" },
|
|
@@ -31391,7 +31534,7 @@ declare class SchemaController {
|
|
|
31391
31534
|
* - Uploads the definition to IPFS to generate a permanent URL
|
|
31392
31535
|
* - Registers the schema on the blockchain with the generated URL
|
|
31393
31536
|
*
|
|
31394
|
-
* @param params - Schema creation parameters including name,
|
|
31537
|
+
* @param params - Schema creation parameters including name, dialect, and definition
|
|
31395
31538
|
* @returns Promise resolving to creation results with schema ID and transaction hash
|
|
31396
31539
|
* @throws {SchemaValidationError} When the schema definition is invalid
|
|
31397
31540
|
* @throws {Error} When IPFS upload or blockchain registration fails
|
|
@@ -31400,8 +31543,8 @@ declare class SchemaController {
|
|
|
31400
31543
|
* // Create a JSON schema for user profiles
|
|
31401
31544
|
* const result = await vana.schemas.create({
|
|
31402
31545
|
* name: "User Profile",
|
|
31403
|
-
*
|
|
31404
|
-
*
|
|
31546
|
+
* dialect: "json",
|
|
31547
|
+
* schema: {
|
|
31405
31548
|
* type: "object",
|
|
31406
31549
|
* properties: {
|
|
31407
31550
|
* name: { type: "string" },
|
|
@@ -31416,27 +31559,28 @@ declare class SchemaController {
|
|
|
31416
31559
|
*/
|
|
31417
31560
|
create(params: CreateSchemaParams): Promise<CreateSchemaResult>;
|
|
31418
31561
|
/**
|
|
31419
|
-
* Retrieves a schema by its ID.
|
|
31562
|
+
* Retrieves a complete schema by its ID with definition fetched and flattened.
|
|
31420
31563
|
*
|
|
31421
31564
|
* @param schemaId - The ID of the schema to retrieve
|
|
31422
31565
|
* @param options - Optional parameters
|
|
31423
31566
|
* @param options.subgraphUrl - Custom subgraph URL to use instead of default
|
|
31424
|
-
* @returns Promise resolving to the schema object
|
|
31425
|
-
* @throws {Error} When the schema is not found or chain is unavailable
|
|
31567
|
+
* @returns Promise resolving to the complete schema object with all fields populated
|
|
31568
|
+
* @throws {Error} When the schema is not found, definition cannot be fetched, or chain is unavailable
|
|
31426
31569
|
* @example
|
|
31427
31570
|
* ```typescript
|
|
31428
31571
|
* const schema = await vana.schemas.get(1);
|
|
31429
|
-
* console.log(`Schema: ${schema.name} (${schema.
|
|
31572
|
+
* console.log(`Schema: ${schema.name} (${schema.dialect})`);
|
|
31573
|
+
* console.log(`Version: ${schema.version}`);
|
|
31574
|
+
* console.log(`Description: ${schema.description}`);
|
|
31575
|
+
* console.log('Schema:', schema.schema);
|
|
31430
31576
|
*
|
|
31431
|
-
* //
|
|
31432
|
-
*
|
|
31433
|
-
* subgraphUrl: 'https://custom-subgraph.com/graphql'
|
|
31434
|
-
* });
|
|
31577
|
+
* // Use directly with validator (schema has all required fields)
|
|
31578
|
+
* validator.validateDataAgainstSchema(data, schema);
|
|
31435
31579
|
* ```
|
|
31436
31580
|
*/
|
|
31437
31581
|
get(schemaId: number, options?: {
|
|
31438
31582
|
subgraphUrl?: string;
|
|
31439
|
-
}): Promise<
|
|
31583
|
+
}): Promise<CompleteSchema>;
|
|
31440
31584
|
/**
|
|
31441
31585
|
* Gets the total number of schemas registered on the network.
|
|
31442
31586
|
*
|
|
@@ -31465,27 +31609,25 @@ declare class SchemaController {
|
|
|
31465
31609
|
* @param options.limit - Maximum number of schemas to return
|
|
31466
31610
|
* @param options.offset - Number of schemas to skip
|
|
31467
31611
|
* @param options.subgraphUrl - Custom subgraph URL to use instead of default
|
|
31612
|
+
* @param options.includeDefinitions - Whether to fetch and include schema definitions (default: false for performance)
|
|
31468
31613
|
* @returns Promise resolving to an array of schemas
|
|
31469
31614
|
* @example
|
|
31470
31615
|
* ```typescript
|
|
31471
|
-
* // Get all schemas
|
|
31616
|
+
* // Get all schemas (without definitions for performance)
|
|
31472
31617
|
* const schemas = await vana.schemas.list();
|
|
31473
31618
|
*
|
|
31619
|
+
* // Get schemas with definitions
|
|
31620
|
+
* const schemas = await vana.schemas.list({ includeDefinitions: true });
|
|
31621
|
+
*
|
|
31474
31622
|
* // Get schemas with pagination
|
|
31475
31623
|
* const schemas = await vana.schemas.list({ limit: 10, offset: 0 });
|
|
31476
|
-
*
|
|
31477
|
-
* // With custom subgraph
|
|
31478
|
-
* const schemas = await vana.schemas.list({
|
|
31479
|
-
* limit: 10,
|
|
31480
|
-
* offset: 0,
|
|
31481
|
-
* subgraphUrl: 'https://custom-subgraph.com/graphql'
|
|
31482
|
-
* });
|
|
31483
31624
|
* ```
|
|
31484
31625
|
*/
|
|
31485
31626
|
list(options?: {
|
|
31486
31627
|
limit?: number;
|
|
31487
31628
|
offset?: number;
|
|
31488
31629
|
subgraphUrl?: string;
|
|
31630
|
+
includeDefinitions?: boolean;
|
|
31489
31631
|
}): Promise<Schema[]>;
|
|
31490
31632
|
/**
|
|
31491
31633
|
* Adds a schema using the legacy method (low-level API).
|
|
@@ -31532,6 +31674,13 @@ declare class SchemaController {
|
|
|
31532
31674
|
* @returns Promise resolving to the user's address
|
|
31533
31675
|
*/
|
|
31534
31676
|
private getUserAddress;
|
|
31677
|
+
/**
|
|
31678
|
+
* Fetches and attaches definitions to an array of schemas.
|
|
31679
|
+
*
|
|
31680
|
+
* @param schemas - Array of schemas to fetch definitions for
|
|
31681
|
+
* @private
|
|
31682
|
+
*/
|
|
31683
|
+
private _fetchDefinitionsForSchemas;
|
|
31535
31684
|
}
|
|
31536
31685
|
|
|
31537
31686
|
/**
|
|
@@ -31573,16 +31722,16 @@ declare class SchemaValidationError extends Error {
|
|
|
31573
31722
|
}>);
|
|
31574
31723
|
}
|
|
31575
31724
|
/**
|
|
31576
|
-
*
|
|
31725
|
+
* Data schema validation utility class
|
|
31577
31726
|
*/
|
|
31578
31727
|
declare class SchemaValidator {
|
|
31579
31728
|
private ajv;
|
|
31580
31729
|
private dataSchemaValidator;
|
|
31581
31730
|
constructor();
|
|
31582
31731
|
/**
|
|
31583
|
-
* Validates a data schema against the Vana meta-schema
|
|
31732
|
+
* Validates a data schema definition against the Vana meta-schema
|
|
31584
31733
|
*
|
|
31585
|
-
* @param schema - The data schema to validate
|
|
31734
|
+
* @param schema - The data schema definition to validate
|
|
31586
31735
|
* @throws SchemaValidationError if invalid
|
|
31587
31736
|
* @example
|
|
31588
31737
|
* ```typescript
|
|
@@ -31601,39 +31750,35 @@ declare class SchemaValidator {
|
|
|
31601
31750
|
* }
|
|
31602
31751
|
* };
|
|
31603
31752
|
*
|
|
31604
|
-
* validator.
|
|
31753
|
+
* validator.validateDataSchemaAgainstMetaSchema(schema); // throws if invalid
|
|
31605
31754
|
* ```
|
|
31606
31755
|
*/
|
|
31607
|
-
|
|
31756
|
+
validateDataSchemaAgainstMetaSchema(schema: unknown): asserts schema is DataSchema;
|
|
31608
31757
|
/**
|
|
31609
|
-
* Validates data against a JSON Schema
|
|
31758
|
+
* Validates data against a JSON Schema
|
|
31610
31759
|
*
|
|
31611
31760
|
* @param data - The data to validate
|
|
31612
|
-
* @param schema - The
|
|
31761
|
+
* @param schema - The schema containing the validation rules (must have been validated or fetched from chain)
|
|
31613
31762
|
* @throws SchemaValidationError if invalid
|
|
31614
31763
|
* @example
|
|
31615
31764
|
* ```typescript
|
|
31616
31765
|
* const validator = new SchemaValidator();
|
|
31617
31766
|
*
|
|
31618
|
-
*
|
|
31767
|
+
* // Works with Schema from schemas.get()
|
|
31768
|
+
* const schema = await vana.schemas.get(1);
|
|
31769
|
+
* validator.validateDataAgainstSchema(userData, schema);
|
|
31770
|
+
*
|
|
31771
|
+
* // Also works with pre-validated DataSchema object
|
|
31772
|
+
* const dataSchema = validator.validateDataSchemaAgainstMetaSchema({
|
|
31619
31773
|
* name: "User Profile",
|
|
31620
31774
|
* version: "1.0.0",
|
|
31621
31775
|
* dialect: "json",
|
|
31622
|
-
* schema: {
|
|
31623
|
-
*
|
|
31624
|
-
*
|
|
31625
|
-
* name: { type: "string" },
|
|
31626
|
-
* age: { type: "number" }
|
|
31627
|
-
* },
|
|
31628
|
-
* required: ["name"]
|
|
31629
|
-
* }
|
|
31630
|
-
* };
|
|
31631
|
-
*
|
|
31632
|
-
* const userData = { name: "Alice", age: 30 };
|
|
31633
|
-
* validator.validateDataAgainstSchema(userData, schema);
|
|
31776
|
+
* schema: { type: "object", properties: { name: { type: "string" } } }
|
|
31777
|
+
* });
|
|
31778
|
+
* validator.validateDataAgainstSchema(userData, dataSchema);
|
|
31634
31779
|
* ```
|
|
31635
31780
|
*/
|
|
31636
|
-
validateDataAgainstSchema(data: unknown, schema: DataSchema): void;
|
|
31781
|
+
validateDataAgainstSchema(data: unknown, schema: DataSchema | Schema): void;
|
|
31637
31782
|
/**
|
|
31638
31783
|
* Validates a SQLite DDL string for basic syntax
|
|
31639
31784
|
* Note: This is a basic validation, full SQL parsing would require a proper SQL parser
|
|
@@ -31644,9 +31789,9 @@ declare class SchemaValidator {
|
|
|
31644
31789
|
*/
|
|
31645
31790
|
validateSQLiteDDL(ddl: string, dialectVersion?: string): void;
|
|
31646
31791
|
/**
|
|
31647
|
-
* Fetches and validates a schema from a URL
|
|
31792
|
+
* Fetches and validates a data schema from a URL
|
|
31648
31793
|
*
|
|
31649
|
-
* @param url - The URL to fetch the schema from
|
|
31794
|
+
* @param url - The URL to fetch the data schema from
|
|
31650
31795
|
* @returns The validated data schema
|
|
31651
31796
|
* @throws SchemaValidationError if invalid or fetch fails
|
|
31652
31797
|
* @example
|
|
@@ -31662,13 +31807,24 @@ declare class SchemaValidator {
|
|
|
31662
31807
|
*/
|
|
31663
31808
|
declare const schemaValidator: SchemaValidator;
|
|
31664
31809
|
/**
|
|
31665
|
-
* Convenience function to validate a data schema
|
|
31810
|
+
* Convenience function to validate a data schema definition against the Vana meta-schema
|
|
31666
31811
|
*
|
|
31667
|
-
* @param schema - The data schema to validate
|
|
31668
|
-
* @returns
|
|
31812
|
+
* @param schema - The data schema definition to validate
|
|
31813
|
+
* @returns The validated DataSchema
|
|
31669
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
|
+
* ```
|
|
31670
31826
|
*/
|
|
31671
|
-
declare function
|
|
31827
|
+
declare function validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
|
|
31672
31828
|
/**
|
|
31673
31829
|
* Convenience function to validate data against a schema
|
|
31674
31830
|
*
|
|
@@ -31677,11 +31833,11 @@ declare function validateDataSchema(schema: unknown): asserts schema is DataSche
|
|
|
31677
31833
|
* @returns void - Function doesn't return a value
|
|
31678
31834
|
* @throws SchemaValidationError if invalid
|
|
31679
31835
|
*/
|
|
31680
|
-
declare function validateDataAgainstSchema(data: unknown, schema: DataSchema): void;
|
|
31836
|
+
declare function validateDataAgainstSchema(data: unknown, schema: DataSchema | Schema): void;
|
|
31681
31837
|
/**
|
|
31682
|
-
* Convenience function to fetch and validate a schema from a URL
|
|
31838
|
+
* Convenience function to fetch and validate a data schema from a URL
|
|
31683
31839
|
*
|
|
31684
|
-
* @param url - The URL to fetch the schema from
|
|
31840
|
+
* @param url - The URL to fetch the data schema from
|
|
31685
31841
|
* @returns The validated data schema
|
|
31686
31842
|
* @throws SchemaValidationError if invalid or fetch fails
|
|
31687
31843
|
*/
|
|
@@ -34172,6 +34328,89 @@ declare class DataController {
|
|
|
34172
34328
|
owner: Address;
|
|
34173
34329
|
subgraphUrl?: string;
|
|
34174
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
|
+
}>>;
|
|
34175
34414
|
/**
|
|
34176
34415
|
* Retrieves a list of permissions granted by a user.
|
|
34177
34416
|
*
|
|
@@ -34564,19 +34803,31 @@ declare class DataController {
|
|
|
34564
34803
|
*/
|
|
34565
34804
|
addPermissionToFile(fileId: number, account: Address, publicKey: string): Promise<TransactionHandle<FilePermissionResult>>;
|
|
34566
34805
|
/**
|
|
34567
|
-
* Submits a file permission transaction
|
|
34806
|
+
* Submits a file permission transaction to the blockchain.
|
|
34568
34807
|
*
|
|
34569
|
-
*
|
|
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.
|
|
34570
34811
|
* Use this when you want to handle transaction confirmation and event parsing separately.
|
|
34571
34812
|
*
|
|
34572
|
-
* @param fileId - The ID of the file to
|
|
34573
|
-
* @param account - The
|
|
34574
|
-
* @param publicKey - The public key
|
|
34575
|
-
*
|
|
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
|
+
*
|
|
34576
34822
|
* @example
|
|
34577
34823
|
* ```typescript
|
|
34578
|
-
* const
|
|
34579
|
-
*
|
|
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}`);
|
|
34580
34831
|
* ```
|
|
34581
34832
|
*/
|
|
34582
34833
|
submitFilePermission(fileId: number, account: Address, publicKey: string): Promise<TransactionHandle<FilePermissionResult>>;
|
|
@@ -34675,10 +34926,10 @@ declare class DataController {
|
|
|
34675
34926
|
gateways?: string[];
|
|
34676
34927
|
}): Promise<Blob>;
|
|
34677
34928
|
/**
|
|
34678
|
-
* Validates a data schema against the Vana meta-schema.
|
|
34929
|
+
* Validates a data schema definition against the Vana meta-schema.
|
|
34679
34930
|
*
|
|
34680
|
-
* @param schema - The data schema to validate
|
|
34681
|
-
* @returns
|
|
34931
|
+
* @param schema - The data schema definition to validate
|
|
34932
|
+
* @returns The validated DataSchema
|
|
34682
34933
|
* @throws SchemaValidationError if invalid
|
|
34683
34934
|
* @example
|
|
34684
34935
|
* ```typescript
|
|
@@ -34695,10 +34946,10 @@ declare class DataController {
|
|
|
34695
34946
|
* }
|
|
34696
34947
|
* };
|
|
34697
34948
|
*
|
|
34698
|
-
* vana.data.
|
|
34949
|
+
* const validatedSchema = vana.data.validateDataSchemaAgainstMetaSchema(schema);
|
|
34699
34950
|
* ```
|
|
34700
34951
|
*/
|
|
34701
|
-
|
|
34952
|
+
validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
|
|
34702
34953
|
/**
|
|
34703
34954
|
* Validates data against a JSON Schema from a data schema.
|
|
34704
34955
|
*
|
|
@@ -34728,9 +34979,9 @@ declare class DataController {
|
|
|
34728
34979
|
*/
|
|
34729
34980
|
validateDataAgainstSchema(data: unknown, schema: DataSchema): void;
|
|
34730
34981
|
/**
|
|
34731
|
-
* 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.
|
|
34732
34983
|
*
|
|
34733
|
-
* @param url - The URL to fetch the schema from
|
|
34984
|
+
* @param url - The URL to fetch the data schema from
|
|
34734
34985
|
* @returns The validated data schema
|
|
34735
34986
|
* @throws SchemaValidationError if invalid or fetch fails
|
|
34736
34987
|
* @example
|
|
@@ -34746,24 +34997,53 @@ declare class DataController {
|
|
|
34746
34997
|
* ```
|
|
34747
34998
|
*/
|
|
34748
34999
|
fetchAndValidateSchema(url: string): Promise<DataSchema>;
|
|
35000
|
+
}
|
|
35001
|
+
|
|
35002
|
+
/**
|
|
35003
|
+
* Configuration options for polling server operations.
|
|
35004
|
+
*/
|
|
35005
|
+
interface PollingOptions {
|
|
35006
|
+
/** Polling interval in milliseconds (default: 500) */
|
|
35007
|
+
pollingInterval?: number;
|
|
35008
|
+
/** Maximum time to wait in milliseconds (default: 30000) */
|
|
35009
|
+
timeout?: number;
|
|
35010
|
+
}
|
|
35011
|
+
/**
|
|
35012
|
+
* Provides a Promise-based interface for server operation lifecycle management.
|
|
35013
|
+
*
|
|
35014
|
+
* @remarks
|
|
35015
|
+
* OperationHandle enables immediate access to operation IDs while providing
|
|
35016
|
+
* Promise-based methods for waiting on results. This pattern matches
|
|
35017
|
+
* TransactionHandle for consistency across the SDK's async operations.
|
|
35018
|
+
*
|
|
35019
|
+
* @category Server Operations
|
|
35020
|
+
*/
|
|
35021
|
+
declare class OperationHandle<T = unknown> {
|
|
35022
|
+
private readonly controller;
|
|
35023
|
+
readonly id: string;
|
|
35024
|
+
private _resultPromise?;
|
|
35025
|
+
constructor(controller: ServerController, id: string);
|
|
34749
35026
|
/**
|
|
34750
|
-
*
|
|
35027
|
+
* Waits for the operation to complete and returns the result.
|
|
34751
35028
|
*
|
|
34752
|
-
* @
|
|
34753
|
-
*
|
|
34754
|
-
*
|
|
35029
|
+
* @remarks
|
|
35030
|
+
* Results are memoized - multiple calls return the same promise.
|
|
35031
|
+
* The method polls the server at regular intervals until the operation
|
|
35032
|
+
* succeeds, fails, or times out.
|
|
35033
|
+
*
|
|
35034
|
+
* @param options - Optional polling configuration
|
|
35035
|
+
* @returns The operation result when completed
|
|
35036
|
+
* @throws {PersonalServerError} When the operation fails or times out
|
|
34755
35037
|
* @example
|
|
34756
35038
|
* ```typescript
|
|
34757
|
-
*
|
|
34758
|
-
*
|
|
34759
|
-
*
|
|
34760
|
-
*
|
|
34761
|
-
* if (schema.dialect === "json") {
|
|
34762
|
-
* vana.data.validateDataAgainstSchema(userData, schema);
|
|
34763
|
-
* }
|
|
35039
|
+
* const result = await handle.waitForResult({
|
|
35040
|
+
* timeout: 60000,
|
|
35041
|
+
* pollingInterval: 500
|
|
35042
|
+
* });
|
|
34764
35043
|
* ```
|
|
34765
35044
|
*/
|
|
34766
|
-
|
|
35045
|
+
waitForResult(options?: PollingOptions): Promise<T>;
|
|
35046
|
+
private pollForCompletion;
|
|
34767
35047
|
}
|
|
34768
35048
|
|
|
34769
35049
|
/**
|
|
@@ -34846,54 +35126,47 @@ declare class ServerController {
|
|
|
34846
35126
|
*/
|
|
34847
35127
|
getIdentity(request: InitPersonalServerParams): Promise<PersonalServerIdentity>;
|
|
34848
35128
|
/**
|
|
34849
|
-
* Creates
|
|
35129
|
+
* Creates a server operation and returns a handle for lifecycle management.
|
|
34850
35130
|
*
|
|
34851
35131
|
* @remarks
|
|
34852
|
-
* This method submits a computation request to the personal server
|
|
34853
|
-
*
|
|
34854
|
-
*
|
|
35132
|
+
* This method submits a computation request to the personal server and returns
|
|
35133
|
+
* an OperationHandle that provides Promise-based methods for waiting on results.
|
|
35134
|
+
* The handle pattern matches TransactionHandle for consistency across async operations.
|
|
35135
|
+
*
|
|
35136
|
+
* @param params - The operation request parameters
|
|
34855
35137
|
* @param params.permissionId - The permission ID authorizing this operation.
|
|
34856
|
-
* Obtain
|
|
34857
|
-
* @returns
|
|
34858
|
-
* @throws {PersonalServerError} When server request fails or parameters are invalid
|
|
34859
|
-
*
|
|
34860
|
-
* @throws {NetworkError} When personal server API communication fails.
|
|
34861
|
-
* Check server URL configuration and network connectivity.
|
|
35138
|
+
* Obtain via `vana.permissions.getUserPermissionGrantsOnChain()`.
|
|
35139
|
+
* @returns An OperationHandle providing access to the operation ID and result methods
|
|
35140
|
+
* @throws {PersonalServerError} When the server request fails or parameters are invalid
|
|
35141
|
+
* @throws {NetworkError} When personal server API communication fails
|
|
34862
35142
|
* @example
|
|
34863
35143
|
* ```typescript
|
|
34864
|
-
* const
|
|
34865
|
-
* permissionId: 123
|
|
35144
|
+
* const operation = await vana.server.createOperation({
|
|
35145
|
+
* permissionId: 123
|
|
34866
35146
|
* });
|
|
35147
|
+
* console.log(`Operation ID: ${operation.id}`);
|
|
34867
35148
|
*
|
|
34868
|
-
*
|
|
35149
|
+
* // Wait for completion
|
|
35150
|
+
* const result = await operation.waitForResult();
|
|
35151
|
+
* console.log("Result:", result);
|
|
34869
35152
|
* ```
|
|
34870
35153
|
*/
|
|
34871
|
-
createOperation(params: CreateOperationParams): Promise<
|
|
35154
|
+
createOperation<T = unknown>(params: CreateOperationParams): Promise<OperationHandle<T>>;
|
|
34872
35155
|
/**
|
|
34873
|
-
*
|
|
35156
|
+
* Retrieves the current status and result of a server operation.
|
|
34874
35157
|
*
|
|
34875
35158
|
* @remarks
|
|
34876
|
-
*
|
|
34877
|
-
*
|
|
34878
|
-
*
|
|
34879
|
-
*
|
|
34880
|
-
*
|
|
34881
|
-
*
|
|
34882
|
-
* @param operationId - The operation ID returned from the initial request submission
|
|
34883
|
-
* @returns A Promise that resolves to the current operation response with status and results
|
|
34884
|
-
* @throws {NetworkError} When the polling request fails or returns invalid data
|
|
35159
|
+
* Common status values: `starting`, `running`, `succeeded`, `failed`, `canceled`.
|
|
35160
|
+
* When status is `succeeded`, the result field contains the operation output.
|
|
35161
|
+
*
|
|
35162
|
+
* @param operationId - The ID of the operation to query
|
|
35163
|
+
* @returns The operation response containing status, result, and metadata
|
|
35164
|
+
* @throws {NetworkError} When the API request fails or returns invalid data
|
|
34885
35165
|
* @example
|
|
34886
35166
|
* ```typescript
|
|
34887
|
-
*
|
|
34888
|
-
*
|
|
34889
|
-
*
|
|
34890
|
-
* while (result.status === "processing") {
|
|
34891
|
-
* await new Promise(resolve => setTimeout(resolve, 1000));
|
|
34892
|
-
* result = await vana.server.getOperation(response.id);
|
|
34893
|
-
* }
|
|
34894
|
-
*
|
|
34895
|
-
* if (result.status === "succeeded") {
|
|
34896
|
-
* console.log("Computation completed:", result.output);
|
|
35167
|
+
* const status = await vana.server.getOperation(operationId);
|
|
35168
|
+
* if (status.status === 'succeeded') {
|
|
35169
|
+
* console.log('Result:', JSON.parse(status.result));
|
|
34897
35170
|
* }
|
|
34898
35171
|
* ```
|
|
34899
35172
|
*/
|
|
@@ -37458,4 +37731,4 @@ declare function Vana(config: VanaConfig): VanaBrowserImpl;
|
|
|
37458
37731
|
*/
|
|
37459
37732
|
type VanaInstance = VanaBrowserImpl;
|
|
37460
37733
|
|
|
37461
|
-
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 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, 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,
|
|
37734
|
+
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 };
|