iota-database-tutorial
iota-database-tutorial copied to clipboard
Storing long data
Hello, I'm trying to store a long json string as data. It will send data to tangle but I can not retrieve it. I see that it make 3 bundles from data. here is a link to the transaction: https://thetangle.org/transaction/YJYJWB9ORHHYUAFOKRRMTTUCSKHF9CDPBABPOOSMOML9ZKGETCMEODOZ9NVOSFKPWVJEQVJFWD9O99999 any workaround?
There should be no problem with data that spans more than one transaction.
I tested using the following code in the tutorial and it reads and extracts correctly:
const txObjects = await IotaHelper.findTransactionObjectsAsync(iota, { bundles: ["ONFKGLWZODOPGSWQH9GEYAGQRLCOCJWU99GXCKFTVIULTCSWSYSWXZLLORKPZFLRGVIATSKHHOWA9HVWX"] });
const objs = IotaHelper.extractBundles(iota, txObjects);
console.log(objs);
I get the response
[ { user: '905353845540',
contacts:
[ '909368947041',
...
'909119437161',
... 66 more items ],
sig: '5df7d0b5cdb5ab67f5020f9ca2a2fe0df6449b0be1b01bd2c3aa6e71760bce9aba5936ac7b0f22cf0301c487e448b8ce388bfd8578849278fee6e147b2abe7ec9479df92749cf888546de2680b5abad45872f1e27ab65377208e37844939fe12c014697bc2b73a1ea3bd9991fbf3e67178c43db5f4f7b4f04e9e1cf1725472c9' } ]