Skip to main content

AnkrSDKFactory

Description

A class for SDK instance creation.

Static methods

MethodDescription
GetAnkrSDKInstanceCreates an instance of SDK with a given argument.

or

MethodDescription
networkNameAn enum containing a network name.

Returns

ParameterDescription
IAnkrSDKAn instance of SDK provider.

Description

Creates an SDK instance by a given provider URL or network name.

Code example

using AnkrSDK.Data;
using AnkrSDK.Provider;
using UnityEngine;

public class CreateSDKExample : MonoBehaviour
{
private void Start()
{
var ankrSDKByProvider = AnkrSDKFactory.GetAnkrSDKInstance("http://...");
// or
var ankrSDKByNetwork = AnkrSDKFactory.GetAnkrSDKInstance(NetworkName.Ethereum);
}
}