Skip to content

AIP #61 v5: GET /channel/:id/spender/:addr #391

Closed
@elpiel

Description

@elpiel

https://github.com/AdExNetwork/aips/issues/61

See the AIP#61 for up-to-date information.

Tasks

  • returns { totalDeposited, spenderLeaf }, where spenderLeaf will contain totalSpent and merkle proof (from AIP#61)

    • Accounting & NewState include spender Balances, from which the spenderLeaf will be taken.
    • spenderLeaf: (spender, balance) however the request already contains the spender address, this is why we only need totalSpent
    • merkle proof of the latest ApproveState, this is so that we can validate that spenderLeaf(hash("spender", spender, totalSpent)) is present in latestApprovedState.stateRoot (todo: additional clarifications needed)
  • GET will return total spendable amount (from Spendable in the DB) and spender leaf (from AIP#61)

  • Update NewState & ApproveState with the new Balances::<CheckedState> once merged Changed NewState/Accounting to use Balances<CheckedState> #422 primitives - Balances & BalancesState #423

  • Generate MerkleProof in the SpenderLeaf AIP #61: AdEx v5: significantly cheaper channels #377 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions