4Mica Rust SDK Documentation

In-depth documentation for the official Rust SDK powering secure, cryptographically-guaranteed tab-based payments on the 4Mica network.

Contents

Overview

Imagine walking into your neighborhood bar on a busy Friday. Instead of paying for each drink, you open a tab, keep enjoying the night, and the bartender quietly records every round you order. There's mutual trust: you promise to settle up before you leave, and the bar keeps serving without friction.

4Mica establishes trust in payment systems by enabling cryptographically enforced, on-chain lines of credit. Each payment request generates a cryptographic guarantee that collateral is securely locked and available—ensuring recipients can trust that funds will be delivered once the credit line (or “tab”) is settled. The Rust SDK provides both parties with a type-safe toolkit to manage these guarantees, including signature handling, settlements, and seamless contract interactions with the Core4Mica protocol.

Key Capabilities

User Client

Deposit collateral, sign guarantees, settle tabs, and manage withdrawals.

Recipient Client

Open tabs, issue payment guarantees, and claim remuneration when settlements fail.

Typed Errors

Strongly typed errors with detailed context for every contract-facing operation.

Built-in Signing

First-class EIP-712 and EIP-191 signing utilities with automatic address validation.

Type-Safe Contracts

Comprehensive Rust types wrap all Core4Mica contract interactions.

Secure Defaults

Non-custodial design with configurable grace periods and tab expiration enforced on-chain.