fuels-ts
fuels-ts copied to clipboard
feat!: improve signing DX
Closes #1745
- [x] Implementing signing transaction via an
Accountthrough a wallet connector - [x] Add multiple external signers to a request through
addAccountWitnessesfunctions onBaseTransactionRequest - [x] Rename
createWitnesstoaddEmptyWitnessand implementaddWitnessfully - [x] Add documentation and example for a script and predicate multi sig with external signers (we only ever used
signMessage, I have addedsignTransactionexamples) - [x] Improvements and fixes to current docs around signing
Please note, the approach discussed in #1576 has not been implemented here however there is merit to it, as shown in the predicate test example.
@danielbate there are some forc formatting errors that you might want to look at
cc @calldelegation
✨ A PR has been created under the rc-1815 tag on fuels-wallet repo.
https://github.com/FuelLabs/fuels-wallet/pull/1174
Coverage Report:
| Lines | Branches | Functions | Statements |
|---|---|---|---|
| 81.35%(-0.11%) | 71.84%(-0.14%) | 78.98%(-0.17%) | 81.46%(-0.1%) |
Changed Files:
| Ok | File (✨=New File) | Lines | Branches | Functions | Statements |
|---|---|---|---|---|---|
| 🔴 | packages/account/src/account.ts | 76.51% (-1.78%) |
53.96% (-1.77%) |
81.81% (-3.9%) |
76.51% (-1.78%) |
| 🔴 | packages/account/src/connectors/fuel-connector.ts | 25.92% (-1%) |
100% (+0%) |
4.76% (-0.24%) |
25.92% (-1%) |
| 🔴 | packages/account/src/providers/provider.ts | 78.14% (-0.21%) |
64.12% (-0.44%) |
85.07% (+0%) |
78.85% (-0.21%) |
| 🔴 | packages/account/src/providers/transaction-request/transaction-request.ts | 85.61% (+0.61%) |
69.44% (+0.87%) |
86.27% (+0.86%) |
85.43% (+0.61%) |