You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to call aleo sdk from js.
first, compile aleo to wasm.
js call wasm
flutter call js.
When i call @aleoHq/sdk, I got error
const { initThreadPool: wasmInitThreadPool, Address, Execution, ExecutionResponse, Field, OfflineQuery, Private, PrivateKey, PrivateKeyCiphertext, Program, ProvingKey, RecordCiphertext, RecordPlaintext, ProgramManager, Signature, Transaction, ViewKey, VerifyingKey, verifyFunctionExecution, } = await Cargo({
^^^^^
SyntaxError: await is only valid in async functions and the top level bodies of modules
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1175:20)
at Module._compile (node:internal/modules/cjs/loader:1219:27)
at Module.m._compile (/Users/weixuefeng/.nvm/versions/node/v20.3.0/lib/node_modules/ts-node/src/index.ts:1618:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1309:10)
at Object.require.extensions.<computed> [as .js] (/Users/weixuefeng/.nvm/versions/node/v20.3.0/lib/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1113:32)
at Function.Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1137:19)
at require (node:internal/modules/helpers:121:18)
The text was updated successfully, but these errors were encountered:
I want to call aleo sdk from js.
first, compile aleo to wasm.
js call wasm
flutter call js.
When i call @aleoHq/sdk, I got error
The text was updated successfully, but these errors were encountered: