///
import { BundleItem } from './BundleItem';
import { SignatureConfig } from './constants';
import { Signer } from './signing/index';
import { Buffer } from 'buffer';
export declare const MAX_TAG_BYTES = 4096;
export declare const MIN_BINARY_SIZE = 80;
export declare class DataItem implements BundleItem {
private binary;
private _id;
constructor(binary: Buffer);
static isDataItem(obj: any): obj is DataItem;
get signatureType(): SignatureConfig;
isValid(): Promise;
get id(): Promise | string;
set id(id: string | Promise);
get rawId(): Promise | Buffer;
set rawId(id: Buffer | Promise);
get rawSignature(): Buffer;
get signature(): string;
set rawOwner(pubkey: Buffer);
get rawOwner(): Buffer;
get signatureLength(): number;
get owner(): string;
get ownerLength(): number;
get rawTarget(): Buffer;
get target(): string;
get rawAnchor(): Buffer;
get anchor(): string;
get rawTags(): Buffer;
get tags(): {
name: string;
value: string;
}[];
get tagsB64Url(): {
name: string;
value: string;
}[];
getStartOfData(): number;
get rawData(): Buffer;
get data(): string;
/**
* UNSAFE!!
* DO NOT MUTATE THE BINARY ARRAY. THIS WILL CAUSE UNDEFINED BEHAVIOUR.
*/
getRaw(): Buffer;
sign(signer: Signer): Promise;
setSignature(signature: Buffer): Promise;
isSigned(): boolean;
/**
* Returns a JSON representation of a DataItem
*/
toJSON(): {
owner: string;
data: string;
signature: string;
target: string;
tags: {
name: string;
value: string;
}[];
};
/**
* Verifies a `Buffer` and checks it fits the format of a DataItem
*
* A binary is valid iff:
* - the tags are encoded correctly
*/
static verify(buffer: Buffer): Promise;
getSignatureData(): Promise;
/**
* Returns the start byte of the tags section (number of tags)
*
* @private
*/
private getTagsStart;
/**
* Returns the start byte of the tags section (number of tags)
*
* @private
*/
private getTargetStart;
/**
* Returns the start byte of the tags section (number of tags)
*
* @private
*/
private getAnchorStart;
}