Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sighash type is not allowed #138

Closed
wujiantao123 opened this issue Jan 4, 2024 · 1 comment
Closed

Sighash type is not allowed #138

wujiantao123 opened this issue Jan 4, 2024 · 1 comment

Comments

@wujiantao123
Copy link

Error "Sighash type is not allowed. Retry the sign method passing the sighashTypes array of whitelisted types. Sighash type: "

When I set sighashTypes: [Transaction.SIGHASH_SINGLE] or Transaction.SIGHASH_SINGLE, I will be prompted. How should I solve it?

Here is a simple example

const toSignInputs = psbt.txInputs.map((v, index) => ({
      index,
      publicKey: publicKey,
      sighashTypes: [Transaction.SIGHASH_ALL],
    }));
  const sign = await unisat?.signPsbt(psbt.toHex(), {
    autoFinalized: false,
    toSignInputs,
  });
@wujiantao123
Copy link
Author

close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant