UNPKG

@casual-simulation/aux-common

Version:
82 lines 1.99 kB
/** * Represents the balance of a financial account. */ export declare class AccountBalance { /** * The ID of the account. */ accountId: string; /** * The number of credits to the account. */ credits: bigint; /** * The number of pending credits to the account. */ pendingCredits: bigint; /** * The number of debits to the account. */ debits: bigint; /** * The number of pending debits to the account. */ pendingDebits: bigint; /** * The factor that should be used to convert between credits and USD. */ displayFactor: bigint; /** * The currency that the account is in. */ currency: string; constructor(data: { accountId: string; credits: bigint | string; pendingCredits: bigint | string; debits: bigint | string; pendingDebits: bigint | string; displayFactor: bigint | string; currency: string; }); /** * Gets the amount of credit that can be used for new transfers. * @returns `credits - (debits + pendingDebits)` */ freeCreditBalance(): bigint; toJSON(): JSONAccountBalance; } /** * Represents the balance of a financial account in a JSON-compatible format. */ export interface JSONAccountBalance { /** * The ID of the account. */ accountId: string; /** * The number of credits to the account. */ credits: string; /** * The number of pending credits to the account. */ pendingCredits: string; /** * The number of debits to the account. */ debits: string; /** * The number of pending debits to the account. */ pendingDebits: string; /** * The factor that should be used to convert between credits and USD. */ displayFactor: string; /** * The currency that the account is in. */ currency: string; } //# sourceMappingURL=AccountBalance.d.ts.map