@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.node.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";
|
|
@@ -28882,7 +29022,7 @@ interface GranteeRegisterResult extends BaseTransactionResult {
|
|
|
28882
29022
|
}
|
|
28883
29023
|
/**
|
|
28884
29024
|
* Result of a successful file addition operation.
|
|
28885
|
-
* Contains data from the
|
|
29025
|
+
* Contains data from the FileAddedV2 blockchain event.
|
|
28886
29026
|
*/
|
|
28887
29027
|
interface FileAddedResult extends BaseTransactionResult {
|
|
28888
29028
|
/** Unique file ID assigned by the registry */
|
|
@@ -28891,6 +29031,8 @@ interface FileAddedResult extends BaseTransactionResult {
|
|
|
28891
29031
|
ownerAddress: Address;
|
|
28892
29032
|
/** URL where the file is stored */
|
|
28893
29033
|
url: string;
|
|
29034
|
+
/** Schema ID associated with the file (0 for no schema) */
|
|
29035
|
+
schemaId: bigint;
|
|
28894
29036
|
}
|
|
28895
29037
|
/**
|
|
28896
29038
|
* Result of a successful file permission addition operation.
|
|
@@ -30419,6 +30561,7 @@ declare class PermissionsController {
|
|
|
30419
30561
|
* @param params.granteeId - Grantee ID
|
|
30420
30562
|
* @param params.grant - Grant URL or grant data
|
|
30421
30563
|
* @param params.fileUrls - Array of file URLs
|
|
30564
|
+
* @param params.schemaIds - Schema IDs for each file
|
|
30422
30565
|
* @param params.serverAddress - Server address
|
|
30423
30566
|
* @param params.serverUrl - Server URL
|
|
30424
30567
|
* @param params.serverPublicKey - Server public key
|
|
@@ -31169,14 +31312,54 @@ declare class PermissionsController {
|
|
|
31169
31312
|
*/
|
|
31170
31313
|
submitSignedAddPermission(typedData: GenericTypedData, signature: Hash): Promise<TransactionHandle<PermissionGrantResult>>;
|
|
31171
31314
|
/**
|
|
31172
|
-
*
|
|
31315
|
+
* Submits server files and permissions with signature to the blockchain, supporting schema validation and gasless transactions.
|
|
31316
|
+
*
|
|
31317
|
+
* @remarks
|
|
31318
|
+
* This method validates files against their specified schemas before submission.
|
|
31319
|
+
* Schema validation ensures data conforms to expected formats before on-chain registration.
|
|
31320
|
+
* Files with schemaId = 0 bypass validation. The method supports atomic batch operations
|
|
31321
|
+
* where all files and permissions are registered in a single transaction.
|
|
31173
31322
|
*
|
|
31174
31323
|
* @param params - Parameters for adding server files and permissions
|
|
31175
|
-
* @
|
|
31176
|
-
* @
|
|
31324
|
+
* @param params.granteeId - The ID of the permission grantee
|
|
31325
|
+
* @param params.grant - Grant URL containing permission parameters (typically IPFS)
|
|
31326
|
+
* @param params.fileUrls - Array of file URLs to register
|
|
31327
|
+
* @param params.schemaIds - Schema IDs for each file. Use 0 for files without schema validation.
|
|
31328
|
+
* Array length must match fileUrls length.
|
|
31329
|
+
* @param params.serverAddress - Server wallet address for decryption permissions
|
|
31330
|
+
* @param params.serverUrl - Server endpoint URL
|
|
31331
|
+
* @param params.serverPublicKey - Server's public key for encryption.
|
|
31332
|
+
* Obtain via `vana.server.getIdentity(userAddress).public_key`.
|
|
31333
|
+
* @param params.filePermissions - Nested array of permissions for each file
|
|
31334
|
+
* @returns TransactionHandle with immediate hash access and event parsing capability
|
|
31335
|
+
* @throws {Error} When schemaIds array length doesn't match fileUrls array length
|
|
31336
|
+
* @throws {SchemaValidationError} When file data doesn't match the specified schema.
|
|
31337
|
+
* Verify data structure matches schema definition from `vana.schemas.get(schemaId)`.
|
|
31338
|
+
* @throws {RelayerError} When gasless transaction submission fails.
|
|
31339
|
+
* Retry without relayer configuration to submit direct transaction.
|
|
31177
31340
|
* @throws {SignatureError} When user rejects the signature request
|
|
31178
31341
|
* @throws {BlockchainError} When server files and permissions addition fails
|
|
31179
|
-
* @throws {NetworkError} When network communication fails
|
|
31342
|
+
* @throws {NetworkError} When network communication fails.
|
|
31343
|
+
* Check network connection or configure alternative gateways.
|
|
31344
|
+
*
|
|
31345
|
+
* @example
|
|
31346
|
+
* ```typescript
|
|
31347
|
+
* const result = await vana.permissions.submitAddServerFilesAndPermissions({
|
|
31348
|
+
* granteeId: BigInt(1),
|
|
31349
|
+
* grant: "ipfs://QmXxx...",
|
|
31350
|
+
* fileUrls: ["https://storage.example.com/data.json"],
|
|
31351
|
+
* schemaIds: [123], // LinkedIn profile schema ID
|
|
31352
|
+
* serverAddress: "0x742d35Cc6634C0532925a3b844Bc9e7595f0b0Bb",
|
|
31353
|
+
* serverUrl: "https://server.example.com",
|
|
31354
|
+
* serverPublicKey: serverInfo.public_key,
|
|
31355
|
+
* filePermissions: [[{
|
|
31356
|
+
* account: "0x742d35Cc6634C0532925a3b844Bc9e7595f0b0Bb",
|
|
31357
|
+
* key: encryptedKey
|
|
31358
|
+
* }]]
|
|
31359
|
+
* });
|
|
31360
|
+
* const events = await result.waitForEvents();
|
|
31361
|
+
* console.log(`Permission ID: ${events.permissionId}`);
|
|
31362
|
+
* ```
|
|
31180
31363
|
*/
|
|
31181
31364
|
submitAddServerFilesAndPermissions(params: ServerFilesAndPermissionParams): Promise<TransactionHandle<PermissionGrantResult>>;
|
|
31182
31365
|
/**
|
|
@@ -31244,10 +31427,10 @@ declare class PermissionsController {
|
|
|
31244
31427
|
interface CreateSchemaParams {
|
|
31245
31428
|
/** The name of the schema */
|
|
31246
31429
|
name: string;
|
|
31247
|
-
/** The
|
|
31248
|
-
|
|
31430
|
+
/** The dialect of the schema (e.g., 'json' or 'sqlite') */
|
|
31431
|
+
dialect: "json" | "sqlite";
|
|
31249
31432
|
/** The schema definition object or JSON string */
|
|
31250
|
-
|
|
31433
|
+
schema: object | string;
|
|
31251
31434
|
}
|
|
31252
31435
|
/**
|
|
31253
31436
|
* Result of creating a new schema.
|
|
@@ -31292,8 +31475,8 @@ interface CreateSchemaResult {
|
|
|
31292
31475
|
* // Create a new schema with automatic IPFS upload
|
|
31293
31476
|
* const result = await vana.schemas.create({
|
|
31294
31477
|
* name: "User Profile",
|
|
31295
|
-
*
|
|
31296
|
-
*
|
|
31478
|
+
* dialect: "json",
|
|
31479
|
+
* schema: {
|
|
31297
31480
|
* type: "object",
|
|
31298
31481
|
* properties: {
|
|
31299
31482
|
* name: { type: "string" },
|
|
@@ -31328,7 +31511,7 @@ declare class SchemaController {
|
|
|
31328
31511
|
* - Uploads the definition to IPFS to generate a permanent URL
|
|
31329
31512
|
* - Registers the schema on the blockchain with the generated URL
|
|
31330
31513
|
*
|
|
31331
|
-
* @param params - Schema creation parameters including name,
|
|
31514
|
+
* @param params - Schema creation parameters including name, dialect, and definition
|
|
31332
31515
|
* @returns Promise resolving to creation results with schema ID and transaction hash
|
|
31333
31516
|
* @throws {SchemaValidationError} When the schema definition is invalid
|
|
31334
31517
|
* @throws {Error} When IPFS upload or blockchain registration fails
|
|
@@ -31337,8 +31520,8 @@ declare class SchemaController {
|
|
|
31337
31520
|
* // Create a JSON schema for user profiles
|
|
31338
31521
|
* const result = await vana.schemas.create({
|
|
31339
31522
|
* name: "User Profile",
|
|
31340
|
-
*
|
|
31341
|
-
*
|
|
31523
|
+
* dialect: "json",
|
|
31524
|
+
* schema: {
|
|
31342
31525
|
* type: "object",
|
|
31343
31526
|
* properties: {
|
|
31344
31527
|
* name: { type: "string" },
|
|
@@ -31353,27 +31536,28 @@ declare class SchemaController {
|
|
|
31353
31536
|
*/
|
|
31354
31537
|
create(params: CreateSchemaParams): Promise<CreateSchemaResult>;
|
|
31355
31538
|
/**
|
|
31356
|
-
* Retrieves a schema by its ID.
|
|
31539
|
+
* Retrieves a complete schema by its ID with definition fetched and flattened.
|
|
31357
31540
|
*
|
|
31358
31541
|
* @param schemaId - The ID of the schema to retrieve
|
|
31359
31542
|
* @param options - Optional parameters
|
|
31360
31543
|
* @param options.subgraphUrl - Custom subgraph URL to use instead of default
|
|
31361
|
-
* @returns Promise resolving to the schema object
|
|
31362
|
-
* @throws {Error} When the schema is not found or chain is unavailable
|
|
31544
|
+
* @returns Promise resolving to the complete schema object with all fields populated
|
|
31545
|
+
* @throws {Error} When the schema is not found, definition cannot be fetched, or chain is unavailable
|
|
31363
31546
|
* @example
|
|
31364
31547
|
* ```typescript
|
|
31365
31548
|
* const schema = await vana.schemas.get(1);
|
|
31366
|
-
* console.log(`Schema: ${schema.name} (${schema.
|
|
31549
|
+
* console.log(`Schema: ${schema.name} (${schema.dialect})`);
|
|
31550
|
+
* console.log(`Version: ${schema.version}`);
|
|
31551
|
+
* console.log(`Description: ${schema.description}`);
|
|
31552
|
+
* console.log('Schema:', schema.schema);
|
|
31367
31553
|
*
|
|
31368
|
-
* //
|
|
31369
|
-
*
|
|
31370
|
-
* subgraphUrl: 'https://custom-subgraph.com/graphql'
|
|
31371
|
-
* });
|
|
31554
|
+
* // Use directly with validator (schema has all required fields)
|
|
31555
|
+
* validator.validateDataAgainstSchema(data, schema);
|
|
31372
31556
|
* ```
|
|
31373
31557
|
*/
|
|
31374
31558
|
get(schemaId: number, options?: {
|
|
31375
31559
|
subgraphUrl?: string;
|
|
31376
|
-
}): Promise<
|
|
31560
|
+
}): Promise<CompleteSchema>;
|
|
31377
31561
|
/**
|
|
31378
31562
|
* Gets the total number of schemas registered on the network.
|
|
31379
31563
|
*
|
|
@@ -31402,27 +31586,25 @@ declare class SchemaController {
|
|
|
31402
31586
|
* @param options.limit - Maximum number of schemas to return
|
|
31403
31587
|
* @param options.offset - Number of schemas to skip
|
|
31404
31588
|
* @param options.subgraphUrl - Custom subgraph URL to use instead of default
|
|
31589
|
+
* @param options.includeDefinitions - Whether to fetch and include schema definitions (default: false for performance)
|
|
31405
31590
|
* @returns Promise resolving to an array of schemas
|
|
31406
31591
|
* @example
|
|
31407
31592
|
* ```typescript
|
|
31408
|
-
* // Get all schemas
|
|
31593
|
+
* // Get all schemas (without definitions for performance)
|
|
31409
31594
|
* const schemas = await vana.schemas.list();
|
|
31410
31595
|
*
|
|
31596
|
+
* // Get schemas with definitions
|
|
31597
|
+
* const schemas = await vana.schemas.list({ includeDefinitions: true });
|
|
31598
|
+
*
|
|
31411
31599
|
* // Get schemas with pagination
|
|
31412
31600
|
* const schemas = await vana.schemas.list({ limit: 10, offset: 0 });
|
|
31413
|
-
*
|
|
31414
|
-
* // With custom subgraph
|
|
31415
|
-
* const schemas = await vana.schemas.list({
|
|
31416
|
-
* limit: 10,
|
|
31417
|
-
* offset: 0,
|
|
31418
|
-
* subgraphUrl: 'https://custom-subgraph.com/graphql'
|
|
31419
|
-
* });
|
|
31420
31601
|
* ```
|
|
31421
31602
|
*/
|
|
31422
31603
|
list(options?: {
|
|
31423
31604
|
limit?: number;
|
|
31424
31605
|
offset?: number;
|
|
31425
31606
|
subgraphUrl?: string;
|
|
31607
|
+
includeDefinitions?: boolean;
|
|
31426
31608
|
}): Promise<Schema[]>;
|
|
31427
31609
|
/**
|
|
31428
31610
|
* Adds a schema using the legacy method (low-level API).
|
|
@@ -31469,6 +31651,13 @@ declare class SchemaController {
|
|
|
31469
31651
|
* @returns Promise resolving to the user's address
|
|
31470
31652
|
*/
|
|
31471
31653
|
private getUserAddress;
|
|
31654
|
+
/**
|
|
31655
|
+
* Fetches and attaches definitions to an array of schemas.
|
|
31656
|
+
*
|
|
31657
|
+
* @param schemas - Array of schemas to fetch definitions for
|
|
31658
|
+
* @private
|
|
31659
|
+
*/
|
|
31660
|
+
private _fetchDefinitionsForSchemas;
|
|
31472
31661
|
}
|
|
31473
31662
|
|
|
31474
31663
|
/**
|
|
@@ -31510,16 +31699,16 @@ declare class SchemaValidationError extends Error {
|
|
|
31510
31699
|
}>);
|
|
31511
31700
|
}
|
|
31512
31701
|
/**
|
|
31513
|
-
*
|
|
31702
|
+
* Data schema validation utility class
|
|
31514
31703
|
*/
|
|
31515
31704
|
declare class SchemaValidator {
|
|
31516
31705
|
private ajv;
|
|
31517
31706
|
private dataSchemaValidator;
|
|
31518
31707
|
constructor();
|
|
31519
31708
|
/**
|
|
31520
|
-
* Validates a data schema against the Vana meta-schema
|
|
31709
|
+
* Validates a data schema definition against the Vana meta-schema
|
|
31521
31710
|
*
|
|
31522
|
-
* @param schema - The data schema to validate
|
|
31711
|
+
* @param schema - The data schema definition to validate
|
|
31523
31712
|
* @throws SchemaValidationError if invalid
|
|
31524
31713
|
* @example
|
|
31525
31714
|
* ```typescript
|
|
@@ -31538,39 +31727,35 @@ declare class SchemaValidator {
|
|
|
31538
31727
|
* }
|
|
31539
31728
|
* };
|
|
31540
31729
|
*
|
|
31541
|
-
* validator.
|
|
31730
|
+
* validator.validateDataSchemaAgainstMetaSchema(schema); // throws if invalid
|
|
31542
31731
|
* ```
|
|
31543
31732
|
*/
|
|
31544
|
-
|
|
31733
|
+
validateDataSchemaAgainstMetaSchema(schema: unknown): asserts schema is DataSchema;
|
|
31545
31734
|
/**
|
|
31546
|
-
* Validates data against a JSON Schema
|
|
31735
|
+
* Validates data against a JSON Schema
|
|
31547
31736
|
*
|
|
31548
31737
|
* @param data - The data to validate
|
|
31549
|
-
* @param schema - The
|
|
31738
|
+
* @param schema - The schema containing the validation rules (must have been validated or fetched from chain)
|
|
31550
31739
|
* @throws SchemaValidationError if invalid
|
|
31551
31740
|
* @example
|
|
31552
31741
|
* ```typescript
|
|
31553
31742
|
* const validator = new SchemaValidator();
|
|
31554
31743
|
*
|
|
31555
|
-
*
|
|
31744
|
+
* // Works with Schema from schemas.get()
|
|
31745
|
+
* const schema = await vana.schemas.get(1);
|
|
31746
|
+
* validator.validateDataAgainstSchema(userData, schema);
|
|
31747
|
+
*
|
|
31748
|
+
* // Also works with pre-validated DataSchema object
|
|
31749
|
+
* const dataSchema = validator.validateDataSchemaAgainstMetaSchema({
|
|
31556
31750
|
* name: "User Profile",
|
|
31557
31751
|
* version: "1.0.0",
|
|
31558
31752
|
* dialect: "json",
|
|
31559
|
-
* schema: {
|
|
31560
|
-
*
|
|
31561
|
-
*
|
|
31562
|
-
* name: { type: "string" },
|
|
31563
|
-
* age: { type: "number" }
|
|
31564
|
-
* },
|
|
31565
|
-
* required: ["name"]
|
|
31566
|
-
* }
|
|
31567
|
-
* };
|
|
31568
|
-
*
|
|
31569
|
-
* const userData = { name: "Alice", age: 30 };
|
|
31570
|
-
* validator.validateDataAgainstSchema(userData, schema);
|
|
31753
|
+
* schema: { type: "object", properties: { name: { type: "string" } } }
|
|
31754
|
+
* });
|
|
31755
|
+
* validator.validateDataAgainstSchema(userData, dataSchema);
|
|
31571
31756
|
* ```
|
|
31572
31757
|
*/
|
|
31573
|
-
validateDataAgainstSchema(data: unknown, schema: DataSchema): void;
|
|
31758
|
+
validateDataAgainstSchema(data: unknown, schema: DataSchema | Schema): void;
|
|
31574
31759
|
/**
|
|
31575
31760
|
* Validates a SQLite DDL string for basic syntax
|
|
31576
31761
|
* Note: This is a basic validation, full SQL parsing would require a proper SQL parser
|
|
@@ -31581,9 +31766,9 @@ declare class SchemaValidator {
|
|
|
31581
31766
|
*/
|
|
31582
31767
|
validateSQLiteDDL(ddl: string, dialectVersion?: string): void;
|
|
31583
31768
|
/**
|
|
31584
|
-
* Fetches and validates a schema from a URL
|
|
31769
|
+
* Fetches and validates a data schema from a URL
|
|
31585
31770
|
*
|
|
31586
|
-
* @param url - The URL to fetch the schema from
|
|
31771
|
+
* @param url - The URL to fetch the data schema from
|
|
31587
31772
|
* @returns The validated data schema
|
|
31588
31773
|
* @throws SchemaValidationError if invalid or fetch fails
|
|
31589
31774
|
* @example
|
|
@@ -31599,13 +31784,24 @@ declare class SchemaValidator {
|
|
|
31599
31784
|
*/
|
|
31600
31785
|
declare const schemaValidator: SchemaValidator;
|
|
31601
31786
|
/**
|
|
31602
|
-
* Convenience function to validate a data schema
|
|
31787
|
+
* Convenience function to validate a data schema definition against the Vana meta-schema
|
|
31603
31788
|
*
|
|
31604
|
-
* @param schema - The data schema to validate
|
|
31605
|
-
* @returns
|
|
31789
|
+
* @param schema - The data schema definition to validate
|
|
31790
|
+
* @returns The validated DataSchema
|
|
31606
31791
|
* @throws SchemaValidationError if invalid
|
|
31792
|
+
* @example
|
|
31793
|
+
* ```typescript
|
|
31794
|
+
* const schemaDefinition = {
|
|
31795
|
+
* name: "User Profile",
|
|
31796
|
+
* version: "1.0.0",
|
|
31797
|
+
* dialect: "json",
|
|
31798
|
+
* schema: { type: "object", properties: { name: { type: "string" } } }
|
|
31799
|
+
* };
|
|
31800
|
+
*
|
|
31801
|
+
* const validatedSchema = validateDataSchemaAgainstMetaSchema(schemaDefinition);
|
|
31802
|
+
* ```
|
|
31607
31803
|
*/
|
|
31608
|
-
declare function
|
|
31804
|
+
declare function validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
|
|
31609
31805
|
/**
|
|
31610
31806
|
* Convenience function to validate data against a schema
|
|
31611
31807
|
*
|
|
@@ -31614,11 +31810,11 @@ declare function validateDataSchema(schema: unknown): asserts schema is DataSche
|
|
|
31614
31810
|
* @returns void - Function doesn't return a value
|
|
31615
31811
|
* @throws SchemaValidationError if invalid
|
|
31616
31812
|
*/
|
|
31617
|
-
declare function validateDataAgainstSchema(data: unknown, schema: DataSchema): void;
|
|
31813
|
+
declare function validateDataAgainstSchema(data: unknown, schema: DataSchema | Schema): void;
|
|
31618
31814
|
/**
|
|
31619
|
-
* Convenience function to fetch and validate a schema from a URL
|
|
31815
|
+
* Convenience function to fetch and validate a data schema from a URL
|
|
31620
31816
|
*
|
|
31621
|
-
* @param url - The URL to fetch the schema from
|
|
31817
|
+
* @param url - The URL to fetch the data schema from
|
|
31622
31818
|
* @returns The validated data schema
|
|
31623
31819
|
* @throws SchemaValidationError if invalid or fetch fails
|
|
31624
31820
|
*/
|
|
@@ -34109,6 +34305,89 @@ declare class DataController {
|
|
|
34109
34305
|
owner: Address;
|
|
34110
34306
|
subgraphUrl?: string;
|
|
34111
34307
|
}): Promise<UserFile$1[]>;
|
|
34308
|
+
/**
|
|
34309
|
+
* Fetches proof data for multiple files from the subgraph.
|
|
34310
|
+
*
|
|
34311
|
+
* @private
|
|
34312
|
+
* @param fileIds - Array of file IDs to fetch proofs for
|
|
34313
|
+
* @param subgraphUrl - The subgraph endpoint URL
|
|
34314
|
+
* @returns Map of file IDs to their associated DLP IDs
|
|
34315
|
+
*/
|
|
34316
|
+
private _fetchProofsFromSubgraph;
|
|
34317
|
+
/**
|
|
34318
|
+
* Fetches proof data for multiple files from the blockchain.
|
|
34319
|
+
* Falls back to this when subgraph is unavailable.
|
|
34320
|
+
*
|
|
34321
|
+
* @private
|
|
34322
|
+
* @param fileIds - Array of file IDs to fetch proofs for
|
|
34323
|
+
* @returns Map of file IDs to their associated DLP IDs
|
|
34324
|
+
*/
|
|
34325
|
+
private _fetchProofsFromChain;
|
|
34326
|
+
/**
|
|
34327
|
+
* Retrieves information about a specific Data Liquidity Pool (DLP).
|
|
34328
|
+
*
|
|
34329
|
+
* @remarks
|
|
34330
|
+
* DLPs are entities that process and verify data files in the Vana network.
|
|
34331
|
+
* This method fetches DLP metadata including name, status, and performance rating.
|
|
34332
|
+
* Uses subgraph first for efficiency, falls back to chain if unavailable.
|
|
34333
|
+
*
|
|
34334
|
+
* @param dlpId - The unique identifier of the DLP
|
|
34335
|
+
* @param options - Optional parameters
|
|
34336
|
+
* @param options.subgraphUrl - Custom subgraph URL to override default
|
|
34337
|
+
* @returns Promise resolving to DLP information
|
|
34338
|
+
* @throws {Error} When DLP cannot be found - "DLP not found: {dlpId}"
|
|
34339
|
+
* @throws {Error} When query fails - "Failed to fetch DLP: {error}"
|
|
34340
|
+
* @example
|
|
34341
|
+
* ```typescript
|
|
34342
|
+
* const dlp = await vana.data.getDLP(26);
|
|
34343
|
+
* console.log(`DLP ${dlp.name}: ${dlp.status}`);
|
|
34344
|
+
* ```
|
|
34345
|
+
*/
|
|
34346
|
+
getDLP(dlpId: number, options?: {
|
|
34347
|
+
subgraphUrl?: string;
|
|
34348
|
+
}): Promise<{
|
|
34349
|
+
id: number;
|
|
34350
|
+
name: string;
|
|
34351
|
+
metadata?: string;
|
|
34352
|
+
status?: number;
|
|
34353
|
+
address?: Address;
|
|
34354
|
+
owner?: Address;
|
|
34355
|
+
}>;
|
|
34356
|
+
/**
|
|
34357
|
+
* Lists all Data Liquidity Pools (DLPs) with optional pagination.
|
|
34358
|
+
*
|
|
34359
|
+
* @remarks
|
|
34360
|
+
* Fetches a paginated list of all DLPs registered in the network.
|
|
34361
|
+
* Uses subgraph for efficient querying with fallback to chain multicall.
|
|
34362
|
+
*
|
|
34363
|
+
* @param options - Optional parameters for pagination and filtering
|
|
34364
|
+
* @param options.limit - Maximum number of DLPs to return (default: 100)
|
|
34365
|
+
* @param options.offset - Number of DLPs to skip (default: 0)
|
|
34366
|
+
* @param options.subgraphUrl - Custom subgraph URL to override default
|
|
34367
|
+
* @returns Promise resolving to array of DLP information
|
|
34368
|
+
* @throws {Error} When query fails - "Failed to list DLPs: {error}"
|
|
34369
|
+
* @example
|
|
34370
|
+
* ```typescript
|
|
34371
|
+
* // Get first 10 DLPs
|
|
34372
|
+
* const dlps = await vana.data.listDLPs({ limit: 10 });
|
|
34373
|
+
* dlps.forEach(dlp => console.log(`${dlp.id}: ${dlp.name}`));
|
|
34374
|
+
*
|
|
34375
|
+
* // Get next page
|
|
34376
|
+
* const nextPage = await vana.data.listDLPs({ limit: 10, offset: 10 });
|
|
34377
|
+
* ```
|
|
34378
|
+
*/
|
|
34379
|
+
listDLPs(options?: {
|
|
34380
|
+
limit?: number;
|
|
34381
|
+
offset?: number;
|
|
34382
|
+
subgraphUrl?: string;
|
|
34383
|
+
}): Promise<Array<{
|
|
34384
|
+
id: number;
|
|
34385
|
+
name: string;
|
|
34386
|
+
metadata?: string;
|
|
34387
|
+
status?: number;
|
|
34388
|
+
address?: Address;
|
|
34389
|
+
owner?: Address;
|
|
34390
|
+
}>>;
|
|
34112
34391
|
/**
|
|
34113
34392
|
* Retrieves a list of permissions granted by a user.
|
|
34114
34393
|
*
|
|
@@ -34612,10 +34891,10 @@ declare class DataController {
|
|
|
34612
34891
|
gateways?: string[];
|
|
34613
34892
|
}): Promise<Blob>;
|
|
34614
34893
|
/**
|
|
34615
|
-
* Validates a data schema against the Vana meta-schema.
|
|
34894
|
+
* Validates a data schema definition against the Vana meta-schema.
|
|
34616
34895
|
*
|
|
34617
|
-
* @param schema - The data schema to validate
|
|
34618
|
-
* @returns
|
|
34896
|
+
* @param schema - The data schema definition to validate
|
|
34897
|
+
* @returns The validated DataSchema
|
|
34619
34898
|
* @throws SchemaValidationError if invalid
|
|
34620
34899
|
* @example
|
|
34621
34900
|
* ```typescript
|
|
@@ -34632,10 +34911,10 @@ declare class DataController {
|
|
|
34632
34911
|
* }
|
|
34633
34912
|
* };
|
|
34634
34913
|
*
|
|
34635
|
-
* vana.data.
|
|
34914
|
+
* const validatedSchema = vana.data.validateDataSchemaAgainstMetaSchema(schema);
|
|
34636
34915
|
* ```
|
|
34637
34916
|
*/
|
|
34638
|
-
|
|
34917
|
+
validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
|
|
34639
34918
|
/**
|
|
34640
34919
|
* Validates data against a JSON Schema from a data schema.
|
|
34641
34920
|
*
|
|
@@ -34665,9 +34944,9 @@ declare class DataController {
|
|
|
34665
34944
|
*/
|
|
34666
34945
|
validateDataAgainstSchema(data: unknown, schema: DataSchema): void;
|
|
34667
34946
|
/**
|
|
34668
|
-
* Fetches and validates a schema from a URL, then returns the parsed data schema.
|
|
34947
|
+
* Fetches and validates a data schema from a URL, then returns the parsed data schema.
|
|
34669
34948
|
*
|
|
34670
|
-
* @param url - The URL to fetch the schema from
|
|
34949
|
+
* @param url - The URL to fetch the data schema from
|
|
34671
34950
|
* @returns The validated data schema
|
|
34672
34951
|
* @throws SchemaValidationError if invalid or fetch fails
|
|
34673
34952
|
* @example
|
|
@@ -34683,24 +34962,6 @@ declare class DataController {
|
|
|
34683
34962
|
* ```
|
|
34684
34963
|
*/
|
|
34685
34964
|
fetchAndValidateSchema(url: string): Promise<DataSchema>;
|
|
34686
|
-
/**
|
|
34687
|
-
* Retrieves a schema by ID and fetches its definition URL to get the full data schema.
|
|
34688
|
-
*
|
|
34689
|
-
* @param schemaId - The schema ID to retrieve and validate
|
|
34690
|
-
* @returns The validated data schema
|
|
34691
|
-
* @throws SchemaValidationError if schema is invalid
|
|
34692
|
-
* @example
|
|
34693
|
-
* ```typescript
|
|
34694
|
-
* // Get schema from registry and validate its schema
|
|
34695
|
-
* const schema = await vana.data.getValidatedSchema(123);
|
|
34696
|
-
*
|
|
34697
|
-
* // Use it to validate user data
|
|
34698
|
-
* if (schema.dialect === "json") {
|
|
34699
|
-
* vana.data.validateDataAgainstSchema(userData, schema);
|
|
34700
|
-
* }
|
|
34701
|
-
* ```
|
|
34702
|
-
*/
|
|
34703
|
-
getValidatedSchema(schemaId: number): Promise<DataSchema>;
|
|
34704
34965
|
}
|
|
34705
34966
|
|
|
34706
34967
|
/**
|
|
@@ -37544,4 +37805,4 @@ declare function Vana(config: VanaConfig): VanaNodeImpl;
|
|
|
37544
37805
|
*/
|
|
37545
37806
|
type VanaInstance = VanaNodeImpl;
|
|
37546
37807
|
|
|
37547
|
-
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, NodePlatformAdapter, type Nominal, type NonNullable, NonceError, type NotFoundErrorResponse, type Observable, type Observer, type OmitByType, type OnChainPermissionGrant, type OperationErrorResponse, OperationNotAllowedError, type OptionalKeys, type PaginatedGrantees, type PaginatedTrustedServers, type PaginationParams, type PaginationResult, type PartialExcept, type Permission, type PermissionAnalytics, type PermissionCheckResult, PermissionError, type PermissionEvent, type PermissionGrantDomain, type PermissionGrantMessage, type PermissionGrantTypedData, type PermissionInfo, type PermissionInputMessage, type PermissionOperation, type PermissionQueryResult, type PermissionStatus, PermissionsController, PersonalServerError, type PersonalServerIdentity, type PersonalServerModel, type PickByType, type PinataListResponse, type PinataPin, PinataStorage, type PinataUploadResponse, type Plugin, type PostRequestParams, type PromiseResult, ProtocolController, type QueryPermissionsParams, type RateLimitInfo, RateLimiter, type RateLimiterConfig, type Refiner, type RegisterGranteeInput, type RegisterGranteeParams, type RegisterGranteeTypedData, type RelayerCallbacks, type RelayerConfig, RelayerError, type RelayerErrorResponse, type RelayerMetrics, type RelayerQueueInfo, type RelayerRequestOptions, type RelayerRequestPayload, type RelayerStatus, type RelayerStorageResponse, type RelayerStoreParams, type RelayerSubmitParams, type RelayerTransactionResponse, type RelayerTransactionStatus, type RelayerWebhookConfig, type RelayerWebhookPayload, type ReplicateAPIResponse, type ReplicateStatus, type Repository, type RequestOptions, type RequireKeys, type RequiredExcept, type RetryConfig, RetryUtility, type RevokePermissionInput, type RevokePermissionParams, type RuntimeConfig, type Schema, SchemaController, SchemaValidationError, SchemaValidator, SerializationError, type Server, type components as ServerComponents, ServerController, type $defs as ServerDefs, type ServerFilesAndPermissionParams, type ServerFilesAndPermissionTypedData, type ServerInfo, type operations as ServerOperations, type paths as ServerPaths, type ServerTrustStatus, ServerUrlMismatchError, type webhooks as ServerWebhooks, type Service, SignatureCache, SignatureError, type SimplifiedPermissionMessage, type StateMachine, type StatusInfo, type StorageCallbacks, type StorageConfig, type StorageDownloadOptions, StorageError, type StorageFile, type StorageListOptions, type StorageListResult, StorageManager, type StorageProvider, type StorageProviderConfig, type StorageRequiredMarker, type StorageUploadResult, type TimeRange, TransactionHandle, type TransactionOptions, type TransactionReceipt, type Transformer, type TrustServerInput, type TrustServerParams, type TrustServerTypedData, type TrustedServer, type TrustedServerInfo, type TrustedServerQueryOptions, type UnencryptedUploadParams, type UntrustServerInput, type UntrustServerParams, type UntrustServerTypedData, type UpdateSchemaIdParams, type UpdateSchemaIdResult, type UploadEncryptedFileResult, type UploadFileParams, type UploadFileResult, type UploadParams, type UploadProgress, type UploadResult, type UserFile, UserRejectedRequestError, type ValidationErrorResponse, type ValidationResult, type Validator, Vana, type VanaChain, type VanaChainConfig, type VanaChainId, type VanaConfig, type VanaConfigWithStorage, type VanaContract, type VanaContract as VanaContractAbi, type VanaContractInstance, type VanaContractName, VanaCore, VanaCoreFactory, VanaError, type VanaInstance, VanaNodeImpl, type VanaPlatformAdapter, type WalletConfig, type WalletConfigWithStorage, __contractCache, chains, checkGrantAccess, clearContractCache, type components, convertIpfsUrl, convertIpfsUrlWithFallbacks, createAndStoreGrant, createBrowserPlatformAdapter, createGrantFile, createNodePlatformAdapter, createPlatformAdapter, createPlatformAdapterFor, createPlatformAdapterSafe, createValidatedGrant, decryptBlobWithSignedKey, decryptWithPrivateKey, decryptWithWalletPrivateKey, Vana as default, detectPlatform, encryptBlobWithSignedKey, encryptFileKey, encryptWithWalletPublicKey, extractIpfsHash, fetchAndValidateSchema, fetchWithFallbacks, formatEth, formatNumber, formatToken, generateEncryptionKey, generateEncryptionKeyPair, generatePGPKeyPair, getAbi, getAllChains, getChainConfig, getContractAddress, getContractController, getContractInfo, getEncryptionParameters, getGatewayUrls, getGrantFileHash, getGrantTimeRemaining, getPlatformCapabilities, handleRelayerRequest, hasStorageConfig, isAPIResponse, isChainConfig, isGrantExpired, isIpfsUrl, isPlatformSupported, isReplicateAPIResponse, isVanaChain, isVanaChainId, isWalletConfig, moksha, mokshaTestnet, type operations, parseReplicateOutput, type paths, retrieveAndValidateGrant, retrieveGrantFile, safeParseJSON, schemaValidator, shortenAddress, storeGrantFile, summarizeGrant, validateDataAgainstSchema,
|
|
37808
|
+
export { type $defs, type APIResponse, type AddAndTrustServerInput, type AddAndTrustServerParams, type AddAndTrustServerTypedData, type AddRefinerParams, type AddRefinerResult, type AddSchemaParams, type AddSchemaResult, type AllKeys, ApiClient, type ApiClientConfig, type ApiResponse, AsyncQueue, type AsyncResult, type AuthenticationErrorResponse, type Awaited, type BaseConfig, type BaseConfigWithStorage, BaseController, type BatchServerInfoResult, type BatchUploadParams, type BatchUploadResult, type BlockRange, BlockchainError, type BlockchainErrorResponse, type Brand, BrowserPlatformAdapter, type Cache, type CacheConfig, CallbackStorage, type ChainConfig, type ChainConfigWithStorage, type CheckPermissionParams, CircuitBreaker, type CompleteSchema, type ComputeErrorResponse, type ConditionalOptional, type ConfigValidationOptions, type ConfigValidationResult, type ContractAddresses, type ContractCall, type ContractDeployment, ContractFactory, type ContractInfo, type ContractMethodParams, type ContractMethodReturnType, ContractNotFoundError, type Controller, type ControllerContext, type CreateOperationParams, type CreateOperationRequest, type CreateOperationResponse, type CreateSchemaParams, type CreateSchemaResult, DEFAULT_ENCRYPTION_SEED, DEFAULT_IPFS_GATEWAY, DataController, type DataSchema, type DecryptionErrorResponse, type DeepPartial, type DeepReadonly, type DeleteFileParams, type DeleteFileResult, type DownloadFileParams, type DownloadFileResult, type EncryptedUploadParams, type EncryptionInfo, type ErrorResponse, EventEmitter, type EventFilter, type EventLog, type Factory, type FileAccessErrorResponse, type FileAccessPermissions, type FileMetadata, type FilePermissionParams, type FileSharingConfig, type GasEstimate, type GenericRequest, type GenericResponse, type GenericTypedData, type GetFileParams, type GetOperationResponse, type GetUserFilesParams, type GetUserPermissionsOptions, type GetUserTrustedServersParams, GoogleDriveStorage, GrantExpiredError, type GrantFile, type GrantPermissionParams, GrantSchemaError, GrantValidationError, type GrantValidationErrorResponse, type GrantValidationOptions, type GrantValidationResult, type GrantedPermission, type Grantee, type GranteeInfo, GranteeMismatchError, type GranteeQueryOptions, type HttpMethod, IPFS_GATEWAYS, type IdentityResponseModel, type InitPersonalServerParams, type InternalServerErrorResponse, InvalidConfigurationError, IpfsStorage, type LegacyPermissionParams, type MaybeArray, type MaybePromise, MemoryCache, type Middleware, MiddlewarePipeline, NetworkError, type NetworkInfo, NodePlatformAdapter, type Nominal, type NonNullable, NonceError, type NotFoundErrorResponse, type Observable, type Observer, type OmitByType, type OnChainPermissionGrant, type OperationErrorResponse, OperationNotAllowedError, type OptionalKeys, type PaginatedGrantees, type PaginatedTrustedServers, type PaginationParams, type PaginationResult, type PartialExcept, type Permission, type PermissionAnalytics, type PermissionCheckResult, PermissionError, type PermissionEvent, type PermissionGrantDomain, type PermissionGrantMessage, type PermissionGrantTypedData, type PermissionInfo, type PermissionInputMessage, type PermissionOperation, type PermissionQueryResult, type PermissionStatus, PermissionsController, PersonalServerError, type PersonalServerIdentity, type PersonalServerModel, type PickByType, type PinataListResponse, type PinataPin, PinataStorage, type PinataUploadResponse, type Plugin, type PostRequestParams, type PromiseResult, ProtocolController, type QueryPermissionsParams, type RateLimitInfo, RateLimiter, type RateLimiterConfig, type Refiner, type RegisterGranteeInput, type RegisterGranteeParams, type RegisterGranteeTypedData, type RelayerCallbacks, type RelayerConfig, RelayerError, type RelayerErrorResponse, type RelayerMetrics, type RelayerQueueInfo, type RelayerRequestOptions, type RelayerRequestPayload, type RelayerStatus, type RelayerStorageResponse, type RelayerStoreParams, type RelayerSubmitParams, type RelayerTransactionResponse, type RelayerTransactionStatus, type RelayerWebhookConfig, type RelayerWebhookPayload, type ReplicateAPIResponse, type ReplicateStatus, type Repository, type RequestOptions, type RequireKeys, type RequiredExcept, type RetryConfig, RetryUtility, type RevokePermissionInput, type RevokePermissionParams, type RuntimeConfig, type Schema, SchemaController, type SchemaMetadata, SchemaValidationError, SchemaValidator, SerializationError, type Server, type components as ServerComponents, ServerController, type $defs as ServerDefs, type ServerFilesAndPermissionParams, type ServerFilesAndPermissionTypedData, type ServerInfo, type operations as ServerOperations, type paths as ServerPaths, type ServerTrustStatus, ServerUrlMismatchError, type webhooks as ServerWebhooks, type Service, SignatureCache, SignatureError, type SimplifiedPermissionMessage, type StateMachine, type StatusInfo, type StorageCallbacks, type StorageConfig, type StorageDownloadOptions, StorageError, type StorageFile, type StorageListOptions, type StorageListResult, StorageManager, type StorageProvider, type StorageProviderConfig, type StorageRequiredMarker, type StorageUploadResult, type TimeRange, TransactionHandle, type TransactionOptions, type TransactionReceipt, type Transformer, type TrustServerInput, type TrustServerParams, type TrustServerTypedData, type TrustedServer, type TrustedServerInfo, type TrustedServerQueryOptions, type UnencryptedUploadParams, type UntrustServerInput, type UntrustServerParams, type UntrustServerTypedData, type UpdateSchemaIdParams, type UpdateSchemaIdResult, type UploadEncryptedFileResult, type UploadFileParams, type UploadFileResult, type UploadParams, type UploadProgress, type UploadResult, type UserFile, UserRejectedRequestError, type ValidationErrorResponse, type ValidationResult, type Validator, Vana, type VanaChain, type VanaChainConfig, type VanaChainId, type VanaConfig, type VanaConfigWithStorage, type VanaContract, type VanaContract as VanaContractAbi, type VanaContractInstance, type VanaContractName, VanaCore, VanaCoreFactory, VanaError, type VanaInstance, VanaNodeImpl, type VanaPlatformAdapter, type WalletConfig, type WalletConfigWithStorage, __contractCache, chains, checkGrantAccess, clearContractCache, type components, convertIpfsUrl, convertIpfsUrlWithFallbacks, createAndStoreGrant, createBrowserPlatformAdapter, createGrantFile, createNodePlatformAdapter, createPlatformAdapter, createPlatformAdapterFor, createPlatformAdapterSafe, createValidatedGrant, decryptBlobWithSignedKey, decryptWithPrivateKey, decryptWithWalletPrivateKey, Vana as default, detectPlatform, encryptBlobWithSignedKey, encryptFileKey, encryptWithWalletPublicKey, extractIpfsHash, fetchAndValidateSchema, fetchWithFallbacks, formatEth, formatNumber, formatToken, generateEncryptionKey, generateEncryptionKeyPair, generatePGPKeyPair, getAbi, getAllChains, getChainConfig, getContractAddress, getContractController, getContractInfo, getEncryptionParameters, getGatewayUrls, getGrantFileHash, getGrantTimeRemaining, getPlatformCapabilities, handleRelayerRequest, hasStorageConfig, isAPIResponse, isChainConfig, isGrantExpired, isIpfsUrl, isPlatformSupported, isReplicateAPIResponse, isVanaChain, isVanaChainId, isWalletConfig, moksha, mokshaTestnet, type operations, parseReplicateOutput, type paths, retrieveAndValidateGrant, retrieveGrantFile, safeParseJSON, schemaValidator, shortenAddress, storeGrantFile, summarizeGrant, validateDataAgainstSchema, validateDataSchemaAgainstMetaSchema, validateGrant, validateGrantExpiry, validateGrantFile, validateGranteeAccess, validateOperationAccess, vanaMainnet, type webhooks, withSignatureCache };
|