AccountCreateContract.fromJson constructor

AccountCreateContract.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory AccountCreateContract.fromJson(Map<String, dynamic> json) {
  return AccountCreateContract(
    /// Transaction initiator address
    ownerAddress: TronAddress(json["owner_address"]),

    /// Account address to be activated
    accountAddress: TronAddress(json["account_address"]),

    /// Account type. The external account type is Normal, and this field will not be displayed in the return value
    type: AccountType.fromName(json["type"]) ?? AccountType.normal,
  );
}