import { ABIValue } from 'algosdk'; import sha512 from "js-sha512"; import { UserAddress, AssetId, Hex, Base64, AppId, AccountId } from '../interfaces'; import { C3AccountType, SupportedChainId } from '../chains'; export declare const ETH_SIGNATURE_LENGTH = 65; export declare const MAX_SIGNATURE_LENGTH = 65; export declare const SHA256_HASH_LENGTH = 32; export declare const ETHEREUM_ADDRESS_LENGTH = 24; export declare const PUBLIC_KEY_LENGTH = 32; export declare const C3_PUBLIC_KEY_LENGTH = 32; export declare const C3_CHECKSUM_LENGTH = 3; export declare const C3_MODERN_ACCOUNT_ID_LENGTH = 61; export declare const C3_LEGACY_ACCOUNT_ID_LENGTH = 59; export declare const C3_CHECKSUM_PREFIX: Uint8Array; export type AlgorandType = bigint | string | boolean | number | Uint8Array; export type IPackedInfoFixed = { type: "address" | "double" | "boolean" | "emptyString" | "signature" | "byte"; }; export type IPackedInfoVariable = { type: "string" | "bytes" | "base64" | "uint" | "number"; size?: number; }; export type IPackedInfoObject = { type: "object" | "hash"; info: IPackedInfo; }; export type IPackedInfoArray = { type: "array"; info: IPackedInfoAny; }; export type IPackedInfoFixedBytes = { type: "fixed"; valueHex: string; }; export type IPackedInfoAny = IPackedInfoFixed | IPackedInfoVariable | IPackedInfoObject | IPackedInfoArray | IPackedInfoFixedBytes; export type IPackedInfo = Record; export type IStateType = 'uint' | 'bytes'; export type IStateMap = Record; export type IStateVar = Uint8Array | bigint; export type IState = Record; export declare const packedTypeMap: string[]; export declare function packABIString(format: IPackedInfo): string; export declare function packABIValue(value: any): ABIValue; export declare function unpackABIValue(value: ABIValue, format: IPackedInfo, index?: number): any; export declare function encodeABIValue(value: any, encoding: string): Uint8Array; export declare function decodeABIValue(value: Uint8Array, encoding: string): any; export declare function encodeABIValueWithFormat(value: any, format: IPackedInfo): Uint8Array; export declare function decodeABIValueWithFormat(value: Uint8Array, format: IPackedInfo): any; export declare function concatArrays(arrays: Uint8Array[]): Uint8Array; export declare function packFormat(format: IPackedInfo): Uint8Array; export declare function unpackFormat(data: Uint8Array): IPackedInfo; export declare function packData(value: Record, format: IPackedInfo, includeType?: boolean): Uint8Array; export declare function unpackPartialData(data: Uint8Array, formatOpt?: IPackedInfo, offset?: number): { result: Record; bytesRead: number; }; export declare function unpackData(data: Uint8Array, formatOpt?: IPackedInfo): Record; export declare function decodeC3PyTealDictionary(keys: Uint8Array, values: Uint8Array): Map; export declare function encodeC3PyTealDictionary(dictionary: Map): { keys: Uint8Array; values: Uint8Array; }; export declare function encodeArgArray(params: AlgorandType[]): Uint8Array[]; export declare function encodeString(value: string | Uint8Array): Uint8Array; export declare function decodeString(value: Uint8Array): string; export declare function decodeState(state: Record>[], stateMap: IStateMap, errorOnMissing?: boolean): IState; export declare function encodeDynamicBytes(value: Uint8Array): Uint8Array; export declare function encodeUint(value: number | bigint, length: number): Uint8Array; export declare function decodeUint(value: Uint8Array, length: number): bigint; export declare function encodeUint64(value: number | bigint): Uint8Array; export declare function decodeUint64(value: Uint8Array): bigint; export declare function convertUint64toInt64(value: bigint): bigint; export declare function decodeInt64(value: Uint8Array): bigint; export declare function encodeInt64(value: bigint): Uint8Array; export declare function encodeUint32(value: number): Uint8Array; export declare function decodeUint32(value: Uint8Array): number; export declare function decodeInt32(value: Uint8Array): number; export declare function encodeUint16(value: number | bigint): Uint8Array; export declare function decodeUint16(value: Uint8Array): number; export declare function encodeUint8(value: number): Uint8Array; export declare function decodeUint8(value: Uint8Array): number; export declare function encodeUnsignedVarint(value: number | bigint): Uint8Array; export declare function encodeBase16(value: Uint8Array): string; export declare function decodeBase16(value: string): Uint8Array; export declare function encodeBase64(value: Uint8Array): string; export declare function decodeBase64(value: string): Uint8Array; export declare function sha256Hash(arr: sha512.Message): Uint8Array; export declare function encodeApplicationAddress(id: number): UserAddress; export declare function getDeltaUint(response: any, key: string): bigint | undefined; export declare function getDeltaBytes(response: any, key: string): Uint8Array | undefined; export declare function padLeftUint8Array(value: Uint8Array, totalLength: number): Uint8Array; export declare function padRightUint8Array(value: Uint8Array, totalLength: number): Uint8Array; export declare function decodeEthereumAddress(ethereumAddress: string): Uint8Array; export declare function decodeSolanaAddress(solanaAddress: string): Uint8Array; export declare function base16ToBase64(hexValue: Hex): Base64; export declare const getAlgorandIdAsString: (asset: bigint | string | number) => string; export declare const toBigInt: (appId: AppId) => bigint; export declare const zeroPadBytes: (value: string, length: number) => string; export declare function arrayEqual(arrayA: Uint8Array, arrayB: Uint8Array): boolean; export declare function getChecksum(c3AccountType: Uint8Array, publicKey: Uint8Array): Uint8Array; export declare function decodeAccountIdFull(accountId: AccountId): { publicKey: Uint8Array; c3AccountType: C3AccountType; }; export declare function decodeAccountId(accountId: AccountId): Uint8Array; export declare function isValidAccountId(accountId: AccountId): boolean; export declare function encodeAccountId(publicKey: Uint8Array, chainId: SupportedChainId): AccountId; export declare function algorandAddressToAccountId(address: UserAddress): AccountId; export declare function userAddressToAccountId(address: UserAddress): AccountId; export declare function accountIdToUserAddress(accountId: AccountId): UserAddress; export declare function decodeSignature(encodedSignature: string): Uint8Array; //# sourceMappingURL=encoding.d.ts.map