|
opensc
NPCI secure-component & UPI Lite / Lite X wallet reimplementation
|
The online UPI Lite wallet: onboard, isBound, balance, sync, spend, unbind. More...

Go to the source code of this file.
Data Structures | |
| struct | lite_bind_info |
| Result of lite_is_bound(). More... | |
| struct | lite_balance_info |
| Result of lite_balance(). More... | |
| struct | lite_txn |
| A spend request. All fields are caller-owned strings. More... | |
Enumerations | |
| enum | { LITE_BIND_NO = 0 , LITE_BIND_YES = 1 } |
| Binding status returned by lite_is_bound(). More... | |
| enum | { LITE_SYNC_OK = 0 , LITE_SYNC_BAD_SIG = -10 , LITE_SYNC_STALE = -11 , LITE_SYNC_DEACTIVATED = -12 , LITE_SPEND_SYNC_REQUIRED = -20 , LITE_SPEND_DECLINED = -21 } |
| sync()/spend() result codes. More... | |
Functions | |
| int | lite_onboard (lite_env *env, const char *alias, const char *signed_state_json) |
| Establishes vault + spend key + session key, then applies the first signed state blob. LITE_SYNC_* code. | |
| int | lite_is_bound (lite_env *env, const char *alias, lite_bind_info *out) |
Reports binding status into out. Returns LITE_BIND_YES or LITE_BIND_NO. | |
| int | lite_balance (lite_env *env, const char *alias, lite_balance_info *out) |
Computes spendable/non-spendable balance and pending count into out. LITE_OK or LITE_ERR. | |
| int | lite_sync (lite_env *env, const char *alias, const char *signed_state_json) |
| Applies a signed state blob: verify, require a newer timestamp, replace state, clear PendingTxn. LITE_SYNC_* code. | |
| int | lite_spend (lite_env *env, const char *alias, const lite_txn *txn, int is_credit, char *out, size_t cap) |
Signs a spend, writing {"riskParams":..,"signature":..} JSON to out. Enforces the PendingTxn gate. LITE_OK/LITE_SPEND_*. | |
| int | lite_unbind (lite_env *env, const char *alias) |
| Removes the device binding: deletes the alias keys and clears the vault record. LITE_OK. | |
The online UPI Lite wallet: onboard, isBound, balance, sync, spend, unbind.
| anonymous enum |
Binding status returned by lite_is_bound().
| Enumerator | |
|---|---|
| LITE_BIND_NO | Not bound. |
| LITE_BIND_YES | Bound. |
| anonymous enum |
sync()/spend() result codes.