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 am trying to use testnet rpc https://fullnode.testnet.aptoslabs.com/v1
import {
Account,
Aptos,
AptosConfig,
Ed25519PrivateKey,
} from "@aptos-labs/ts-sdk";
import { Network } from "aptos";
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Discord user ID
No response
Describe your question in detail.
I am trying to use testnet rpc https://fullnode.testnet.aptoslabs.com/v1
import {
Account,
Aptos,
AptosConfig,
Ed25519PrivateKey,
} from "@aptos-labs/ts-sdk";
import { Network } from "aptos";
const aptosConfig = new AptosConfig({
network: Network.TESTNET,
fullnode: "https://fullnode.testnet.aptoslabs.com/v1",
});
const aptos = new Aptos(aptosConfig);
const main = async () => {
try {
const privateKey = new Ed25519PrivateKey();
const account = Account.fromPrivateKey({ privateKey });
const transactionsCount = await aptos.getAccountTransactionsCount({
accountAddress: account.accountAddress,
});
console.log("Count:", transactionsCount);
const transactions = await aptos.getAccountTransactions({
accountAddress: account.accountAddress,
});
console.log("Transactions:", transactions);
} catch (e: any) {
console.log(e);
}
};
main();
What error, if any, are you getting?
Getting the error:
346 | ...options
347 | });
348 | session[kCurrentStreamsCount] = 0;
349 | session[kGracefullyClosing] = false;
350 |
351 | const isFree = () => session[kCurrentStreamsCount] < session.remoteSettings.maxConcurrentStreams;
^
TypeError: null is not an object (evaluating 'session.remoteSettings.maxConcurrentStreams')
at isFree (/Users/ankit.agrawal/projects/block-c/1inch/zephyrlabs_test/node_modules/http2-wrapper/source/agent.js:351:67)
at /Users/ankit.agrawal/projects/block-c/1inch/zephyrlabs_test/node_modules/http2-wrapper/source/agent.js:449:12
at emit (node:events:180:48)
at #onConnect (node:http2:718:13)
at onConnect (node:http2:855:23)
at emit (node:events:180:48)
at handshake (node:net:115:14)
❌ Error: ERR_HTTP2_ERROR: h2 is not supported
What have you tried or looked at? Or how can we reproduce the error?
No response
Which operating system are you using?
Linux (Ubuntu, Fedora, Windows WSL, etc.)
Which SDK or tool are you using? (if any)
TypeScript SDK
Describe your environment or tooling in detail
No response
Beta Was this translation helpful? Give feedback.
All reactions