Skip to content

Commit d09d54b

Browse files
committed
Update docs for 0.11.4 release
1 parent 65134e5 commit d09d54b

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

website/docs/releases/release-notes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
title: Release Notes
33
---
44

5+
## v0.11.4
6+
7+
### CashScript SDK
8+
- :sparkles: Add `updateUtxoSet` option to `MockNetworkProvider` to allow for updating the UTXO set after a transaction is sent.
9+
- :bug: Fix bug where sending P2PKH-only transactions would throw `No placeholder scenario ID or script ID found`.
10+
511
## v0.11.3
612

713
#### cashc compiler

website/docs/sdk/other-network-providers.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ The CashScript SDK needs to connect to the BCH network to perform certain operat
66

77
## MockNetworkProvider
88
```ts
9-
new MockNetworkProvider()
9+
new MockNetworkProvider(options?: { updateUtxoSet: boolean })
1010
```
1111

12-
The `MockNetworkProvider` is a special network provider that allows you to evaluate transactions locally without interacting with the Bitcoin Cash network. This is useful when writing automated tests for your contracts, or when debugging your contract locally.
12+
The `MockNetworkProvider` is a special network provider that allows you to evaluate transactions locally without interacting with the Bitcoin Cash network. This is useful when writing automated tests for your contracts, or when debugging your contract locally.
1313

1414
The `MockNetworkProvider` has extra methods to enable this local emulation such as `.addUtxo()` and `.setBlockHeight()`.
1515
You can read more about the `MockNetworkProvider` and automated tests on the [testing setup](/docs/sdk/testing-setup) page.
1616

17+
The `updateUtxoSet` option is used to determine whether the UTXO set should be updated after a transaction is sent. If `updateUtxoSet` is `true`, the UTXO set will be updated to reflect the new state of the mock network. If `updateUtxoSet` is `false` (default), the UTXO set will not be updated.
18+
1719
#### Example
1820
```ts
1921
const provider = new MockNetworkProvider();

website/docs/sdk/testing-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const aliceUtxo = provider.addUtxo(aliceAddress, randomUtxo({
2929
```
3030

3131
:::note
32-
The `MockNetworkProvider` evaluates transactions locally but does not process the transaction updates. This means no UTXOs are consumed and no new UTXOs are created when mocking a transaction `send` using the provider.
32+
By default, the `MockNetworkProvider` evaluates transactions locally but does not process the transaction updates. This means no UTXOs are consumed and no new UTXOs are created when mocking a transaction `send` using the provider. This can be configured by setting the `updateUtxoSet` option to `true`.
3333
:::
3434

3535
## Automated testing

0 commit comments

Comments
 (0)