Ankr.

Beitrag

Teile dein Wissen.

0x4119...0694.
Mar 30, 2025
Experten Q&A

Switching from TestnetConnection to Custom RPC in Sui SDK

How can I use a custom RPC URL instead of testnetConnection in @mysten/sui.js?

  • Polygon Avail
0
3
Teilen
Kommentare
.

Antworten

3
Torus Gmail.
Jun 11 2025, 19:14

Moderator's answer To use a custom RPC URL instead of testnetConnection, you can use the following approach:

import { Connection, JsonRpcProvider } from '@mysten/sui.js'; const connection = new Connection({ fullnode: 'RPC_URL', }); const provider = new JsonRpcProvider(connection);

0
Offizielle Antwort
Kommentare
.
0x030e...d43a.
Mar 31 2025, 19:39

To use a custom RPC URL instead of testnetConnection, you can use the following approach:

import { Connection, JsonRpcProvider } from '@mysten/sui.js';
const connection = new Connection({
  fullnode: 'RPC_URL',
});
const provider = new JsonRpcProvider(connection);

Consider migrating to the latest version of the SDK ®mysten/sui® instead of the deprecated ®mysten/sui.js®.

0
Kommentare
.
0x5c35...a234.
Jun 11 2025, 17:48

Update Consider migrating to the latest version of the SDK ®mysten/sui® instead of the deprecated ®mysten/sui.js®.1

0
Kommentare
.

Weißt du die Antwort?

Bitte melde dich an und teile sie.

Community created on Polygon network

216Beiträge166Antworten
Sui.X.Peera.

Verdiene deinen Anteil an 1000 Sui

Sammle Reputationspunkte und erhalte Belohnungen für deine Hilfe beim Wachstum der Sui-Community.