impl NotaFileClient {
pub fn create(&self, options: CreateNotaOptions) -> Result<NotaBuilder, SdkError>;
pub fn parse(&self, content: &str) -> Result<NotaFile, SdkError>;
pub fn validate(&self, nota: &NotaFile) -> Result<(), SdkError>;
pub fn is_valid(&self, nota: &NotaFile) -> bool;
pub fn serialize(&self, nota: &NotaFile) -> Result<String, SdkError>;
}
impl NotaBuilder {
pub fn sign(self, private_key_hex: &str) -> Result<Self, SdkError>;
pub fn validate(self) -> Result<Self, SdkError>;
pub fn serialize(&self) -> Result<String, SdkError>;
pub fn build(self) -> NotaFile;
}
pub struct CreateNotaOptions {
pub type_: String, // `type` is reserved in Rust; field is `type_`
pub chain_name: String,
pub chain_id: u64,
pub network: Option<String>,
pub identifier: String,
pub name: Option<String>,
pub alias: Option<String>,
pub description: Option<String>,
pub resource_metadata: Option<serde_json::Value>,
pub issuer_name: Option<String>,
pub issuer_entity_type: Option<String>,
}
impl CreateNotaOptions {
pub fn new(
type_: impl Into<String>,
chain_name: impl Into<String>,
chain_id: u64,
identifier: impl Into<String>,
) -> Self;
}