账号类交易

创建账号

Node.JS Example

var jlib = require('jingtum-lib');
var Wallet = jlib.Wallet;
var w1 = Wallet.generate();//方法1
var w2 = Wallet.fromSecret('ss2A7y...Hu3uReDk');//方法二

C# Example

var w1 = Wallet.Generate();//方法1
var w2 = Wallet.FromSecret('ss2A7y...Hu3uReDK');//方法二

请求账号信息

Node.JS Example

var Remote = require('jingtum-lib').Remote;
var remote = new Remote({server: 'ws://ts5.jingtum.com:5020', local_sign:true});
remote.connect(function (err, result) {
    if(err) return console.log('err: ', err);
    console.log('result : ', result);
    var req = remote.requestAccountInfo({account: 'jHb9C...4bwdtyTh'});
    req.submit(function (err1, result1) {
        if(err1) return console.log('err1: ', err1);
        console.log('account info: ', result);
    })
});

C# Example

var remote = new Remote(@"ws://ts5.jingtum.com:5020", true);
remote.Connect(result =>
{
  if (result.Exception != null)
  {
    Console.Write(result.Exception.Message);
  }
  else
  {
    var req = remote.RequestAccountInfo(new AccountInfoOptions
    {
      Account = "j9FGhAW9dSzL3RjbXkyW6Z6bHGxFK8cmB1"
    });
    req.Submit(reqResult =>
    {
      Console.Write(reqResult.Message);
      // get result from reqResult.Result
    });
  }
})