1#[macro_use]
23extern crate amplify;
24#[macro_use]
25extern crate strict_types;
26
27mod cfa;
28mod nia;
29mod pfa;
30mod uda;
31mod ifa;
32
33pub use cfa::{CfaWrapper, CollectibleFungibleAsset, CFA_SCHEMA_ID};
34pub use ifa::{IfaWrapper, InflatableFungibleAsset, IFA_SCHEMA_ID};
35pub use nia::{NiaWrapper, NonInflatableAsset, NIA_SCHEMA_ID};
36pub use pfa::{PermissionedFungibleAsset, PfaWrapper, PFA_SCHEMA_ID};
37use rgbstd::{AssignmentType, GlobalStateType, MetaType, TransitionType};
38pub use uda::{UdaWrapper, UniqueDigitalAsset, UDA_SCHEMA_ID};
39
40pub const GS_ART: GlobalStateType = GlobalStateType::with(3000);
41pub const GS_ATTACH: GlobalStateType = GlobalStateType::with(2104);
42pub const GS_REJECT_LIST_URL: GlobalStateType = GlobalStateType::with(2012);
43pub const GS_DETAILS: GlobalStateType = GlobalStateType::with(3004);
44pub const GS_ENGRAVINGS: GlobalStateType = GlobalStateType::with(2103);
45pub const GS_ISSUED_SUPPLY: GlobalStateType = GlobalStateType::with(2010);
46pub const GS_MAX_SUPPLY: GlobalStateType = GlobalStateType::with(2011);
47pub const GS_NAME: GlobalStateType = GlobalStateType::with(3001);
48pub const GS_NOMINAL: GlobalStateType = GlobalStateType::with(2000);
49pub const GS_PRECISION: GlobalStateType = GlobalStateType::with(3005);
50pub const GS_TERMS: GlobalStateType = GlobalStateType::with(2001);
51pub const GS_TOKENS: GlobalStateType = GlobalStateType::with(2102);
52pub const GS_PUBKEY: GlobalStateType = GlobalStateType::with(3006);
53
54pub const OS_ASSET: AssignmentType = AssignmentType::with(4000);
55pub const OS_INFLATION: AssignmentType = AssignmentType::with(4010);
56pub const OS_REPLACE: AssignmentType = AssignmentType::with(4012);
57
58pub const TS_INFLATION: TransitionType = TransitionType::with(8000);
59pub const TS_BURN: TransitionType = TransitionType::with(8010);
60pub const TS_REPLACE: TransitionType = TransitionType::with(8011);
61pub const TS_TRANSFER: TransitionType = TransitionType::with(10000);
62
63pub const MS_ALLOWED_INFLATION: MetaType = MetaType::with(1000);
64
65pub const ERRNO_NON_EQUAL_IN_OUT: u8 = 0;
66pub const ERRNO_ISSUED_MISMATCH: u8 = 1;
67pub const ERRNO_NON_FRACTIONAL: u8 = 10;
68pub const ERRNO_MISSING_PUBKEY: u8 = 20;
69pub const ERRNO_INVALID_SIGNATURE: u8 = 21;
70pub const ERRNO_INFLATION_MISMATCH: u8 = 30;
71pub const ERRNO_INFLATION_EXCEEDS_ALLOWANCE: u8 = 31;
72pub const ERRNO_REPLACE_NO_INPUT: u8 = 35;
73pub const ERRNO_REPLACE_HIDDEN_BURN: u8 = 36;
74
75pub mod dumb {
76 use rgbstd::validation::{ResolveWitness, WitnessResolverError, WitnessStatus};
77 use rgbstd::{ChainNet, Txid};
78
79 pub struct NoResolver;
80
81 impl ResolveWitness for NoResolver {
82 fn resolve_witness(&self, _: Txid) -> Result<WitnessStatus, WitnessResolverError> {
83 unreachable!()
84 }
85
86 fn check_chain_net(&self, _: ChainNet) -> Result<(), WitnessResolverError> {
87 unreachable!()
88 }
89 }
90}