import { Bytes } from '../utils/bytes';
import { Chunk } from './cac';
import { UploadOptions, Signature, Signer, BatchId, Reference, Ky, PlainBytesReference } from '../types';
import { EthAddress } from '../utils/eth';
export declare type Identifier = Bytes<32>;
/**
 * With single owner chunks, a user can assign arbitrary data to an
 * address and attest chunk integrity with their digital signature.
 *
 * This interface extends the Chunk interface so it has the same
 * properties, but the address calculation is based on the identifier
 * and the owner of the chunk.
 */
export interface SingleOwnerChunk extends Chunk {
    identifier: () => Identifier;
    signature: () => Signature;
    owner: () => EthAddress;
}
/**
 * Verifies if the data is a valid single owner chunk
 *
 * @param data    The chunk data
 * @param address The address of the single owner chunk
 *
 * @returns a single owner chunk or throws error
 */
export declare function makeSingleOwnerChunkFromData(data: Uint8Array, address: PlainBytesReference): SingleOwnerChunk;
export declare function makeSOCAddress(identifier: Identifier, address: EthAddress): PlainBytesReference;
/**
 * Creates a single owner chunk object
 *
 * @param chunk       A chunk object used for the span and payload
 * @param identifier  The identifier of the chunk
 * @param signer      The singer interface for signing the chunk
 */
export declare function makeSingleOwnerChunk(chunk: Chunk, identifier: Identifier, signer: Signer): Promise<SingleOwnerChunk>;
/**
 * Helper function to upload a chunk.
 *
 * It uses the Chunk API and calculates the address before uploading.
 *
 * @param ky              Ky instance
 * @param chunk           A chunk object
 * @param postageBatchId  Postage BatchId that will be assigned to uploaded data
 * @param options         Upload options
 */
export declare function uploadSingleOwnerChunk(ky: Ky, chunk: SingleOwnerChunk, postageBatchId: BatchId, options?: UploadOptions): Promise<Reference>;
/**
 * Helper function to create and upload SOC.
 *
 * @param ky              Ky instance
 * @param signer          The singer interface for signing the chunk
 * @param postageBatchId
 * @param identifier      The identifier of the chunk
 * @param data            The chunk data
 * @param options
 */
export declare function uploadSingleOwnerChunkData(ky: Ky, signer: Signer, postageBatchId: BatchId | string, identifier: Identifier, data: Uint8Array, options?: UploadOptions): Promise<Reference>;
/**
 * Helper function to download SOC.
 *
 * @param url           The url of the Bee service
 * @param ownerAddress  The singer interface for signing the chunk
 * @param identifier    The identifier of the chunk
 */
export declare function downloadSingleOwnerChunk(ky: Ky, ownerAddress: EthAddress, identifier: Identifier): Promise<SingleOwnerChunk>;
