I dont think its the library, just tried sending a transaction using the cli with same result.
./bitcoin-cli -regtest sendtoaddress [address] 2.1
Returns a transaction ID, then when I run
./bitcoin-cli -regtest gettransaction [txid]
The amount still says 0..
This is my most recent return for gettransaction:
./bitcoin-cli -regtest gettransaction f8d306e9649aad81e1bac5f1e61cb752f886a0d5340b4ad9ac305fb5027182cc
{
"amount": 0.00000000,
"fee": -0.00006640,
"confirmations": 0,
"trusted": true,
"txid": "f8d306e9649aad81e1bac5f1e61cb752f886a0d5340b4ad9ac305fb5027182cc",
"walletconflicts": [
],
"time": 1567455718,
"timereceived": 1567455718,
"bip125-replaceable": "no",
"details": [
{
"address": "2N72hQwNLCXYmDnyBFDXwcUAvppm1bLLzX8",
"category": "send",
"amount": -2.40000000,
"label": "",
"vout": 0,
"fee": -0.00006640,
"abandoned": false
},
{
"address": "2N72hQwNLCXYmDnyBFDXwcUAvppm1bLLzX8",
"category": "receive",
"amount": 2.40000000,
"label": "",
"vout": 0
}
],
"hex": "02000000000101519e1d7e4a983b8135148dbb32198e23b7500a407048805bd9ffd97d38fd163300000000171600148e193f47083de7efbe286f289e7034c084a7f70bfeffffff02001c4e0e0000000017a91497333f2c2bdf79ec3637fbef6f331fabb2f451aa8710bcb71b0100000017a914b9d9b20cb6cbf043cae1b361bc391d102dc6d49c870247304402207f71c6bdde891742d274d227f51d9f0e8a0477c2776c057278f035d9606eb0bf022014cb9951b6144462fe7423bf99f137c38846a3c647cf5426b27412ced26a47b201210340ce4e488b13b4c9dedabe231722211a2e4f02237ea347e81b804a714fac2d4500000000"
It's looking like its maybe sending and receiving to the same address which I dont know how its possible because I literally just generated the address with getnewaddress.