register method

Future<String> register(
  1. AptosAccount coinReceiver,
  2. String coinType
)

Implementation

Future<String> register(AptosAccount coinReceiver, String coinType) async {
  final payload = EntryFunctionPayload(
    functionId: "0x1::managed_coin::register",
    typeArguments: [coinType],
    arguments: []);
  final rawTxn = await aptosClient.generateTransaction(coinReceiver, payload);
  final bcsTxn = aptosClient.signTransaction(coinReceiver, rawTxn);
  final txn = await aptosClient.submitSignedBCSTransaction(bcsTxn);
  return txn["hash"];
}