Muxed Account
class MuxedAccount
Represents a multiplexed (muxed) account on Stellar's network.
A muxed account is an extension of the regular account that allows multiple entities to share the same ed25519 key pair as their account ID while providing a unique identifier for each entity.
A muxed account consists of two parts:
The ed25519 account ID, which starts with the letter "G"
An optional account multiplexing ID, which is a 64-bit unsigned integer
When the multiplexing ID is set, the address starts with "M" instead of "G".
Usage
// Create from regular account ID
val account = MuxedAccount("GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H")
// Create from muxed account address
val muxedAccount = MuxedAccount("MAAAAAAAAAAAAAB7BQ2L7E5NBWMXDUCMZSIPOBKRDSBYVLMXGSSKF6YNPIB7Y77ITLVL6")
println(muxedAccount.accountId) // Returns underlying G... address
println(muxedAccount.id) // Returns the muxed ID
// Create from account ID and muxed ID
val muxed = MuxedAccount("GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H", 123456789UL)
println(muxed.address) // Returns M... addressContent copied to clipboard