I'm trying to use the Polkadot CLI to create an unsigned extrinsic, which I subsequently generate a signature for sign out of band using my custody provider. The Polkadot CLI has a useful tool for doing this available and documented here.

I'm using the following input:

yarn run:signer sendOffline --ws wss://rpc.polkadot.io --account 1ab..2yz convictionVoting.delegate 0000 1cd...3Ag locked3x 1

The tool seems to generate an unsigned extrinsic with no problems and then prompts me for a signature as documented. Upon pasting in the signature and continuing, I get the following error:

Error: createType(ExtrinsicSignature):: Unable to create Enum via index 108, in Ed25519, Sr25519, Ecdsa
    at createTypeUnsafe (file:///Users/***/github/tools/node_modules/@polkadot/types-create/create/type.js:51:22)
    at TypeRegistry.createTypeUnsafe (file:///Users/***/github/tools/node_modules/@polkadot/types/create/registry.js:267:16)
    at Type.addSignature (file:///Users/***/github/tools/node_modules/@polkadot/types/extrinsic/v4/ExtrinsicSignature.js:104:86)
    at Type.addSignature (file:///Users/***/github/tools/node_modules/@polkadot/types/extrinsic/v4/Extrinsic.js:64:24)
    at Submittable.addSignature (file:///Users/***/github/tools/node_modules/@polkadot/types/extrinsic/Extrinsic.js:196:20)
    at Submittable.__internal__signViaSigner (file:///Users/***/github/tools/node_modules/@polkadot/api/submittable/createClass.js:121:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///Users/***/github/tools/node_modules/@polkadot/api/submittable/createClass.js:62:36

Now, it looks as though to me like the tool has an issue with the format of the signature I'm providing. As I understand, Polkadot supports Ed25519 and Sr25519 and Ecdsa, and the custody provider I'm using supports ECDSA_SECP256K1 and EDDSA_ED25519, so assuming using either of those curves works fine, and so in theory there should be no problems with format of the signature. However, since I'm getting the error posted above, I'm wondering if I'm doing something wrong/silly or overlooked something. For instance, could the unsigned extrinsic contain some invalid data causing the aforementioned error? Any insight would be much appreciated.

Many thanks

2 Answers 2


Edit : I changed @polkadot/api to version 10.10.1 in package.json and it is now working

if you have found an answer to your question, I would be glad to hear it :)

Otherwise, I have the same issue and my research led me to believe it is because of a circular dependency import. Which I haven't found yet. Moreover I believe this caused the issue because a friend of mine got rid of it by defining his functions in different modules...

This post helped me a bit, and I think it is about the same problem https://stackoverflow.com/questions/47418124/enum-type-not-defined-at-runtime

Thank you, and again if you have found the answer I would really like to have it

Edit : my error is only :

log : [Error: createType(ExtrinsicSignature):: Unable to create Enum via index 182, in Ed25519, Sr25519, Ecdsa]

and according to my successive prints the error comes from here : const hash = await transfer.signAndSend(sender);

where sender is a KeyringPair defined with a Mnemonic Seed The function signAndSend is causing the issue


So I ran into this and solved it, Substrate chains can handle many different signature schemes and the handle this by prefixing an extra byte to the signature (00 = ed25519, 01 = sr25519, 02 = ecdsa). so for edcsa you should add a 02 something like

 sigHex = `0x02${stripHexPrefix(sigHex)}`

here is a relevant issue https://github.com/polkadot-js/tools/issues/175#issuecomment-767496439

New contributor
oodlesofmoodles is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.