Error: FATAL: Unable to initialize the API: createType(ChainProperties)

I am learning to interact with the blockchain using @polkadot/api , but I got the error

2022-04-27 09:55:56        RPC-CORE: properties(): ChainProperties:: createType(ChainProperties):: Struct: failed on 'ss58Format':: u8: Input too large. Found input with 12 bits, expected 8
2022-04-27 09:55:56        API/INIT: Error: FATAL: Unable to initialize the API: createType(ChainProperties):: Struct: failed on 'ss58Format':: u8: Input too large. Found input with 12 bits, expected 8

image

Latest version of Polkadot.js API should work just fine. Try to upgrade @polkadot/api to the latest version (it knows how to read auto-generated types).

Make sure your package.json version matches latest on npm official site here: @polkadot/api - npm

1 Like