stacks-network / sbtc

Repo containing sbtc
GNU General Public License v3.0
263 stars 5 forks source link

[Design] - Modules for STX Sponsorship #487

Open setbern opened 2 months ago

setbern commented 2 months ago

At a high level the stx sponsorship functionality will rely on one route POST /sponsor-tx

The build out for this route will fall into 2 phases 1) Get up and Running 2) Plug in to Emily

The reason for the separation of the above is for the need to get a minimal sponsor testing before plugging into Emily API. Why? Since we're building this in rust a slice of the stack.js lib is going have to be recreated in rust specifically sponsorTransaction

https://github.com/hirosystems/stacks.js/blob/d638246b8d3759791492d67b7f5c957d78f80735/packages/transactions/src/builders.ts#L1552

Since at the moment of this write up we're unsure what data is going need to be stored in Emily to successfully fit all the needs I've opted to build a basic sponsorship API alongside Emily and once we have the tools built revise the module and integrate with Emily.

Pre Emily Requirements

diwakergupta commented 2 months ago

Why? Since we're building this in rust a slice of the stack.js lib is going have to be recreated in rust specifically sponsorTransaction

Can't you reuse code from stacks-core for this?

setbern commented 1 month ago

Why? Since we're building this in rust a slice of the stack.js lib is going have to be recreated in rust specifically sponsorTransaction

Can't you reuse code from stacks-core for this?

That's be incredible helpful, will parse through the code base and follow up.