hashgraph / hedera-block-node

New Block Node services
Apache License 2.0
18 stars 2 forks source link

EPIC: Streaming payments #200

Open Nana-EC opened 1 month ago

Nana-EC commented 1 month ago

Problem

It may be useful for a BN to receieve payments for providing both data aailabilty and additonal API services to callers

Solution

Add logic that may facilitate the recouping of BN management costs

Estimation considerations

1) Consumers need to pay on each Block Node they are using. 2) Safely store BN user info. 3) Consumers can pre-load their balance 4) Balance is maintained for every consumer consumer. When the balance is 0, stop serving with an error. 5) gRPC endpoint to find account and pricing information. 6) Debit with each streaming item based on bytes. 7) getBalance() endpoint. 8) "Allowances" may be a consideration but needs to be explored.

Alternatives

No response

Mark-Swirlds commented 4 days ago

per https://www.notion.so/swirldslabs/Block-Node-monetization-Design-and-Notes-1227c9ab259180b9be15d8122ec18982?pvs=4

OAuth Integration: Each user account will be associated with an OAuth token signed by the keypair corresponding to a Hedera account. WalletConnect will be used to facilitate message passing to user wallets for signing tokens.