Skip to main content
10 votes
Accepted

Convert any address to accountId (in hex)

You have a couple of options. First, if you already have an initialized API in your app - const ADDR = "5DTNtGF2DmZ7QwGxg6n1xWzF6cEokNyNre7mUqpVuozrLxu3" // create a type from this const id ...
Luna's user avatar
  • 321
6 votes
Accepted

How to create custom SS58 address format?

Yes, the unique prefix is used to determine how a SS58 Address starts. It may be generated by this encodeAddress function from the Polkadot.js API. The function shows that the unique SS58 Address ...
Luke Schoen's user avatar
  • 2,346
5 votes

Could any `MultiAddress<AccountId, AccountIndex>` variant be encoded to SS58?

SS58 is interesting. I did an implementation of it a couple months ago, and what I found is that we currently have one document -- https://docs.substrate.io/reference/address-formats/ -- with ...
Kirk Haines's user avatar
3 votes

How to convert HEX public key into SS58

The easiest way is to use the subkey tool. You can install it from the substrate repo. Then, you can use: $ subkey inspect --public 0xec7c1c10c73a2d90c6a4fc92a5212caaff849a65193db3a2b2aa1ffdadb99f06 ...
pepyakin's user avatar
  • 2,184
3 votes

What is the SS58 Format?

From the docs: The SS58 address format is a public key address based on the Bitcoin Base-58-check encoding. Each Substrate SS58 address uses a base-58 encoded value to identify a specific account on ...
Lee's user avatar
  • 209
2 votes

How to update the SS58Prefix for a running node?

The chain spec is no longer a canonical place to store the SS58 Prefix for a chain. Instead you should use the SS58Prefix configuration constant in frame_system: /// The designated SS85 prefix of this ...
Shawn Tabrizi's user avatar
  • 16.2k
2 votes
Accepted

How to convert ss58 address to a different parachain in py-substrate-interface

py-substrate-interface provides helper functions for that in the utils.ss58 namespace. Transforming an address from one chain-id to another can look like this: from substrateinterface.utils.ss58 ...
Oliver Tale-Yazdi's user avatar
2 votes

How do I work with SS58 encoded addresses?

I made a working example of how to go about generating keys with sp-core::crypto primitives Here is a snapshot of that source for quick reference: //! Example generating SS58 Address format from ...
Nuke's user avatar
  • 1,842
1 vote

Is there any way to convert an ss58 address to the 32 bytes pubkey?

Yes, you can convert an address in SS58 format into the 32-byte public key. The process of encoding a public key to an SS58 format address is fully reversible since it just implies adding a prefix, a ...
Iker's user avatar
  • 1,426
1 vote

-32602: Unknown SS58 address format

I solved the problem because 129 was not registered. https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json
99kies's user avatar
  • 763
1 vote

Convert any address to accountId (in hex)

There is also the /accounts/{address}/validate endpoint in Sidecar which takes a ss58 or hex (from a u8 array) formatted address and returns the following information : isValid ss58Prefix network ...
dominique's user avatar
  • 1,718
1 vote

How to convert HEX public key into SS58

Subalfred is another option now. It provides more detail about the key. It could: show the SS58 prefix detect if it is a pallet account detect if it is a paraid show all networks' address accept ...
AurevoirXavier's user avatar
  • 10.8k
1 vote

How to update the SS58Prefix for a running node?

42 is the default development prefix. To register an own prefix add it to the global registry - https://github.com/paritytech/ss58-registry. Next update your on-chain system.ss58Prefix constant to ...
RosaryBeads's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible