UNPKG

@keypo/typescript-sdk

Version:

A TypeScript SDK for using Keypo

71 lines (70 loc) 1.93 kB
export interface DataMetadata { name: string; type: string; mimeType?: string; subtype?: string; arrayType?: string; userMetaData?: any; } export interface DecryptAPIResponse { decryptedData: Uint8Array; metadata: DataMetadata; } export interface DecryptConfig { registryContractAddress: string; chain: string; expiration: string; apiUrl: string; } export interface DeleteConfig { permissionsRegistryContractAddress: string; bundlerRpcUrl: string; } export interface EncryptAPIResponse { name: string; encryptedData: { ipfsHash: string; dataIdentifier: string; }; } export interface EncryptConfig { apiUrl: string; validatorAddress: string; registryContractAddress: string; bundlerRpcUrl: string; } export interface EncryptForProxyConfig { apiUrl: string; validatorAddress: string; registryContractAddress: string; bundlerRpcUrl: string; proxyAddress: string; } export interface EncryptionResult { dataCID: string; dataIdentifier: string; } export interface KeypoRefs { Version: string; KeypoApiUrl: string; RegistryContractAddress: string; DefaultValidationContractAddress: string; DefaultLitActionCID: string; DefaultJSONRPC: string; ChainId: string; Chain: string; GetFileDataByOwnerSubGraph: string; } export interface ProxyExecuteConfig { chain: string; apiUrl: string; expiration: string; permissionsRegistryContractAddress: string; } export interface ShareConfig { permissionsRegistryContractAddress: string; bundlerRpcUrl: string; } export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; export type BrowserFile = typeof File extends undefined ? never : File; export type BrowserBlob = typeof Blob extends undefined ? never : Blob;