Skip to content

Query Around TransactionType Support #41

@just-a-stream

Description

@just-a-stream

Hey 👋

Thanks for the work on this library, it's much appreciated!

When subscribing to the streams="transactions", and using your models, I get deserialisation errors due to 'unsupported transaction type variant OracleSet'.

From what I can see here:

/// Ledger transaction. See <https://xrpl.org/transaction-formats.html>
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[serde(tag = "TransactionType")]
pub enum Transaction {
    AccountDelete(AccountDeleteTransaction),
    AccountSet(AccountSetTransaction),
    // TODO add model for remaining transactions
    CheckCancel(TransactionCommon),
    CheckCash(TransactionCommon),
    CheckCreate(TransactionCommon),
    DepositPreauth(TransactionCommon),
    EscrowCancel(TransactionCommon),
    EscrowCreate(TransactionCommon),
    EscrowFinish(TransactionCommon),
    NFTokenAcceptOffer(TransactionCommon),
    NFTokenBurn(TransactionCommon),
    NFTokenCancelOffer(TransactionCommon),
    NFTokenCreateOffer(TransactionCommon),
    NFTokenMint(TransactionCommon),
    OfferCancel(OfferCancelTransaction),
    OfferCreate(OfferCreateTransaction),
    Payment(PaymentTransaction),
    PaymentChannelClaim(TransactionCommon),
    PaymentChannelCreate(TransactionCommon),
    PaymentChannelFund(TransactionCommon),
    SetRegularKey(TransactionCommon),
    SignerListSet(TransactionCommon),
    TicketCreate(TransactionCommon),
    TrustSet(TrustSetTransaction),

This model is missing many of the TransactionType variants that are detailed here:
https://xrpl.org/docs/references/protocol/transactions/types

Am I looking at the wrong xrpl-sdk-rust Transaction model here?

If I am correct I am happy to open an MR and add an additional variant that captures "Other" (or similar).

I don't actually need the variants, but I need to eliminate the deserialisation errors to make this library usable.

Any information you can provide me is great!

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions