Page MenuHomePhabricator

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

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

Details

Summary

Add tested methods for constructing a token rewards tx

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
token-server-wallet-next
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 28459
Build 56459: Build Diff
Build 56458: arc lint + arc unit

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.Apr 11 2024, 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.Apr 11 2024, 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