From 976f48ae15fe9ad79a7fb426935601beb2b7e369 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Wed, 11 Sep 2024 12:41:38 +0200 Subject: [PATCH] iface: add contract state accessing methods to IfaceWrapper --- src/interface/iface.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/interface/iface.rs b/src/interface/iface.rs index c6cbfaaf..fa97086d 100644 --- a/src/interface/iface.rs +++ b/src/interface/iface.rs @@ -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, @@ -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; } /// The instances implementing this trait are used as wrappers around