stacks-archive / stacks-transactions-js

The JavaScript library for generating Stacks 2.0 transactions
19 stars 17 forks source link

Change fee rate to fee #55

Closed yknl closed 4 years ago

yknl commented 4 years ago

The fee rate in the wire format is actually a total fee for the transaction. References to "fee rate" in this library should be changed to "fee".

hstove commented 4 years ago

Ah! This actually makes a lot more sense. I was a bit confused as to why nodes would say a fee "rate" was too low for one TX, and not another.

So, the proper way to show a fee is to:

Ya?

yknl commented 4 years ago

Get fee rate from the node Multiply rate * tx.serialize().toString('hex')

That's correct. I'll update the fee estimation PR shortly.