[−][src]Struct grin_wallet_libwallet::Context
Holds the context for a single aggsig transaction
Fields
parent_key_id: Identifier
Parent key id
sec_key: SecretKey
Secret key (of which public is shared)
sec_nonce: SecretKey
Secret nonce (of which public is shared) (basically a SecretKey)
initial_sec_key: SecretKey
only used if self-sending an invoice
initial_sec_nonce: SecretKey
as above
output_ids: Vec<(Identifier, Option<u64>, u64)>
store my outputs + amounts between invocations Id, mmr_index (if known), amount
input_ids: Vec<(Identifier, Option<u64>, u64)>
store my inputs Id, mmr_index (if known), amount
amount: u64
store amount, so we can remove from slate if not needed by the other party
fee: u64
store the calculated fee
payment_proof_derivation_index: Option<u32>
Payment proof sender address derivation path, if needed
is_invoice: bool
whether this was an invoice transaction
calculated_excess: Option<Commitment>
for invoice I2 Only, store the tx excess so we can remove it from the slate on return
Implementations
impl Context
[src]
pub fn new(
secp: &Secp256k1,
sec_key: SecretKey,
parent_key_id: &Identifier,
use_test_rng: bool,
is_invoice: bool
) -> Context
[src]
secp: &Secp256k1,
sec_key: SecretKey,
parent_key_id: &Identifier,
use_test_rng: bool,
is_invoice: bool
) -> Context
Create a new context with defaults
impl Context
[src]
pub fn add_output(
&mut self,
output_id: &Identifier,
mmr_index: &Option<u64>,
amount: u64
)
[src]
&mut self,
output_id: &Identifier,
mmr_index: &Option<u64>,
amount: u64
)
Tracks an output contributing to my excess value (if it needs to be kept between invocations
pub fn get_outputs(&self) -> Vec<(Identifier, Option<u64>, u64)>
[src]
Returns all stored outputs
pub fn add_input(
&mut self,
input_id: &Identifier,
mmr_index: &Option<u64>,
amount: u64
)
[src]
&mut self,
input_id: &Identifier,
mmr_index: &Option<u64>,
amount: u64
)
Tracks IDs of my inputs into the transaction be kept between invocations
pub fn get_inputs(&self) -> Vec<(Identifier, Option<u64>, u64)>
[src]
Returns all stored input identifiers
pub fn get_private_keys(&self) -> (SecretKey, SecretKey)
[src]
Returns private key, private nonce
pub fn get_public_keys(&self, secp: &Secp256k1) -> (PublicKey, PublicKey)
[src]
Returns public key, public nonce
Trait Implementations
impl Clone for Context
[src]
impl Debug for Context
[src]
impl<'de> Deserialize<'de> for Context
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Readable for Context
[src]
impl Serialize for Context
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl Writeable for Context
[src]
Auto Trait Implementations
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
T: Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Sync + Send> where
T: Send + Sync,
T: Send + Sync,
impl<T> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Clone + Send + Sync,
T: 'a + Clone + Send + Sync,
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
T: 'a + Clone,
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,