@aeternity/aepp-sdk
Version:
SDK for the æternity blockchain
26 lines (25 loc) • 882 B
TypeScript
import * as Encoded from './encoder-types.js';
import { Encoding } from './encoder-types.js';
export { Encoded, Encoding };
/**
* Calculate SHA256 hash of `input`
* @param input - Data to hash
* @returns Hash
*/
export declare function sha256hash(input: Uint8Array | string): Buffer;
/**
* Decode data using the default encoding/decoding algorithm
* @param data - An Base58/64check encoded and prefixed string
* (ex tx_..., sg_..., ak_....)
* @returns Decoded data
* @category utils
*/
export declare function decode(data: Encoded.Any): Buffer;
/**
* Encode data using the default encoding/decoding algorithm
* @param data - An decoded data
* @param type - Prefix of Transaction
* @returns Encoded string Base58check or Base64check data
* @category utils
*/
export declare function encode<Type extends Encoding>(data: Uint8Array, type: Type): Encoded.Generic<Type>;