Work in progress. Technology preview, even though partially used in production.
Universal cluster focused transaction engine concept implementation.
Documentation --> FutoIn Guide
Reference implementation of:
FTN19: FutoIn Interface - Transaction Engine
Version: 1.0
- Market cases (aka transaction domains):
- Deposits & Withdrawals
- Retail
- Payments
- Online Gaming
- Fee bound to transaction (both deducted & extra)
- Multi-currency
- ISO fiat currencies
- Crypto currency namespace
- Any custom currency namespace
- Advanced limits per transaction domain:
- Per-account statistics
- Daily, Weekly, Monthly limits for amounts & transaction count
- Overdraft for balance
- Dedicated "External" accounts for integration limits of third-party systems
- Clustering with protocol level interaction
- External Wallet (Seamless Wallet)
- DB-based event stream for reliable state distribution for ad-hoc systems
- MySQL
- PostgreSQL
- SQLite
- Potentially, any other SQL-compliant supported by
futoin-database
Please DO NOT use it unless you really understand what it is. The package is published as essential open source part of derived custom closed source projects of different vendors.
Command line:
$ yarn add futoin-xferengine
or
$ npm install futoin-xferengine --save
More detailed concept is in the FTN19 spec.
The concept is described in FutoIn specification: FTN19: FutoIn Interface - Transaction Engine v1.x
- AccountsFace
Accounts Face
- AccountsService
Accounts Service
- BaseFace
Base Face with neutral common registration functionality
- BaseService
Base Service with common registration logic
- BonusFace
Bonus Face
- BonusService
Bonus Service
- CachedAccountsFace
Efficient cached AccountsFace with event-based cache invalidation
Keeps local cache of limits and invalidates based on LIVE events.
- CachedLimitsFace
Efficient cached LimitsFace with event-based cache invalidation
Keeps local cache of limits and invalidates based on LIVE events.
- DepositFace
Deposits Face
- DepositService
Deposits Service
- DepositTools
XferTools with focus on Deposits use case
- GamingFace
Gaming Face
- GamingService
Gaming Service
- GamingTools
XferTools with focus on Gaming use case
- GenericFace
Generic Face
- GenericService
Generic Service
- LimitsFace
Limits Face
- LimitsService
Limits Service
- MessageFace
Message Face
- MessageService
Message Service
- MessageTools
XferTools with focus on Message processing
- PaymentFace
Payments Face
- PaymentService
Payments Service
- PaymentTools
XferTools with focus on Payments use case
- PeerFace
Peer Face
- PeerService
Peer Service
- RetailFace
Payments Face
- RetailService
Retail Service
- RetailTools
XferTools with focus on Retail use case
- UUIDTool
Extended UUIDTool with focus on collision safety in whole history of particular instance.
- WithdrawFace
Witdrawals Face
- WithdrawService
Withdrawals Service
- XferCCM
Special CCM implementation for XferCore
- CurrencyCacheInfoFace
An efficient version of Currency/InfoFace.
Keeps local cache of currencies and exchange rates. Listens on related event stream for changes as LIVE component.
- CurrencyInfoFace
Currency Information Face
- CurrencyInfoService
Currency Manage Service
- CurrencyManageFace
Currency Management Face
- CurrencyManageService
Currency Manage Service
Accounts Face
Accounts Service
Base Face with neutral common registration functionality
Kind: global class
Note: Not official API
Latest supported FTN17 version
Kind: static property of BaseFace
Latest supported FTN4 version
Kind: static property of BaseFace
CCM registration helper
Kind: static method of BaseFace
Param | Type | Default | Description |
---|---|---|---|
as | AsyncSteps |
steps interface | |
ccm | AdvancedCCM |
CCM instance | |
name | string |
CCM registration name | |
endpoint | * |
see AdvancedCCM#register | |
[credentials] | * |
|
see AdvancedCCM#register |
[options] | object |
{} |
interface options |
[options.version] | string |
"1.0" |
interface version to use |
Base Service with common registration logic
Kind: global class
- BaseService
- instance
- ._checkType(type, val) ⇒
boolean
- ._checkType(type, val) ⇒
- static
- instance
Check value against type in spec of implemented interface
Kind: instance method of BaseService
Returns: boolean
- result of check
Param | Type | Description |
---|---|---|
type | string |
name of defined type |
val | * |
value to check |
BaseService.register(as, executor, options) ⇒ LimitsService
Register futoin.xfers.limits interface with Executor
Kind: static method of BaseService
Returns: LimitsService
- instance
Param | Type | Description |
---|---|---|
as | AsyncSteps |
steps interface |
executor | Executor |
executor instance |
options | object |
implementation defined options |
Bonus Face
Bonus Service
Efficient cached AccountsFace with event-based cache invalidation
Keeps local cache of limits and invalidates based on LIVE events.
CCM registration helper
Kind: static method of CachedAccountsFace
Param | Type | Default | Description |
---|---|---|---|
as | AsyncSteps |
steps interface | |
ccm | AdvancedCCM |
CCM instance | |
name | string |
CCM registration name | |
endpoint | * |
see AdvancedCCM#register | |
[credentials] | * |
|
see AdvancedCCM#register |
[options] | object |
{} |
interface options |
[options.version] | string |
"<latest>" |
interface version to use |
Efficient cached LimitsFace with event-based cache invalidation
Keeps local cache of limits and invalidates based on LIVE events.
CCM registration helper
Kind: static method of CachedLimitsFace
Param | Type | Default | Description |
---|---|---|---|
as | AsyncSteps |
steps interface | |
ccm | AdvancedCCM |
CCM instance | |
name | string |
CCM registration name | |
endpoint | * |
see AdvancedCCM#register | |
[credentials] | * |
|
see AdvancedCCM#register |
[options] | object |
{} |
interface options |
[options.version] | string |
"<latest>" |
interface version to use |
Deposits Face
Deposits Service
XferTools with focus on Deposits use case
Gaming Face
Gaming Service
XferTools with focus on Gaming use case
Generic Face
Generic Service
Limits Face
Limits Service
Message Face
Message Service
XferTools with focus on Message processing
Payments Face
Payments Service
XferTools with focus on Payments use case
Peer Face
Peer Service
Payments Face
Retail Service
XferTools with focus on Retail use case
Extended UUIDTool with focus on collision safety in whole history of particular instance.
Kind: global class
- UUIDTool
- .addXfer(xfer, val)
- .genXfer(xfer) ⇒
string
Call on xfer to ensure whole history uniqueness (just in case)
Kind: static method of UUIDTool
Param | Type | Description |
---|---|---|
xfer | XferBuilder |
xfer builder object |
val | string |
UUID in Base64 format without padding |
Generate UUID v4 in scope of transaction
Kind: static method of UUIDTool
Returns: string
- UUID encoded in Base64 without padding
Param | Type | Description |
---|---|---|
xfer | XferBuilder |
xfer builder object |
Witdrawals Face
Withdrawals Service
Special CCM implementation for XferCore
Kind: global class
Register all services required for operation
Kind: instance method of XferCCM
Param | Type | Description |
---|---|---|
as | AsyncSteps |
async step interface |
executor | Executor |
internal protected executor |
Register event services required for operation
Kind: instance method of XferCCM
Param | Type | Description |
---|---|---|
as | AsyncSteps |
async step interface |
executor | Executor |
internal protected executor |
Register currency services required for operation
Kind: instance method of XferCCM
Param | Type | Description |
---|---|---|
as | AsyncSteps |
async step interface |
executor | Executor |
internal protected executor |
Register limit services required for operation
Kind: instance method of XferCCM
Param | Type | Description |
---|---|---|
as | AsyncSteps |
async step interface |
executor | Executor |
internal protected executor |
Register account services required for operation
Kind: instance method of XferCCM
Param | Type | Description |
---|---|---|
as | AsyncSteps |
async step interface |
executor | Executor |
internal protected executor |
Get manual alias for specific iface & key combination
Kind: instance method of XferCCM
Returns: string
- - manual key to be used with registerOnDemand()
Param | Type | Description |
---|---|---|
iface | string |
interface identifier |
key | string |
arbitrary key, typically account # |
Register callback for on-demand interface creation
Kind: instance method of XferCCM
Param | Type | Description |
---|---|---|
iface | string |
full iface identifier |
flavour | string |
a type of interface implementation |
callback | callable |
callback to register interface |
Get interface with on-demand logic
Kind: instance method of XferCCM
Param | Type | Description |
---|---|---|
as | AsyncSteps |
async step interface |
iface | string |
full iface identifier |
account | string |
related account ID |
An efficient version of Currency/InfoFace.
Keeps local cache of currencies and exchange rates. Listens on related event stream for changes as LIVE component.
CCM registration helper
Kind: static method of CurrencyCacheInfoFace
Param | Type | Default | Description |
---|---|---|---|
as | AsyncSteps |
steps interface | |
ccm | AdvancedCCM |
CCM instance | |
name | string |
CCM registration name | |
endpoint | * |
see AdvancedCCM#register | |
[credentials] | * |
|
see AdvancedCCM#register |
[options] | object |
{} |
interface options |
[options.version] | string |
"<latest>" |
interface version to use |
Currency Information Face
Currency Manage Service
Currency Management Face
Currency Manage Service
Kind: global class
documented by jsdoc-to-markdown.