diff --git a/.changeset/bright-ducks-wonder.md b/.changeset/bright-ducks-wonder.md new file mode 100644 index 0000000..eafeb75 --- /dev/null +++ b/.changeset/bright-ducks-wonder.md @@ -0,0 +1,5 @@ +--- +'@joyid/ckb': minor +--- + +feat: Add calculateChallenge and buildSignedTx functions diff --git a/packages/ckb/src/index.ts b/packages/ckb/src/index.ts index 4c6657a..b7b9b72 100644 --- a/packages/ckb/src/index.ts +++ b/packages/ckb/src/index.ts @@ -263,7 +263,7 @@ export const calculateChallenge = async ( utils.ckbHash(blockchain.RawTransaction.pack(tx)) ) const witnessArgs = blockchain.WitnessArgs.unpack( - tx.witnesses[firstWitnessIndex] + tx.witnesses[firstWitnessIndex]! ) const emptyWitness = { ...witnessArgs,