MuxedAccount

public class MuxedAccount : Account, @unchecked Sendable

see https://github.com/stellar/stellar-protocol/blob/master/core/cap-0027.md

  • id

    The optional subaccount ID for multiplexed accounts (CAP-27).

    Declaration

    Swift

    public let id: UInt64?
  • xdr

    The XDR representation of this muxed account.

    Declaration

    Swift

    public let xdr: MuxedAccountXDR
  • Human readable Stellar ed25519 or med25519 account ID.

    Declaration

    Swift

    public override var accountId: String { get }
  • Human readable Stellar ed25519 account ID.

    Declaration

    Swift

    public var ed25519AccountId: String { get }
  • Creates a new MuxedAccount object.

    Declaration

    Swift

    public init(keyPair: KeyPair, sequenceNumber: Int64, id: UInt64? = nil)

    Parameters

    keyPair

    KeyPair associated with this Account.

    sequenceNumber

    Current sequence number of the account (can be obtained using the sdk or horizon server).

    id

    optional subaccount ID

  • Creates a MuxedAccount from an accountId (“G…” or “M…”) If you do not provide a sequence nr, it will be set to 0 If you provide an accountId starting with “M” and an id by id parameter, then the id parameter will be ignored

    Declaration

    Swift

    public convenience init(accountId: String, sequenceNumber: Int64? = nil, id: UInt64? = nil) throws
  • Creates a MuxedAccount from a secretSeed “S…” and a sequence number The account will be of type ED25519 if you do not provide an id The account will be of type MUXED_ED25519 if you provide an id

    Declaration

    Swift

    public convenience init(secretSeed: String, sequenceNumber: Int64, id: UInt64? = nil) throws
  • Creates a MuxedAccount from an account id wich can start with “M” or with “G” and a sequence number Optionally you can also send the secret seed “S…” The account will be of type MUXED_ED25519 if the account id starts with “M” (contains the id) The account will be of type ED25519 if the account id starts with “G” (does not contain the id)

    Declaration

    Swift

    public convenience init(accountId: String, secretSeed: String? = nil, sequenceNumber: Int64) throws