【发布时间】:2022-01-14 16:44:29
【问题描述】:
我在尝试使用 near-api-js 时收到 ReferenceError: Buffer is not defined。
相关的代码行是:
export const near = new Near({
networkId,
keyStore: new keyStores.BrowserLocalStorageKeyStore(),
nodeUrl,
walletUrl,
headers: null,
});
export const walletConnection = new WalletConnection(near, appKeyPrefix);
walletConnection.requestSignIn({ // This line causes the problem
contractId,
methodNames: [],
});
我的项目是全新安装的 Gatsby。
任何想法我缺少什么?
【问题讨论】:
标签: nearprotocol