0.1.4Updated 6 months ago
declare namespace Ledger {
  interface Options<PEMC extends Entity.Meta.Config = Entity.Meta.Config> extends Entity.Options<PEMC> {
    /**
     * Should this ledger allow users to go into negative balances?
     * 
     * If this is false, `.AddEntry()` will *fail* when trying to subtract below a zero balance.
     * 
     * **Default**: `false`
     * */
    allow_negative_balances?: boolean
  
    /**
     * What is the maximum length a key value could be?
     * 
     * A *key* is used to identify ledger data based on a user. Usually the `msisdn`.
     * 
     * This is used when creating the ledger tables to improve performance.
     * 
     * **Default**: `11`
     */
    key_max_length?: number

    /**
     * Expiration options for a ledger instance
     */
    expiration?: Ledger.Expiration.Options
  
    /**
     * REST API options for a ledger instance
     */
    rest?: Ledger.RestOptions
  }
}