Properties
Optional payment
payment?: PaymentHandlers<URL>
Optional signer
signer?: Signer
Static createDeleteAuth
createDeleteAuth: ((signer, hash, message?, expiration?) => Promise<SignedEvent>) = createDeleteAuth
Type declaration
- (signer, hash, message?, expiration?): Promise<SignedEvent>
Parameters
- signer: Signer
- hash: string | string[]
- message: string = "Delete Blob"
- expiration: number = ...
Returns Promise<SignedEvent>
Static createGetAuth
createGetAuth: ((signer, serverOrHash, message, expiration?) => Promise<SignedEvent>) = createDownloadAuth
Type declaration
- (signer, serverOrHash, message, expiration?): Promise<SignedEvent>
Parameters
- signer: Signer
- serverOrHash: string | string[]
- message: string
- expiration: number = ...
Returns Promise<SignedEvent>
Static createListAuth
createListAuth: ((signer, message?, expiration?) => Promise<SignedEvent>) = createListAuth
Type declaration
- (signer, message?, expiration?): Promise<SignedEvent>
Parameters
- signer: Signer
- message: string = "List Blobs"
- expiration: number = ...
Returns Promise<SignedEvent>
Static createUploadAuth
createUploadAuth: ((signer, blobsOrHashes, message?, expiration?) => Promise<SignedEvent>) = createUploadAuth
Type declaration
- (signer, blobsOrHashes, message?, expiration?): Promise<SignedEvent>
Parameters
- signer: Signer
- blobsOrHashes: string | string[] | UploadType | UploadType[]
- message: string = "Upload Blob"
- expiration: number = ...
Returns Promise<SignedEvent>
Static deleteBlob
deleteBlob: (<S>(server,
hash,
opts?) => Promise<boolean>) = deleteBlob Type declaration
- <S>(server, hash, opts?): Promise<boolean>
Parameters
- server: S
- hash: string
Optional opts: DeleteOptions<S>
Returns Promise<boolean>
Static downloadBlob
downloadBlob: (<S>(server,
hash,
opts?) => Promise<Response>) = downloadBlob Type declaration
- <S>(server, hash, opts?): Promise<Response>
Parameters
- server: S
- hash: string
Optional opts: DownloadOptions<S>
Returns Promise<Response>
Static encodeAuthorizationHeader
encodeAuthorizationHeader: ((event) => string) = encodeAuthorizationHeader
Static getFileSha256
getFileSha256: ((blob) => string | Promise<string>) = getBlobSha256
Type declaration
- (blob): string | Promise<string>
Returns string | Promise<string>
Static listBlobs
listBlobs: (<S>(server,
pubkey,
opts?) => Promise<BlobDescriptor[]>) = listBlobs Type declaration
- <S>(server, pubkey, opts?): Promise<BlobDescriptor[]>
Parameters
- server: S
- pubkey: string
Optional opts: ListOptions<S>
Returns Promise<BlobDescriptor[]>
Static mirrorBlob
mirrorBlob: (<S>(server,
blob,
opts?) => Promise<BlobDescriptor>) = mirrorBlob Type declaration
- <S>(server, blob, opts?): Promise<BlobDescriptor>
Parameters
- server: S
- blob: BlobDescriptor
Optional opts: MirrorOptions<S>
Returns Promise<BlobDescriptor>
Static uploadBlob
uploadBlob: (<S, B>(server,
blob,
opts?) => Promise<BlobDescriptor>) = uploadBlob Type declaration
- <S, B>(server, blob, opts?): Promise<BlobDescriptor>
Parameters
- server: S
- blob: B
Optional opts: UploadOptions<S, B>
Returns Promise<BlobDescriptor>
Creates a GET auth event