fn halts(program: A) -> bool
fn b(program: A) {
if halts(A) {
loop {}
} else {
return ();
}
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run me with: | |
# flatpak-builder --force-clean --user --install-deps-from=flathub-verified --install builddir com.sparrowwallet.Sparrow.yml | |
id: com.sparrowwallet.Sparrow | |
branch: 2.0.0 | |
runtime: org.freedesktop.Platform | |
runtime-version: '23.08' | |
sdk: org.freedesktop.Sdk | |
command: Sparrow | |
modules: | |
- name: Sparrow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::pin::pin; | |
use std::marker::PhantomPinned; | |
#[derive(Debug)] | |
struct MyStruct { | |
field: u32, | |
_pin: PhantomPinned | |
} | |
impl MyStruct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In general there are two properties for traits to satisfy | |
// in order them to be object-safe: | |
// | |
// 1. The return type isn’t Self. | |
// 2. There are no generic type parameters. | |
// Here's an example of a non-object-safe Trait | |
trait MyTrait { | |
fn f(&self) -> Self; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"input_combination": [ | |
{ | |
"type": 1, | |
"code": 58, | |
"origin_hash": "748e31550c24fc009038438dc4fce338" | |
} | |
], | |
"target_uinput": "keyboard", |
You can't do this in the CLI, the addinvoice
requires a random 32-byte hex-encoded preimage.
But you can do this with the REST API LND interface:
curl --insecure --request POST --data '{"r_hash": "<PAYMENT_HASH>", "value": <INT>}' --header "Grpc-Metadata-macaroon: <INVOICE MACAROON OR HIGHER>" --header "Content-Type: application/json" -v https://localhost:<LND_PORT>/v1/invoices
You need the --insecure
flag since it is an https://
endpoint that we cannot validate the TLS certificate.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GROQ_API_KEY=<REDACTED> |
PR discussed: bitcoindevkit/bdk#1395
-
Why does BDK needs pseudorandom number generators (PRNG)? Particularly in signing and in building a transaction.
-
Why when signing a tx?
A: Because of nonces, even if you don't use a PRNG, you get deterministic nonce generated which depends
-
- Spin the container:
docker run --rm --name bitcoin jaonoctus/bitcoind:v26.0 -maxconnections=0
- Use the
bitcoin-cli
from another terminal:docker exec -it bitcoin bitcoin-cli decoderawtransaction true
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lazy-lock.json |
NewerOlder