export declare const CodeMetadataLength = 2; /** * The metadata of a Smart Contract, as an abstraction. */ export declare class CodeMetadata { upgradeable: boolean; readable: boolean; payable: boolean; payableBySc: boolean; static ByteZero: { Upgradeable: number; Reserved2: number; Readable: number; }; static ByteOne: { Reserved1: number; Payable: number; PayableBySc: number; }; /** * Creates a metadata object. By default, set the `upgradeable` attribute, and uset all others. * * @param upgradeable Whether the contract is upgradeable * @param readable Whether other contracts can read this contract's data (without calling one of its pure functions) * @param payable Whether the contract is payable * @param payableBySc Whether the contract is payable by other smart contracts */ constructor(upgradeable?: boolean, readable?: boolean, payable?: boolean, payableBySc?: boolean); /** * Named constructor * Creates a metadata object from a buffer. * Also checks that data has correct length (2 bytes) */ static newFromBytes(bytes: Uint8Array): CodeMetadata; /** * Converts the metadata to the protocol-friendly representation. */ toBytes(): Uint8Array; /** * Converts the metadata to a hex-encoded string. */ toString(): string; /** * Adjust the metadata (the `upgradeable` attribute), when preparing the deployment transaction. */ toggleUpgradeable(value: boolean): void; /** * Adjust the metadata (the `readable` attribute), when preparing the deployment transaction. */ toggleReadable(value: boolean): void; /** * Adjust the metadata (the `payable` attribute), when preparing the deployment transaction. */ togglePayable(value: boolean): void; /** * Adjust the metadata (the `payableBySc` attribute), when preparing the deployment transaction. */ togglePayableBySc(value: boolean): void; /** * Converts the metadata to a pretty, plain JavaScript object. */ toJSON(): object; equals(other: CodeMetadata): boolean; }