FuseWalletSDK constructor
FuseWalletSDK(})
Constructs a new instance of FuseWalletSDK.
publicApiKey is the public API key used to access the Fuse API.
baseUrl
is the base URL of the Fuse API. Default value is taken from Variables.BASE_URL.
rpcUrl
is the URL of the Ethereum JSON-RPC endpoint. Default value is taken from Variables.FUSE_RPC_URL.
Implementation
FuseWalletSDK(
this.publicApiKey, {
String baseUrl = Variables.BASE_URL,
String rpcUrl = Variables.FUSE_RPC_URL,
this.websocketServerURL = Variables.DEFAULT_SOCKET_SERVER_URL,
}) : _dio = Dio(
BaseOptions(
baseUrl: Uri.https(baseUrl, '/api').toString(),
headers: {
'Content-Type': 'application/json',
},
queryParameters: {
'apiKey': publicApiKey,
},
),
),
web3client = Web3Client(rpcUrl, http.Client()) {
_initializeModules();
}