Sep24

class Sep24

Interactive flow for deposit and withdrawal using SEP-24.

Functions

Link copied to clipboard
suspend fun deposit(assetId: StellarAssetId, authToken: AuthToken, extraFields: Map<String, String>? = null, destinationAccount: String? = null, destinationMemo: Pair<String, MemoType>? = null): InteractiveFlowResponse

Initiates interactive deposit using SEP-24.

Link copied to clipboard
suspend fun getServicesInfo(): AnchorServiceInfo

Available anchor services and information about them. For example, limits, currency, fees, payment methods.

Link copied to clipboard
suspend fun getTransaction(transactionId: String, authToken: AuthToken): AnchorTransaction

Get single transaction's current status and details.

Link copied to clipboard
suspend fun getTransactionBy(authToken: AuthToken, id: String? = null, stellarTransactionId: String? = null, externalTransactionId: String? = null, lang: String? = null): AnchorTransaction

Get single transaction's current status and details. One of the id, stellarTransactionId, externalTransactionId must be provided.

Link copied to clipboard
suspend fun getTransactionsForAsset(asset: AssetId, authToken: AuthToken, noOlderThan: Instant? = null, limit: Int? = null, kind: TransactionKind? = null, pagingId: String? = null, lang: String? = null): List<AnchorTransaction>

Get all account's transactions by specified asset. See SEP-24 specification for parameters

Link copied to clipboard
fun watcher(pollDelay: Duration = 5.seconds, channelSize: Int = Channel.UNLIMITED, exceptionHandler: WalletExceptionHandler = RetryExceptionHandler()): Watcher

Creates new transaction watcher

Link copied to clipboard
suspend fun withdraw(assetId: StellarAssetId, authToken: AuthToken, extraFields: Map<String, String>? = null, withdrawalAccount: String? = null): InteractiveFlowResponse

Initiates interactive withdrawal using SEP-24.