Alzymologist / Kalatori-backend

Kalatori daemon to handle chain-to-webstore interaction
GNU General Public License v3.0
0 stars 6 forks source link

Finalize order response to be according to API specs #55

Open Vovke opened 3 weeks ago

Vovke commented 3 weeks ago

API specs

{
  "order": "123456",
  "payment_status": "pending",
  "withdrawal_status": "waiting",
  "payment_account": "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3",
  "amount": 1.5,
  "currency": {
    "currency": "DOT",
    "chain_name": "polkadot",
    "kind": "native",
    "decimals": 10,
    "rpc_url": "wss://rpc.polkadot.io"
  },
  "callback": "http://localhost:3000/api/kalatori/orders",
  "recipient": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5",
  "transactions": [
    {
      "block_number": 123456,
      "position_in_block": 1,
      "timestamp": "2021-01-01T00:00:00Z",
      "transaction_bytes": "0x1234567890abcdef",
      "sender": "14Gjs1TD93gnwEBfDMHoCgsuf1s2TVKUP6Z1qKmAZnZ8cW5q",
      "recipient": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5",
      "amount": 1.1,
      "currency": {
        "currency": "DOT",
        "chain_name": "polkadot",
        "kind": "native",
        "decimals": 10,
        "rpc_url": "wss://rpc.polkadot.io"
      },
      "status": "finalized"
    }
  ],
  "server_info": {
    "version": "0.2.0",
    "instance_id": "cunning-garbo",
    "debug": true,
    "kalatori_remark": "DEBUG=true;"
  }
}
Vovke commented 1 week ago

we still need to have transactions on order so we could finish here. this part is postponed