@opendatalabs/vana-sdk 0.1.0-alpha.273dc39 → 0.1.0-alpha.2fd4542
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 +363 -104
- package/dist/index.browser.js +34029 -33084
- package/dist/index.browser.js.map +1 -1
- package/dist/index.node.cjs +34399 -33450
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.cts +366 -105
- package/dist/index.node.d.ts +366 -105
- package/dist/index.node.js +34344 -33397
- package/dist/index.node.js.map +1 -1
- package/package.json +1 -1
package/dist/index.browser.d.ts
CHANGED
|
@@ -984,6 +984,8 @@ interface ServerFilesAndPermissionParams {
|
|
|
984
984
|
grant: string;
|
|
985
985
|
/** File URLs */
|
|
986
986
|
fileUrls: string[];
|
|
987
|
+
/** Schema IDs for each file - use 0 for files without schema validation */
|
|
988
|
+
schemaIds: number[];
|
|
987
989
|
/** Server address */
|
|
988
990
|
serverAddress: Address;
|
|
989
991
|
/** Server URL */
|
|
@@ -1009,6 +1011,8 @@ interface ServerFilesAndPermissionTypedData extends GenericTypedData {
|
|
|
1009
1011
|
grant: string;
|
|
1010
1012
|
/** File URLs */
|
|
1011
1013
|
fileUrls: string[];
|
|
1014
|
+
/** Schema IDs for each file - use 0 for files without schema validation */
|
|
1015
|
+
schemaIds: bigint[];
|
|
1012
1016
|
/** Server address */
|
|
1013
1017
|
serverAddress: Address;
|
|
1014
1018
|
/** Server URL */
|
|
@@ -1748,6 +1752,12 @@ interface UserFile$1 {
|
|
|
1748
1752
|
transactionHash?: Address;
|
|
1749
1753
|
/** Additional file properties and custom application data. */
|
|
1750
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[];
|
|
1751
1761
|
}
|
|
1752
1762
|
/**
|
|
1753
1763
|
* Provides optional metadata for uploaded files and content description.
|
|
@@ -2159,33 +2169,84 @@ interface BatchUploadResult {
|
|
|
2159
2169
|
errors?: string[];
|
|
2160
2170
|
}
|
|
2161
2171
|
/**
|
|
2162
|
-
*
|
|
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.
|
|
2163
2205
|
*
|
|
2164
2206
|
* Schemas define the structure and validation rules for user data processed by refiners.
|
|
2165
2207
|
* They ensure data quality and consistency across the Vana network by specifying how
|
|
2166
2208
|
* raw user data should be formatted, validated, and processed.
|
|
2167
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
|
+
*
|
|
2168
2213
|
* @category Data Management
|
|
2169
2214
|
* @example
|
|
2170
2215
|
* ```typescript
|
|
2171
|
-
*
|
|
2216
|
+
* // Complete schema from schemas.get()
|
|
2217
|
+
* const completeSchema: Schema = {
|
|
2172
2218
|
* id: 5,
|
|
2173
2219
|
* name: 'Social Media Profile',
|
|
2174
|
-
*
|
|
2175
|
-
*
|
|
2176
|
-
*
|
|
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 = {
|
|
2234
|
+
* id: 5,
|
|
2235
|
+
* name: 'Social Media Profile',
|
|
2236
|
+
* dialect: 'json',
|
|
2237
|
+
* definitionUrl: 'ipfs://QmSchema...'
|
|
2177
2238
|
* };
|
|
2178
2239
|
* ```
|
|
2179
2240
|
*/
|
|
2180
|
-
interface Schema {
|
|
2181
|
-
/**
|
|
2182
|
-
|
|
2183
|
-
/**
|
|
2184
|
-
|
|
2185
|
-
/**
|
|
2186
|
-
|
|
2187
|
-
/**
|
|
2188
|
-
|
|
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;
|
|
2189
2250
|
}
|
|
2190
2251
|
/**
|
|
2191
2252
|
* Represents a refiner with schema information
|
|
@@ -2441,6 +2502,18 @@ declare const contractAbis: {
|
|
|
2441
2502
|
}];
|
|
2442
2503
|
readonly name: "InvalidPermissionsLength";
|
|
2443
2504
|
readonly type: "error";
|
|
2505
|
+
}, {
|
|
2506
|
+
readonly inputs: readonly [{
|
|
2507
|
+
readonly internalType: "uint256";
|
|
2508
|
+
readonly name: "filesLength";
|
|
2509
|
+
readonly type: "uint256";
|
|
2510
|
+
}, {
|
|
2511
|
+
readonly internalType: "uint256";
|
|
2512
|
+
readonly name: "schemaIdsLength";
|
|
2513
|
+
readonly type: "uint256";
|
|
2514
|
+
}];
|
|
2515
|
+
readonly name: "InvalidSchemaIdsLength";
|
|
2516
|
+
readonly type: "error";
|
|
2444
2517
|
}, {
|
|
2445
2518
|
readonly inputs: readonly [];
|
|
2446
2519
|
readonly name: "InvalidSignature";
|
|
@@ -2717,6 +2790,10 @@ declare const contractAbis: {
|
|
|
2717
2790
|
readonly internalType: "string[]";
|
|
2718
2791
|
readonly name: "fileUrls";
|
|
2719
2792
|
readonly type: "string[]";
|
|
2793
|
+
}, {
|
|
2794
|
+
readonly internalType: "uint256[]";
|
|
2795
|
+
readonly name: "schemaIds";
|
|
2796
|
+
readonly type: "uint256[]";
|
|
2720
2797
|
}, {
|
|
2721
2798
|
readonly internalType: "address";
|
|
2722
2799
|
readonly name: "serverAddress";
|
|
@@ -3699,7 +3776,7 @@ declare const contractAbis: {
|
|
|
3699
3776
|
readonly name: "addServerInput";
|
|
3700
3777
|
readonly type: "tuple";
|
|
3701
3778
|
}];
|
|
3702
|
-
readonly name: "
|
|
3779
|
+
readonly name: "addAndTrustServerByManager";
|
|
3703
3780
|
readonly outputs: readonly [];
|
|
3704
3781
|
readonly stateMutability: "nonpayable";
|
|
3705
3782
|
readonly type: "function";
|
|
@@ -4087,6 +4164,20 @@ declare const contractAbis: {
|
|
|
4087
4164
|
readonly outputs: readonly [];
|
|
4088
4165
|
readonly stateMutability: "nonpayable";
|
|
4089
4166
|
readonly type: "function";
|
|
4167
|
+
}, {
|
|
4168
|
+
readonly inputs: readonly [{
|
|
4169
|
+
readonly internalType: "address";
|
|
4170
|
+
readonly name: "userAddress";
|
|
4171
|
+
readonly type: "address";
|
|
4172
|
+
}, {
|
|
4173
|
+
readonly internalType: "uint256";
|
|
4174
|
+
readonly name: "serverId";
|
|
4175
|
+
readonly type: "uint256";
|
|
4176
|
+
}];
|
|
4177
|
+
readonly name: "trustServerByManager";
|
|
4178
|
+
readonly outputs: readonly [];
|
|
4179
|
+
readonly stateMutability: "nonpayable";
|
|
4180
|
+
readonly type: "function";
|
|
4090
4181
|
}, {
|
|
4091
4182
|
readonly inputs: readonly [{
|
|
4092
4183
|
readonly components: readonly [{
|
|
@@ -5145,6 +5236,31 @@ declare const contractAbis: {
|
|
|
5145
5236
|
}];
|
|
5146
5237
|
readonly name: "FileAdded";
|
|
5147
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";
|
|
5148
5264
|
}, {
|
|
5149
5265
|
readonly anonymous: false;
|
|
5150
5266
|
readonly inputs: readonly [{
|
|
@@ -5571,6 +5687,16 @@ declare const contractAbis: {
|
|
|
5571
5687
|
}];
|
|
5572
5688
|
readonly stateMutability: "view";
|
|
5573
5689
|
readonly type: "function";
|
|
5690
|
+
}, {
|
|
5691
|
+
readonly inputs: readonly [];
|
|
5692
|
+
readonly name: "emitLegacyEvents";
|
|
5693
|
+
readonly outputs: readonly [{
|
|
5694
|
+
readonly internalType: "bool";
|
|
5695
|
+
readonly name: "";
|
|
5696
|
+
readonly type: "bool";
|
|
5697
|
+
}];
|
|
5698
|
+
readonly stateMutability: "view";
|
|
5699
|
+
readonly type: "function";
|
|
5574
5700
|
}, {
|
|
5575
5701
|
readonly inputs: readonly [{
|
|
5576
5702
|
readonly internalType: "string";
|
|
@@ -5689,6 +5815,10 @@ declare const contractAbis: {
|
|
|
5689
5815
|
readonly internalType: "string";
|
|
5690
5816
|
readonly name: "url";
|
|
5691
5817
|
readonly type: "string";
|
|
5818
|
+
}, {
|
|
5819
|
+
readonly internalType: "uint256";
|
|
5820
|
+
readonly name: "schemaId";
|
|
5821
|
+
readonly type: "uint256";
|
|
5692
5822
|
}, {
|
|
5693
5823
|
readonly internalType: "uint256";
|
|
5694
5824
|
readonly name: "addedAtBlock";
|
|
@@ -5906,6 +6036,16 @@ declare const contractAbis: {
|
|
|
5906
6036
|
readonly outputs: readonly [];
|
|
5907
6037
|
readonly stateMutability: "nonpayable";
|
|
5908
6038
|
readonly type: "function";
|
|
6039
|
+
}, {
|
|
6040
|
+
readonly inputs: readonly [{
|
|
6041
|
+
readonly internalType: "bool";
|
|
6042
|
+
readonly name: "newEmitLegacyEvents";
|
|
6043
|
+
readonly type: "bool";
|
|
6044
|
+
}];
|
|
6045
|
+
readonly name: "updateEmitLegacyEvents";
|
|
6046
|
+
readonly outputs: readonly [];
|
|
6047
|
+
readonly stateMutability: "nonpayable";
|
|
6048
|
+
readonly type: "function";
|
|
5909
6049
|
}, {
|
|
5910
6050
|
readonly inputs: readonly [{
|
|
5911
6051
|
readonly internalType: "address";
|
|
@@ -28754,19 +28894,19 @@ declare const EVENT_MAPPINGS: {
|
|
|
28754
28894
|
};
|
|
28755
28895
|
readonly addFile: {
|
|
28756
28896
|
readonly contract: "DataRegistry";
|
|
28757
|
-
readonly event: "
|
|
28897
|
+
readonly event: "FileAddedV2";
|
|
28758
28898
|
};
|
|
28759
28899
|
readonly addFileWithPermissionsAndSchema: {
|
|
28760
28900
|
readonly contract: "DataRegistry";
|
|
28761
|
-
readonly event: "
|
|
28901
|
+
readonly event: "FileAddedV2";
|
|
28762
28902
|
};
|
|
28763
28903
|
readonly addFileWithSchema: {
|
|
28764
28904
|
readonly contract: "DataRegistry";
|
|
28765
|
-
readonly event: "
|
|
28905
|
+
readonly event: "FileAddedV2";
|
|
28766
28906
|
};
|
|
28767
28907
|
readonly addFileWithPermissions: {
|
|
28768
28908
|
readonly contract: "DataRegistry";
|
|
28769
|
-
readonly event: "
|
|
28909
|
+
readonly event: "FileAddedV2";
|
|
28770
28910
|
};
|
|
28771
28911
|
readonly addRefinement: {
|
|
28772
28912
|
readonly contract: "DataRegistry";
|
|
@@ -30407,6 +30547,7 @@ declare class PermissionsController {
|
|
|
30407
30547
|
* @param params.granteeId - Grantee ID
|
|
30408
30548
|
* @param params.grant - Grant URL or grant data
|
|
30409
30549
|
* @param params.fileUrls - Array of file URLs
|
|
30550
|
+
* @param params.schemaIds - Schema IDs for each file
|
|
30410
30551
|
* @param params.serverAddress - Server address
|
|
30411
30552
|
* @param params.serverUrl - Server URL
|
|
30412
30553
|
* @param params.serverPublicKey - Server public key
|
|
@@ -31157,14 +31298,54 @@ declare class PermissionsController {
|
|
|
31157
31298
|
*/
|
|
31158
31299
|
submitSignedAddPermission(typedData: GenericTypedData, signature: Hash): Promise<TransactionHandle<PermissionGrantResult>>;
|
|
31159
31300
|
/**
|
|
31160
|
-
*
|
|
31301
|
+
* Submits server files and permissions with signature to the blockchain, supporting schema validation and gasless transactions.
|
|
31302
|
+
*
|
|
31303
|
+
* @remarks
|
|
31304
|
+
* This method validates files against their specified schemas before submission.
|
|
31305
|
+
* Schema validation ensures data conforms to expected formats before on-chain registration.
|
|
31306
|
+
* Files with schemaId = 0 bypass validation. The method supports atomic batch operations
|
|
31307
|
+
* where all files and permissions are registered in a single transaction.
|
|
31161
31308
|
*
|
|
31162
31309
|
* @param params - Parameters for adding server files and permissions
|
|
31163
|
-
* @
|
|
31164
|
-
* @
|
|
31310
|
+
* @param params.granteeId - The ID of the permission grantee
|
|
31311
|
+
* @param params.grant - Grant URL containing permission parameters (typically IPFS)
|
|
31312
|
+
* @param params.fileUrls - Array of file URLs to register
|
|
31313
|
+
* @param params.schemaIds - Schema IDs for each file. Use 0 for files without schema validation.
|
|
31314
|
+
* Array length must match fileUrls length.
|
|
31315
|
+
* @param params.serverAddress - Server wallet address for decryption permissions
|
|
31316
|
+
* @param params.serverUrl - Server endpoint URL
|
|
31317
|
+
* @param params.serverPublicKey - Server's public key for encryption.
|
|
31318
|
+
* Obtain via `vana.server.getIdentity(userAddress).public_key`.
|
|
31319
|
+
* @param params.filePermissions - Nested array of permissions for each file
|
|
31320
|
+
* @returns TransactionHandle with immediate hash access and event parsing capability
|
|
31321
|
+
* @throws {Error} When schemaIds array length doesn't match fileUrls array length
|
|
31322
|
+
* @throws {SchemaValidationError} When file data doesn't match the specified schema.
|
|
31323
|
+
* Verify data structure matches schema definition from `vana.schemas.get(schemaId)`.
|
|
31324
|
+
* @throws {RelayerError} When gasless transaction submission fails.
|
|
31325
|
+
* Retry without relayer configuration to submit direct transaction.
|
|
31165
31326
|
* @throws {SignatureError} When user rejects the signature request
|
|
31166
31327
|
* @throws {BlockchainError} When server files and permissions addition fails
|
|
31167
|
-
* @throws {NetworkError} When network communication fails
|
|
31328
|
+
* @throws {NetworkError} When network communication fails.
|
|
31329
|
+
* Check network connection or configure alternative gateways.
|
|
31330
|
+
*
|
|
31331
|
+
* @example
|
|
31332
|
+
* ```typescript
|
|
31333
|
+
* const result = await vana.permissions.submitAddServerFilesAndPermissions({
|
|
31334
|
+
* granteeId: BigInt(1),
|
|
31335
|
+
* grant: "ipfs://QmXxx...",
|
|
31336
|
+
* fileUrls: ["https://storage.example.com/data.json"],
|
|
31337
|
+
* schemaIds: [123], // LinkedIn profile schema ID
|
|
31338
|
+
* serverAddress: "0x742d35Cc6634C0532925a3b844Bc9e7595f0b0Bb",
|
|
31339
|
+
* serverUrl: "https://server.example.com",
|
|
31340
|
+
* serverPublicKey: serverInfo.public_key,
|
|
31341
|
+
* filePermissions: [[{
|
|
31342
|
+
* account: "0x742d35Cc6634C0532925a3b844Bc9e7595f0b0Bb",
|
|
31343
|
+
* key: encryptedKey
|
|
31344
|
+
* }]]
|
|
31345
|
+
* });
|
|
31346
|
+
* const events = await result.waitForEvents();
|
|
31347
|
+
* console.log(`Permission ID: ${events.permissionId}`);
|
|
31348
|
+
* ```
|
|
31168
31349
|
*/
|
|
31169
31350
|
submitAddServerFilesAndPermissions(params: ServerFilesAndPermissionParams): Promise<TransactionHandle<PermissionGrantResult>>;
|
|
31170
31351
|
/**
|
|
@@ -31232,10 +31413,10 @@ declare class PermissionsController {
|
|
|
31232
31413
|
interface CreateSchemaParams {
|
|
31233
31414
|
/** The name of the schema */
|
|
31234
31415
|
name: string;
|
|
31235
|
-
/** The
|
|
31236
|
-
|
|
31416
|
+
/** The dialect of the schema (e.g., 'json' or 'sqlite') */
|
|
31417
|
+
dialect: "json" | "sqlite";
|
|
31237
31418
|
/** The schema definition object or JSON string */
|
|
31238
|
-
|
|
31419
|
+
schema: object | string;
|
|
31239
31420
|
}
|
|
31240
31421
|
/**
|
|
31241
31422
|
* Result of creating a new schema.
|
|
@@ -31280,8 +31461,8 @@ interface CreateSchemaResult {
|
|
|
31280
31461
|
* // Create a new schema with automatic IPFS upload
|
|
31281
31462
|
* const result = await vana.schemas.create({
|
|
31282
31463
|
* name: "User Profile",
|
|
31283
|
-
*
|
|
31284
|
-
*
|
|
31464
|
+
* dialect: "json",
|
|
31465
|
+
* schema: {
|
|
31285
31466
|
* type: "object",
|
|
31286
31467
|
* properties: {
|
|
31287
31468
|
* name: { type: "string" },
|
|
@@ -31316,7 +31497,7 @@ declare class SchemaController {
|
|
|
31316
31497
|
* - Uploads the definition to IPFS to generate a permanent URL
|
|
31317
31498
|
* - Registers the schema on the blockchain with the generated URL
|
|
31318
31499
|
*
|
|
31319
|
-
* @param params - Schema creation parameters including name,
|
|
31500
|
+
* @param params - Schema creation parameters including name, dialect, and definition
|
|
31320
31501
|
* @returns Promise resolving to creation results with schema ID and transaction hash
|
|
31321
31502
|
* @throws {SchemaValidationError} When the schema definition is invalid
|
|
31322
31503
|
* @throws {Error} When IPFS upload or blockchain registration fails
|
|
@@ -31325,8 +31506,8 @@ declare class SchemaController {
|
|
|
31325
31506
|
* // Create a JSON schema for user profiles
|
|
31326
31507
|
* const result = await vana.schemas.create({
|
|
31327
31508
|
* name: "User Profile",
|
|
31328
|
-
*
|
|
31329
|
-
*
|
|
31509
|
+
* dialect: "json",
|
|
31510
|
+
* schema: {
|
|
31330
31511
|
* type: "object",
|
|
31331
31512
|
* properties: {
|
|
31332
31513
|
* name: { type: "string" },
|
|
@@ -31341,27 +31522,28 @@ declare class SchemaController {
|
|
|
31341
31522
|
*/
|
|
31342
31523
|
create(params: CreateSchemaParams): Promise<CreateSchemaResult>;
|
|
31343
31524
|
/**
|
|
31344
|
-
* Retrieves a schema by its ID.
|
|
31525
|
+
* Retrieves a complete schema by its ID with definition fetched and flattened.
|
|
31345
31526
|
*
|
|
31346
31527
|
* @param schemaId - The ID of the schema to retrieve
|
|
31347
31528
|
* @param options - Optional parameters
|
|
31348
31529
|
* @param options.subgraphUrl - Custom subgraph URL to use instead of default
|
|
31349
|
-
* @returns Promise resolving to the schema object
|
|
31350
|
-
* @throws {Error} When the schema is not found or chain is unavailable
|
|
31530
|
+
* @returns Promise resolving to the complete schema object with all fields populated
|
|
31531
|
+
* @throws {Error} When the schema is not found, definition cannot be fetched, or chain is unavailable
|
|
31351
31532
|
* @example
|
|
31352
31533
|
* ```typescript
|
|
31353
31534
|
* const schema = await vana.schemas.get(1);
|
|
31354
|
-
* console.log(`Schema: ${schema.name} (${schema.
|
|
31535
|
+
* console.log(`Schema: ${schema.name} (${schema.dialect})`);
|
|
31536
|
+
* console.log(`Version: ${schema.version}`);
|
|
31537
|
+
* console.log(`Description: ${schema.description}`);
|
|
31538
|
+
* console.log('Schema:', schema.schema);
|
|
31355
31539
|
*
|
|
31356
|
-
* //
|
|
31357
|
-
*
|
|
31358
|
-
* subgraphUrl: 'https://custom-subgraph.com/graphql'
|
|
31359
|
-
* });
|
|
31540
|
+
* // Use directly with validator (schema has all required fields)
|
|
31541
|
+
* validator.validateDataAgainstSchema(data, schema);
|
|
31360
31542
|
* ```
|
|
31361
31543
|
*/
|
|
31362
31544
|
get(schemaId: number, options?: {
|
|
31363
31545
|
subgraphUrl?: string;
|
|
31364
|
-
}): Promise<
|
|
31546
|
+
}): Promise<CompleteSchema>;
|
|
31365
31547
|
/**
|
|
31366
31548
|
* Gets the total number of schemas registered on the network.
|
|
31367
31549
|
*
|
|
@@ -31390,27 +31572,25 @@ declare class SchemaController {
|
|
|
31390
31572
|
* @param options.limit - Maximum number of schemas to return
|
|
31391
31573
|
* @param options.offset - Number of schemas to skip
|
|
31392
31574
|
* @param options.subgraphUrl - Custom subgraph URL to use instead of default
|
|
31575
|
+
* @param options.includeDefinitions - Whether to fetch and include schema definitions (default: false for performance)
|
|
31393
31576
|
* @returns Promise resolving to an array of schemas
|
|
31394
31577
|
* @example
|
|
31395
31578
|
* ```typescript
|
|
31396
|
-
* // Get all schemas
|
|
31579
|
+
* // Get all schemas (without definitions for performance)
|
|
31397
31580
|
* const schemas = await vana.schemas.list();
|
|
31398
31581
|
*
|
|
31582
|
+
* // Get schemas with definitions
|
|
31583
|
+
* const schemas = await vana.schemas.list({ includeDefinitions: true });
|
|
31584
|
+
*
|
|
31399
31585
|
* // Get schemas with pagination
|
|
31400
31586
|
* const schemas = await vana.schemas.list({ limit: 10, offset: 0 });
|
|
31401
|
-
*
|
|
31402
|
-
* // With custom subgraph
|
|
31403
|
-
* const schemas = await vana.schemas.list({
|
|
31404
|
-
* limit: 10,
|
|
31405
|
-
* offset: 0,
|
|
31406
|
-
* subgraphUrl: 'https://custom-subgraph.com/graphql'
|
|
31407
|
-
* });
|
|
31408
31587
|
* ```
|
|
31409
31588
|
*/
|
|
31410
31589
|
list(options?: {
|
|
31411
31590
|
limit?: number;
|
|
31412
31591
|
offset?: number;
|
|
31413
31592
|
subgraphUrl?: string;
|
|
31593
|
+
includeDefinitions?: boolean;
|
|
31414
31594
|
}): Promise<Schema[]>;
|
|
31415
31595
|
/**
|
|
31416
31596
|
* Adds a schema using the legacy method (low-level API).
|
|
@@ -31457,6 +31637,13 @@ declare class SchemaController {
|
|
|
31457
31637
|
* @returns Promise resolving to the user's address
|
|
31458
31638
|
*/
|
|
31459
31639
|
private getUserAddress;
|
|
31640
|
+
/**
|
|
31641
|
+
* Fetches and attaches definitions to an array of schemas.
|
|
31642
|
+
*
|
|
31643
|
+
* @param schemas - Array of schemas to fetch definitions for
|
|
31644
|
+
* @private
|
|
31645
|
+
*/
|
|
31646
|
+
private _fetchDefinitionsForSchemas;
|
|
31460
31647
|
}
|
|
31461
31648
|
|
|
31462
31649
|
/**
|
|
@@ -31498,16 +31685,16 @@ declare class SchemaValidationError extends Error {
|
|
|
31498
31685
|
}>);
|
|
31499
31686
|
}
|
|
31500
31687
|
/**
|
|
31501
|
-
*
|
|
31688
|
+
* Data schema validation utility class
|
|
31502
31689
|
*/
|
|
31503
31690
|
declare class SchemaValidator {
|
|
31504
31691
|
private ajv;
|
|
31505
31692
|
private dataSchemaValidator;
|
|
31506
31693
|
constructor();
|
|
31507
31694
|
/**
|
|
31508
|
-
* Validates a data schema against the Vana meta-schema
|
|
31695
|
+
* Validates a data schema definition against the Vana meta-schema
|
|
31509
31696
|
*
|
|
31510
|
-
* @param schema - The data schema to validate
|
|
31697
|
+
* @param schema - The data schema definition to validate
|
|
31511
31698
|
* @throws SchemaValidationError if invalid
|
|
31512
31699
|
* @example
|
|
31513
31700
|
* ```typescript
|
|
@@ -31526,39 +31713,35 @@ declare class SchemaValidator {
|
|
|
31526
31713
|
* }
|
|
31527
31714
|
* };
|
|
31528
31715
|
*
|
|
31529
|
-
* validator.
|
|
31716
|
+
* validator.validateDataSchemaAgainstMetaSchema(schema); // throws if invalid
|
|
31530
31717
|
* ```
|
|
31531
31718
|
*/
|
|
31532
|
-
|
|
31719
|
+
validateDataSchemaAgainstMetaSchema(schema: unknown): asserts schema is DataSchema;
|
|
31533
31720
|
/**
|
|
31534
|
-
* Validates data against a JSON Schema
|
|
31721
|
+
* Validates data against a JSON Schema
|
|
31535
31722
|
*
|
|
31536
31723
|
* @param data - The data to validate
|
|
31537
|
-
* @param schema - The
|
|
31724
|
+
* @param schema - The schema containing the validation rules (must have been validated or fetched from chain)
|
|
31538
31725
|
* @throws SchemaValidationError if invalid
|
|
31539
31726
|
* @example
|
|
31540
31727
|
* ```typescript
|
|
31541
31728
|
* const validator = new SchemaValidator();
|
|
31542
31729
|
*
|
|
31543
|
-
*
|
|
31730
|
+
* // Works with Schema from schemas.get()
|
|
31731
|
+
* const schema = await vana.schemas.get(1);
|
|
31732
|
+
* validator.validateDataAgainstSchema(userData, schema);
|
|
31733
|
+
*
|
|
31734
|
+
* // Also works with pre-validated DataSchema object
|
|
31735
|
+
* const dataSchema = validator.validateDataSchemaAgainstMetaSchema({
|
|
31544
31736
|
* name: "User Profile",
|
|
31545
31737
|
* version: "1.0.0",
|
|
31546
31738
|
* dialect: "json",
|
|
31547
|
-
* schema: {
|
|
31548
|
-
*
|
|
31549
|
-
*
|
|
31550
|
-
* name: { type: "string" },
|
|
31551
|
-
* age: { type: "number" }
|
|
31552
|
-
* },
|
|
31553
|
-
* required: ["name"]
|
|
31554
|
-
* }
|
|
31555
|
-
* };
|
|
31556
|
-
*
|
|
31557
|
-
* const userData = { name: "Alice", age: 30 };
|
|
31558
|
-
* validator.validateDataAgainstSchema(userData, schema);
|
|
31739
|
+
* schema: { type: "object", properties: { name: { type: "string" } } }
|
|
31740
|
+
* });
|
|
31741
|
+
* validator.validateDataAgainstSchema(userData, dataSchema);
|
|
31559
31742
|
* ```
|
|
31560
31743
|
*/
|
|
31561
|
-
validateDataAgainstSchema(data: unknown, schema: DataSchema): void;
|
|
31744
|
+
validateDataAgainstSchema(data: unknown, schema: DataSchema | Schema): void;
|
|
31562
31745
|
/**
|
|
31563
31746
|
* Validates a SQLite DDL string for basic syntax
|
|
31564
31747
|
* Note: This is a basic validation, full SQL parsing would require a proper SQL parser
|
|
@@ -31569,9 +31752,9 @@ declare class SchemaValidator {
|
|
|
31569
31752
|
*/
|
|
31570
31753
|
validateSQLiteDDL(ddl: string, dialectVersion?: string): void;
|
|
31571
31754
|
/**
|
|
31572
|
-
* Fetches and validates a schema from a URL
|
|
31755
|
+
* Fetches and validates a data schema from a URL
|
|
31573
31756
|
*
|
|
31574
|
-
* @param url - The URL to fetch the schema from
|
|
31757
|
+
* @param url - The URL to fetch the data schema from
|
|
31575
31758
|
* @returns The validated data schema
|
|
31576
31759
|
* @throws SchemaValidationError if invalid or fetch fails
|
|
31577
31760
|
* @example
|
|
@@ -31587,13 +31770,24 @@ declare class SchemaValidator {
|
|
|
31587
31770
|
*/
|
|
31588
31771
|
declare const schemaValidator: SchemaValidator;
|
|
31589
31772
|
/**
|
|
31590
|
-
* Convenience function to validate a data schema
|
|
31773
|
+
* Convenience function to validate a data schema definition against the Vana meta-schema
|
|
31591
31774
|
*
|
|
31592
|
-
* @param schema - The data schema to validate
|
|
31593
|
-
* @returns
|
|
31775
|
+
* @param schema - The data schema definition to validate
|
|
31776
|
+
* @returns The validated DataSchema
|
|
31594
31777
|
* @throws SchemaValidationError if invalid
|
|
31778
|
+
* @example
|
|
31779
|
+
* ```typescript
|
|
31780
|
+
* const schemaDefinition = {
|
|
31781
|
+
* name: "User Profile",
|
|
31782
|
+
* version: "1.0.0",
|
|
31783
|
+
* dialect: "json",
|
|
31784
|
+
* schema: { type: "object", properties: { name: { type: "string" } } }
|
|
31785
|
+
* };
|
|
31786
|
+
*
|
|
31787
|
+
* const validatedSchema = validateDataSchemaAgainstMetaSchema(schemaDefinition);
|
|
31788
|
+
* ```
|
|
31595
31789
|
*/
|
|
31596
|
-
declare function
|
|
31790
|
+
declare function validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
|
|
31597
31791
|
/**
|
|
31598
31792
|
* Convenience function to validate data against a schema
|
|
31599
31793
|
*
|
|
@@ -31602,11 +31796,11 @@ declare function validateDataSchema(schema: unknown): asserts schema is DataSche
|
|
|
31602
31796
|
* @returns void - Function doesn't return a value
|
|
31603
31797
|
* @throws SchemaValidationError if invalid
|
|
31604
31798
|
*/
|
|
31605
|
-
declare function validateDataAgainstSchema(data: unknown, schema: DataSchema): void;
|
|
31799
|
+
declare function validateDataAgainstSchema(data: unknown, schema: DataSchema | Schema): void;
|
|
31606
31800
|
/**
|
|
31607
|
-
* Convenience function to fetch and validate a schema from a URL
|
|
31801
|
+
* Convenience function to fetch and validate a data schema from a URL
|
|
31608
31802
|
*
|
|
31609
|
-
* @param url - The URL to fetch the schema from
|
|
31803
|
+
* @param url - The URL to fetch the data schema from
|
|
31610
31804
|
* @returns The validated data schema
|
|
31611
31805
|
* @throws SchemaValidationError if invalid or fetch fails
|
|
31612
31806
|
*/
|
|
@@ -34097,6 +34291,89 @@ declare class DataController {
|
|
|
34097
34291
|
owner: Address;
|
|
34098
34292
|
subgraphUrl?: string;
|
|
34099
34293
|
}): Promise<UserFile$1[]>;
|
|
34294
|
+
/**
|
|
34295
|
+
* Fetches proof data for multiple files from the subgraph.
|
|
34296
|
+
*
|
|
34297
|
+
* @private
|
|
34298
|
+
* @param fileIds - Array of file IDs to fetch proofs for
|
|
34299
|
+
* @param subgraphUrl - The subgraph endpoint URL
|
|
34300
|
+
* @returns Map of file IDs to their associated DLP IDs
|
|
34301
|
+
*/
|
|
34302
|
+
private _fetchProofsFromSubgraph;
|
|
34303
|
+
/**
|
|
34304
|
+
* Fetches proof data for multiple files from the blockchain.
|
|
34305
|
+
* Falls back to this when subgraph is unavailable.
|
|
34306
|
+
*
|
|
34307
|
+
* @private
|
|
34308
|
+
* @param fileIds - Array of file IDs to fetch proofs for
|
|
34309
|
+
* @returns Map of file IDs to their associated DLP IDs
|
|
34310
|
+
*/
|
|
34311
|
+
private _fetchProofsFromChain;
|
|
34312
|
+
/**
|
|
34313
|
+
* Retrieves information about a specific Data Liquidity Pool (DLP).
|
|
34314
|
+
*
|
|
34315
|
+
* @remarks
|
|
34316
|
+
* DLPs are entities that process and verify data files in the Vana network.
|
|
34317
|
+
* This method fetches DLP metadata including name, status, and performance rating.
|
|
34318
|
+
* Uses subgraph first for efficiency, falls back to chain if unavailable.
|
|
34319
|
+
*
|
|
34320
|
+
* @param dlpId - The unique identifier of the DLP
|
|
34321
|
+
* @param options - Optional parameters
|
|
34322
|
+
* @param options.subgraphUrl - Custom subgraph URL to override default
|
|
34323
|
+
* @returns Promise resolving to DLP information
|
|
34324
|
+
* @throws {Error} When DLP cannot be found - "DLP not found: {dlpId}"
|
|
34325
|
+
* @throws {Error} When query fails - "Failed to fetch DLP: {error}"
|
|
34326
|
+
* @example
|
|
34327
|
+
* ```typescript
|
|
34328
|
+
* const dlp = await vana.data.getDLP(26);
|
|
34329
|
+
* console.log(`DLP ${dlp.name}: ${dlp.status}`);
|
|
34330
|
+
* ```
|
|
34331
|
+
*/
|
|
34332
|
+
getDLP(dlpId: number, options?: {
|
|
34333
|
+
subgraphUrl?: string;
|
|
34334
|
+
}): Promise<{
|
|
34335
|
+
id: number;
|
|
34336
|
+
name: string;
|
|
34337
|
+
metadata?: string;
|
|
34338
|
+
status?: number;
|
|
34339
|
+
address?: Address;
|
|
34340
|
+
owner?: Address;
|
|
34341
|
+
}>;
|
|
34342
|
+
/**
|
|
34343
|
+
* Lists all Data Liquidity Pools (DLPs) with optional pagination.
|
|
34344
|
+
*
|
|
34345
|
+
* @remarks
|
|
34346
|
+
* Fetches a paginated list of all DLPs registered in the network.
|
|
34347
|
+
* Uses subgraph for efficient querying with fallback to chain multicall.
|
|
34348
|
+
*
|
|
34349
|
+
* @param options - Optional parameters for pagination and filtering
|
|
34350
|
+
* @param options.limit - Maximum number of DLPs to return (default: 100)
|
|
34351
|
+
* @param options.offset - Number of DLPs to skip (default: 0)
|
|
34352
|
+
* @param options.subgraphUrl - Custom subgraph URL to override default
|
|
34353
|
+
* @returns Promise resolving to array of DLP information
|
|
34354
|
+
* @throws {Error} When query fails - "Failed to list DLPs: {error}"
|
|
34355
|
+
* @example
|
|
34356
|
+
* ```typescript
|
|
34357
|
+
* // Get first 10 DLPs
|
|
34358
|
+
* const dlps = await vana.data.listDLPs({ limit: 10 });
|
|
34359
|
+
* dlps.forEach(dlp => console.log(`${dlp.id}: ${dlp.name}`));
|
|
34360
|
+
*
|
|
34361
|
+
* // Get next page
|
|
34362
|
+
* const nextPage = await vana.data.listDLPs({ limit: 10, offset: 10 });
|
|
34363
|
+
* ```
|
|
34364
|
+
*/
|
|
34365
|
+
listDLPs(options?: {
|
|
34366
|
+
limit?: number;
|
|
34367
|
+
offset?: number;
|
|
34368
|
+
subgraphUrl?: string;
|
|
34369
|
+
}): Promise<Array<{
|
|
34370
|
+
id: number;
|
|
34371
|
+
name: string;
|
|
34372
|
+
metadata?: string;
|
|
34373
|
+
status?: number;
|
|
34374
|
+
address?: Address;
|
|
34375
|
+
owner?: Address;
|
|
34376
|
+
}>>;
|
|
34100
34377
|
/**
|
|
34101
34378
|
* Retrieves a list of permissions granted by a user.
|
|
34102
34379
|
*
|
|
@@ -34600,10 +34877,10 @@ declare class DataController {
|
|
|
34600
34877
|
gateways?: string[];
|
|
34601
34878
|
}): Promise<Blob>;
|
|
34602
34879
|
/**
|
|
34603
|
-
* Validates a data schema against the Vana meta-schema.
|
|
34880
|
+
* Validates a data schema definition against the Vana meta-schema.
|
|
34604
34881
|
*
|
|
34605
|
-
* @param schema - The data schema to validate
|
|
34606
|
-
* @returns
|
|
34882
|
+
* @param schema - The data schema definition to validate
|
|
34883
|
+
* @returns The validated DataSchema
|
|
34607
34884
|
* @throws SchemaValidationError if invalid
|
|
34608
34885
|
* @example
|
|
34609
34886
|
* ```typescript
|
|
@@ -34620,10 +34897,10 @@ declare class DataController {
|
|
|
34620
34897
|
* }
|
|
34621
34898
|
* };
|
|
34622
34899
|
*
|
|
34623
|
-
* vana.data.
|
|
34900
|
+
* const validatedSchema = vana.data.validateDataSchemaAgainstMetaSchema(schema);
|
|
34624
34901
|
* ```
|
|
34625
34902
|
*/
|
|
34626
|
-
|
|
34903
|
+
validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
|
|
34627
34904
|
/**
|
|
34628
34905
|
* Validates data against a JSON Schema from a data schema.
|
|
34629
34906
|
*
|
|
@@ -34653,9 +34930,9 @@ declare class DataController {
|
|
|
34653
34930
|
*/
|
|
34654
34931
|
validateDataAgainstSchema(data: unknown, schema: DataSchema): void;
|
|
34655
34932
|
/**
|
|
34656
|
-
* Fetches and validates a schema from a URL, then returns the parsed data schema.
|
|
34933
|
+
* Fetches and validates a data schema from a URL, then returns the parsed data schema.
|
|
34657
34934
|
*
|
|
34658
|
-
* @param url - The URL to fetch the schema from
|
|
34935
|
+
* @param url - The URL to fetch the data schema from
|
|
34659
34936
|
* @returns The validated data schema
|
|
34660
34937
|
* @throws SchemaValidationError if invalid or fetch fails
|
|
34661
34938
|
* @example
|
|
@@ -34671,24 +34948,6 @@ declare class DataController {
|
|
|
34671
34948
|
* ```
|
|
34672
34949
|
*/
|
|
34673
34950
|
fetchAndValidateSchema(url: string): Promise<DataSchema>;
|
|
34674
|
-
/**
|
|
34675
|
-
* Retrieves a schema by ID and fetches its definition URL to get the full data schema.
|
|
34676
|
-
*
|
|
34677
|
-
* @param schemaId - The schema ID to retrieve and validate
|
|
34678
|
-
* @returns The validated data schema
|
|
34679
|
-
* @throws SchemaValidationError if schema is invalid
|
|
34680
|
-
* @example
|
|
34681
|
-
* ```typescript
|
|
34682
|
-
* // Get schema from registry and validate its schema
|
|
34683
|
-
* const schema = await vana.data.getValidatedSchema(123);
|
|
34684
|
-
*
|
|
34685
|
-
* // Use it to validate user data
|
|
34686
|
-
* if (schema.dialect === "json") {
|
|
34687
|
-
* vana.data.validateDataAgainstSchema(userData, schema);
|
|
34688
|
-
* }
|
|
34689
|
-
* ```
|
|
34690
|
-
*/
|
|
34691
|
-
getValidatedSchema(schemaId: number): Promise<DataSchema>;
|
|
34692
34951
|
}
|
|
34693
34952
|
|
|
34694
34953
|
/**
|
|
@@ -37383,4 +37642,4 @@ declare function Vana(config: VanaConfig): VanaBrowserImpl;
|
|
|
37383
37642
|
*/
|
|
37384
37643
|
type VanaInstance = VanaBrowserImpl;
|
|
37385
37644
|
|
|
37386
|
-
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,
|
|
37645
|
+
export { type $defs, type APIResponse, type AddAndTrustServerInput, type AddAndTrustServerParams, type AddAndTrustServerTypedData, type AddRefinerParams, type AddRefinerResult, type AddSchemaParams, type AddSchemaResult, type AllKeys, ApiClient, type ApiClientConfig, type ApiResponse, AsyncQueue, type AsyncResult, type AuthenticationErrorResponse, type Awaited, type BaseConfig, type BaseConfigWithStorage, BaseController, type BatchServerInfoResult, type BatchUploadParams, type BatchUploadResult, type BlockRange, BlockchainError, type BlockchainErrorResponse, type Brand, BrowserPlatformAdapter, type Cache, type CacheConfig, CallbackStorage, type ChainConfig, type ChainConfigWithStorage, type CheckPermissionParams, CircuitBreaker, type CompleteSchema, type ComputeErrorResponse, type ConditionalOptional, type ConfigValidationOptions, type ConfigValidationResult, type ContractAddresses, type ContractCall, type ContractDeployment, ContractFactory, type ContractInfo, type ContractMethodParams, type ContractMethodReturnType, ContractNotFoundError, type Controller, type ControllerContext, type CreateOperationParams, type CreateOperationRequest, type CreateOperationResponse, type CreateSchemaParams, type CreateSchemaResult, DEFAULT_ENCRYPTION_SEED, DEFAULT_IPFS_GATEWAY, DataController, type DataSchema, type DecryptionErrorResponse, type DeepPartial, type DeepReadonly, type DeleteFileParams, type DeleteFileResult, type DownloadFileParams, type DownloadFileResult, type EncryptedUploadParams, type EncryptionInfo, type ErrorResponse, EventEmitter, type EventFilter, type EventLog, type Factory, type FileAccessErrorResponse, type FileAccessPermissions, type FileMetadata, type FilePermissionParams, type FileSharingConfig, type GasEstimate, type GenericRequest, type GenericResponse, type GenericTypedData, type GetFileParams, type GetOperationResponse, type GetUserFilesParams, type GetUserPermissionsOptions, type GetUserTrustedServersParams, GoogleDriveStorage, GrantExpiredError, type GrantFile, type GrantPermissionParams, GrantSchemaError, GrantValidationError, type GrantValidationErrorResponse, type GrantValidationOptions, type GrantValidationResult, type GrantedPermission, type Grantee, type GranteeInfo, GranteeMismatchError, type GranteeQueryOptions, type HttpMethod, IPFS_GATEWAYS, type IdentityResponseModel, type InitPersonalServerParams, type InternalServerErrorResponse, InvalidConfigurationError, IpfsStorage, type LegacyPermissionParams, type MaybeArray, type MaybePromise, MemoryCache, type Middleware, MiddlewarePipeline, NetworkError, type NetworkInfo, type Nominal, type NonNullable, NonceError, type NotFoundErrorResponse, type Observable, type Observer, type OmitByType, type OnChainPermissionGrant, type OperationErrorResponse, OperationNotAllowedError, type OptionalKeys, type PaginatedGrantees, type PaginatedTrustedServers, type PaginationParams, type PaginationResult, type PartialExcept, type Permission, type PermissionAnalytics, type PermissionCheckResult, PermissionError, type PermissionEvent, type PermissionGrantDomain, type PermissionGrantMessage, type PermissionGrantTypedData, type PermissionInfo, type PermissionInputMessage, type PermissionOperation, type PermissionQueryResult, type PermissionStatus, PermissionsController, PersonalServerError, type PersonalServerIdentity, type PersonalServerModel, type PickByType, type PinataListResponse, type PinataPin, PinataStorage, type PinataUploadResponse, type Plugin, type PostRequestParams, type PromiseResult, ProtocolController, type QueryPermissionsParams, type RateLimitInfo, RateLimiter, type RateLimiterConfig, type Refiner, type RegisterGranteeInput, type RegisterGranteeParams, type RegisterGranteeTypedData, type RelayerCallbacks, type RelayerConfig, RelayerError, type RelayerErrorResponse, type RelayerMetrics, type RelayerQueueInfo, type RelayerRequestOptions, type RelayerStatus, type RelayerStorageResponse, type RelayerStoreParams, type RelayerSubmitParams, type RelayerTransactionResponse, type RelayerTransactionStatus, type RelayerWebhookConfig, type RelayerWebhookPayload, type ReplicateAPIResponse, type ReplicateStatus, type Repository, type RequestOptions, type RequireKeys, type RequiredExcept, type RetryConfig, RetryUtility, type RevokePermissionInput, type RevokePermissionParams, type RuntimeConfig, type Schema, type SchemaMetadata, SchemaValidationError, SchemaValidator, SerializationError, type Server, type components as ServerComponents, ServerController, type $defs as ServerDefs, type ServerFilesAndPermissionParams, type ServerFilesAndPermissionTypedData, type ServerInfo, type operations as ServerOperations, type paths as ServerPaths, type ServerTrustStatus, ServerUrlMismatchError, type webhooks as ServerWebhooks, type Service, SignatureCache, SignatureError, type SimplifiedPermissionMessage, type StateMachine, type StatusInfo, type StorageCallbacks, type StorageConfig, type StorageDownloadOptions, StorageError, type StorageFile, type StorageListOptions, type StorageListResult, StorageManager, type StorageProvider, type StorageProviderConfig, type StorageRequiredMarker, type StorageUploadResult, type TimeRange, TransactionHandle, type TransactionOptions, type TransactionReceipt, type Transformer, type TrustServerInput, type TrustServerParams, type TrustServerTypedData, type TrustedServer, type TrustedServerInfo, type TrustedServerQueryOptions, type UnencryptedUploadParams, type UntrustServerInput, type UntrustServerParams, type UntrustServerTypedData, type UpdateSchemaIdParams, type UpdateSchemaIdResult, type UploadEncryptedFileResult, type UploadFileParams, type UploadFileResult, type UploadParams, type UploadProgress, type UploadResult, type UserFile, UserRejectedRequestError, type ValidationErrorResponse, type ValidationResult, type Validator, Vana, VanaBrowserImpl, type VanaChain, type VanaChainConfig, type VanaChainId, type VanaConfig, type VanaConfigWithStorage, type VanaContract, type VanaContract as VanaContractAbi, type VanaContractInstance, type VanaContractName, VanaCore, VanaCoreFactory, VanaError, type VanaInstance, type VanaPlatformAdapter, type WalletConfig, type WalletConfigWithStorage, __contractCache, chains, checkGrantAccess, clearContractCache, type components, convertIpfsUrl, convertIpfsUrlWithFallbacks, createAndStoreGrant, createBrowserPlatformAdapter, createGrantFile, createPlatformAdapterSafe, createValidatedGrant, decryptBlobWithSignedKey, decryptWithPrivateKey, decryptWithWalletPrivateKey, Vana as default, detectPlatform, encryptBlobWithSignedKey, encryptFileKey, encryptWithWalletPublicKey, extractIpfsHash, fetchAndValidateSchema, fetchWithFallbacks, formatEth, formatNumber, formatToken, generateEncryptionKey, generateEncryptionKeyPair, generatePGPKeyPair, getAbi, getAllChains, getChainConfig, getContractAddress, getContractController, getContractInfo, getEncryptionParameters, getGatewayUrls, getGrantFileHash, getGrantTimeRemaining, getPlatformCapabilities, hasStorageConfig, isAPIResponse, isChainConfig, isGrantExpired, isIpfsUrl, isPlatformSupported, isReplicateAPIResponse, isVanaChain, isVanaChainId, isWalletConfig, moksha, mokshaTestnet, type operations, parseReplicateOutput, type paths, retrieveAndValidateGrant, retrieveGrantFile, safeParseJSON, schemaValidator, shortenAddress, storeGrantFile, summarizeGrant, validateDataAgainstSchema, validateDataSchemaAgainstMetaSchema, validateGrant, validateGrantExpiry, validateGrantFile, validateGranteeAccess, validateOperationAccess, vanaMainnet, type webhooks, withSignatureCache };
|