Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions canister/sol_rpc_canister.did
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,10 @@ type CompiledInstruction = record {
stackHeight : opt nat32;
};
type EncodedTransaction = variant {
Binary : record { text; variant { base58; base64 } };
LegacyBinary : text;
binary : record { text; variant { base58; base64 } };
legacyBinary : text;
};
type Instruction = variant { Compiled : CompiledInstruction };
type Instruction = variant { compiled : CompiledInstruction };
type InnerInstructions = record {
instructions : vec Instruction;
index : nat8;
Expand Down Expand Up @@ -424,7 +424,7 @@ type Reward = record {
lamports : int64;
commission : opt nat8;
pubkey : Pubkey;
rewardType : opt variant { Fee; Rent; Voting; Staking };
rewardType : opt variant { fee; rent; voting; staking };
postBalance : nat64;
};
type TokenAmount = record {
Expand Down Expand Up @@ -480,7 +480,7 @@ type TransactionInfo = record {
meta : opt TransactionStatusMeta;
transaction : EncodedTransaction;
slot : nat64;
version : opt variant { Legacy; Number : nat8 };
version : opt variant { legacy; number : nat8 };
};
type TransactionStatusMeta = record {
fee : nat64;
Expand Down
1 change: 1 addition & 0 deletions libs/types/src/solana/transaction/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ impl From<InnerInstructions> for UiInnerInstructions {
#[derive(Debug, Clone, Deserialize, Serialize, CandidType, PartialEq)]
pub enum Instruction {
/// A compiled Solana instruction.
#[serde(rename = "compiled")]
Compiled(CompiledInstruction),
}

Expand Down
4 changes: 4 additions & 0 deletions libs/types/src/solana/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,10 @@ impl TryFrom<UiTransactionStatusMeta> for TransactionStatusMeta {
#[derive(Debug, Clone, Deserialize, Serialize, CandidType, PartialEq)]
pub enum EncodedTransaction {
/// Legacy format kept for backwards compatibility. The transaction is base58-encoded.
#[serde(rename = "legacyBinary")]
LegacyBinary(String),
///The transaction is encoded in one of the [`TransactionBinaryEncoding`] formats.
#[serde(rename = "binary")]
Binary(String, TransactionBinaryEncoding),
}

Expand Down Expand Up @@ -404,8 +406,10 @@ impl From<TransactionReturnData> for UiTransactionReturnData {
#[derive(Debug, Clone, Deserialize, Serialize, CandidType, PartialEq)]
pub enum TransactionVersion {
/// Legacy transaction format, which does not explicitly include a version number.
#[serde(rename = "legacy")]
Legacy,
/// Versioned transaction format.
#[serde(rename = "number")]
Number(u8),
}

Expand Down
4 changes: 4 additions & 0 deletions libs/types/src/solana/transaction/reward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,16 @@ impl From<Reward> for solana_transaction_status_client_types::Reward {
#[derive(Debug, Clone, Deserialize, Serialize, CandidType, PartialEq)]
pub enum RewardType {
/// Reward from transaction fees collected in the block.
#[serde(rename = "fee")]
Fee,
/// Reward from rent fees paid by accounts storing data on-chain.
#[serde(rename = "rent")]
Rent,
/// Reward earned from delegating stake to validators with good performance.
#[serde(rename = "staking")]
Staking,
/// Reward earned for participating in vote transactions to help reach consensus.
#[serde(rename = "voting")]
Voting,
}

Expand Down