Struct private_tx::Provider[][src]

pub struct Provider { /* fields omitted */ }

Manager of private transactions

Implementations

impl Provider[src]

pub fn new(
    client: Arc<Client>,
    miner: Arc<Miner>,
    accounts: Arc<dyn Signer>,
    encryptor: Box<dyn Encryptor>,
    config: ProviderConfig,
    channel: IoChannel<ClientIoMessage<Client>>,
    keys_provider: Arc<dyn KeyProvider>,
    db: Arc<dyn KeyValueDB>
) -> Self
[src]

Create a new provider.

pub fn private_state_db(&self) -> Arc<PrivateStateDB>[src]

Returns private state DB

pub fn add_notify(&self, target: Arc<dyn ChainNotify>)[src]

Adds an actor to be notified on certain events

pub fn create_private_transaction(
    &self,
    signed_transaction: SignedTransaction
) -> Result<Receipt, Error>
[src]

  1. Create private transaction from the signed transaction
  2. Executes private transaction
  3. Save it with state returned on prev step to the queue for signing
  4. Broadcast corresponding message to the chain

pub fn calculate_state_hash(&self, state: &Bytes, nonce: U256) -> H256[src]

Calculate hash from united private state and contract nonce

pub fn process_signature(
    &self,
    signed_tx: &SignedPrivateTransaction
) -> Result<(), Error>
[src]

Add signed private transaction into the store Creates corresponding public transaction if last required signature collected and sends it to the chain

pub fn get_contract_nonce(
    &self,
    address: &Address,
    block: BlockId
) -> Result<U256, Error>
[src]

pub fn execute_private<T, V>(
    &self,
    transaction: &SignedTransaction,
    options: TransactOptions<T, V>,
    block: BlockId
) -> Result<PrivateExecutionResult<T, V>, Error> where
    T: Tracer,
    V: VMTracer
[src]

pub fn contract_key_id(&self, contract_address: &Address) -> Result<H256, Error>[src]

Returns the key from the key server associated with the contract

pub fn public_creation_transaction(
    &self,
    block: BlockId,
    source: &SignedTransaction,
    validators: &[Address],
    gas_price: U256
) -> Result<(Transaction, Address), Error>
[src]

Create encrypted public contract deployment transaction.

pub fn execute_private_transaction(
    &self,
    block: BlockId,
    source: &SignedTransaction
) -> Result<Bytes, Error>
[src]

Create encrypted public contract deployment transaction. Returns updated encrypted state.

pub fn public_transaction(
    &self,
    state: Bytes,
    source: &SignedTransaction,
    signatures: &[Signature],
    nonce: U256,
    gas_price: U256
) -> Result<Transaction, Error>
[src]

Create encrypted public transaction from private transaction.

pub fn private_call(
    &self,
    block: BlockId,
    transaction: &SignedTransaction
) -> Result<FlatExecuted, Error>
[src]

Call into private contract.

pub fn private_log(&self, tx_hash: H256) -> Result<TransactionLog, Error>[src]

Retrieves log information about private transaction

pub fn get_validators(
    &self,
    block: BlockId,
    address: &Address
) -> Result<Vec<Address>, Error>
[src]

Returns private validators for a contract.

Trait Implementations

impl ChainNotify for Provider[src]

impl IoHandler<ClientIoMessage<Client>> for Provider[src]

Auto Trait Implementations

impl !RefUnwindSafe for Provider

impl Send for Provider

impl Sync for Provider

impl Unpin for Provider

impl !UnwindSafe for Provider

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> Erased for T

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

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>,