3

I'm attempting to create a new Origination account for a user with Ledger. I'm using:

  • WebAuthN
  • eztz

I am already using the following function to create and sign an operation that the user approves/disapproves to transfer & delegate XTZ - successfully.

This function accepts the same parameters (path of ledger, opbytes of operation) in the aforementioned case, as in the case where I want to create a new origination account. I have checked that the parameters are valid and not blank.

For some reason, in this case, the function errors out on the creation of the signature. The below line:

let signature = await xtz.signOperation(path, "03" + opBytes);

Any ideas?

try {
  let transport = await TransportWebAuthn.create();
  let xtz = new Tezos(transport);

   // This is where the break seems to be
  let signature = await xtz.signOperation(path, "03" + opBytes);

  let signedOperation = eztz.utility.b58cencode(
    eztz.utility.hex2buf(signature.signature),
    eztz.prefix.edsig
);

  let result = opBytes + signature;
  return result;
} catch (e) {

 console.error(
  `Error in the xtzRemoteSign action\nAction Object\nPath: ${path}\nopBytes: ${opBytes}\nError: ${e}`
  );
}

Error Message(s):

Error in the xtzRemoteSign action
Action Object
Path: 44'/1729'/0'/0'
opBytes: e98d1e9104b62dda48d3b1f7beb1e1f7546ce40f0b23b75e4a652521c514ea0907000048973e6da5e79e01eb4afc97b2aa4cc6e2953dfbf509f5b04a904e000063bee97e315cb49fec39b4f4bdff73212ef917a18cd85514430b4bdb436dd94609000048973e6da5e79e01eb4afc97b2aa4cc6e2953dfbf80af6b04a904e81020048973e6da5e79e01eb4afc97b2aa4cc6e2953dfb00ffff0000
Error: TransportStatusError: Ledger device: UNKNOWN_ERROR (0x917e)

ERROR creating XTZ origination account: Cannot read property 'signature' of undefined

  • Any particular reason you are using TransportWebauthn instead of hw-transport-u2f/TransportU2F as recommended by the docs for hw-app-xtz? – Tom Apr 12 at 20:31
  • (Is your question "how do I make webauthn transport work? Or do you just want to sign operations in some supported way?) – Tom Apr 12 at 20:32
  • Using WebAuthN - to test locally but also testing 'live' with TransportU2F. The problem was actually just an outdated Ledger – SamYoungNY Apr 12 at 23:04
  • @SamYoungNY is it solved ? – Ezy Apr 14 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.