feat: set up project

This commit is contained in:
2023-07-19 11:47:46 +02:00
parent fac61db3f1
commit b426a36570
45 changed files with 2388 additions and 4 deletions

View File

@@ -0,0 +1,25 @@
package btc
import (
"testing"
"github.com/stretchr/testify/require"
)
func Test_bitcoinService_getRawTransaction(t *testing.T) {
th := newTestHelper()
txid := "873d5516a9cacc065bb30831bf4855b058f59a2a4877e08e0e28c22c51c58e39"
tx, err := th.b.getTransaction(txid)
require.NoError(t, err)
rawTrx, err := th.b.getRawTransaction(tx.Txid, tx.Blockhash)
require.NoError(t, err)
require.Equal(t, rawTrx.Txid, txid)
require.NotEmpty(t, rawTrx.getOpReturn())
// hexMessage := rawTrx.getOpReturn()
// bts, err := hex.DecodeString(hexMessage)
// require.NoError(t, err)
// require.Equal(t, testMessage, string(bts))
}