pub struct AssetId(/* private fields */);
Expand description
An issued asset ID.
Implementations§
source§impl AssetId
impl AssetId
sourcepub const LIQUID_BTC: AssetId = _
pub const LIQUID_BTC: AssetId = _
The asset ID for L-BTC, Bitcoin on the Liquid network.
sourcepub fn from_inner(midstate: Midstate) -> AssetId
pub fn from_inner(midstate: Midstate) -> AssetId
Create an AssetId from its inner type.
sourcepub fn into_inner(self) -> Midstate
pub fn into_inner(self) -> Midstate
Convert the AssetId into its inner type.
sourcepub fn from_slice(sl: &[u8]) -> Result<AssetId, FromSliceError>
pub fn from_slice(sl: &[u8]) -> Result<AssetId, FromSliceError>
Copies a byte slice into an AssetId object
sourcepub fn generate_asset_entropy(
prevout: OutPoint,
contract_hash: ContractHash
) -> Midstate
pub fn generate_asset_entropy( prevout: OutPoint, contract_hash: ContractHash ) -> Midstate
Generate the asset entropy from the issuance prevout and the contract hash.
sourcepub fn from_entropy(entropy: Midstate) -> AssetId
pub fn from_entropy(entropy: Midstate) -> AssetId
Calculate the asset ID from the asset entropy.
sourcepub fn new_issuance(prevout: OutPoint, contract_hash: ContractHash) -> Self
pub fn new_issuance(prevout: OutPoint, contract_hash: ContractHash) -> Self
Computes the asset ID when issuing asset from issuing input and contract hash
sourcepub fn new_reissuance_token(
prevout: OutPoint,
contract_hash: ContractHash,
confidential: bool
) -> Self
pub fn new_reissuance_token( prevout: OutPoint, contract_hash: ContractHash, confidential: bool ) -> Self
Computes the re-issuance token from input and contract hash
sourcepub fn reissuance_token_from_entropy(
entropy: Midstate,
confidential: bool
) -> AssetId
pub fn reissuance_token_from_entropy( entropy: Midstate, confidential: bool ) -> AssetId
Calculate the reissuance token asset ID from the asset entropy.
Trait Implementations§
source§impl Deserialize for AssetId
impl Deserialize for AssetId
source§impl Ord for AssetId
impl Ord for AssetId
source§impl PartialEq for AssetId
impl PartialEq for AssetId
source§impl PartialOrd for AssetId
impl PartialOrd for AssetId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for AssetId
impl Eq for AssetId
impl StructuralPartialEq for AssetId
Auto Trait Implementations§
impl RefUnwindSafe for AssetId
impl Send for AssetId
impl Sync for AssetId
impl Unpin for AssetId
impl UnwindSafe for AssetId
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more