From 0ceb2551fe476aa5d417cc6c1e4ce37cb38ee505 Mon Sep 17 00:00:00 2001 From: Dylan Duan Date: Wed, 11 Dec 2024 11:40:52 +0800 Subject: [PATCH] chore: Add changeset --- .changeset/bright-ducks-wonder.md | 5 +++++ packages/ckb/src/index.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/bright-ducks-wonder.md 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,