Back to Home
v4.0.1-beta

Nodency Developer Docs

Welcome to the technical documentation for the Nodency Universal Trust Protocol. Nodency is a decentralized financial operating system designed for emerging markets, featuring a Zero-Gas architecture and Offline-First capabilities.

Quick Start

Clone the repo to start a local dev environment.

git clone https://github.com/Nodency/core-protocol.git

1. System Architecture

The system follows a "Thick Client, Thin Server" architecture. The Mobile App acts as a Light Node (holding the ledger state), while the Server acts as a Router/Gatekeeper.

Mobile Client

  • React Native: UI & Logic
  • SQLite (WatermelonDB): Local Ledger Storage
  • Secure Enclave: Private Key Management

Gatekeeper Server

  • Node.js: API & Relayer
  • Redis: Geo-Spatial Indexing
  • PostgreSQL: Transaction Indexing

2. Local Light Chain ("My Chain")

Every user maintains their own personal blockchain locally. This allows for instant, offline transaction creation.

Local Block Structure

{
                        "localHeight": 42,
                        "previousLocalHash": "0x5A6B...D2F", // Links to previous block
                        "transactionType": "P2P_TRANSFER",
                        "dataPayload": {
                            "recipientDID": "did:kash:alice.w.5678",
                            "amount": "500.00",
                            "kCode": "K-9R4X-MP2P"
                        },
                        "signature": "0x5C6D...342F", // Biometric Signature
                        "isSyncedGlobal": false
                        }

3. Global Ledger (Finality)

The Validator Nodes maintain the canonical state of the network. The data stored here is optimized for size and verification speed.

Final Transaction Record

{
                        "txIdHash": "0x5C6D...342F",
                        "senderDID": "did:kash:alice.w.5678",
                        "recipientDID": "did:kash:bob.m.7654",
                        "amount": 500000000, // In base units (cents)
                        "currency": "0x634B4553", // Hex for c ( STABLECOINS )
                        "protocolFlow": 1, // 1=P2P
                        "timestamp": 1732049200
                        }

4. Synchronization Protocol

The Light Client syncs with the Global Ledger using a Validation-by-Verification model. It does not download the whole chain, only the proofs relevant to itself.

1

Local Broadcast (Push)

App sends signed local block to Gatekeeper: POST /api/v1/tx/submit

2

Mining & Validation

Validator nodes verify signature, check double-spend, and include tx in a Global Block.

3

Merkle Proof (Pull)

App downloads the Inclusion Proof and marks the local block as Synced.

5. Gatekeeper API Reference

POST /api/v1/tx/submit

Broadcast a signed local transaction block to the network.

{
                                    "rawTx": "0xf8...", // RLP encoded transaction
                                    "signature": "0x5c..."
                                    }
POST /api/v1/match/find

Find nearby K-Nodes (Agents) with sufficient float.

{
                                    "lat": -1.2921,
                                    "long": 36.8219,
                                    "amount": 1000
                                    }