Publication
Partagez vos connaissances.
Mar 30, 2025
Questions et Réponses avec des Experts
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
Partager
Commentaires
Réponses
3Torus Gmail111
Jun 11 2025, 19:14Moderator'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
Réponse officielle
Commentaires
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
Commentaires
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
Commentaires
Connaissez-vous la réponse ?
Veuillez vous connecter et la partager.