n-y-z-o / nyzoVerifier

Verifier for the Nyzo cryptocurrency
The Unlicense
73 stars 42 forks source link

What does 'type' mean in transaction body? #38

Closed Wangmmx closed 3 years ago

Wangmmx commented 3 years ago
{
    "start_timestamp": 1618225693000, 
    "hash": "20db858edce54e6345303994eec74f02a77d3f16caa1d7787fd71cf33064a589", 
    "transactions": [
        {
            "fee": 867856, 
            "sender": "12d454a69523f739-eb5eb71c7deb8701-1804df336ae0e2c1-9e0b24a636683e31", 
            "receiver_nyzo_string": "id__81bkmarm8_tXYTYV77VIyN4p1d-RrL3zNqWb9apUr3WP-ys.NG-H", 
            "timestamp": 1618225694000, 
            "sender_nyzo_string": "id__81bkmarm8_tXYTYV77VIyN4p1d-RrL3zNqWb9apUr3WP-ys.NG-H", 
            "signature": "53deda5c5e53194aae9eb7de7bedc617a7f86d7c91fb49b216b8e0e9d1514526ba71fcfcf6c835b55f3cabc7dc68d82eae0e3ddedfc4dca9b51a33cd7a0a0b00", 
            "previous_hash_height": 0, 
            "sender_data": "", 
            "amount": 347142109, 
            "previous_block_hash": "bc4cca2a2a50a229256ae3f5b2b5cd49aa1df1e2d0192726c4bb41cdcea15364", 
            "type_enum": "seed", 
            "type": "0000000000000001", 
            "id": "803c581e05020f5c-d610d25a0ebd413a-768d7943fb73cfd6-0ddae8d66ab19b9d", 
            "receiver": "12d454a69523f739-eb5eb71c7deb8701-1804df336ae0e2c1-9e0b24a636683e31"
        }
    ], 
    "balance_list_hash": "f400305efb457c07d70a46ae2a5cb738de6c7d8bcca7bd4512e91f10bf46ec1e", 
    "verification_timestamp": 1618225701680, 
    "previous_block_hash": "be0dc3deb13dd7fd365f1431acde8d2eaa14bd3b714f508cce26bd29e2d2d597", 
    "height": 11632699
}

Called the 'block' method of JSONRPC, got the txs list, and there are many parameters in it that I don’t really understand, etc the type_enum, type. BTW, How can I get the tx result from the transaction body?

EggPool commented 3 years ago

Hi,

I just saw issues were disabled on the open-nyzo repository. They are now open.

I'd prefer the issues related to the community version and json-rpc to be conducted over there, so we can manage and reference code and doc better:

https://github.com/Open-Nyzo/nyzoVerifier

type is the transaction type, as per http://tech.nyzo.co/dataFormats/transaction type_enum is the clear text enum version of the type byte field

Wangmmx commented 3 years ago

Yes, I found that I can’t raise issues over there, so I asked them all here, ok I will go there and close this one, thanks for you reply!