API Reference
v3
Onli Cloud

Onli Cloud API

Onli_Cloud provides the compute, storage, networking, database, and platform services you need to interact with Owners on the Onli_One Network. Onli Cloud Services is a functions-as-a-service platform that, upon an authenticated request, creates Owners (Onli_ID), ask owners to move assets (AskToMove), host the master Oracle and hosts Treasury Vault were Assets are held for issuance to Owners (Issue). Onli_Cloud Services also executes requests (changeOwner) by Owners in an enclave, a secure environment

Onli.Cloud processes these requests.

Issue

Issue appliance assets from the Treasury Vault to any member of your Appliance. Issuance incurs a one time Issuance fee of $0.05 USD per asset. The issuance fee is billed to the Issuer Account.

Request

AttributeDescription
toonli_you_id of the receiver of issuance
app_symbolName of appliance making request
app_keyOnli Cloud API Key
amountAmount of appliance assets to issue from Treasury Vault Inventory

Response

AttributeDescription
issue_idTransaction id for onli cloud on the treasury vault
toonli_you_id of the receiver of issuance
amountAmount of appliance assets to issue from Treasury Vault Inventory
issued_atTime treasury vault shipped assets
owner_changed_atTime transfer agent changed ownership of assets
delivered_atTime assets were delivered to owners vault

Example

Request - Issue
{
    "to": "usr-xxx",
    "app_symbol": "ENGMA",
    "app_key": "app-key-code",
    "amount": 10000000
} 
Response Issue
{
    "issue_id": "issue-0b93e02b-f50c-42fc-915e-cf4f5d046700",
    "to": "usr-9c809d42-a804-4d96-addc-d3d9545d557f",
    "amount": 10000000,
    "issued_at": "1680648682",
    "owner_changed_at": "1680648682",
    "delivered_at": "1680648682"
}

Context

MethodIssue
ObjectiveIssue appliance assets to a specified owner.
Requirementsto app_symbol app_key amount
APITreasury API

Treasurers can approve Appliance Developers app_key for remote issuances from a backend server or manually issue from their Onli_Cloud RMS app.

ChangeOwner

ChangeOwner is an authenticated request to change the Owner of Onli. ChangeOwner results in Genome Editing.

Request

AttributeDescription
fromonli_you_id of the sender of assets
toonli_you_id of the receiver of assets
ask_to_move_idId of owner authorized ask to move request
app_symbolName of appliance making request
app_keyOnli Cloud API Key
amountAmount of appliance assets to transfer

Response

AttributeDescription
change_order_idTransaction id for onli cloud request
change_idTransaction id from transfer agent
fromonli_you_id of the sender of assets
toonli_you_id of the receiver of assets
amountAmount of appliance assets to transfer
received_atTime Onli Cloud received request
owner_changed_atTime transfer agent changed ownership of assets
delivered_atTime assets were delivered to owners vault

Example

Request - ChangeOwner
{
    "from": "usr-xxx",
    "to": "usr-xxx",
    "ask_to_move_id": "ask-xxx",
    "app_symbol": "ENGMA",
    "app_key": "app-key-code",
    "amount": 1000000
}
Response - ChangeOwner
{
    "change_order_id": "change-order-f162b5c2-8338-4324-b325-d259ffab3d43",
    "change_id": "change-fb607b2b-3854-4c4f-b2ab-1428eee99019",
    "from": "usr-fe6d806f-3670-45f2-9f8e-e6f3f5250e1b",
    "to": "usr-bf63c21f-adce-424d-9a97-7f1980fdc6d9",
    "amount": 1000000,
    "received_at": "1680649468",
    "owner_changed_at": "1680649468",
    "delivered_at": "1680649468"
}

Context

MethodChangeOwner
ObjectiveChange ownership of onli from one owner to another or others.
Requirementsfrom to ask_to_move_id app_symbol app_key amount
APIOnli Cloud API

AskToMove, which will temporarily place the owners assets in an appliance settlement locker. ChangeOwner will not execute unless the amount specified and owner match the authorization of AskToMove.

ChangeOwners

ChangeOwners is an authenticated request to the Transfer Agent service of Onli_One to change the Owner of an Onli based Asset to a list of specified owners. Only Assets in a settlement locker can be accessed by the Transfer Agent. This results in genome editing. Genome editing can only be executed by the Transfer Agent inside the secure execution environment of Onli_One. The request to change an owner while it is a request from an Appliance, this request must be authorized by an Owner. To obtain this authorization, an AskToMove is a requirement.

Request

AttributeDescription
fromonli_you_id of the sender of assets
sum_ofArray of asset receivers user ids and amounts of assets to each
toonli_you_id of the receiver of assets
ask_to_move_idId of owner authorized ask to move request
app_symbolName of appliance making request
app_keyOnli Cloud API Key
amountAmount of appliance assets to issue from Treasury Vault Inventory

Response

AttributeDescription
change_order_idTransaction id for onli cloud request
change_owner_receiptsArray of receivers receipts
change_idTransaction id from transfer agent
fromonli_you_id of the sender of assets
toonli_you_id of the receiver of assets
amountAmount of appliance assets to transfer
received_atTime Onli Cloud received request
owner_changed_atTime transfer agent changed ownership of assets
delivered_atTime assets were delivered to owners vault

Example

Request - ChangeOwners
{
    "from": "usr-xxx",
    "sum_of": [
        {"to": "usr-xxx", "amount": 250000},
        {"to": "usr-xxx", "amount": 250000},
        {"to": "usr-xxx", "amount": 500000}],
    "ask_to_move_id": "ask-uuid-xxx",
    "app_symbol": "ENGMA",
    "app_key": "app-key-code",
    "amount": 1000000
}
Response - ChangeOwners
{
    "change_order_id": "change-order-b724d7ca-5d2f-42d0-babe-973adeb38780",
    "change_owner_receipts": [
        {
            "change_id": "change-9b8849cb-96f2-459e-a88a-a19512f2081c",
            "to": "usr-52dd6fb0-b0c8-42b9-9141-b78b6bddeec4",
            "amount": 250000,
            "received_at": "1681343310",
            "owner_changed_at": "1681343310",
            "delivered_at": "1681343310"
        },
        {
            "change_id": "change-id-ff411d80-a74e-42bb-a3f8-6c71f589d9e7",
            "to": "usr-9d9e719d-2322-4da1-9226-3c64f642cc6d",
            "amount": 250000,
            "received_at": "1681343310",
            "owner_changed_at": "1681343310",
            "delivered_at": "1681343310"
        },
        {
            "change_id": "change-id-bceb0411-396f-4298-abcb-b2d9d55b7802",
            "to": "usr-e5c609dd-b02d-42ca-9b7c-065c0ccf5d12",
            "amount": 500000,
            "received_at": "1681343310",
            "owner_changed_at": "1681343310",
            "delivered_at": "1681343310"
        }
    ]
}

Context

MethodChangeOwners
ObjectiveChange ownership of onli from one owner to a list of specified owners.
Requirementsfrom sum_of ask_to_move_id app_symbol app_key amount
APIOnli Cloud API

Change Owners requires the Request amount to equal the sum of the amounts listed in sum_of.

AskToMove

Only an Owner can move an issued Asset. AskToMove is an authenticated request from an Appliance to an asset Owner to move a specified amount of Assets from an Onli_You vault to an appliance settlement locker for the purposes of settlement. Assets that remain in a settlement locker and have not changed ownership in a discrete time window will automatically be returned to the original owners cloud vault.

Request

AttributeDescription
toonli_you_id of user for AskToMove
app_symbolName of appliance making request
app_keyOnli Cloud API Key
noteContains behavior check and body, personalized text for owner
note.behaviorbehavior askToMove is used for
note.bodymessage for owner
amountamount of assets requested to move
add_settle_timetime, in hourrs, to add to default time

Response

AttributeDescription
ask_to_move_idtransaction id from Onli Cloud for ask to move
toonli_you_id of the receiver of assets
amountAmount of appliance assets authorized to transfer
asset_balanceNet asset balance of owners connected vaults
notified_atTime owner was notified of request
statusStatus of askToMove authorization
expires_atTime askToMove authorization expires
behavior_statusCapabilities check: is user capable of executing behavior?
authorization_statusOwners response to askToMove request
auth_log_idTransaction id from security for auth event

Example

Request - AskToMove
{
    "to": "usr-xxx",
    "app_symbol": "ENGMA",
    "app_key": "app-key-code",
    "note": {
        "behavior": "sell",
        "body": "Confirm move of 100M Enigma to Settlement."
    },
    "amount": 100000000,
    "add_settle_time": 12
}
Response - AskToMove
{
    "ask_to_move_id": "ask-to-move-f591dd6a-992f-4b5a-8a2d-db7c1711ecfb",
    "to": "usr-c7ac8908-1fd0-4f58-b820-96fd4d62237a",
    "amount": 100000000,
    "asset_balance": 250000000,
    "notified_at": "1680650273",
    "status": "open",
    "expires_at": "1680650273",
    "behavior_status": true,
    "authorization_status": true,
    "auth_log_id": "auth-log-266bf3fc-e6ef-4f45-b1ff-41e4deec3719"
}

Context

MethodAskToMove
ObjectiveAsk Owner to move their assets to an appliance settlement locker.
Requirementsto ask_to_move_id app_symbol app_key note.behavior note.body amount
APIOwners API

AskToMove response times will depend on the Owners authorization. Thus it is critical for Developers to account for the handling of a pending or notified status for this request; before the Owner will accept or deny authorization.