UNPKG

@stellar/stellar-sdk

Version:

A library for working with the Stellar network, including communication with the Horizon and Soroban RPC servers.

11 lines (8 loc) 274 B
import { Buffer } from 'buffer'; import { sha256 } from '@noble/hashes/sha2.js'; function hash(data) { const bytes = typeof data === "string" ? Buffer.from(data, "utf8") : data; return Buffer.from(sha256(bytes)); } export { hash }; //# sourceMappingURL=hashing.js.map