T3 // Underworld & Cyber

coe_crypto

Noxcoin — Cryptocurrency

Private-key wallets, public ledger, exchange and mining

HEADLESS SERVICE (NO UI)
DEPENDS ON coe_corecoe_databasecoe_logging
coe_crypto 18 exports · 0 commands

Runs without a NUI: nothing is rendered on the client and the resource stays idle until events arrive.

01 // OVERVIEW

The in-game cryptocurrency (Noxcoin, NOX): wallets with a public address and private key, a network with transfers and fees, an exchange with a floating price and mining. It is the DeepWeb currency: market, services and contracts are paid in it, with escrow for the Deep Market. The key can be written on paper, saved to a USB drive or imported.

On FiveM Enhanced

The server stores only the key hash: whoever holds the key moves the funds, and losing the key means losing the wallet.

02 // FEATURES

What the module delivers

01

Private Key

Wallets moved by whoever holds the key.

02

Exchange

Buy and sell with spread and floating price.

03

Mining

Round-based issuance with a configurable cap.

04

Escrow

Custody for the DeepWeb market.

ARCHITECTURAL LAYERS // CLEAN ARCHITECTURE

4-Layer Isolation with 0.00 ms Idle

Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:

L4
Headless Operation (No UI)
Zero DOM · CoE UI Delegation
Headless
L3
Application & Server
Atomic locks · Rate limiting
Auth Server
L2
Platform & HAL
Core.Platform · Mock natives
Gen9 HAL
L1
Domain & ACID Database
Prepared SQL · MariaDB pool
ACID Pool
LAYER 04 // HEADLESS SERVICE

Headless Service (No Dedicated NUI)

Operates strictly within layers L1–L3 (domain, HAL, and server-authoritative application logic). Visual interactions and management flows are delegated to centralized ecosystem apps (coe_ui / coe_tablet), guaranteeing 0.00 ms idle client overhead in FiveM DX12.

Zero CEF graphic overhead: no background web pages or NUI bridges loaded
Typed public contracts (types.lua) consumed directly by external resources and UIs
Strict adherence to the Server-Authoritative model with zero direct DOM manipulation
ADMIN POWERS // OPERATION & MANAGEMENT

What this script delivers to Server Owners

Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:

🛡️
ACE Permissions
Administrative operations strictly protected by coe.staff and coe.admin principals.
IsPlayerAceAllowed(src, "coe.admin")
📊
Ledger Auditing
Relevant actions write audit records to the database through coe_audit.
exports.coe_audit:Record(severity, category, event, context)
⚡
0.00ms Idle Telemetry
Event-driven thread dispatch that stays dormant until network events fire.
Clean Architecture & HAL
03 // EXPORTS

Public API 18

Typed contracts to call from other resources. Full types live in types.lua and in the docs reference.

exports['coe_crypto']:IsReady() → boolean

Returns whether the network is ready (migrations, exchange reserve, and price feed loaded).

No parameters.

LUA
local result = exports['coe_crypto']:IsReady()
exports['coe_crypto']:Price() → integer

Returns the exchange's current price in dollars per whole coin.

No parameters.

LUA
local result = exports['coe_crypto']:Price()
exports['coe_crypto']:Balance(address) → integer|nil

Returns the balance for an address. Read access is unrestricted.

ParameterType
addressstring
LUA
local result = exports['coe_crypto']:Balance(address)
exports['coe_crypto']:IsAddress(address) → boolean

Checks whether the address format is valid; it does not check whether the address exists.

ParameterType
addressstring
LUA
local result = exports['coe_crypto']:IsAddress(address)
exports['coe_crypto']:Format(units) → string

Formats units with the currency symbol (for example, 1.5000 NOX).

ParameterType
unitsinteger
LUA
local result = exports['coe_crypto']:Format(units)
exports['coe_crypto']:MintMining(entries) → CoeCryptoMintResult

Issues one mining round. Restricted to Mining.Callers, at most once per Mining.TickMinutes.

ParameterType
entries{
LUA
local result = exports['coe_crypto']:MintMining(entries)
exports['coe_crypto']:ComputerCall(playerId, deviceKey, action, payload) → table

Handles the Crypto app on a coe_deepweb computer. Restricted to ComputerHosts; deviceKey is the device key (laptop:<serial>, etc.).

ParameterType
playerIdinteger
deviceKeystring
actionstring
payloadtable|nil
LUA
local result = exports['coe_crypto']:ComputerCall(playerId, deviceKey, action, payload)
exports['coe_crypto']:HeldWallets(playerId, deviceKey) → table|nil

Returns wallets whose keys are available on deviceKey and in the character's inventory, including balances. Restricted to Escrow.Callers.

ParameterType
playerIdinteger
deviceKeystring
LUA
local result = exports['coe_crypto']:HeldWallets(playerId, deviceKey)
exports['coe_crypto']:EscrowLock(playerId, deviceKey, from, amount, memo) → table

Locks amount plus the network fee from wallet from in marketplace escrow. The key must be available. Restricted to Escrow.Callers.

ParameterType
playerIdinteger
deviceKeystring
fromstring
amountinteger
memostring|nil
LUA
local result = exports['coe_crypto']:EscrowLock(playerId, deviceKey, from, amount, memo)
exports['coe_crypto']:EscrowRelease(to, amount, memo) → table

Releases amount from escrow to to without a network fee. Restricted to Escrow.Callers.

ParameterType
tostring
amountinteger
memostring|nil
LUA
local result = exports['coe_crypto']:EscrowRelease(to, amount, memo)
exports['coe_crypto']:ReserveAddress() → string

Returns the exchange reserve address (receives marketplace fees and payments to NPC vendors).

No parameters.

LUA
local result = exports['coe_crypto']:ReserveAddress()
exports['coe_crypto']:AdminOverview() → table

Admin overview of settings, live price, network summary, top wallets, and recent transactions. Restricted to coe_admin.

No parameters.

LUA
local result = exports['coe_crypto']:AdminOverview()
exports['coe_crypto']:AdminInspect(address) → table

Inspects a wallet by address (balance, creator, devices holding its key, and transaction history). Restricted to coe_admin.

ParameterType
addressstring
LUA
local result = exports['coe_crypto']:AdminInspect(address)
exports['coe_crypto']:AdminSaveSettings(raw) → boolean|table

Validates, persists, and applies editable coe_crypto settings in memory. Restricted to coe_admin.

ParameterType
rawtable
LUA
local result = exports['coe_crypto']:AdminSaveSettings(raw)
exports['coe_crypto']:AdminResetSettings() → boolean|table

Restores the settings from config.lua to their defaults. Restricted to coe_admin.

No parameters.

LUA
local result = exports['coe_crypto']:AdminResetSettings()
exports['coe_crypto']:AdminSetPrice(price) → boolean|table

Immediately sets the exchange price in dollars per whole coin. Restricted to coe_admin.

ParameterType
priceinteger
LUA
local result = exports['coe_crypto']:AdminSetPrice(price)
exports['coe_crypto']:TabletVisible(playerId, appId) → boolean

Controls whether the Crypto app is visible on the tablet after it has been installed.

ParameterType
playerIdinteger
appIdstring
LUA
local result = exports['coe_crypto']:TabletVisible(playerId, appId)
exports['coe_crypto']:TabletCall(playerId, appId, action, payload) → table

Handles actions for the Crypto app on the tablet.

ParameterType
playerIdinteger
appIdstring
actionstring
payloadtable|nil
LUA
local result = exports['coe_crypto']:TabletCall(playerId, appId, action, payload)
04 // COMMANDS

In-game commands 0

This module registers no commands: it is driven by exports and events.