🏁findDataWithAddress

You can use this command to find data which has been saved block network.

const result = await Transaction.findDataWithAddress(<from:Base58>, <to:Base58>, <key:string>, <skip:integer>, <limit:integer>)

From: Sender Address

To: Receipt Address

Key: Get data by key property

Skip : Skip Relevant data records

Limit: Set limitation of records

Sample:

return Transaction.findDataWithAddress('PRTMQbunYS1CxSs5i59CrR4ot2WUThT9JvsKvLYDfwF','PRTMRAwXEVfbTD7bsYgkP74JFuKtPZ6hDcXxMWQKpEJ','ratio',0,100);

System will get data array which include "ratio" key which stored same transaction. As we see that below response, system returned 4 different transaction that have ratio key.

Response:

[
    {"addedAssetID":"10007","addedLiq":"100","expireDate":"2024-01-20T10:49:58.396Z","ratio":"1.2"},
    // tx1
    {"addedLiq":"10","expireDate":"2024-01 15T22:35:54.143Z","addedAssetID":"10007","ratio":"1.112"}, 
    //tx2
    {"addedAssetID":"10007","expireDate":"2024-01-14T12:24:24.492Z","ratio":"1.112","addedLiq":"19"},
    //tx3
    {"addedAssetID":"10007","expireDate":"2024-01-14T12:24:24.040Z","addedLiq":"19","ratio":"1.112"}
    //tx4
]

Last updated