Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Nit UX Improvement: Add Provider Address in API Response #172

Open
ckartik opened this issue Jan 17, 2024 · 0 comments
Open

Nit UX Improvement: Add Provider Address in API Response #172

ckartik opened this issue Jan 17, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ckartik
Copy link
Contributor

ckartik commented Jan 17, 2024

It would be nice to check the commitmentSignature and do an ECRecover on the payload, and augment the output of the API to include the address associated with the provider.

e.g, currently if you POST a bid to the bidder api, you get back a payload:

{
      "txHash":"91a89B633194c0D86C539A1A5B14DCCacfD47094",
      "bidAmount":"2000",
      "blockNumber":"890200",
      "receivedBidDigest":"61634fad9081e1b23a00234a52a85386a91fc0fad3fb32d325891bdc4f8a52a9",
      "receivedBidSignature":"be99f499be5483665d569bd52fa8c4c9ed5c3bed2f94fb9949259bf640d8bd365b1d9a4b9ccb3ace86ffdcd1fdadc605b0f49b3adaf1c6a9ffea25585234664f1c",
      "commitmentDigest":"08a98d4c9d45f8431b46d99a23e6e8f82601ccf0773499d4e47bcd857cad92a6",
      "commitmentSignature":"cfc1e4e2ea9cc417027ed5846fa073c8e6031f70f91ffa9b92051b5b7738c0500d8fefb0fc189bce16004b3c0e1c4cfa41260968161adf8b55446ed5c40d1ac51b"
   }

We can augment the response to have "providerAddress": 0xProvider

{
      "providerAddress": 0xProvider
      "txHash":"91a89B633194c0D86C539A1A5B14DCCacfD47094",
      "bidAmount":"2000",
      ..."commitmentSignature":"cfc1e4e2ea9cc417027ed5846fa073c8e6031f70f91ffa9b92051b5b7738c0500d8fefb0fc189bce16004b3c0e1c4cfa41260968161adf8b55446ed5c40d1ac51b"
   }
} 
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant