Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.

unable to create a transaction using testweave-sdk #11

@Retamogordo

Description

@Retamogordo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions