RPC: Support base64 encoded transactions
Defaults to base58
This commit is contained in:
committed by
Trent Nelson
parent
7f67d36777
commit
e35889542b
@ -21,6 +21,7 @@ use solana_sdk::{
|
||||
signature::Signature,
|
||||
transaction::{Result, Transaction, TransactionError},
|
||||
};
|
||||
use std::fmt;
|
||||
|
||||
/// A duplicate representation of an Instruction for pretty JSON serialization
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
@ -380,6 +381,14 @@ pub enum UiTransactionEncoding {
|
||||
JsonParsed,
|
||||
}
|
||||
|
||||
impl fmt::Display for UiTransactionEncoding {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let v = serde_json::to_value(self).map_err(|_| fmt::Error)?;
|
||||
let s = v.as_str().ok_or(fmt::Error)?;
|
||||
write!(f, "{}", s)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase", untagged)]
|
||||
pub enum EncodedTransaction {
|
||||
|
Reference in New Issue
Block a user