Page MenuHomePhabricator

[token-server] Add method to get token inputs and outputs for a token reward tx
ClosedPublic

Authored by bytesofman on Wed, Apr 10, 17:17.

Details

Summary

Add tested methods for constructing a token rewards tx

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Combine functions, initialize test vector types

publishing despite CI failure as CI issue appears unrelated.

can still be tested with

arc patch 15937
cd apps/token-server
npm ci
npm test
bytesofman retitled this revision from [token-server] Add methods to build a token reward tx to [token-server] Add method to get token inputs and outputs for a token reward tx.Thu, Apr 11, 00:10
emack added a subscriber: emack.

Accepted with minor nit on function name.

apps/token-server/src/transactions.ts
33 ↗(On Diff #47010)

Isn't this function name a bit too generic for a reward specific function?

64 ↗(On Diff #47010)

hmm this is unfortunate, we should fork it and BigInt the codebase in the near future.

This revision is now accepted and ready to land.Thu, Apr 11, 00:19
bytesofman added inline comments.
apps/token-server/src/transactions.ts
33 ↗(On Diff #47010)

well, it would work for any slpv1 token send tx using chronik inputs and this lib.

similar to cashtab -- the function is only general to the scope of this app...but it is pretty general. Will make more sense when we have the other functions, then we call getSlpInputsAndOutputs to get the slp inputs and outputs we need to builda tx.

64 ↗(On Diff #47010)

I have been working on this but it has been tabled during the antd run.

now, it will prob become part of ecash-lib once we get that up and running (then we'll have an ecash-specific stack, schnorr support, the works)

T3504