@opendatalabs/vana-sdk 0.1.0-alpha.3bc04d8 → 0.1.0-alpha.3cd7595
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/index.browser.d.ts +280 -73
- package/dist/index.browser.js +1259 -754
- package/dist/index.browser.js.map +1 -1
- package/dist/index.node.cjs +1294 -788
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.cts +280 -73
- package/dist/index.node.d.ts +280 -73
- package/dist/index.node.js +1265 -759
- package/dist/index.node.js.map +1 -1
- package/package.json +1 -1
package/dist/index.node.d.ts
CHANGED
|
@@ -191,10 +191,10 @@ interface OnChainPermissionGrant {
|
|
|
191
191
|
grantUrl: string;
|
|
192
192
|
/** Cryptographic signature that authorized this permission */
|
|
193
193
|
grantSignature: string;
|
|
194
|
-
/** Hash of the grant file content for integrity verification */
|
|
195
|
-
grantHash: string;
|
|
196
194
|
/** Nonce used when granting the permission */
|
|
197
195
|
nonce: bigint;
|
|
196
|
+
/** Block number when permission started */
|
|
197
|
+
startBlock: bigint;
|
|
198
198
|
/** Block number when permission was granted */
|
|
199
199
|
addedAtBlock: bigint;
|
|
200
200
|
/** Timestamp when permission was added */
|
|
@@ -203,6 +203,13 @@ interface OnChainPermissionGrant {
|
|
|
203
203
|
transactionHash: string;
|
|
204
204
|
/** Address that granted the permission */
|
|
205
205
|
grantor: Address;
|
|
206
|
+
/** Grantee information */
|
|
207
|
+
grantee: {
|
|
208
|
+
/** Grantee ID */
|
|
209
|
+
id: string;
|
|
210
|
+
/** Grantee address */
|
|
211
|
+
address: string;
|
|
212
|
+
};
|
|
206
213
|
/** Whether the permission is still active (not revoked) */
|
|
207
214
|
active: boolean;
|
|
208
215
|
}
|
|
@@ -490,6 +497,48 @@ interface GenericTypedData extends RecordCompatible {
|
|
|
490
497
|
/** Message to sign */
|
|
491
498
|
message: Record<string, unknown>;
|
|
492
499
|
}
|
|
500
|
+
/**
|
|
501
|
+
* Represents EIP-712 typed data for permission revocation.
|
|
502
|
+
*
|
|
503
|
+
* @remarks
|
|
504
|
+
* Used when revoking previously granted permissions through gasless transactions.
|
|
505
|
+
* The message contains a nonce and the permission ID to revoke.
|
|
506
|
+
*
|
|
507
|
+
* @category Permissions
|
|
508
|
+
*/
|
|
509
|
+
interface RevokePermissionTypedData extends GenericTypedData {
|
|
510
|
+
/** EIP-712 type definitions for the RevokePermission structure */
|
|
511
|
+
types: {
|
|
512
|
+
RevokePermission: Array<{
|
|
513
|
+
name: string;
|
|
514
|
+
type: string;
|
|
515
|
+
}>;
|
|
516
|
+
};
|
|
517
|
+
/** The primary type identifier for revocation operations */
|
|
518
|
+
primaryType: "RevokePermission";
|
|
519
|
+
/** The structured message containing revocation parameters */
|
|
520
|
+
message: RevokePermissionInput;
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* Defines all valid primary types for EIP-712 typed data in the Vana SDK.
|
|
524
|
+
*
|
|
525
|
+
* @remarks
|
|
526
|
+
* These literal types ensure compile-time safety when handling typed data operations.
|
|
527
|
+
* Each corresponds to a specific blockchain operation type.
|
|
528
|
+
*
|
|
529
|
+
* @category Permissions
|
|
530
|
+
*/
|
|
531
|
+
type TypedDataPrimaryType = "Permission" | "RevokePermission" | "TrustServer" | "UntrustServer" | "AddServer" | "RegisterGrantee" | "ServerFilesAndPermission";
|
|
532
|
+
/**
|
|
533
|
+
* Represents the union of all specific typed data interfaces.
|
|
534
|
+
*
|
|
535
|
+
* @remarks
|
|
536
|
+
* Enables type-safe handling of any typed data structure in the SDK.
|
|
537
|
+
* Used internally by relayer handlers and signature verification.
|
|
538
|
+
*
|
|
539
|
+
* @category Permissions
|
|
540
|
+
*/
|
|
541
|
+
type SpecificTypedData = PermissionGrantTypedData | RevokePermissionTypedData | TrustServerTypedData | UntrustServerTypedData | AddAndTrustServerTypedData | RegisterGranteeTypedData | ServerFilesAndPermissionTypedData;
|
|
493
542
|
/**
|
|
494
543
|
* Permission operation types
|
|
495
544
|
*
|
|
@@ -1071,6 +1120,36 @@ interface StorageConfig {
|
|
|
1071
1120
|
*/
|
|
1072
1121
|
defaultProvider?: string;
|
|
1073
1122
|
}
|
|
1123
|
+
/**
|
|
1124
|
+
* Download relayer callbacks for proxying CORS-restricted downloads.
|
|
1125
|
+
*
|
|
1126
|
+
* Provides a callback to proxy download requests through your application server
|
|
1127
|
+
* when direct browser access fails due to CORS restrictions (e.g., Google Drive).
|
|
1128
|
+
*
|
|
1129
|
+
* @category Configuration
|
|
1130
|
+
* @example
|
|
1131
|
+
* ```typescript
|
|
1132
|
+
* const downloadRelayer: DownloadRelayerCallbacks = {
|
|
1133
|
+
* async proxyDownload(url) {
|
|
1134
|
+
* const response = await fetch('https://my-app.com/api/proxy', {
|
|
1135
|
+
* method: 'POST',
|
|
1136
|
+
* headers: { 'Content-Type': 'application/json' },
|
|
1137
|
+
* body: JSON.stringify({ url })
|
|
1138
|
+
* });
|
|
1139
|
+
* return response.blob();
|
|
1140
|
+
* }
|
|
1141
|
+
* };
|
|
1142
|
+
* ```
|
|
1143
|
+
*/
|
|
1144
|
+
interface DownloadRelayerCallbacks {
|
|
1145
|
+
/**
|
|
1146
|
+
* Proxy a download request through your application server
|
|
1147
|
+
*
|
|
1148
|
+
* @param url - The URL to download from
|
|
1149
|
+
* @returns Promise resolving to the downloaded content as a Blob
|
|
1150
|
+
*/
|
|
1151
|
+
proxyDownload: (url: string) => Promise<Blob>;
|
|
1152
|
+
}
|
|
1074
1153
|
/**
|
|
1075
1154
|
* Relayer callback functions for handling gasless transactions.
|
|
1076
1155
|
*
|
|
@@ -1374,6 +1453,11 @@ interface BaseConfig {
|
|
|
1374
1453
|
* Provides flexible relay mechanism - can use HTTP, WebSocket, or any custom implementation.
|
|
1375
1454
|
*/
|
|
1376
1455
|
relayerCallbacks?: RelayerCallbacks;
|
|
1456
|
+
/**
|
|
1457
|
+
* Optional download relayer for proxying CORS-restricted downloads.
|
|
1458
|
+
* Provides a proxy mechanism for files stored on servers with CORS restrictions.
|
|
1459
|
+
*/
|
|
1460
|
+
downloadRelayer?: DownloadRelayerCallbacks;
|
|
1377
1461
|
/**
|
|
1378
1462
|
* Optional storage providers configuration for file upload/download.
|
|
1379
1463
|
* Required for: upload(), grant() without pre-stored URLs, schema operations.
|
|
@@ -1415,6 +1499,11 @@ interface BaseConfigWithStorage {
|
|
|
1415
1499
|
* Provides flexible relay mechanism - can use HTTP, WebSocket, or any custom implementation.
|
|
1416
1500
|
*/
|
|
1417
1501
|
relayerCallbacks?: RelayerCallbacks;
|
|
1502
|
+
/**
|
|
1503
|
+
* Optional download relayer for proxying CORS-restricted downloads.
|
|
1504
|
+
* Provides a proxy mechanism for files stored on servers with CORS restrictions.
|
|
1505
|
+
*/
|
|
1506
|
+
downloadRelayer?: DownloadRelayerCallbacks;
|
|
1418
1507
|
/** Required storage providers configuration for file upload/download */
|
|
1419
1508
|
storage: StorageConfig;
|
|
1420
1509
|
/**
|
|
@@ -5451,6 +5540,16 @@ declare const contractAbis: {
|
|
|
5451
5540
|
}];
|
|
5452
5541
|
readonly name: "Upgraded";
|
|
5453
5542
|
readonly type: "event";
|
|
5543
|
+
}, {
|
|
5544
|
+
readonly inputs: readonly [];
|
|
5545
|
+
readonly name: "DATA_PORTABILITY_ROLE";
|
|
5546
|
+
readonly outputs: readonly [{
|
|
5547
|
+
readonly internalType: "bytes32";
|
|
5548
|
+
readonly name: "";
|
|
5549
|
+
readonly type: "bytes32";
|
|
5550
|
+
}];
|
|
5551
|
+
readonly stateMutability: "view";
|
|
5552
|
+
readonly type: "function";
|
|
5454
5553
|
}, {
|
|
5455
5554
|
readonly inputs: readonly [];
|
|
5456
5555
|
readonly name: "DEFAULT_ADMIN_ROLE";
|
|
@@ -5523,6 +5622,33 @@ declare const contractAbis: {
|
|
|
5523
5622
|
readonly outputs: readonly [];
|
|
5524
5623
|
readonly stateMutability: "nonpayable";
|
|
5525
5624
|
readonly type: "function";
|
|
5625
|
+
}, {
|
|
5626
|
+
readonly inputs: readonly [{
|
|
5627
|
+
readonly internalType: "uint256";
|
|
5628
|
+
readonly name: "fileId";
|
|
5629
|
+
readonly type: "uint256";
|
|
5630
|
+
}, {
|
|
5631
|
+
readonly components: readonly [{
|
|
5632
|
+
readonly internalType: "address";
|
|
5633
|
+
readonly name: "account";
|
|
5634
|
+
readonly type: "address";
|
|
5635
|
+
}, {
|
|
5636
|
+
readonly internalType: "string";
|
|
5637
|
+
readonly name: "key";
|
|
5638
|
+
readonly type: "string";
|
|
5639
|
+
}];
|
|
5640
|
+
readonly internalType: "struct IDataRegistry.Permission[]";
|
|
5641
|
+
readonly name: "permissions";
|
|
5642
|
+
readonly type: "tuple[]";
|
|
5643
|
+
}, {
|
|
5644
|
+
readonly internalType: "uint256";
|
|
5645
|
+
readonly name: "schemaId";
|
|
5646
|
+
readonly type: "uint256";
|
|
5647
|
+
}];
|
|
5648
|
+
readonly name: "addFilePermissionsAndSchema";
|
|
5649
|
+
readonly outputs: readonly [];
|
|
5650
|
+
readonly stateMutability: "nonpayable";
|
|
5651
|
+
readonly type: "function";
|
|
5526
5652
|
}, {
|
|
5527
5653
|
readonly inputs: readonly [{
|
|
5528
5654
|
readonly internalType: "string";
|
|
@@ -30059,6 +30185,8 @@ interface ControllerContext$1 {
|
|
|
30059
30185
|
applicationClient?: WalletClient;
|
|
30060
30186
|
/** Handles gasless transaction submission through relayer services. */
|
|
30061
30187
|
relayerCallbacks?: RelayerCallbacks;
|
|
30188
|
+
/** Proxies CORS-restricted downloads through application server. */
|
|
30189
|
+
downloadRelayer?: DownloadRelayerCallbacks;
|
|
30062
30190
|
/** Manages file upload and download operations across storage providers. */
|
|
30063
30191
|
storageManager?: StorageManager;
|
|
30064
30192
|
/** Provides subgraph endpoint for querying indexed blockchain data. */
|
|
@@ -31699,16 +31827,16 @@ declare class SchemaValidationError extends Error {
|
|
|
31699
31827
|
}>);
|
|
31700
31828
|
}
|
|
31701
31829
|
/**
|
|
31702
|
-
*
|
|
31830
|
+
* Data schema validation utility class
|
|
31703
31831
|
*/
|
|
31704
31832
|
declare class SchemaValidator {
|
|
31705
31833
|
private ajv;
|
|
31706
31834
|
private dataSchemaValidator;
|
|
31707
31835
|
constructor();
|
|
31708
31836
|
/**
|
|
31709
|
-
* Validates a data schema against the Vana meta-schema
|
|
31837
|
+
* Validates a data schema definition against the Vana meta-schema
|
|
31710
31838
|
*
|
|
31711
|
-
* @param schema - The data schema to validate
|
|
31839
|
+
* @param schema - The data schema definition to validate
|
|
31712
31840
|
* @throws SchemaValidationError if invalid
|
|
31713
31841
|
* @example
|
|
31714
31842
|
* ```typescript
|
|
@@ -31727,15 +31855,15 @@ declare class SchemaValidator {
|
|
|
31727
31855
|
* }
|
|
31728
31856
|
* };
|
|
31729
31857
|
*
|
|
31730
|
-
* validator.
|
|
31858
|
+
* validator.validateDataSchemaAgainstMetaSchema(schema); // throws if invalid
|
|
31731
31859
|
* ```
|
|
31732
31860
|
*/
|
|
31733
|
-
|
|
31861
|
+
validateDataSchemaAgainstMetaSchema(schema: unknown): asserts schema is DataSchema;
|
|
31734
31862
|
/**
|
|
31735
|
-
* Validates data against a JSON Schema
|
|
31863
|
+
* Validates data against a JSON Schema
|
|
31736
31864
|
*
|
|
31737
31865
|
* @param data - The data to validate
|
|
31738
|
-
* @param schema - The schema containing the validation rules (
|
|
31866
|
+
* @param schema - The schema containing the validation rules (must have been validated or fetched from chain)
|
|
31739
31867
|
* @throws SchemaValidationError if invalid
|
|
31740
31868
|
* @example
|
|
31741
31869
|
* ```typescript
|
|
@@ -31745,13 +31873,13 @@ declare class SchemaValidator {
|
|
|
31745
31873
|
* const schema = await vana.schemas.get(1);
|
|
31746
31874
|
* validator.validateDataAgainstSchema(userData, schema);
|
|
31747
31875
|
*
|
|
31748
|
-
* // Also works with DataSchema object
|
|
31749
|
-
* const dataSchema
|
|
31876
|
+
* // Also works with pre-validated DataSchema object
|
|
31877
|
+
* const dataSchema = validator.validateDataSchemaAgainstMetaSchema({
|
|
31750
31878
|
* name: "User Profile",
|
|
31751
31879
|
* version: "1.0.0",
|
|
31752
31880
|
* dialect: "json",
|
|
31753
31881
|
* schema: { type: "object", properties: { name: { type: "string" } } }
|
|
31754
|
-
* };
|
|
31882
|
+
* });
|
|
31755
31883
|
* validator.validateDataAgainstSchema(userData, dataSchema);
|
|
31756
31884
|
* ```
|
|
31757
31885
|
*/
|
|
@@ -31766,9 +31894,11 @@ declare class SchemaValidator {
|
|
|
31766
31894
|
*/
|
|
31767
31895
|
validateSQLiteDDL(ddl: string, dialectVersion?: string): void;
|
|
31768
31896
|
/**
|
|
31769
|
-
* Fetches and validates a schema from a URL
|
|
31897
|
+
* Fetches and validates a data schema from a URL
|
|
31770
31898
|
*
|
|
31771
|
-
* @param url - The URL to fetch the schema from
|
|
31899
|
+
* @param url - The URL to fetch the data schema from
|
|
31900
|
+
* @param downloadRelayer - Optional download relayer for CORS bypass
|
|
31901
|
+
* @param downloadRelayer.proxyDownload - Function to proxy downloads through application server
|
|
31772
31902
|
* @returns The validated data schema
|
|
31773
31903
|
* @throws SchemaValidationError if invalid or fetch fails
|
|
31774
31904
|
* @example
|
|
@@ -31777,20 +31907,33 @@ declare class SchemaValidator {
|
|
|
31777
31907
|
* const schema = await validator.fetchAndValidateSchema("https://example.com/schema.json");
|
|
31778
31908
|
* ```
|
|
31779
31909
|
*/
|
|
31780
|
-
fetchAndValidateSchema(url: string
|
|
31910
|
+
fetchAndValidateSchema(url: string, downloadRelayer?: {
|
|
31911
|
+
proxyDownload: (url: string) => Promise<Blob>;
|
|
31912
|
+
}): Promise<DataSchema>;
|
|
31781
31913
|
}
|
|
31782
31914
|
/**
|
|
31783
31915
|
* Global schema validator instance
|
|
31784
31916
|
*/
|
|
31785
31917
|
declare const schemaValidator: SchemaValidator;
|
|
31786
31918
|
/**
|
|
31787
|
-
* Convenience function to validate a data schema
|
|
31919
|
+
* Convenience function to validate a data schema definition against the Vana meta-schema
|
|
31788
31920
|
*
|
|
31789
|
-
* @param schema - The data schema to validate
|
|
31790
|
-
* @returns
|
|
31921
|
+
* @param schema - The data schema definition to validate
|
|
31922
|
+
* @returns The validated DataSchema
|
|
31791
31923
|
* @throws SchemaValidationError if invalid
|
|
31924
|
+
* @example
|
|
31925
|
+
* ```typescript
|
|
31926
|
+
* const schemaDefinition = {
|
|
31927
|
+
* name: "User Profile",
|
|
31928
|
+
* version: "1.0.0",
|
|
31929
|
+
* dialect: "json",
|
|
31930
|
+
* schema: { type: "object", properties: { name: { type: "string" } } }
|
|
31931
|
+
* };
|
|
31932
|
+
*
|
|
31933
|
+
* const validatedSchema = validateDataSchemaAgainstMetaSchema(schemaDefinition);
|
|
31934
|
+
* ```
|
|
31792
31935
|
*/
|
|
31793
|
-
declare function
|
|
31936
|
+
declare function validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
|
|
31794
31937
|
/**
|
|
31795
31938
|
* Convenience function to validate data against a schema
|
|
31796
31939
|
*
|
|
@@ -31801,13 +31944,17 @@ declare function validateDataSchema(schema: unknown): asserts schema is DataSche
|
|
|
31801
31944
|
*/
|
|
31802
31945
|
declare function validateDataAgainstSchema(data: unknown, schema: DataSchema | Schema): void;
|
|
31803
31946
|
/**
|
|
31804
|
-
* Convenience function to fetch and validate a schema from a URL
|
|
31947
|
+
* Convenience function to fetch and validate a data schema from a URL
|
|
31805
31948
|
*
|
|
31806
|
-
* @param url - The URL to fetch the schema from
|
|
31949
|
+
* @param url - The URL to fetch the data schema from
|
|
31950
|
+
* @param downloadRelayer - Optional download relayer for CORS bypass
|
|
31951
|
+
* @param downloadRelayer.proxyDownload - Function to proxy downloads through application server
|
|
31807
31952
|
* @returns The validated data schema
|
|
31808
31953
|
* @throws SchemaValidationError if invalid or fetch fails
|
|
31809
31954
|
*/
|
|
31810
|
-
declare function fetchAndValidateSchema(url: string
|
|
31955
|
+
declare function fetchAndValidateSchema(url: string, downloadRelayer?: {
|
|
31956
|
+
proxyDownload: (url: string) => Promise<Blob>;
|
|
31957
|
+
}): Promise<DataSchema>;
|
|
31811
31958
|
|
|
31812
31959
|
/**
|
|
31813
31960
|
* Parameters for the `vana.personal.postRequest` method.
|
|
@@ -34769,19 +34916,31 @@ declare class DataController {
|
|
|
34769
34916
|
*/
|
|
34770
34917
|
addPermissionToFile(fileId: number, account: Address, publicKey: string): Promise<TransactionHandle<FilePermissionResult>>;
|
|
34771
34918
|
/**
|
|
34772
|
-
* Submits a file permission transaction
|
|
34919
|
+
* Submits a file permission transaction to the blockchain.
|
|
34773
34920
|
*
|
|
34774
|
-
*
|
|
34921
|
+
* @remarks
|
|
34922
|
+
* This method supports gasless transactions via relayer callbacks when configured.
|
|
34923
|
+
* It encrypts the user's encryption key with the recipient's public key before submission.
|
|
34775
34924
|
* Use this when you want to handle transaction confirmation and event parsing separately.
|
|
34776
34925
|
*
|
|
34777
|
-
* @param fileId - The ID of the file to
|
|
34778
|
-
* @param account - The
|
|
34779
|
-
* @param publicKey - The public key
|
|
34780
|
-
*
|
|
34926
|
+
* @param fileId - The ID of the file to grant permission for
|
|
34927
|
+
* @param account - The recipient's wallet address that will access the file
|
|
34928
|
+
* @param publicKey - The recipient's public key for encryption.
|
|
34929
|
+
* Obtain via `vana.server.getIdentity(account).public_key`
|
|
34930
|
+
* @returns Promise resolving to TransactionHandle for tracking the transaction
|
|
34931
|
+
* @throws {Error} When chain ID is not available
|
|
34932
|
+
* @throws {Error} When encryption key generation fails
|
|
34933
|
+
* @throws {Error} When public key encryption fails
|
|
34934
|
+
*
|
|
34781
34935
|
* @example
|
|
34782
34936
|
* ```typescript
|
|
34783
|
-
* const
|
|
34784
|
-
*
|
|
34937
|
+
* const tx = await vana.data.submitFilePermission(
|
|
34938
|
+
* fileId,
|
|
34939
|
+
* "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36",
|
|
34940
|
+
* recipientPublicKey
|
|
34941
|
+
* );
|
|
34942
|
+
* const result = await tx.waitForEvents();
|
|
34943
|
+
* console.log(`Permission granted with ID: ${result.permissionId}`);
|
|
34785
34944
|
* ```
|
|
34786
34945
|
*/
|
|
34787
34946
|
submitFilePermission(fileId: number, account: Address, publicKey: string): Promise<TransactionHandle<FilePermissionResult>>;
|
|
@@ -34880,10 +35039,10 @@ declare class DataController {
|
|
|
34880
35039
|
gateways?: string[];
|
|
34881
35040
|
}): Promise<Blob>;
|
|
34882
35041
|
/**
|
|
34883
|
-
* Validates a data schema against the Vana meta-schema.
|
|
35042
|
+
* Validates a data schema definition against the Vana meta-schema.
|
|
34884
35043
|
*
|
|
34885
|
-
* @param schema - The data schema to validate
|
|
34886
|
-
* @returns
|
|
35044
|
+
* @param schema - The data schema definition to validate
|
|
35045
|
+
* @returns The validated DataSchema
|
|
34887
35046
|
* @throws SchemaValidationError if invalid
|
|
34888
35047
|
* @example
|
|
34889
35048
|
* ```typescript
|
|
@@ -34900,10 +35059,10 @@ declare class DataController {
|
|
|
34900
35059
|
* }
|
|
34901
35060
|
* };
|
|
34902
35061
|
*
|
|
34903
|
-
* vana.data.
|
|
35062
|
+
* const validatedSchema = vana.data.validateDataSchemaAgainstMetaSchema(schema);
|
|
34904
35063
|
* ```
|
|
34905
35064
|
*/
|
|
34906
|
-
|
|
35065
|
+
validateDataSchemaAgainstMetaSchema(schema: unknown): DataSchema;
|
|
34907
35066
|
/**
|
|
34908
35067
|
* Validates data against a JSON Schema from a data schema.
|
|
34909
35068
|
*
|
|
@@ -34933,9 +35092,9 @@ declare class DataController {
|
|
|
34933
35092
|
*/
|
|
34934
35093
|
validateDataAgainstSchema(data: unknown, schema: DataSchema): void;
|
|
34935
35094
|
/**
|
|
34936
|
-
* Fetches and validates a schema from a URL, then returns the parsed data schema.
|
|
35095
|
+
* Fetches and validates a data schema from a URL, then returns the parsed data schema.
|
|
34937
35096
|
*
|
|
34938
|
-
* @param url - The URL to fetch the schema from
|
|
35097
|
+
* @param url - The URL to fetch the data schema from
|
|
34939
35098
|
* @returns The validated data schema
|
|
34940
35099
|
* @throws SchemaValidationError if invalid or fetch fails
|
|
34941
35100
|
* @example
|
|
@@ -34953,6 +35112,56 @@ declare class DataController {
|
|
|
34953
35112
|
fetchAndValidateSchema(url: string): Promise<DataSchema>;
|
|
34954
35113
|
}
|
|
34955
35114
|
|
|
35115
|
+
/**
|
|
35116
|
+
* Configuration options for polling server operations.
|
|
35117
|
+
*/
|
|
35118
|
+
interface PollingOptions {
|
|
35119
|
+
/** Polling interval in milliseconds (default: 500) */
|
|
35120
|
+
pollingInterval?: number;
|
|
35121
|
+
/** Maximum time to wait in milliseconds (default: 30000) */
|
|
35122
|
+
timeout?: number;
|
|
35123
|
+
}
|
|
35124
|
+
/**
|
|
35125
|
+
* Provides a Promise-based interface for server operation lifecycle management.
|
|
35126
|
+
*
|
|
35127
|
+
* @remarks
|
|
35128
|
+
* OperationHandle enables immediate access to operation IDs while providing
|
|
35129
|
+
* Promise-based methods for waiting on results. This pattern matches
|
|
35130
|
+
* TransactionHandle for consistency across the SDK's async operations.
|
|
35131
|
+
*
|
|
35132
|
+
* @category Server Operations
|
|
35133
|
+
*/
|
|
35134
|
+
declare class OperationHandle<T = unknown> {
|
|
35135
|
+
private readonly controller;
|
|
35136
|
+
readonly id: string;
|
|
35137
|
+
private _resultPromise?;
|
|
35138
|
+
constructor(controller: ServerController, id: string);
|
|
35139
|
+
/**
|
|
35140
|
+
* Waits for the operation to complete and returns the result.
|
|
35141
|
+
*
|
|
35142
|
+
* @remarks
|
|
35143
|
+
* Results are memoized - multiple calls return the same promise.
|
|
35144
|
+
* The method polls the server at regular intervals until the operation
|
|
35145
|
+
* succeeds, fails, or times out. Returns the raw string result from the
|
|
35146
|
+
* server - callers are responsible for parsing if needed.
|
|
35147
|
+
*
|
|
35148
|
+
* @param options - Optional polling configuration
|
|
35149
|
+
* @returns The operation result as a string when completed
|
|
35150
|
+
* @throws {PersonalServerError} When the operation fails or times out
|
|
35151
|
+
* @example
|
|
35152
|
+
* ```typescript
|
|
35153
|
+
* const result = await handle.waitForResult({
|
|
35154
|
+
* timeout: 60000,
|
|
35155
|
+
* pollingInterval: 500
|
|
35156
|
+
* });
|
|
35157
|
+
* // If expecting JSON, parse it:
|
|
35158
|
+
* const data = JSON.parse(result);
|
|
35159
|
+
* ```
|
|
35160
|
+
*/
|
|
35161
|
+
waitForResult(options?: PollingOptions): Promise<T>;
|
|
35162
|
+
private pollForCompletion;
|
|
35163
|
+
}
|
|
35164
|
+
|
|
34956
35165
|
/**
|
|
34957
35166
|
* Manages interactions with Vana personal servers and identity infrastructure.
|
|
34958
35167
|
*
|
|
@@ -35033,54 +35242,47 @@ declare class ServerController {
|
|
|
35033
35242
|
*/
|
|
35034
35243
|
getIdentity(request: InitPersonalServerParams): Promise<PersonalServerIdentity>;
|
|
35035
35244
|
/**
|
|
35036
|
-
* Creates
|
|
35245
|
+
* Creates a server operation and returns a handle for lifecycle management.
|
|
35037
35246
|
*
|
|
35038
35247
|
* @remarks
|
|
35039
|
-
* This method submits a computation request to the personal server
|
|
35040
|
-
*
|
|
35041
|
-
*
|
|
35248
|
+
* This method submits a computation request to the personal server and returns
|
|
35249
|
+
* an OperationHandle that provides Promise-based methods for waiting on results.
|
|
35250
|
+
* The handle pattern matches TransactionHandle for consistency across async operations.
|
|
35251
|
+
*
|
|
35252
|
+
* @param params - The operation request parameters
|
|
35042
35253
|
* @param params.permissionId - The permission ID authorizing this operation.
|
|
35043
|
-
* Obtain
|
|
35044
|
-
* @returns
|
|
35045
|
-
* @throws {PersonalServerError} When server request fails or parameters are invalid
|
|
35046
|
-
*
|
|
35047
|
-
* @throws {NetworkError} When personal server API communication fails.
|
|
35048
|
-
* Check server URL configuration and network connectivity.
|
|
35254
|
+
* Obtain via `vana.permissions.getUserPermissionGrantsOnChain()`.
|
|
35255
|
+
* @returns An OperationHandle providing access to the operation ID and result methods
|
|
35256
|
+
* @throws {PersonalServerError} When the server request fails or parameters are invalid
|
|
35257
|
+
* @throws {NetworkError} When personal server API communication fails
|
|
35049
35258
|
* @example
|
|
35050
35259
|
* ```typescript
|
|
35051
|
-
* const
|
|
35052
|
-
* permissionId: 123
|
|
35260
|
+
* const operation = await vana.server.createOperation({
|
|
35261
|
+
* permissionId: 123
|
|
35053
35262
|
* });
|
|
35263
|
+
* console.log(`Operation ID: ${operation.id}`);
|
|
35054
35264
|
*
|
|
35055
|
-
*
|
|
35265
|
+
* // Wait for completion
|
|
35266
|
+
* const result = await operation.waitForResult();
|
|
35267
|
+
* console.log("Result:", result);
|
|
35056
35268
|
* ```
|
|
35057
35269
|
*/
|
|
35058
|
-
createOperation(params: CreateOperationParams): Promise<
|
|
35270
|
+
createOperation<T = unknown>(params: CreateOperationParams): Promise<OperationHandle<T>>;
|
|
35059
35271
|
/**
|
|
35060
|
-
*
|
|
35272
|
+
* Retrieves the current status and result of a server operation.
|
|
35061
35273
|
*
|
|
35062
35274
|
* @remarks
|
|
35063
|
-
*
|
|
35064
|
-
*
|
|
35065
|
-
*
|
|
35066
|
-
*
|
|
35067
|
-
*
|
|
35068
|
-
*
|
|
35069
|
-
* @param operationId - The operation ID returned from the initial request submission
|
|
35070
|
-
* @returns A Promise that resolves to the current operation response with status and results
|
|
35071
|
-
* @throws {NetworkError} When the polling request fails or returns invalid data
|
|
35275
|
+
* Common status values: `starting`, `running`, `succeeded`, `failed`, `canceled`.
|
|
35276
|
+
* When status is `succeeded`, the result field contains the operation output.
|
|
35277
|
+
*
|
|
35278
|
+
* @param operationId - The ID of the operation to query
|
|
35279
|
+
* @returns The operation response containing status, result, and metadata
|
|
35280
|
+
* @throws {NetworkError} When the API request fails or returns invalid data
|
|
35072
35281
|
* @example
|
|
35073
35282
|
* ```typescript
|
|
35074
|
-
*
|
|
35075
|
-
*
|
|
35076
|
-
*
|
|
35077
|
-
* while (result.status === "processing") {
|
|
35078
|
-
* await new Promise(resolve => setTimeout(resolve, 1000));
|
|
35079
|
-
* result = await vana.server.getOperation(response.id);
|
|
35080
|
-
* }
|
|
35081
|
-
*
|
|
35082
|
-
* if (result.status === "succeeded") {
|
|
35083
|
-
* console.log("Computation completed:", result.output);
|
|
35283
|
+
* const status = await vana.server.getOperation(operationId);
|
|
35284
|
+
* if (status.status === 'succeeded') {
|
|
35285
|
+
* console.log('Result:', JSON.parse(status.result));
|
|
35084
35286
|
* }
|
|
35085
35287
|
* ```
|
|
35086
35288
|
*/
|
|
@@ -35490,6 +35692,7 @@ declare class VanaCore {
|
|
|
35490
35692
|
/** Handles environment-specific operations like encryption and file systems. */
|
|
35491
35693
|
protected platform: VanaPlatformAdapter;
|
|
35492
35694
|
private readonly relayerCallbacks?;
|
|
35695
|
+
private readonly downloadRelayer?;
|
|
35493
35696
|
private readonly storageManager?;
|
|
35494
35697
|
private readonly hasRequiredStorage;
|
|
35495
35698
|
private readonly ipfsGateways?;
|
|
@@ -36544,6 +36747,8 @@ declare function storeGrantFile(grantFile: GrantFile, relayerUrl: string): Promi
|
|
|
36544
36747
|
*
|
|
36545
36748
|
* @param grantUrl - The grant file URL from OnChainPermissionGrant.grantUrl
|
|
36546
36749
|
* @param _relayerUrl - URL of the relayer service (optional, unused)
|
|
36750
|
+
* @param downloadRelayer - Optional download relayer for proxying CORS-restricted downloads
|
|
36751
|
+
* @param downloadRelayer.proxyDownload - Function to proxy download requests through application server
|
|
36547
36752
|
* @returns Promise resolving to the complete grant file with operation details
|
|
36548
36753
|
* @throws {NetworkError} When all retrieval attempts fail
|
|
36549
36754
|
* @throws {SerializationError} When grant file format is invalid
|
|
@@ -36566,7 +36771,9 @@ declare function storeGrantFile(grantFile: GrantFile, relayerUrl: string): Promi
|
|
|
36566
36771
|
* }
|
|
36567
36772
|
* ```
|
|
36568
36773
|
*/
|
|
36569
|
-
declare function retrieveGrantFile(grantUrl: string, _relayerUrl?: string
|
|
36774
|
+
declare function retrieveGrantFile(grantUrl: string, _relayerUrl?: string, downloadRelayer?: {
|
|
36775
|
+
proxyDownload: (url: string) => Promise<Blob>;
|
|
36776
|
+
}): Promise<GrantFile>;
|
|
36570
36777
|
/**
|
|
36571
36778
|
* Generates a content hash for a grant file.
|
|
36572
36779
|
* This can be used for integrity verification.
|
|
@@ -37794,4 +38001,4 @@ declare function Vana(config: VanaConfig): VanaNodeImpl;
|
|
|
37794
38001
|
*/
|
|
37795
38002
|
type VanaInstance = VanaNodeImpl;
|
|
37796
38003
|
|
|
37797
|
-
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,
|
|
38004
|
+
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 DownloadRelayerCallbacks, 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 RevokePermissionTypedData, 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 SpecificTypedData, 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 TypedDataPrimaryType, 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 };
|