Skip to content

Commit f21aa22

Browse files
authored
Merge pull request #18 from Foundation-Devices/sdk
Add RawData message for third-party apps
2 parents b3c04c0 + 7c6f6a4 commit f21aa22

File tree

6 files changed

+19
-3
lines changed

6 files changed

+19
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api-demo/src/demo/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ pub fn handle_ctrl_c() {
4949

5050
pub fn chapter_title(title: &str) {
5151
println!();
52-
println!("===== {} =====", title);
52+
println!("===== {title} =====");
5353
println!();
5454
}

api/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "foundation-api"
3-
version = "1.6.0"
3+
version = "1.7.0"
44
edition = "2021"
55
description = "Foundation API using Gordian Sealed Transaction Protocol (GSTP)."
66
authors = ["Wolf McNally, Blockchain Commons, Foundation Devices"]

api/src/api/message.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use super::onboarding::OnboardingState;
2+
use crate::api::raw::RawData;
23
use crate::backup::Shard;
34
use crate::bitcoin::*;
45
use crate::firmware::{FirmwarePayload, FirmwareUpdate};
@@ -85,4 +86,6 @@ pub enum QuantumLinkMessage {
8586
SecurityProofMessage(#[n(0)] SecurityProofMessage),
8687
#[n(13)]
8788
Shard(#[n(0)] Shard),
89+
#[n(14)]
90+
RawData(#[n(0)] RawData),
8891
}

api/src/api/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub mod onboarding;
88
pub mod pairing;
99
pub mod passport;
1010
pub mod quantum_link;
11+
pub mod raw;
1112
pub mod scv;
1213
pub mod settings;
1314
pub mod status;

api/src/api/raw.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
use crate::api::quantum_link::QuantumLink;
2+
use flutter_rust_bridge::frb;
3+
use {
4+
minicbor_derive::{Decode, Encode},
5+
quantum_link_macros::quantum_link,
6+
};
7+
8+
#[quantum_link]
9+
pub struct RawData {
10+
#[n(0)]
11+
pub payload: Vec<u8>,
12+
}

0 commit comments

Comments
 (0)