Skip to content

About

Offline Payments System in Rust

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

43 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Offline PWA Backend

NOTE: Later development will begin with partial completion of frontend with integration with IndexedDb

  • TODO [ ] Add rollup engine support [ ] implement DHT for offline peer network

The requests should be of types given:

\\ http://localhost:3000/api/drip_test_tokens POST

{
    "wallet": {
        "public_key": "0x8b4754842db66d1e31d166eb96cadb700dc2f3a4",
        "private_key": "0xe3dd13d6098228249925315caf3abca462a6edf1696b8d61b379906ff1353926"
    },
    "amount": "1000000000000000000000"
}
\\ http://localhost:3000/api/register POST
{
    "wallet": {
        "public_key": "0x8b4754842db66d1e31d166eb96cadb700dc2f3a4",
        "private_key": "0xe3dd13d6098228249925315caf3abca462a6edf1696b8d61b379906ff1353926"
    },
    "amount": "90000000000000000000"
}
\\ http://localhost:3000/api/get_balance GET
{
    "public_key": "0x8b4754842db66d1e31d166eb96cadb700dc2f3a4",
    "private_key": "0xe3dd13d6098228249925315caf3abca462a6edf1696b8d61b379906ff1353926"
}
\\ http://localhost:3000/api/balance GET
{
    "public_key": "0x8b4754842db66d1e31d166eb96cadb700dc2f3a4",
    "private_key": "0xe3dd13d6098228249925315caf3abca462a6edf1696b8d61b379906ff1353926"
}
\\ http://localhost:3000/api/get_collateral POST
{
    "public_key": "0x8b4754842db66d1e31d166eb96cadb700dc2f3a4",
    "private_key": "0xe3dd13d6098228249925315caf3abca462a6edf1696b8d61b379906ff1353926"
}
\\ http://localhost:3000/api/add_balance POST
{
    "wallet": {
        "public_key": "0x8b4754842db66d1e31d166eb96cadb700dc2f3a4",
        "private_key": "0xe3dd13d6098228249925315caf3abca462a6edf1696b8d61b379906ff1353926"
    },
    "amount": "500000000000000000"
}
\\ http://localhost:3000/api/settle_payment POST
{
    "wallet": {
        "public_key": "0x8b4754842db66d1e31d166eb96cadb700dc2f3a4",
        "private_key": "0xe3dd13d6098228249925315caf3abca462a6edf1696b8d61b379906ff1353926"
    },
    "transaction": {
        "id": "1",
        "from": "0x8b4754842db66d1e31d166eb96cadb700dc2f3a4",
        "to": "0x1f41edf961bf379e0c10c9e5c94361b769806898",
        "amount": "100000000000000000",
        "timestamp": "1753807570",
        "is_settled": false,
        "tx_hash": "1f41edf961bf379e0c10c9e5c94361b769806898"
    },
    "amount": "100000000000000000"
}

About

Offline Payments System in Rust

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages