Skip to content

Commit b7e6b2f

Browse files
authored
Merge pull request #12 from kiminuo/feature/lovely-readme
Add Rust syntax highlighting to README.md
2 parents ce62e53 + ceb4a4b commit b7e6b2f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ and native P2WSH for arbitrary sripts.
1313
## Basic Accounts Use
1414
`MasterAccount` holds an encrypted seed that implies the BIP32 root key. Add any number of `Account` to it to derive
1515
hiararchies following BIP44. An Account will have addresses of a uniform type.
16-
```
16+
```rust
1717
const PASSPHRASE: &str = "correct horse battery staple";
1818

1919
// create a new random master account. This holds the root BIP32 key
@@ -124,7 +124,7 @@ spending_transaction.verify(|point|
124124
).expect("Bitcoin Core would not like this")
125125
```
126126
## Advanced Accounts Use
127-
```
127+
```rust
128128
const CSV:u16 = 10; // 10 blocks relative lock
129129

130130
// create a P2WSH (pay-to-witness-script-hash) (native segwit for arbitrary scripts) account
@@ -144,7 +144,7 @@ master.add_account(account);
144144

145145
```
146146
## Coins use
147-
```
147+
```rust
148148
// create a coin store
149149
let mut coins = Coins::new();
150150

@@ -165,7 +165,7 @@ let inputs = choose_inputs (minimum_amount_needed, current_block_height, |h| hei
165165

166166
```
167167
## Shamir's Secret Shares
168-
```
168+
```rust
169169
// create an new random account
170170
let master = MasterAccount::new(MasterKeyEntropy::Low, Network::Bitcoin, PASSPHRASE).unwrap();
171171

0 commit comments

Comments
 (0)