-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from metaplex-foundation/feat/rpc-interface
feat: solana-rpc interfaces
- Loading branch information
Showing
8 changed files
with
47 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
pub mod asset_streaming_and_discovery; | ||
pub mod error; | ||
pub mod solana_rpc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
use crate::error::UsecaseError; | ||
use async_trait::async_trait; | ||
use entities::models::BufferedTransaction; | ||
use mockall::automock; | ||
use solana_sdk::pubkey::Pubkey; | ||
use solana_sdk::signature::Signature; | ||
|
||
#[allow(dead_code)] | ||
pub struct SignatureWithSlot { | ||
pub signature: Signature, | ||
pub slot: u64, | ||
} | ||
|
||
#[automock] | ||
#[async_trait] | ||
pub trait GetSignaturesByAddress: Send + Sync { | ||
async fn get_signatures_by_address( | ||
&self, | ||
signature: Signature, | ||
program_id: Pubkey, | ||
) -> Result<Vec<SignatureWithSlot>, UsecaseError>; | ||
} | ||
|
||
#[automock] | ||
#[async_trait] | ||
pub trait GetTransactionsBySignatures: Send + Sync { | ||
async fn get_txs_by_signatures( | ||
&self, | ||
signatures: Vec<Signature>, | ||
) -> Result<Vec<BufferedTransaction>, UsecaseError>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters