Skip to content

Commit

Permalink
iface: add contract state accessing methods to IfaceWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Sep 11, 2024
1 parent ef4679f commit 976f48a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/interface/iface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ use amplify::{ByteArray, Bytes32};
use baid64::{Baid64ParseError, DisplayBaid64, FromBaid64Str};
use chrono::{DateTime, TimeZone, Utc};
use commit_verify::{CommitId, CommitmentId, DigestExt, Sha256};
use rgb::{Identity, Occurrences};
use rgb::vm::WitnessOrd;
use rgb::{ContractId, Identity, Occurrences, SchemaId, XWitnessId};
use strict_encoding::{
FieldName, StrictDecode, StrictDeserialize, StrictDumb, StrictEncode, StrictSerialize,
StrictType, TypeName, VariantName,
Expand Down Expand Up @@ -341,6 +342,10 @@ pub trait IfaceClass: Clone + Default {
fn stl(&self) -> TypeLib;
fn iface(&self) -> Iface;
fn iface_id(&self) -> IfaceId;

fn contract_id(&self) -> ContractId;
fn schema_id(&self) -> SchemaId;
fn witness_info(&self, witness_id: XWitnessId) -> Option<WitnessOrd>;
}

/// The instances implementing this trait are used as wrappers around
Expand Down

0 comments on commit 976f48a

Please sign in to comment.