Sigil documentation
ReferenceRust referencesigil-sdk

sigil-sdk · mail

Source declarations, signatures and documentation for mail.

Source: sigil/node/sigil-sdk/src/mail.rs. SHA-256: 755d120a271ab72894f4d39d32daa9ad985a948ce4dc67a5e3af042ef3d1e5aa.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

mail::derive_mailbox_id

Build a deterministic mailbox id from the chain, subject DID, and blinded mailbox salt commitment.

pub fn derive_mailbox_id(
    chain_id: &str,
    subject_did: &str,
    mailbox_salt_commitment: &str,
) -> Result<String, SdkError>;

Source line: 22.

mail::allow_all_policy

Build the standard launch v1 allow-all receive policy.

pub fn allow_all_policy(
    chain_id: &str,
    mailbox_id: &str,
    version: u64,
    created_at_height: u64,
) -> Result<MailboxPolicyRecord, SdkError>;

Source line: 32.

mail::public_mail_key_record

Build an active public mail key record from a lowercase hex public key.

#[allow(clippy::too_many_arguments)]
pub fn public_mail_key_record(
    chain_id: &str,
    mailbox_id: &str,
    purpose: MailKeyPurpose,
    algorithm: &str,
    public_key_hex: &str,
    device_commitment: &str,
    version: u64,
    published_at_height: u64,
    expires_at_height: Option<u64>,
) -> Result<MailPublicKeyRecord, SdkError>;

Source line: 63.

mail::delivery_commitment

Build a content-blind delivery commitment. encrypted_weave_ref_commitment and ciphertext_content_hash must be 32-byte lowercase hex commitments, never plaintext paths or headers.

#[allow(clippy::too_many_arguments)]
pub fn delivery_commitment(
    chain_id: &str,
    sender_route: SenderRoute,
    recipient_mailbox_id: &str,
    encrypted_weave_ref_commitment: &str,
    ciphertext_content_hash: &str,
    recipient_key_id: &str,
    recipient_key_version: u64,
    policy_version: u64,
    client_nonce: &str,
    required_fee: u128,
    locked_stake: u128,
) -> Result<DeliveryCommitmentRecord, SdkError>;

Source line: 108.

mail::preflight_delivery_commitment

pub fn preflight_delivery_commitment(record: &DeliveryCommitmentRecord) -> Result<(), SdkError>;

Source line: 153.

mail::TransactionBuilder::mail_create_mailbox

Build MailCreateMailbox.

#[allow(clippy::too_many_arguments)]
pub fn mail_create_mailbox(
        self,
        mailbox_id: &str,
        subject_did: &str,
        controller_policy: ControlPolicy,
        wallet_address: Option<&str>,
        mailbox_salt_commitment: &str,
        mailbox_storage_commitment: Option<&str>,
        client_nonce: &str,
    ) -> Transaction;

Source line: 168.

mail::TransactionBuilder::mail_update_receive_policy

Build MailUpdateReceivePolicy.

pub fn mail_update_receive_policy(
        self,
        mailbox_id: &str,
        policy: MailboxPolicyRecord,
        expected_sequence: u64,
        client_nonce: &str,
    ) -> Transaction;

Source line: 190.

mail::TransactionBuilder::mail_publish_key

Build MailPublishKey.

pub fn mail_publish_key(
        self,
        mailbox_id: &str,
        key: MailPublicKeyRecord,
        expected_sequence: u64,
        client_nonce: &str,
    ) -> Transaction;

Source line: 208.

mail::TransactionBuilder::mail_publish_delivery_commitment

Build MailPublishDeliveryCommitment.

pub fn mail_publish_delivery_commitment(
        self,
        commitment: DeliveryCommitmentRecord,
        sender_signature_hex: Option<&str>,
        client_nonce: &str,
    ) -> Transaction;

Source line: 224.

mail::TransactionBuilder::mail_grant_permission

Build MailGrantPermission.

pub fn mail_grant_permission(
        self,
        grant: MailDelegationGrant,
        client_nonce: &str,
    ) -> Transaction;

Source line: 242.

On this page