Showcase Iced Rust GUI framework tools, apps and more!
A product registry
use bitcoin::Network; | |
use std::path::PathBuf; | |
use magical_bitcoin_wallet::bitcoincore_rpc::{Auth as RpcAuth, Client as RpcClient}; | |
use magical_bitcoin_wallet::blockchain::{ | |
BitcoinRpcBlockchain, Blockchain, Capability, ElectrumBlockchain, OnlineBlockchain, Progress, | |
}; | |
use magical_bitcoin_wallet::Client as ElectrumClient; | |
use std::collections::HashSet; |
[4:52:58 pm] <justinmoon> How should "sortedmulti" work with rust-miniscript? Seems like we'd need extended descriptor support and another `Terminal` variant to accomplish this? | |
[5:05:36 pm] <sanket1729> Can you elaborate? What is sortedmulti? | |
[5:13:58 pm] <sanket1729> I see, it is a descriptor like multi, but with pubkeys sorted | |
[5:23:10 pm] <andytoshi> is this part of core? i've never heard of it | |
[5:23:18 pm] <andytoshi> why would this be a distinct descriptor? | |
[5:24:09 pm] <sanket1729> Looks like it is present in core | |
[5:24:10 pm] <sanket1729> https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md | |
[5:25:09 pm] <sanket1729> https://github.com/bitcoin/bitcoin/pull/17056 | |
[5:25:47 pm] <andytoshi> ok i see | |
[5:25:51 pm] <andytoshi> yeah this is cool, we should support it |
$ cargo run | |
Compiling cc v1.0.50 | |
Compiling pkg-config v0.3.17 | |
Compiling proc-macro2 v1.0.9 | |
Compiling libc v0.2.68 | |
Compiling autocfg v1.0.0 | |
Compiling unicode-xid v0.2.0 | |
Compiling fs_extra v1.1.0 | |
Compiling syn v1.0.17 | |
Compiling log v0.4.8 |
use iced::{button, Align, Button, Column, Element, Sandbox, Settings, Text}; | |
pub fn main() { | |
App::run(Settings::default()) | |
} | |
#[derive(Default)] | |
struct First<'value> { | |
value: &'value str, | |
} |
use iced::{button, Align, Button, Column, Element, Row, Sandbox, Settings, Text}; | |
// | |
// Node page | |
// | |
struct NodePage {} | |
impl NodePage { | |
fn view(&mut self) -> Element<Message> { |
import asyncio | |
from colorama import Fore, Back, Style | |
from random import choice | |
def random_color(): | |
return choice([Fore.BLACK, Fore.RED, Fore.GREEN, Fore.YELLOW, Fore.BLUE, Fore.MAGENTA, Fore.CYAN, Fore.WHITE]) | |
class Pool: |
#[cfg(all(target_os = "linux"))] | |
fn are_you_on_linux() { | |
println!("You are running linux!"); | |
} | |
#[cfg(not(target_os = "linux"))] | |
fn are_you_on_linux() { | |
println!("You are *not* running linux!"); | |
} |
import { readable } from "svelte/store"; | |
import { interpret } from "xstate"; | |
import { debugMachineTransition } from "./debug"; | |
export function useMachine(machine: any, options: any = {}) { | |
const service = interpret(machine, { ...options, devTools: true }); | |
const state = readable(machine.initialState, set => { | |
service | |
.onTransition(newState => { |
const bitcoin = require('bitcoinjs-lib') | |
// const raw = 'cHNidP8BAKACAAAAAqsJSaCMWvfEm4IS9Bfi8Vqz9cM9zxU4IagTn4d6W3vkAAAAAAD+////qwlJoIxa98SbghL0F+LxWrP1wz3PFTghqBOfh3pbe+QBAAAAAP7///8CYDvqCwAAAAAZdqkUdopAu9dAy+gdmI5x3ipNXHE5ax2IrI4kAAAAAAAAGXapFG9GILVT+glechue4O/p+gOcykWXiKwAAAAAAAEHakcwRAIgR1lmF5fAGwNrJZKJSGhiGDR9iYZLcZ4ff89X0eURZYcCIFMJ6r9Wqk2Ikf/REf3xM286KdqGbX+EhtdVRs7tr5MZASEDXNxh/HupccC1AaZGoqg7ECy0OIEhfKaC3Ibi1z+ogpIAAQEgAOH1BQAAAAAXqRQ1RebjO4MsRwUPJNPuuTycA5SLx4cBBBYAFIXRNTfy4mVAWjTbr6nj3aAfuCMIAAAA' | |
// P2WPKH ledger-regtest-2 | |
const raw = 'cHNidP8BAHICAAAAAbuKj5iuve6fDpK5pAj24ufiRXcA8312D6SRzg/QY2FxAAAAAAD+////AgDh9QUAAAAAF6kUbsH1OtmyE+5ByjQx5kEXQvgNK+yH6AUQJAEAAAAWABTv6SHVcAkCx33yCGcyQommoRfT3wAAAAAAAQEfAPIFKgEAAAAWABSa3W1HMiPOr9PK6zrzlZMCROA9qSIGA3pc9nuIbfhNan9xRt6Cxvth725E2MBD9U1G0jv29MX4GGuz1AMwAACAAAAAgAAAAIAAAAAAAQAAAAAAIgIDxKTMwYqQ9fXjc9KMVCI5s9dALIubvzjXNb4hpJrT79AYa7PUAzAAAIAAAACAAAAAgAEAAAAAAAAAAA==' | |
const psbt = bitcoin.Psbt.fromBase64(raw) | |
const signed = bitcoin.Psbt.fromBase64('cHNid |