Open setbern opened 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?
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.
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
POST /sponsor-tx
route business logic which takes in a serialized tx and returns signed tx