Factory Methods
Factory methods of Azoth SDK for creating instances and getting network information
AzothSDK.create()
AzothSDK.create()Creates a new instance of the Azoth SDK.
static create(
provider: ethers.Provider | ethers.Signer,
network: NetworkName = 'polygon',
tokenSymbol: TokenSymbol = 'USDT',
contractVersion?: string
): AzothSDKParameters:
provider: An ethers.js Provider or Signer instancenetwork(optional): Blockchain network to use (default: 'polygon')tokenSymbol(optional): Stablecoin to use (default: 'USDT')contractVersion(optional): Specific contract version to use (defaults to the latest version for the selected network)
Returns:
A new
AzothSDKinstanceExample:
const provider = new ethers.JsonRpcProvider('https://polygon-rpc.com');
const azoth = AzothSDK.create(provider, 'polygon', 'USDT');AzothSDK.getAvailableNetworks()
AzothSDK.getAvailableNetworks()Returns a list of all networks supported by the SDK.
Returns:
Array of network names
Example:
AzothSDK.getAvailableTokens()
AzothSDK.getAvailableTokens()Returns a list of tokens available for a specific network.
Parameters:
network: The network to check for available tokens
Returns:
Array of token symbols available on the specified network
Example:
Last updated