Add sign timeout to thunk

This commit is contained in:
Jon Staab
2025-09-16 11:56:00 -07:00
parent 80944e64a7
commit a3295dc2fe
10 changed files with 94 additions and 35 deletions
+4 -1
View File
@@ -20,8 +20,11 @@ import { makeEvent } from '@welshman/util'
import { ISigner, Nip01Signer, makeSecret } from '@welshman/signer'
const signer: ISigner = new Nip01Signer(makeSecret())
const options = {
signal: AbortSignal.timeout(10_000),
}
signer.sign(makeEvent(1)).then(signedEvent => console.log(signedEvent))
signer.sign(makeEvent(1), options).then(signedEvent => console.log(signedEvent))
```
## Installation