I am using the library to interact with Tezos blockchain via Nodejs application.
The source code
import * as api from '@tzkt/sdk-api';
api.defaults.baseUrl = 'https://api.ghostnet.tzkt.io/'
async function getTransaction()
{
const receipt = await api.operationsGetByHash("oopzR8DwzX9VLrSoeJP4WirFWz22SkA2AZ7TM4K1yHSGKzViDme");
console.log(receipt);
}
getTransaction();
The error msg is :
/../nodejsexample/node_modules/@tzkt/oazapfts/lib/runtime/index.js:78
const res = await (customFetch || fetch)(href, {
^
ReferenceError: fetch is not defined
at doFetch (/../nodejsexample/node_modules/@tzkt/oazapfts/lib/runtime/index.js:78:43)
at fetchText (/../nodejsexample/node_modules/@tzkt/oazapfts/lib/runtime/index.js:32:27)
at Object.fetchJson (/../nodejsexample/node_modules/@tzkt/oazapfts/lib/runtime/index.js:46:62)
at Module.operationsGetByHash (/../nodejsexample/node_modules/@tzkt/sdk-api/build/main/index.js:684:33)
at getTransaction (file:///../nodejsexample/index.js:119:29)
at file:///../nodejsexample/index.js:123:1
I am using the library to interact with Tezos blockchain via Nodejs application. The source code
The error msg is :