createChildAccountCap method
Create and Transfer custodian account to user's currentAddress.
accountCap Object id of Account Capacity under user address, created after invoking createAccount
Implementation
/// [accountCap] Object id of Account Capacity under user address, created after invoking createAccount
TransactionBlock createChildAccountCap({
String? currentAddress,
String? accountCap,
}) {
final txb = TransactionBlock();
final childCap = txb.moveCall(
"$PACKAGE_ID::$MODULE_CUSTODIAN::create_child_account_cap",
typeArguments: [],
arguments: [txb.object(_checkAccountCap(accountCap ?? this.accountCap))],
);
txb.transferObjects([childCap], txb.pureAddress(_checkAddress(currentAddress ?? this.currentAddress)));
return txb;
}