From: AsamK Date: Sat, 21 May 2022 10:10:51 +0000 (+0200) Subject: Update json-rpc client X-Git-Tag: v0.10.7~21 X-Git-Url: https://git.nmode.ca/signal-cli/commitdiff_plain/cf07512d2403cd428959f96840ee923a606d78d9 Update json-rpc client --- diff --git a/client/Cargo.lock b/client/Cargo.lock index 855d74bc..607cf0d5 100644 --- a/client/Cargo.lock +++ b/client/Cargo.lock @@ -639,9 +639,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" dependencies = [ "aho-corasick", "memchr", @@ -650,9 +650,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" [[package]] name = "rustc_version" diff --git a/client/src/cli.rs b/client/src/cli.rs index 01b59fed..a98b16d3 100644 --- a/client/src/cli.rs +++ b/client/src/cli.rs @@ -164,6 +164,15 @@ pub enum CliCommands { sticker: Option, }, SendContacts, + SendPaymentNotification { + recipient: String, + + #[clap(long)] + receipt: String, + + #[clap(long)] + note: String, + }, SendReaction { recipient: Vec, @@ -319,6 +328,9 @@ pub enum CliCommands { #[clap(long = "about-emoji")] about_emoji: Option, + #[clap(long = "mobile-coin-address")] + mobile_coin_address: Option, + #[clap(long)] avatar: Option, diff --git a/client/src/jsonrpc.rs b/client/src/jsonrpc.rs index f91be25e..3c8abbbd 100644 --- a/client/src/jsonrpc.rs +++ b/client/src/jsonrpc.rs @@ -135,6 +135,15 @@ pub trait Rpc { #[rpc(name = "sendContacts", params = "named")] fn send_contacts(&self, account: Option) -> Result; + #[rpc(name = "sendPaymentNotification", params = "named")] + fn send_payment_notification( + &self, + account: Option, + recipient: String, + receipt: String, + note: String, + ) -> Result; + #[rpc(name = "sendReaction", params = "named")] fn send_reaction( &self, @@ -263,6 +272,7 @@ pub trait Rpc { #[allow(non_snake_case)] familyName: Option, about: Option, #[allow(non_snake_case)] aboutEmoji: Option, + #[allow(non_snake_case)] mobileCoinAddress: Option, avatar: Option, #[allow(non_snake_case)] removeAvatar: bool, ) -> Result; diff --git a/client/src/main.rs b/client/src/main.rs index 622be806..c0ef0de6 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -147,6 +147,15 @@ async fn main() -> Result<(), anyhow::Error> { .await } cli::CliCommands::SendContacts => client.send_contacts(cli.account).await, + cli::CliCommands::SendPaymentNotification { + recipient, + receipt, + note, + } => { + client + .send_payment_notification(cli.account, recipient, receipt, note) + .await + } cli::CliCommands::SendReaction { recipient, group_id, @@ -309,6 +318,7 @@ async fn main() -> Result<(), anyhow::Error> { family_name, about, about_emoji, + mobile_coin_address, avatar, remove_avatar, } => { @@ -319,6 +329,7 @@ async fn main() -> Result<(), anyhow::Error> { family_name, about, about_emoji, + mobile_coin_address, avatar, remove_avatar, ) diff --git a/graalvm-config-dir/reflect-config.json b/graalvm-config-dir/reflect-config.json index 6d5df0d0..503f17f5 100644 --- a/graalvm-config-dir/reflect-config.json +++ b/graalvm-config-dir/reflect-config.json @@ -2971,6 +2971,30 @@ {"name":"type_"} ] }, +{ + "name":"org.whispersystems.signalservice.internal.push.SignalServiceProtos$SyncMessage$OutgoingPayment", + "fields":[ + {"name":"bitField0_"}, + {"name":"note_"}, + {"name":"paymentDetailCase_"}, + {"name":"paymentDetail_"}, + {"name":"recipientUuid_"} + ] +}, +{ + "name":"org.whispersystems.signalservice.internal.push.SignalServiceProtos$SyncMessage$OutgoingPayment$MobileCoin", + "fields":[ + {"name":"amountPicoMob_"}, + {"name":"bitField0_"}, + {"name":"feePicoMob_"}, + {"name":"ledgerBlockIndex_"}, + {"name":"ledgerBlockTimestamp_"}, + {"name":"outputPublicKeys_"}, + {"name":"receipt_"}, + {"name":"recipientAddress_"}, + {"name":"spentKeyImages_"} + ] +}, { "name":"org.whispersystems.signalservice.internal.push.SignalServiceProtos$SyncMessage$PniIdentity", "fields":[