Remove Bech32 class

This commit is contained in:
Simon Warta
2023-03-07 15:21:09 +01:00
parent e89a91401f
commit 0351a46d97
7 changed files with 6 additions and 28 deletions
-22
View File
@@ -26,25 +26,3 @@ export function normalizeBech32(address: string): string {
const { prefix, data } = fromBech32(address);
return toBech32(prefix, data);
}
/**
* @deprecated This class is deprecated and will be removed soon. Please use fromBech32() and toBech32() instead. For more details please refer to https://github.com/cosmos/cosmjs/issues/1053.
*/
export class Bech32 {
/**
* @deprecated This class is deprecated and will be removed soon. Please use fromBech32() and toBech32() instead. For more details please refer to https://github.com/cosmos/cosmjs/issues/1053.
*/
public static encode(prefix: string, data: Uint8Array, limit?: number): string {
return toBech32(prefix, data, limit);
}
/**
* @deprecated This class is deprecated and will be removed soon. Please use fromBech32() and toBech32() instead. For more details please refer to https://github.com/cosmos/cosmjs/issues/1053.
*/
public static decode(
address: string,
limit = Infinity,
): { readonly prefix: string; readonly data: Uint8Array } {
return fromBech32(address, limit);
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
export { fromAscii, toAscii } from "./ascii";
export { fromBase64, toBase64 } from "./base64";
export { Bech32, fromBech32, normalizeBech32, toBech32 } from "./bech32";
export { fromBech32, normalizeBech32, toBech32 } from "./bech32";
export { fromHex, toHex } from "./hex";
export { fromRfc3339, toRfc3339 } from "./rfc3339";
export { fromUtf8, toUtf8 } from "./utf8";