Page MenuHomePhabricator

Transaction API
Open, HighPublic

Event Timeline

iongchun created this object with edit policy "Ethereum Web Wallet (Project)".
iongchun moved this task from Backlog to Working on the Ethereum Web Wallet board.Nov 2 2017, 8:32 AM

Transaction object: {
"hash", "from":"0x...", "to":"0x...", "value":..., "gasPrice":..., "gasLimit":..., "nonce":..., "input":"BA5E64",
(followings are unused now:)
"r":"...", "s":"...", "v":"...",
(followings are optional, only available when mined in a block:)
"blockHash":"0x...", "blockNumber":..., "indexInBlock":...,
(followings are optional, belongs to receipt:)
"contractAddress":"0x....", "gasUsed":..., "cumulativeGasUsed":..., "root":"..."
(timestamps:)
"timeCreated":..., (when created here)
"timePending":..., (when seen as pending transaction)
"timeMined":..., (when included in a block)
"timeExist":... (==timeCreated when created here, or ==timePending when seen in pending transactions, or ==timeMined when mined in a block),
"timeNoticed":... (when queried and saved)
}

Transaction info object: {
"hash", "from":"0x...", "to":"0x...", "value":...,
(followings are optional, only available when mined in a block:)
"blockHash":"0x...", "blockNumber":..., "indexInBlock":...,
(followings are optional, belongs to receipt:)
"contractAddress":"0x....",
(timestamps:)
"timeExist":... (==timeCreated when created here, or ==timePending when seen in pending transactions, or ==timeMined when mined in a block)
}

GET /api/tx/{hash}: returns 404, or 200 with tx object
GET /api/account/{address}/txinfos: returns 404, or 200 with array of tx info objects

ISSUE: web3j could not parse pending transactions returned by ethGetTransaction correctly (missed block number)

Change:
GET /api/account/{address}/txinfos
to:
GET /api/tx/info: returns 404, or 200 with array of tx info objects of all addresses belong to the user

Transaction synchronization is needed, in another task T54.

iongchun moved this task from Working to Ready on the Ethereum Web Wallet board.Nov 6 2017, 12:00 PM