UNPKG

472 BJavaScriptView Raw
1import { logger } from '@polkadot/util';
2import { defaults } from './defaults.js';
3const l = logger('setSS58Format');
4/**
5 * @description Sets the global SS58 format to use for address encoding
6 * @deprecated Use keyring.setSS58Format
7 */
8export function setSS58Format(prefix) {
9 l.warn('Global setting of the ss58Format is deprecated and not recommended. Set format on the keyring (if used) or as part of the address encode function');
10 defaults.prefix = prefix;
11}