Create instance
Create a new instance and set url of an AElf chain node.
- Javascript
- C#
- Go
- Java
- PHP
- Python
import AElf from "aelf-sdk";
// create a new instance of AElf
const aelf = new AElf(new AElf.providers.HttpProvider("http://127.0.0.1:1235"));
using AElf.Client.Service;
// create a new instance of AElfClient
AElfClient client = new AElfClient("http://127.0.0.1:1235");
import ("github.com/AElfProject/aelf-sdk.go/client")
var aelf = client.AElfClient{
Host: "http://127.0.0.1:8000",
Version: "1.0",
PrivateKey: "XXXXXX",
}
using AElf.Client.Service;
// create a new instance of AElf, change the URL if needed
AElfClient client = new AElfClient("http://127.0.0.1:1235");
require_once 'vendor/autoload.php';
use AElf\AElf;
$url = '127.0.0.1:8000';
$aelf = new AElf($url);
from aelf import AElf
// create a new instance of AElf
aelf = AElf('http://127.0.0.1:8000')