-
Notifications
You must be signed in to change notification settings - Fork 15
unable to create a transaction using testweave-sdk #11
Description
Hi guys,
I'm trying to mess around with arweave, I managed to have some success using ArLocal,
now I'm trying to migrate to testweave-sdk, so I can use it in a browser.
However I have this strange issue with a basic test:
Here is code snippet:
it("Arweave create test transaction", async () => {
const arweave1 = Arweave.init({
host: 'localhost',
port: 1984,
protocol: 'http',
timeout: 20000,
logging: false,
});
const testWeave1 = await TestWeave.init(arweave1);
let data = "test arweave transaction creation";
console.log(testWeave1.rootJWK);
const dataTransaction = await arweave1.createTransaction({
data
}, testWeave1.rootJWK);
})
Inside createTransaction method the following error occurs:
TypeError: Cannot read properties of undefined (reading 'data')
at /home/yury/Desktop/SolanaProjects/stakan/src/common/transactions.ts:51:25
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Arweave.createTransaction (src/common/common.ts:105:29)
I see that rootJWK contains an object.
My packages are:
stakan@ /home/yury/Desktop/SolanaProjects/stakan
└─┬ testweave-sdk@0.2.2
├─┬ arweave@1.11.4
│ └─┬ arconnect@0.4.2
│ └── arweave@1.11.4 deduped
└─┬ smartweave@0.4.48
└── arweave@1.11.4 deduped
Must be something very basic I miss here.
Thank you.