@opendatalabs/vana-sdk 0.1.0-alpha.61efc06 → 0.1.0-alpha.66768f7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.browser.d.ts +61 -1
- package/dist/index.browser.js +63 -0
- package/dist/index.browser.js.map +1 -1
- package/dist/index.node.cjs +63 -0
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.cts +61 -1
- package/dist/index.node.d.ts +61 -1
- package/dist/index.node.js +63 -0
- package/dist/index.node.js.map +1 -1
- package/package.json +1 -1
package/dist/index.browser.d.ts
CHANGED
|
@@ -1023,6 +1023,39 @@ interface ServerFilesAndPermissionTypedData extends GenericTypedData {
|
|
|
1023
1023
|
filePermissions: Permission[][];
|
|
1024
1024
|
};
|
|
1025
1025
|
}
|
|
1026
|
+
/**
|
|
1027
|
+
* Input structure for FilePermission typed data
|
|
1028
|
+
*
|
|
1029
|
+
* @category Permissions
|
|
1030
|
+
*/
|
|
1031
|
+
interface FilePermissionInput extends RecordCompatible {
|
|
1032
|
+
/** User nonce */
|
|
1033
|
+
nonce: bigint;
|
|
1034
|
+
/** File ID to grant permission for */
|
|
1035
|
+
fileId: number;
|
|
1036
|
+
/** Account address to grant permission to */
|
|
1037
|
+
account: Address;
|
|
1038
|
+
/** Encrypted key for the permission */
|
|
1039
|
+
encryptedKey: string;
|
|
1040
|
+
}
|
|
1041
|
+
/**
|
|
1042
|
+
* EIP-712 typed data for FilePermission
|
|
1043
|
+
*
|
|
1044
|
+
* @category Permissions
|
|
1045
|
+
*/
|
|
1046
|
+
interface FilePermissionTypedData extends GenericTypedData {
|
|
1047
|
+
/** EIP-712 types */
|
|
1048
|
+
types: {
|
|
1049
|
+
FilePermission: Array<{
|
|
1050
|
+
name: string;
|
|
1051
|
+
type: string;
|
|
1052
|
+
}>;
|
|
1053
|
+
};
|
|
1054
|
+
/** Primary type */
|
|
1055
|
+
primaryType: "FilePermission";
|
|
1056
|
+
/** Message to sign */
|
|
1057
|
+
message: FilePermissionInput;
|
|
1058
|
+
}
|
|
1026
1059
|
|
|
1027
1060
|
/**
|
|
1028
1061
|
* Marker interface to indicate that a Vana instance has storage configured.
|
|
@@ -1247,6 +1280,22 @@ interface RelayerCallbacks {
|
|
|
1247
1280
|
* @returns Promise resolving to the storage URL
|
|
1248
1281
|
*/
|
|
1249
1282
|
storeGrantFile?: (grantData: GrantFile) => Promise<string>;
|
|
1283
|
+
/**
|
|
1284
|
+
* Submit a signed file permission transaction for relay
|
|
1285
|
+
*
|
|
1286
|
+
* @param params - Complete parameters for file permission
|
|
1287
|
+
* @param params.fileId - The file ID to grant permission for
|
|
1288
|
+
* @param params.account - The account address to grant permission to
|
|
1289
|
+
* @param params.encryptedKey - The encrypted key for the permission
|
|
1290
|
+
* @param params.userAddress - The user's address (owner of the file)
|
|
1291
|
+
* @returns Promise resolving to the transaction hash
|
|
1292
|
+
*/
|
|
1293
|
+
submitFilePermission?: (params: {
|
|
1294
|
+
fileId: number;
|
|
1295
|
+
account: Address;
|
|
1296
|
+
encryptedKey: string;
|
|
1297
|
+
userAddress: Address;
|
|
1298
|
+
}) => Promise<Hash>;
|
|
1250
1299
|
}
|
|
1251
1300
|
/**
|
|
1252
1301
|
* Storage callback functions for flexible storage operations.
|
|
@@ -34782,6 +34831,17 @@ declare class DataController {
|
|
|
34782
34831
|
* ```
|
|
34783
34832
|
*/
|
|
34784
34833
|
submitFilePermission(fileId: number, account: Address, publicKey: string): Promise<TransactionHandle<FilePermissionResult>>;
|
|
34834
|
+
/**
|
|
34835
|
+
* Composes the EIP-712 typed data for FilePermission.
|
|
34836
|
+
*
|
|
34837
|
+
* @param params - The parameters for composing the file permission message
|
|
34838
|
+
* @param params.nonce - The user's nonce for preventing replay attacks
|
|
34839
|
+
* @param params.fileId - The ID of the file to grant permission for
|
|
34840
|
+
* @param params.account - The account address to grant permission to
|
|
34841
|
+
* @param params.encryptedKey - The encrypted key for the permission
|
|
34842
|
+
* @returns Promise resolving to the typed data structure
|
|
34843
|
+
*/
|
|
34844
|
+
private composeFilePermissionMessage;
|
|
34785
34845
|
/**
|
|
34786
34846
|
* Gets the encrypted key for a specific account's permission to access a file.
|
|
34787
34847
|
*
|
|
@@ -37642,4 +37702,4 @@ declare function Vana(config: VanaConfig): VanaBrowserImpl;
|
|
|
37642
37702
|
*/
|
|
37643
37703
|
type VanaInstance = VanaBrowserImpl;
|
|
37644
37704
|
|
|
37645
|
-
export { type $defs, type APIResponse, type AddAndTrustServerInput, type AddAndTrustServerParams, type AddAndTrustServerTypedData, type AddRefinerParams, type AddRefinerResult, type AddSchemaParams, type AddSchemaResult, type AllKeys, ApiClient, type ApiClientConfig, type ApiResponse, AsyncQueue, type AsyncResult, type AuthenticationErrorResponse, type Awaited, type BaseConfig, type BaseConfigWithStorage, BaseController, type BatchServerInfoResult, type BatchUploadParams, type BatchUploadResult, type BlockRange, BlockchainError, type BlockchainErrorResponse, type Brand, BrowserPlatformAdapter, type Cache, type CacheConfig, CallbackStorage, type ChainConfig, type ChainConfigWithStorage, type CheckPermissionParams, CircuitBreaker, type CompleteSchema, type ComputeErrorResponse, type ConditionalOptional, type ConfigValidationOptions, type ConfigValidationResult, type ContractAddresses, type ContractCall, type ContractDeployment, ContractFactory, type ContractInfo, type ContractMethodParams, type ContractMethodReturnType, ContractNotFoundError, type Controller, type ControllerContext, type CreateOperationParams, type CreateOperationRequest, type CreateOperationResponse, type CreateSchemaParams, type CreateSchemaResult, DEFAULT_ENCRYPTION_SEED, DEFAULT_IPFS_GATEWAY, DataController, type DataSchema, type DecryptionErrorResponse, type DeepPartial, type DeepReadonly, type DeleteFileParams, type DeleteFileResult, type DownloadFileParams, type DownloadFileResult, type EncryptedUploadParams, type EncryptionInfo, type ErrorResponse, EventEmitter, type EventFilter, type EventLog, type Factory, type FileAccessErrorResponse, type FileAccessPermissions, type FileMetadata, type FilePermissionParams, type FileSharingConfig, type GasEstimate, type GenericRequest, type GenericResponse, type GenericTypedData, type GetFileParams, type GetOperationResponse, type GetUserFilesParams, type GetUserPermissionsOptions, type GetUserTrustedServersParams, GoogleDriveStorage, GrantExpiredError, type GrantFile, type GrantPermissionParams, GrantSchemaError, GrantValidationError, type GrantValidationErrorResponse, type GrantValidationOptions, type GrantValidationResult, type GrantedPermission, type Grantee, type GranteeInfo, GranteeMismatchError, type GranteeQueryOptions, type HttpMethod, IPFS_GATEWAYS, type IdentityResponseModel, type InitPersonalServerParams, type InternalServerErrorResponse, InvalidConfigurationError, IpfsStorage, type LegacyPermissionParams, type MaybeArray, type MaybePromise, MemoryCache, type Middleware, MiddlewarePipeline, NetworkError, type NetworkInfo, type Nominal, type NonNullable, NonceError, type NotFoundErrorResponse, type Observable, type Observer, type OmitByType, type OnChainPermissionGrant, type OperationErrorResponse, OperationNotAllowedError, type OptionalKeys, type PaginatedGrantees, type PaginatedTrustedServers, type PaginationParams, type PaginationResult, type PartialExcept, type Permission, type PermissionAnalytics, type PermissionCheckResult, PermissionError, type PermissionEvent, type PermissionGrantDomain, type PermissionGrantMessage, type PermissionGrantTypedData, type PermissionInfo, type PermissionInputMessage, type PermissionOperation, type PermissionQueryResult, type PermissionStatus, PermissionsController, PersonalServerError, type PersonalServerIdentity, type PersonalServerModel, type PickByType, type PinataListResponse, type PinataPin, PinataStorage, type PinataUploadResponse, type Plugin, type PostRequestParams, type PromiseResult, ProtocolController, type QueryPermissionsParams, type RateLimitInfo, RateLimiter, type RateLimiterConfig, type Refiner, type RegisterGranteeInput, type RegisterGranteeParams, type RegisterGranteeTypedData, type RelayerCallbacks, type RelayerConfig, RelayerError, type RelayerErrorResponse, type RelayerMetrics, type RelayerQueueInfo, type RelayerRequestOptions, type RelayerStatus, type RelayerStorageResponse, type RelayerStoreParams, type RelayerSubmitParams, type RelayerTransactionResponse, type RelayerTransactionStatus, type RelayerWebhookConfig, type RelayerWebhookPayload, type ReplicateAPIResponse, type ReplicateStatus, type Repository, type RequestOptions, type RequireKeys, type RequiredExcept, type RetryConfig, RetryUtility, type RevokePermissionInput, type RevokePermissionParams, type RuntimeConfig, type Schema, type SchemaMetadata, SchemaValidationError, SchemaValidator, SerializationError, type Server, type components as ServerComponents, ServerController, type $defs as ServerDefs, type ServerFilesAndPermissionParams, type ServerFilesAndPermissionTypedData, type ServerInfo, type operations as ServerOperations, type paths as ServerPaths, type ServerTrustStatus, ServerUrlMismatchError, type webhooks as ServerWebhooks, type Service, SignatureCache, SignatureError, type SimplifiedPermissionMessage, type StateMachine, type StatusInfo, type StorageCallbacks, type StorageConfig, type StorageDownloadOptions, StorageError, type StorageFile, type StorageListOptions, type StorageListResult, StorageManager, type StorageProvider, type StorageProviderConfig, type StorageRequiredMarker, type StorageUploadResult, type TimeRange, TransactionHandle, type TransactionOptions, type TransactionReceipt, type Transformer, type TrustServerInput, type TrustServerParams, type TrustServerTypedData, type TrustedServer, type TrustedServerInfo, type TrustedServerQueryOptions, type UnencryptedUploadParams, type UntrustServerInput, type UntrustServerParams, type UntrustServerTypedData, type UpdateSchemaIdParams, type UpdateSchemaIdResult, type UploadEncryptedFileResult, type UploadFileParams, type UploadFileResult, type UploadParams, type UploadProgress, type UploadResult, type UserFile, UserRejectedRequestError, type ValidationErrorResponse, type ValidationResult, type Validator, Vana, VanaBrowserImpl, type VanaChain, type VanaChainConfig, type VanaChainId, type VanaConfig, type VanaConfigWithStorage, type VanaContract, type VanaContract as VanaContractAbi, type VanaContractInstance, type VanaContractName, VanaCore, VanaCoreFactory, VanaError, type VanaInstance, type VanaPlatformAdapter, type WalletConfig, type WalletConfigWithStorage, __contractCache, chains, checkGrantAccess, clearContractCache, type components, convertIpfsUrl, convertIpfsUrlWithFallbacks, createAndStoreGrant, createBrowserPlatformAdapter, createGrantFile, createPlatformAdapterSafe, createValidatedGrant, decryptBlobWithSignedKey, decryptWithPrivateKey, decryptWithWalletPrivateKey, Vana as default, detectPlatform, encryptBlobWithSignedKey, encryptFileKey, encryptWithWalletPublicKey, extractIpfsHash, fetchAndValidateSchema, fetchWithFallbacks, formatEth, formatNumber, formatToken, generateEncryptionKey, generateEncryptionKeyPair, generatePGPKeyPair, getAbi, getAllChains, getChainConfig, getContractAddress, getContractController, getContractInfo, getEncryptionParameters, getGatewayUrls, getGrantFileHash, getGrantTimeRemaining, getPlatformCapabilities, hasStorageConfig, isAPIResponse, isChainConfig, isGrantExpired, isIpfsUrl, isPlatformSupported, isReplicateAPIResponse, isVanaChain, isVanaChainId, isWalletConfig, moksha, mokshaTestnet, type operations, parseReplicateOutput, type paths, retrieveAndValidateGrant, retrieveGrantFile, safeParseJSON, schemaValidator, shortenAddress, storeGrantFile, summarizeGrant, validateDataAgainstSchema, validateDataSchemaAgainstMetaSchema, validateGrant, validateGrantExpiry, validateGrantFile, validateGranteeAccess, validateOperationAccess, vanaMainnet, type webhooks, withSignatureCache };
|
|
37705
|
+
export { type $defs, type APIResponse, type AddAndTrustServerInput, type AddAndTrustServerParams, type AddAndTrustServerTypedData, type AddRefinerParams, type AddRefinerResult, type AddSchemaParams, type AddSchemaResult, type AllKeys, ApiClient, type ApiClientConfig, type ApiResponse, AsyncQueue, type AsyncResult, type AuthenticationErrorResponse, type Awaited, type BaseConfig, type BaseConfigWithStorage, BaseController, type BatchServerInfoResult, type BatchUploadParams, type BatchUploadResult, type BlockRange, BlockchainError, type BlockchainErrorResponse, type Brand, BrowserPlatformAdapter, type Cache, type CacheConfig, CallbackStorage, type ChainConfig, type ChainConfigWithStorage, type CheckPermissionParams, CircuitBreaker, type CompleteSchema, type ComputeErrorResponse, type ConditionalOptional, type ConfigValidationOptions, type ConfigValidationResult, type ContractAddresses, type ContractCall, type ContractDeployment, ContractFactory, type ContractInfo, type ContractMethodParams, type ContractMethodReturnType, ContractNotFoundError, type Controller, type ControllerContext, type CreateOperationParams, type CreateOperationRequest, type CreateOperationResponse, type CreateSchemaParams, type CreateSchemaResult, DEFAULT_ENCRYPTION_SEED, DEFAULT_IPFS_GATEWAY, DataController, type DataSchema, type DecryptionErrorResponse, type DeepPartial, type DeepReadonly, type DeleteFileParams, type DeleteFileResult, type DownloadFileParams, type DownloadFileResult, type EncryptedUploadParams, type EncryptionInfo, type ErrorResponse, EventEmitter, type EventFilter, type EventLog, type Factory, type FileAccessErrorResponse, type FileAccessPermissions, type FileMetadata, type FilePermissionInput, type FilePermissionParams, type FilePermissionTypedData, type FileSharingConfig, type GasEstimate, type GenericRequest, type GenericResponse, type GenericTypedData, type GetFileParams, type GetOperationResponse, type GetUserFilesParams, type GetUserPermissionsOptions, type GetUserTrustedServersParams, GoogleDriveStorage, GrantExpiredError, type GrantFile, type GrantPermissionParams, GrantSchemaError, GrantValidationError, type GrantValidationErrorResponse, type GrantValidationOptions, type GrantValidationResult, type GrantedPermission, type Grantee, type GranteeInfo, GranteeMismatchError, type GranteeQueryOptions, type HttpMethod, IPFS_GATEWAYS, type IdentityResponseModel, type InitPersonalServerParams, type InternalServerErrorResponse, InvalidConfigurationError, IpfsStorage, type LegacyPermissionParams, type MaybeArray, type MaybePromise, MemoryCache, type Middleware, MiddlewarePipeline, NetworkError, type NetworkInfo, type Nominal, type NonNullable, NonceError, type NotFoundErrorResponse, type Observable, type Observer, type OmitByType, type OnChainPermissionGrant, type OperationErrorResponse, OperationNotAllowedError, type OptionalKeys, type PaginatedGrantees, type PaginatedTrustedServers, type PaginationParams, type PaginationResult, type PartialExcept, type Permission, type PermissionAnalytics, type PermissionCheckResult, PermissionError, type PermissionEvent, type PermissionGrantDomain, type PermissionGrantMessage, type PermissionGrantTypedData, type PermissionInfo, type PermissionInputMessage, type PermissionOperation, type PermissionQueryResult, type PermissionStatus, PermissionsController, PersonalServerError, type PersonalServerIdentity, type PersonalServerModel, type PickByType, type PinataListResponse, type PinataPin, PinataStorage, type PinataUploadResponse, type Plugin, type PostRequestParams, type PromiseResult, ProtocolController, type QueryPermissionsParams, type RateLimitInfo, RateLimiter, type RateLimiterConfig, type Refiner, type RegisterGranteeInput, type RegisterGranteeParams, type RegisterGranteeTypedData, type RelayerCallbacks, type RelayerConfig, RelayerError, type RelayerErrorResponse, type RelayerMetrics, type RelayerQueueInfo, type RelayerRequestOptions, type RelayerStatus, type RelayerStorageResponse, type RelayerStoreParams, type RelayerSubmitParams, type RelayerTransactionResponse, type RelayerTransactionStatus, type RelayerWebhookConfig, type RelayerWebhookPayload, type ReplicateAPIResponse, type ReplicateStatus, type Repository, type RequestOptions, type RequireKeys, type RequiredExcept, type RetryConfig, RetryUtility, type RevokePermissionInput, type RevokePermissionParams, type RuntimeConfig, type Schema, type SchemaMetadata, SchemaValidationError, SchemaValidator, SerializationError, type Server, type components as ServerComponents, ServerController, type $defs as ServerDefs, type ServerFilesAndPermissionParams, type ServerFilesAndPermissionTypedData, type ServerInfo, type operations as ServerOperations, type paths as ServerPaths, type ServerTrustStatus, ServerUrlMismatchError, type webhooks as ServerWebhooks, type Service, SignatureCache, SignatureError, type SimplifiedPermissionMessage, type StateMachine, type StatusInfo, type StorageCallbacks, type StorageConfig, type StorageDownloadOptions, StorageError, type StorageFile, type StorageListOptions, type StorageListResult, StorageManager, type StorageProvider, type StorageProviderConfig, type StorageRequiredMarker, type StorageUploadResult, type TimeRange, TransactionHandle, type TransactionOptions, type TransactionReceipt, type Transformer, type TrustServerInput, type TrustServerParams, type TrustServerTypedData, type TrustedServer, type TrustedServerInfo, type TrustedServerQueryOptions, type UnencryptedUploadParams, type UntrustServerInput, type UntrustServerParams, type UntrustServerTypedData, type UpdateSchemaIdParams, type UpdateSchemaIdResult, type UploadEncryptedFileResult, type UploadFileParams, type UploadFileResult, type UploadParams, type UploadProgress, type UploadResult, type UserFile, UserRejectedRequestError, type ValidationErrorResponse, type ValidationResult, type Validator, Vana, VanaBrowserImpl, type VanaChain, type VanaChainConfig, type VanaChainId, type VanaConfig, type VanaConfigWithStorage, type VanaContract, type VanaContract as VanaContractAbi, type VanaContractInstance, type VanaContractName, VanaCore, VanaCoreFactory, VanaError, type VanaInstance, type VanaPlatformAdapter, type WalletConfig, type WalletConfigWithStorage, __contractCache, chains, checkGrantAccess, clearContractCache, type components, convertIpfsUrl, convertIpfsUrlWithFallbacks, createAndStoreGrant, createBrowserPlatformAdapter, createGrantFile, createPlatformAdapterSafe, createValidatedGrant, decryptBlobWithSignedKey, decryptWithPrivateKey, decryptWithWalletPrivateKey, Vana as default, detectPlatform, encryptBlobWithSignedKey, encryptFileKey, encryptWithWalletPublicKey, extractIpfsHash, fetchAndValidateSchema, fetchWithFallbacks, formatEth, formatNumber, formatToken, generateEncryptionKey, generateEncryptionKeyPair, generatePGPKeyPair, getAbi, getAllChains, getChainConfig, getContractAddress, getContractController, getContractInfo, getEncryptionParameters, getGatewayUrls, getGrantFileHash, getGrantTimeRemaining, getPlatformCapabilities, hasStorageConfig, isAPIResponse, isChainConfig, isGrantExpired, isIpfsUrl, isPlatformSupported, isReplicateAPIResponse, isVanaChain, isVanaChainId, isWalletConfig, moksha, mokshaTestnet, type operations, parseReplicateOutput, type paths, retrieveAndValidateGrant, retrieveGrantFile, safeParseJSON, schemaValidator, shortenAddress, storeGrantFile, summarizeGrant, validateDataAgainstSchema, validateDataSchemaAgainstMetaSchema, validateGrant, validateGrantExpiry, validateGrantFile, validateGranteeAccess, validateOperationAccess, vanaMainnet, type webhooks, withSignatureCache };
|
package/dist/index.browser.js
CHANGED
|
@@ -43470,6 +43470,26 @@ var DataController = class {
|
|
|
43470
43470
|
publicKey,
|
|
43471
43471
|
this.context.platform
|
|
43472
43472
|
);
|
|
43473
|
+
if (this.context.relayerCallbacks?.submitFilePermission) {
|
|
43474
|
+
console.debug(
|
|
43475
|
+
"\u{1F4DD} Using relayer for submitFilePermission (gasless transaction)"
|
|
43476
|
+
);
|
|
43477
|
+
const userAddress = await this.getUserAddress();
|
|
43478
|
+
const txHash2 = await this.context.relayerCallbacks.submitFilePermission(
|
|
43479
|
+
{
|
|
43480
|
+
fileId,
|
|
43481
|
+
account,
|
|
43482
|
+
encryptedKey,
|
|
43483
|
+
userAddress
|
|
43484
|
+
}
|
|
43485
|
+
);
|
|
43486
|
+
return new TransactionHandle(
|
|
43487
|
+
this.context,
|
|
43488
|
+
txHash2,
|
|
43489
|
+
"addFilePermission"
|
|
43490
|
+
);
|
|
43491
|
+
}
|
|
43492
|
+
console.debug("\u{1F4DD} Using direct transaction for submitFilePermission");
|
|
43473
43493
|
const chainId = this.context.walletClient.chain?.id;
|
|
43474
43494
|
if (!chainId) {
|
|
43475
43495
|
throw new Error("Chain ID not available");
|
|
@@ -43496,6 +43516,49 @@ var DataController = class {
|
|
|
43496
43516
|
);
|
|
43497
43517
|
}
|
|
43498
43518
|
}
|
|
43519
|
+
/**
|
|
43520
|
+
* Composes the EIP-712 typed data for FilePermission.
|
|
43521
|
+
*
|
|
43522
|
+
* @param params - The parameters for composing the file permission message
|
|
43523
|
+
* @param params.nonce - The user's nonce for preventing replay attacks
|
|
43524
|
+
* @param params.fileId - The ID of the file to grant permission for
|
|
43525
|
+
* @param params.account - The account address to grant permission to
|
|
43526
|
+
* @param params.encryptedKey - The encrypted key for the permission
|
|
43527
|
+
* @returns Promise resolving to the typed data structure
|
|
43528
|
+
*/
|
|
43529
|
+
async composeFilePermissionMessage(params) {
|
|
43530
|
+
const chainId = this.context.walletClient.chain?.id;
|
|
43531
|
+
if (!chainId) {
|
|
43532
|
+
throw new Error("Chain ID not available");
|
|
43533
|
+
}
|
|
43534
|
+
const dataRegistryAddress = getContractAddress(chainId, "DataRegistry");
|
|
43535
|
+
const domain = {
|
|
43536
|
+
name: "VanaDataRegistry",
|
|
43537
|
+
version: "1",
|
|
43538
|
+
chainId,
|
|
43539
|
+
verifyingContract: dataRegistryAddress
|
|
43540
|
+
};
|
|
43541
|
+
const types = {
|
|
43542
|
+
FilePermission: [
|
|
43543
|
+
{ name: "nonce", type: "uint256" },
|
|
43544
|
+
{ name: "fileId", type: "uint256" },
|
|
43545
|
+
{ name: "account", type: "address" },
|
|
43546
|
+
{ name: "encryptedKey", type: "string" }
|
|
43547
|
+
]
|
|
43548
|
+
};
|
|
43549
|
+
const message = {
|
|
43550
|
+
nonce: params.nonce,
|
|
43551
|
+
fileId: params.fileId,
|
|
43552
|
+
account: params.account,
|
|
43553
|
+
encryptedKey: params.encryptedKey
|
|
43554
|
+
};
|
|
43555
|
+
return {
|
|
43556
|
+
domain,
|
|
43557
|
+
types,
|
|
43558
|
+
primaryType: "FilePermission",
|
|
43559
|
+
message
|
|
43560
|
+
};
|
|
43561
|
+
}
|
|
43499
43562
|
/**
|
|
43500
43563
|
* Gets the encrypted key for a specific account's permission to access a file.
|
|
43501
43564
|
*
|