#[repr(i32)]pub enum ScriptKeyType {
ScriptKeyUnknown = 0,
ScriptKeyBip86 = 1,
ScriptKeyScriptPathExternal = 2,
ScriptKeyBurn = 3,
ScriptKeyTombstone = 4,
ScriptKeyChannel = 5,
ScriptKeyUniquePedersen = 6,
}Variants§
ScriptKeyUnknown = 0
The type of script key is not known. This should only be stored for assets where we don’t know the internal key of the script key (e.g. for imported proofs).
ScriptKeyBip86 = 1
The script key is a normal BIP-86 key. This means that the internal key is turned into a Taproot output key by applying a BIP-86 tweak to it.
ScriptKeyScriptPathExternal = 2
The script key is a key that contains a script path that is defined by the user and is therefore external to the tapd wallet. Spending this key requires providing a specific witness and must be signed through the vPSBT signing flow.
ScriptKeyBurn = 3
The script key is a specific un-spendable key that indicates a burnt asset. Assets with this key type can never be spent again, as a burn key is a tweaked NUMS key that nobody knows the private key for.
ScriptKeyTombstone = 4
The script key is a specific un-spendable key that indicates a tombstone output. This is only the case for zero-value assets that result from a non-interactive (TAP address) send where no change was left over.
ScriptKeyChannel = 5
The script key is used for an asset that resides within a Taproot Asset Channel. That means the script key is either a funding key (OP_TRUE), a commitment output key (to_local, to_remote, htlc), or a HTLC second-level transaction output key. Keys related to channels are not shown in asset balances (unless specifically requested) and are never used for coin selection.
ScriptKeyUniquePedersen = 6
The script key is derived using the asset ID and a single leaf that contains
an un-spendable Pedersen commitment key
(OP_CHECKSIG <NUMS_key + asset_id * G>). This can be used to create
unique script keys for each virtual packet in the fragment, to avoid proof
collisions in the universe, where the script keys should be spendable by
a hardware wallet that only supports miniscript policies for signing P2TR
outputs.
Implementations§
Source§impl ScriptKeyType
impl ScriptKeyType
Source§impl ScriptKeyType
impl ScriptKeyType
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for ScriptKeyType
impl Clone for ScriptKeyType
Source§fn clone(&self) -> ScriptKeyType
fn clone(&self) -> ScriptKeyType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ScriptKeyType
Source§impl Debug for ScriptKeyType
impl Debug for ScriptKeyType
Source§impl Default for ScriptKeyType
impl Default for ScriptKeyType
Source§fn default() -> ScriptKeyType
fn default() -> ScriptKeyType
impl Eq for ScriptKeyType
Source§impl From<ScriptKeyType> for i32
impl From<ScriptKeyType> for i32
Source§fn from(value: ScriptKeyType) -> i32
fn from(value: ScriptKeyType) -> i32
Source§impl Hash for ScriptKeyType
impl Hash for ScriptKeyType
Source§impl Ord for ScriptKeyType
impl Ord for ScriptKeyType
Source§fn cmp(&self, other: &ScriptKeyType) -> Ordering
fn cmp(&self, other: &ScriptKeyType) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ScriptKeyType
impl PartialEq for ScriptKeyType
Source§fn eq(&self, other: &ScriptKeyType) -> bool
fn eq(&self, other: &ScriptKeyType) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ScriptKeyType
impl PartialOrd for ScriptKeyType
impl StructuralPartialEq for ScriptKeyType
Source§impl TryFrom<i32> for ScriptKeyType
impl TryFrom<i32> for ScriptKeyType
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<ScriptKeyType, UnknownEnumValue>
fn try_from(value: i32) -> Result<ScriptKeyType, UnknownEnumValue>
Auto Trait Implementations§
impl Freeze for ScriptKeyType
impl RefUnwindSafe for ScriptKeyType
impl Send for ScriptKeyType
impl Sync for ScriptKeyType
impl Unpin for ScriptKeyType
impl UnsafeUnpin for ScriptKeyType
impl UnwindSafe for ScriptKeyType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request