In NEAR, users can register named accounts (e.g. bob.near) which are simpler to use and remember.
Named accounts can create sub-accounts of themselves, helping to better organize related-accounts. In this way, named accounts work as domains, particularly:
Only registrar can create short top-level accounts (e.g. near, aurora).
Anyone can create long top-level accounts, e.g. verylongaccountnamethatis32chars.
near can create bob.near, and bob.near can create app.bob.near.
nearcannot create app.bob.near, and test.nearcannot create sub.example.near.
val accountId = "test.near"
val newAccountId = "test-sub.near"
val amount = "4"
val chain = "testnet"
val result = NearNftService.createSubAccount(accountId, newAccountId , amount , chain )
println("operation result: $result")