[][src]Struct ergo_node_interface::scanning::Scan

pub struct Scan {
    pub name: String,
    pub id: ScanID,
    pub node_interface: NodeInterface,
}

A Scan is a name + scan_id for a given scan with extra methods for acquiring boxes.

Fields

name: Stringid: ScanIDnode_interface: NodeInterface

Implementations

impl Scan[src]

pub fn new(name: &str, scan_id: &str, node_interface: &NodeInterface) -> Scan[src]

Manually create a new Scan struct. It is assumed that a scan with the given id has already been registered with the Ergo Node and the developer is simply creating a struct for the given scan.

pub fn register(
    name: &String,
    tracking_rule: JsonValue,
    node_interface: &NodeInterface
) -> Result<Scan>
[src]

Register a new scan in the Ergo Node and builds/returns a Scan struct in a Result.

pub fn get_boxes(&self) -> Result<Vec<ErgoBox>>[src]

Returns all ErgoBoxes found by the scan

pub fn get_box(&self) -> Result<ErgoBox>[src]

Returns the first ErgoBox found by the scan

pub fn get_serialized_boxes(&self) -> Result<Vec<String>>[src]

Returns all ErgoBoxes found by the scan serialized and ready to be used as rawInputs

pub fn get_serialized_box(&self) -> Result<String>[src]

Returns the first ErgoBox found by the registered scan serialized and ready to be used as a rawInput

pub fn save_scan_ids_locally(scans: Vec<Scan>) -> Result<bool>[src]

Saves UTXO-set scans (specifically id) to local scanIDs.json

pub fn read_local_scan_ids(node: &NodeInterface) -> Result<Vec<Scan>>[src]

Read UTXO-set scan ids from local scanIDs.json

pub fn serialize_p2pk_for_tracking(
    node: &NodeInterface,
    address: &P2PKAddressString
) -> Result<String>
[src]

Serialize a "P2PKAddressString" to be used within a scan tracking rule

Trait Implementations

impl Clone for Scan[src]

impl Debug for Scan[src]

Auto Trait Implementations

impl RefUnwindSafe for Scan

impl Send for Scan

impl Sync for Scan

impl Unpin for Scan

impl UnwindSafe for Scan

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,