mirror of
https://github.com/stakwork/sphinx-key.git
synced 2025-12-19 16:24:29 +01:00
multiple DROM segments MRE
This commit is contained in:
@@ -84,8 +84,13 @@ after pressing the ok button, restart the sphinx key, and wait for a MQTT connec
|
|||||||
|
|
||||||
### espflash notes
|
### espflash notes
|
||||||
|
|
||||||
espflash save-image esp32-c3 target/riscv32imc-esp-espidf/debug/sphinx-key ./asdf-blah
|
espflash save-image esp32-c3 target/riscv32imc-esp-espidf/debug/sphinx-key ./test-flash
|
||||||
|
|
||||||
espflash save-image esp32-c3 target/riscv32imc-esp-espidf/release/sphinx-key ./test-flash
|
espflash save-image esp32-c3 target/riscv32imc-esp-espidf/release/sphinx-key ./test-flash
|
||||||
|
|
||||||
espflash board-info
|
espflash board-info
|
||||||
|
|
||||||
|
espflash target/riscv32imc-esp-espidf/debug/tiny
|
||||||
|
espmonitor /dev/tty.usbserial-1420
|
||||||
|
|
||||||
|
espflash save-image esp32-c3 target/riscv32imc-esp-espidf/debug/tiny ./test-flash
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
use lightning_signer::persist::{DummyPersister, Persist};
|
pub use lightning_signer::persist::{DummyPersister, Persist};
|
||||||
use lightning_signer::Arc;
|
pub use lightning_signer::Arc as SignerArc;
|
||||||
use sphinx_key_parser::MsgDriver;
|
use sphinx_key_parser::MsgDriver;
|
||||||
use vls_protocol::msgs::{self, read_serial_request_header, write_serial_response_header, Message};
|
use vls_protocol::msgs::{read_serial_request_header, write_serial_response_header, Message};
|
||||||
use vls_protocol::serde_bolt::WireString;
|
|
||||||
use vls_protocol_signer::lightning_signer;
|
use vls_protocol_signer::lightning_signer;
|
||||||
use vls_protocol_signer::vls_protocol;
|
use vls_protocol_signer::vls_protocol;
|
||||||
|
pub use vls_protocol::{msgs, model::{PubKey, Secret}};
|
||||||
pub use vls_protocol::model::PubKey;
|
|
||||||
pub use vls_protocol_signer::handler::{Handler, RootHandler};
|
pub use vls_protocol_signer::handler::{Handler, RootHandler};
|
||||||
|
pub use vls_protocol::serde_bolt::WireString;
|
||||||
|
pub use sphinx_key_parser as parser;
|
||||||
|
|
||||||
pub struct InitResponse {
|
pub struct InitResponse {
|
||||||
pub root_handler: RootHandler,
|
pub root_handler: RootHandler,
|
||||||
@@ -15,7 +15,7 @@ pub struct InitResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn init(bytes: Vec<u8>) -> anyhow::Result<InitResponse> {
|
pub fn init(bytes: Vec<u8>) -> anyhow::Result<InitResponse> {
|
||||||
let persister: Arc<dyn Persist> = Arc::new(DummyPersister);
|
let persister: SignerArc<dyn Persist> = SignerArc::new(DummyPersister);
|
||||||
let mut md = MsgDriver::new(bytes);
|
let mut md = MsgDriver::new(bytes);
|
||||||
let (sequence, dbid) = read_serial_request_header(&mut md).expect("read init header");
|
let (sequence, dbid) = read_serial_request_header(&mut md).expect("read init header");
|
||||||
assert_eq!(dbid, 0);
|
assert_eq!(dbid, 0);
|
||||||
|
|||||||
@@ -39,3 +39,7 @@ anyhow = "1"
|
|||||||
[[bin]]
|
[[bin]]
|
||||||
name = "clear"
|
name = "clear"
|
||||||
path = "src/clear.rs"
|
path = "src/clear.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "tiny"
|
||||||
|
path = "src/tiny.rs"
|
||||||
12
sphinx-key/src/tiny.rs
Normal file
12
sphinx-key/src/tiny.rs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#![feature(once_cell)]
|
||||||
|
|
||||||
|
use sphinx_key_signer::{self, DummyPersister, Persist, RootHandler, SignerArc};
|
||||||
|
|
||||||
|
fn main() -> anyhow::Result<()> {
|
||||||
|
esp_idf_sys::link_patches();
|
||||||
|
|
||||||
|
let persister: SignerArc<dyn Persist> = SignerArc::new(DummyPersister);
|
||||||
|
let rh = RootHandler::new(0, Some([0; 32]), persister, Vec::new());
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user