UNPKG

@blooo/hw-app-concordium

Version:

Ledger Hardware Wallet Concordium Application API

64 lines 3.09 kB
import { AccountTransactionType } from "@concordium/web-sdk"; /** * Checks if a transaction handler exists for a given transaction kind. * @param transactionKind The type of account transaction. * @returns True if a handler exists, false otherwise. */ export declare function isAccountTransactionHandlerExists(transactionKind: AccountTransactionType): boolean; /** * Encodes a 64-bit unsigned integer to a Buffer using big endian. * @param value A 64-bit integer. * @param useLittleEndian A boolean value, if not given, the value is serialized in big endian. * @returns Big endian serialization of the input. */ export declare function encodeWord64(value: any, useLittleEndian?: boolean): Buffer; /** * Encodes a 32-bit signed integer to a Buffer using big endian. * @param value A 32-bit integer. * @param useLittleEndian A boolean value, if not given, the value is serialized in big endian. * @returns Big endian serialization of the input. */ export declare function encodeInt32(value: any, useLittleEndian?: boolean): Buffer; /** * Encodes a 32-bit unsigned integer to a Buffer. * @param value A 32-bit integer. * @param useLittleEndian A boolean value, if not given, the value is serialized in big endian. * @returns Big endian serialization of the input. */ export declare function encodeWord32(value: any, useLittleEndian?: boolean): Buffer; /** * Encodes a 16-bit unsigned integer to a Buffer using big endian. * @param value A 16-bit integer. * @param useLittleEndian A boolean value, if not given, the value is serialized in big endian. * @returns Big endian serialization of the input. */ export declare function encodeWord16(value: any, useLittleEndian?: boolean): Buffer; /** * Encodes an 8-bit signed integer to a Buffer using big endian. * @param value An 8-bit integer. * @returns Big endian serialization of the input. */ export declare function encodeInt8(value: number): Buffer; /** * Encodes a data blob with its length as a prefix. * @param blob The data blob to encode. * @returns A Buffer containing the length-prefixed data blob. */ export declare function encodeDataBlob(blob: any): Buffer; /** * Serializes an account transaction header. * @param accountTransaction The account transaction header with metadata about the transaction. * @param payloadSize The byte size of the serialized payload. * @returns The serialized account transaction header. */ export declare const serializeAccountTransactionHeader: (accountTransaction: any, payloadSize: any) => Buffer; /** * Serializes a transaction and its signatures. * This serialization when sha256 hashed is considered as the transaction hash, * and is used to look up the status of a submitted transaction. * @param accountTransaction The transaction to serialize. * @param signatures Signatures on the signed digest of the transaction. * @returns The serialization of the account transaction, which is used to calculate the transaction hash. */ export declare const serializeAccountTransaction: (accountTransaction: any) => Buffer; //# sourceMappingURL=utils.d.ts.map