Struct private_tx::Provider [−][src]
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]
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
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]
&self,
signed_transaction: SignedTransaction
) -> Result<Receipt, Error>
- Create private transaction from the signed transaction
- Executes private transaction
- Save it with state returned on prev step to the queue for signing
- 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]
&self,
signed_tx: &SignedPrivateTransaction
) -> Result<(), Error>
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]
&self,
address: &Address,
block: BlockId
) -> Result<U256, Error>
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]
&self,
transaction: &SignedTransaction,
options: TransactOptions<T, V>,
block: BlockId
) -> Result<PrivateExecutionResult<T, V>, Error> where
T: Tracer,
V: VMTracer,
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]
&self,
block: BlockId,
source: &SignedTransaction,
validators: &[Address],
gas_price: U256
) -> Result<(Transaction, Address), Error>
Create encrypted public contract deployment transaction.
pub fn execute_private_transaction(
&self,
block: BlockId,
source: &SignedTransaction
) -> Result<Bytes, Error>
[src]
&self,
block: BlockId,
source: &SignedTransaction
) -> Result<Bytes, Error>
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]
&self,
state: Bytes,
source: &SignedTransaction,
signatures: &[Signature],
nonce: U256,
gas_price: U256
) -> Result<Transaction, Error>
Create encrypted public transaction from private transaction.
pub fn private_call(
&self,
block: BlockId,
transaction: &SignedTransaction
) -> Result<FlatExecuted, Error>
[src]
&self,
block: BlockId,
transaction: &SignedTransaction
) -> Result<FlatExecuted, Error>
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]
&self,
block: BlockId,
address: &Address
) -> Result<Vec<Address>, Error>
Returns private validators for a contract.
Trait Implementations
impl ChainNotify for Provider
[src]
fn new_blocks(&self, new_blocks: NewBlocks)
[src]
pub fn start(&self)
[src]
pub fn stop(&self)
[src]
pub fn broadcast(&self, _message_type: ChainMessageType)
[src]
pub fn block_pre_import(
&self,
_bytes: &Vec<u8, Global>,
_hash: &H256,
_difficulty: &U256
)
[src]
&self,
_bytes: &Vec<u8, Global>,
_hash: &H256,
_difficulty: &U256
)
pub fn transactions_received(
&self,
_txs: &[UnverifiedTransaction],
_peer_id: usize
)
[src]
&self,
_txs: &[UnverifiedTransaction],
_peer_id: usize
)
impl IoHandler<ClientIoMessage<Client>> for Provider
[src]
fn initialize(&self, io: &IoContext<ClientIoMessage<Client>>)
[src]
fn timeout(&self, _io: &IoContext<ClientIoMessage<Client>>, timer: TimerToken)
[src]
pub fn message(&self, _io: &IoContext<Message>, _message: &Message)
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[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]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,