Struct noah_api::xfr::structs::AssetRecord
source · pub struct AssetRecord {
pub open_asset_record: OpenAssetRecord,
pub tracing_policies: TracingPolicies,
pub identity_proofs: Vec<Option<ACConfidentialRevealProof>>,
pub asset_tracers_memos: Vec<TracerMemo>,
pub owner_memo: Option<OwnerMemo>,
}Expand description
An input or output record and associated information (policies and memos). It contains all the information used to the do a valid confidential transfer.
Fields§
§open_asset_record: OpenAssetRecordThe opened version of the asset record.
tracing_policies: TracingPoliciesThe tracing policies.
identity_proofs: Vec<Option<ACConfidentialRevealProof>>The identity proof for asset tracers, one for each tracer.
asset_tracers_memos: Vec<TracerMemo>The memo for asset tracers, one for each tracer.
owner_memo: Option<OwnerMemo>The owner memo.
Implementations§
source§impl AssetRecord
impl AssetRecord
sourcepub fn from_open_asset_record_no_asset_tracing(
oar: OpenAssetRecord
) -> AssetRecord
pub fn from_open_asset_record_no_asset_tracing(
oar: OpenAssetRecord
) -> AssetRecord
Build a record input from OpenAssetRecord with no associated policy Important: It assumes that RecordInput will be used as an input and not as an output since OpenAsset record was recovered from a BlindAsset record. This means owner_memo field is None.
sourcepub fn from_open_asset_record_with_asset_tracing_but_no_identity<R: CryptoRng + RngCore>(
prng: &mut R,
oar: OpenAssetRecord,
asset_tracing_policies: TracingPolicies
) -> Result<AssetRecord>
pub fn from_open_asset_record_with_asset_tracing_but_no_identity<R: CryptoRng + RngCore>(
prng: &mut R,
oar: OpenAssetRecord,
asset_tracing_policies: TracingPolicies
) -> Result<AssetRecord>
Build a record input from OpenAssetRecord with an associated policy that has no identity tracing Important: It assumes that RecordInput will be used as an input and not as an output since OpenAsset record was recovered from a BlindAsset record. This means owner_memo field is be None.
sourcepub fn from_open_asset_record_with_tracing<R: CryptoRng + RngCore>(
prng: &mut R,
oar: OpenAssetRecord,
asset_tracing_policies: TracingPolicies,
credential_sec_key: &ACUserSecretKey,
credential: &Credential,
credential_commitment_key: &ACCommitmentKey
) -> Result<AssetRecord>
pub fn from_open_asset_record_with_tracing<R: CryptoRng + RngCore>(
prng: &mut R,
oar: OpenAssetRecord,
asset_tracing_policies: TracingPolicies,
credential_sec_key: &ACUserSecretKey,
credential: &Credential,
credential_commitment_key: &ACCommitmentKey
) -> Result<AssetRecord>
Build a record input from OpenAssetRecord with associated policies for asset and identity tracing Important: It assumes that RecordInput will be used as an input and not as an output since OpenAsset record was recovered from a BlindAsset record. This means owner_memo field is None.
sourcepub fn from_template_no_identity_tracing<R: CryptoRng + RngCore>(
prng: &mut R,
template: &AssetRecordTemplate
) -> Result<AssetRecord>
pub fn from_template_no_identity_tracing<R: CryptoRng + RngCore>(
prng: &mut R,
template: &AssetRecordTemplate
) -> Result<AssetRecord>
Create the asset record using a template, without identity tracing.
sourcepub fn from_template_with_identity_tracing<R: CryptoRng + RngCore>(
prng: &mut R,
template: &AssetRecordTemplate,
credential_user_sec_key: &ACUserSecretKey,
credential: &Credential,
credential_key: &ACCommitmentKey
) -> Result<AssetRecord>
pub fn from_template_with_identity_tracing<R: CryptoRng + RngCore>(
prng: &mut R,
template: &AssetRecordTemplate,
credential_user_sec_key: &ACUserSecretKey,
credential: &Credential,
credential_key: &ACCommitmentKey
) -> Result<AssetRecord>
Create the asset record using a template, with identity tracing.
Trait Implementations§
source§impl Clone for AssetRecord
impl Clone for AssetRecord
source§fn clone(&self) -> AssetRecord
fn clone(&self) -> AssetRecord
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more