megumii
November 27, 2023, 7:42am
1
I got this error when i try to use any examples from here https://github.com/availproject/avail-js/tree/main/examples
$ npm start
> data-transfer@0.0.1 start
> tsc && node build/index.js
2023-11-27 13:01:59 API-WS: disconnected from wss://goldberg.avail.tools/ws: 1006:: Abnormal Closure
2023-11-27 13:02:04 PORTABLEREGISTRY: Unable to determine runtime Call type, cannot inspect sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic
Just spoke to the team. Seems like this is supposed to be more of a warning. Not an error. Could you please confirm?
megumii
November 27, 2023, 7:51am
3
my index.ts
import { initialize, getKeyringFromSeed } from "avail-js-sdk"
const main = async () => {
try {
const seed = "seed pharse which i have AVL" // Put a seed with some funds here
const data = "Test App megumii"
const api = await initialize()
const keyring = getKeyringFromSeed(seed)
const options = { app_id: 24, nonce: -1 }
await api.tx.dataAvailability.submitData(data).signAndSend(keyring, options)
process.exit(0)
} catch (err) {
console.error(err)
process.exit(1)
}
}
main()
megumii
November 27, 2023, 7:53am
4
how to change the default wss url? i want to try to use my own wss URL
megumii
November 27, 2023, 8:07am
5
even with ts-node
it’s still give me the same result
$ ts-node src/index.ts
2023-11-27 15:06:53 PORTABLEREGISTRY: Unable to determine runtime Call type, cannot inspect sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic
Hey so i tried running this locally. It’s not an error. It’s just a warning. The data submission does go through successfully. Keep an eye on the explorer , and you’ll see your data submission transaction being included in the block.
We will try to modify the example code to show transaction result as well so it’s easier for users.
1 Like
We made some changes for more visibility into the transaction status. Check it out here.
1 Like
megumii
November 27, 2023, 9:13am
9
Instead of changing the src file endpoint, you could add an argument when initializing the api
1 Like
megumii
November 27, 2023, 9:29am
11
perfect! everything is answered, thank you for your response
1 Like
megumii
November 27, 2023, 9:30am
12
and now i can track the tx id from submit data and transfer
1 Like