Welcome to the new Provenance Blockchain developer documentation portal!
logo

Purpose

The Ledger module provides a comprehensive financial tracking system for NFTs, allowing for detailed accounting of transactions, disbursements, payments, and fees associated with NFT ownership. It maintains a chronological record of all financial activities and their impact on principal, interest, and other balances.

How It Works

  • Ledger Classes: Define configuration for specific classes of assets
  • Ledgers: Track financial activities for specific NFTs or scopes
  • Ledger Entries: Represent individual financial transactions or activities
  • Balance Buckets: Maintain balances in different categories (Principal, Interest, Other)
  • Entry Types: Support various transaction types (Disbursements, Payments, Fees, etc.)

Key Messages/Actions

MsgCreateLedgerClass

Creates a new ledger class configuration.
protobuf
message MsgCreateLedgerClass { LedgerClass ledger_class = 1; string authority = 2; }

MsgCreateLedger

Creates a new ledger for an asset.
protobuf
message MsgCreateLedger { Ledger ledger = 1; string authority = 2; }

MsgAppendLedgerEntry

Adds one or more new entries to an existing ledger.
protobuf
message MsgAppendLedgerEntry { string nft_id = 1; string asset_class_id = 2; repeated LedgerEntry entries = 3; string authority = 4; }

MsgDestroyLedger

Removes a ledger and all associated data.
protobuf
message MsgDestroyLedger { string nft_id = 1; string asset_class_id = 2; string authority = 3; }