There are two different types of transactions possible, company to user and user initiated. The latter must be signed by the users private keys on their mobile device.
|company-to-user||Client company to end-user|
Our Server Side SDKs (available in PHP, Ruby, Node.js, Java). facilitate company-to-user transactions
|user initiated||End-user to another user OR end-user to the client company |
Our Mobile Wallet SDKs (available in Android, iOS, React Native) facilitate user initiated transactions. The mobile wallet is used to sign transactions.
Each transaction is defined by a Rules contract. OST provides two Rules contracts out of the box:
directTransfer: Transfer Tokens
pay: Transfer fiat value
If a client company wants to transfer tokens worth USD5 to a user the following sequence of events occur:
- Company's TokenHolder contract initiates “execute pricer rule” request to client company's PricerRule contract.
- The TokenHolder contract also approves company's TokenRules contract to spend tokens on its behalf.
- Company's PricerRule contract applies “conversion from USD to tokens rules”. The PricerRule contract will pass all this information after applying rules to the TokenRules contract.
- The TokenRules contract executes the transfer between all concerned parties as specified by the company's PricerRule contract.