AliasManager
Payment handles — client.aliases. A handle names one or more Stellar addresses, so a payer can send to @ada instead of a 56-character key.
Payment handles — client.aliases. A handle names one or more Stellar addresses, so a payer can send to @ada instead of a 56-character key. Every address on a handle proved control of itself: claiming a handle or pointing it somewhere new takes a signature, by that address, over a challenge the server issued. The SDK never holds the key — ask for a challenge, sign its message where the key lives, and send the signature back.
Constructor
AliasManager
constructor(client: Client)Parameters
client:Client
Properties
client
readonly client: ClientType Client
resolve
Where to pay a handle: its verified addresses on a network, primary first.
resolve(name: string, options?: { network?: stringmember
}): Promise<AliasResolutionData>byAddress
Which handles point at an address — the reverse lookup.
byAddress(address: string, options?: { network?: stringmember
}): Promise<AliasByAddressData>list
The handles this consumer owns (paginated).
list(options?: { take?: numberskip
skip?: numbermember
}): Promise<AliasListData>Methods
availability()
Whether a handle can be claimed, and if not, why not.
availability(name: string): Promise<AliasAvailabilityData>Parameters
name:string
Returns Promise<AliasAvailabilityData>
createChallenge()
A nonce and the exact message to sign, for a claim, a new address or a recovery.
createChallenge(options: CreateAliasChallengeOptions): Promise<AliasChallengeData>Parameters
options:CreateAliasChallengeOptions
Returns Promise<AliasChallengeData>
claim()
Claim a handle with a signature over a CLAIM challenge.
claim(options: ClaimAliasOptions): Promise<OwnedAliasData>Parameters
options:ClaimAliasOptions
Returns Promise<OwnedAliasData>
addAddress()
Point a handle at another address, signed by that address (ADD_ADDRESS challenge).
addAddress(name: string, options: AddAliasAddressOptions): Promise<AliasAddressData>Parameters
name:stringoptions:AddAliasAddressOptions
Returns Promise<AliasAddressData>
removeAddress()
Remove one address from a handle.
removeAddress(name: string, addressId: string): Promise<AliasDeletedData>Parameters
name:stringaddressId:string
Returns Promise<AliasDeletedData>
release()
Release a handle back to the namespace.
release(name: string): Promise<AliasDeletedData>Parameters
name:string
Returns Promise<AliasDeletedData>
startRecovery()
Start a recovery: the service emails a one-time token to the mailbox the handle was claimed with, if email is that mailbox. The answer is the same either way, so it says nothing about who owns the handle; the token only ever reaches the mailbox, never this response.
startRecovery(name: string, email: string): Promise<AliasRecoveryStartedData>Parameters
name:stringemail:string
Returns Promise<AliasRecoveryStartedData>
completeRecovery()
Take a handle over with a new address after losing the old one: the token the owner received by email, plus a signature by the new address over a RECOVER challenge.
completeRecovery(name: string, options: CompleteAliasRecoveryOptions): Promise<OwnedAliasData>Parameters
name:stringoptions:CompleteAliasRecoveryOptions
Returns Promise<OwnedAliasData>