Package org.stellar.walletsdk.anchor

Types

Link copied to clipboard
class Anchor

Build on/off ramps with anchors.

Link copied to clipboard
@Serializable
data class AnchorAllTransactionsResponse(transactions: List<AnchorTransaction>)
Link copied to clipboard
@Serializable
data class AnchorServiceAsset(enabled: Boolean, minAmount: Double?, maxAmount: Double?, feeFixed: Double?, feePercent: Double?)
Link copied to clipboard
@Serializable
data class AnchorServiceFeatures(accountCreation: Boolean, claimableBalances: Boolean)
Link copied to clipboard
@Serializable
data class AnchorServiceFee(enabled: Boolean)
Link copied to clipboard
@Serializable
data class AnchorServiceInfo(deposit: Map<String, AnchorServiceAsset>, withdraw: Map<String, AnchorServiceAsset>, fee: AnchorServiceFee, features: AnchorServiceFeatures?)
Link copied to clipboard
@Serializable(with = AnchorTransactionSerializer::class)
interface AnchorTransaction

Represents SEP-24 anchor transaction.

Link copied to clipboard
@Serializable
data class AnchorTransactionStatusResponse(transaction: AnchorTransaction)
Link copied to clipboard
typealias Auth = Sep10
Link copied to clipboard
object ChannelClosed : StatusUpdateEvent
Link copied to clipboard
typealias Customer = Sep12
Link copied to clipboard
@Serializable
data class DepositTransaction(id: String, status: TransactionStatus, statusEta: String?, kycVerified: Boolean?, moreInfoUrl: String, amountInAsset: String?, amountIn: String, amountOutAsset: String?, amountOut: String, amountFeeAsset: String?, amountFee: String, startedAt: Instant, completedAt: Instant?, stellarTransactionId: String?, externalTransactionId: String?, message: String?, refunds: Refunds?, from: PublicKeyPair?, to: PublicKeyPair?, depositMemo: String?, depositMemoType: MemoType?, claimableBalanceId: String?) : ProcessingAnchorTransaction
Link copied to clipboard
@Serializable
data class ErrorTransaction(id: String, kind: TransactionKind, status: TransactionStatus, moreInfoUrl: String, startedAt: Instant, message: String?, statusEta: String?, kycVerified: Boolean?, amountInAsset: String?, amountIn: String?, amountOutAsset: String?, amountOut: String?, amountFeeAsset: String?, amountFee: String?, completedAt: String?, stellarTransactionId: String?, externalTransactionId: String?, refunds: Refunds?, from: PublicKeyPair?, to: PublicKeyPair?, depositMemo: String?, depositMemoType: MemoType?, claimableBalanceId: String?, withdrawalMemo: String?, withdrawalMemoType: MemoType?, withdrawAnchorAccount: String?) : AnchorTransaction
Link copied to clipboard
object ExceptionHandlerExit : StatusUpdateEvent
Link copied to clipboard
interface IncompleteAnchorTransaction : AnchorTransaction
Link copied to clipboard
@Serializable
data class IncompleteDepositTransaction(id: String, status: TransactionStatus, moreInfoUrl: String, startedAt: Instant, message: String?, to: PublicKeyPair?) : IncompleteAnchorTransaction
Link copied to clipboard
@Serializable
data class IncompleteWithdrawalTransaction(id: String, status: TransactionStatus, moreInfoUrl: String, startedAt: Instant, message: String?, from: PublicKeyPair?) : IncompleteAnchorTransaction
Link copied to clipboard
typealias Interactive = Sep24
Link copied to clipboard
enum MemoType : Enum<MemoType>
Link copied to clipboard
@Serializable
data class Payment(amount: String, fee: String, id: String, idType: String)
Link copied to clipboard
interface ProcessingAnchorTransaction : AnchorTransaction
Link copied to clipboard
@Serializable
data class Refunds(amountFee: String, amountRefunded: String, payments: List<Payment>)
Link copied to clipboard
class RetryContext
Link copied to clipboard
class RetryExceptionHandler(maxRetryCount: Int, backoffPeriod: Duration) : SuspendFunction1<RetryContext, Boolean>

Simple exception handler that retries on the error

Link copied to clipboard
class Sep24

Interactive flow for deposit and withdrawal using SEP-24.

Link copied to clipboard
data class StatusChange(transaction: AnchorTransaction, status: TransactionStatus, oldStatus: TransactionStatus?) : StatusUpdateEvent
Link copied to clipboard
interface StatusUpdateEvent
Link copied to clipboard
enum TransactionKind : Enum<TransactionKind>
Link copied to clipboard
@Serializable
enum TransactionStatus : Enum<TransactionStatus>
Link copied to clipboard
typealias WalletExceptionHandler = suspend (RetryContext) -> Boolean
Link copied to clipboard
class Watcher
Link copied to clipboard
data class WatcherResult(channel: Channel<StatusUpdateEvent>, job: Job)
Link copied to clipboard
@Serializable
data class WithdrawalTransaction(id: String, status: TransactionStatus, statusEta: String?, kycVerified: Boolean?, moreInfoUrl: String, amountInAsset: String?, amountIn: String, amountOutAsset: String?, amountOut: String, amountFeeAsset: String?, amountFee: String, startedAt: Instant, completedAt: Instant?, stellarTransactionId: String?, externalTransactionId: String?, message: String?, refunds: Refunds?, from: PublicKeyPair?, to: PublicKeyPair?, withdrawalMemo: String?, withdrawalMemoType: MemoType, withdrawAnchorAccount: String) : ProcessingAnchorTransaction

Functions

Link copied to clipboard
suspend fun Anchor.auth(): Auth
Link copied to clipboard
suspend fun Anchor.customer(authToken: AuthToken): Customer
Link copied to clipboard
suspend fun Anchor.getInfo(): TomlInfo
Link copied to clipboard
fun Anchor.interactive(): Interactive