Renamed Bytes32-based coding functions.

This commit is contained in:
Richard Moore 2022-09-30 05:54:00 -04:00
parent fa87757253
commit 9771b851f8
3 changed files with 4 additions and 4 deletions

@ -6,7 +6,7 @@ import {
import type { BytesLike } from "../utils/index.js";
export function formatBytes32String(text: string): string {
export function encodeBytes32String(text: string): string {
// Get the bytes
const bytes = toUtf8Bytes(text);
@ -18,7 +18,7 @@ export function formatBytes32String(text: string): string {
return zeroPadBytes(bytes, 32);
}
export function parseBytes32String(_bytes: BytesLike): string {
export function decodeBytes32String(_bytes: BytesLike): string {
const data = getBytes(_bytes, "bytes");
// Must be 32 bytes with a null-termination

@ -7,7 +7,7 @@ export {
defaultAbiCoder
} from "./abi-coder.js";
export { formatBytes32String, parseBytes32String } from "./bytes32.js";
export { decodeBytes32String, encodeBytes32String } from "./bytes32.js";
export {
ConstructorFragment, ErrorFragment, EventFragment, Fragment,

@ -6,7 +6,7 @@
export { version } from "./_version.js";
export {
formatBytes32String, parseBytes32String,
decodeBytes32String, encodeBytes32String,
AbiCoder, defaultAbiCoder,
ConstructorFragment, ErrorFragment, EventFragment, Fragment, FunctionFragment, ParamType,