import BN from 'bn.js'; import Base from '../../codec/Base'; import AccountId from './AccountId'; import AccountIndex from './AccountIndex'; declare type AnyAddress = BN | Address | AccountId | AccountIndex | number[] | Uint8Array | number | string; export declare const ACCOUNT_ID_PREFIX: Uint8Array; /** * @name Address * @description * A wrapper around an AccountId and/or AccountIndex that is encoded with a prefix. * Since we are dealing with underlying publicKeys (or shorter encoded addresses), * we extend from Base with an AccountId/AccountIndex wrapper. Basically the Address * is encoded as `[ , ...publicKey/...bytes ]` as per spec */ export default class Address extends Base { constructor(value?: AnyAddress); static decodeAddress(value: AnyAddress): AccountId | AccountIndex; private static decodeString; private static decodeU8a; /** * @description The length of the value when encoded as a Uint8Array */ readonly encodedLength: number; /** * @description The length of the raw value, either AccountIndex or AccountId */ readonly rawLength: number; /** * @description Returns a hex string representation of the value */ toHex(): string; /** * @description Returns the base runtime type name for this instance */ toRawType(): string; /** * @description Encodes the value as a Uint8Array as per the SCALE specifications * @param isBare true when the value has none of the type-specific prefixes (internal) */ toU8a(isBare?: boolean): Uint8Array; } export {};