- GET /api/v1/transactions
- GET /api/v1/wallets
- GET /api/v1/wallets/:id
- GET /api/v1/transactions/:id
- POST /api/v1/wallets
- { address, balance }
- address is the account hash identifier
- balance is the account balance
- { address, balance }
- POST /api/v1/transactions
- { txHash, amount, to, from }
- txHash is the transaction hash identifier
- amount is the amount of the transaction
- to is a wallet foreign key
- from is another wallet foreign key
- { txHash, amount, to, from }
- PATCH /api/v1/transactions/:id
- { amount }
- amount is the only value that can be patched
- { amount }
- PATCH /api/v1/wallets/:id
- { balance }
- balance is the only value that can be patched
- { balance }
- DELETE /api/v1/transactions/:id
- DELETE /api/v1/wallets/:id
- nested delete of foreign keys in to: or from: of the transaction table, then wallet.
- [{ txHash: 'duksehdk2121hjkdnbesk', amount: '500', to: '1', from: '2'}...]
- [{ address: '#jojw390f9ednseknd3', balance: '100'}...]
- { txHash: 'duksehdk2121hjkdnbesk', amount: '500', to: '1', from: '2'}
- { address: '#jojw390f9ednseknd3', balance: '100'}
- { id: 26 }
- { id: 26 }
- { 1 } returns number of objects affected
- { 1 } returns number of objects affected
- { 1 } returns number of objects affected
- { 1 } returns number of objects affected