Table of Contents

Class ApSdk

Namespace
AkashicPaySDK.Sdk
Assembly
AkashicPaySDK.dll
public sealed class ApSdk : IApSdk, IDisposable
Inheritance
ApSdk
Implements
Inherited Members

Constructors

ApSdk(APEnvironment, ApBaseUrl, AcBaseContract, AcOtk)

public ApSdk(APEnvironment environment, ApBaseUrl apBaseUrl, AcBaseContract contract, AcOtk otk)

Parameters

environment APEnvironment
apBaseUrl ApBaseUrl
contract AcBaseContract
otk AcOtk

ApSdk(APEnvironment, ApBaseUrl, AcBaseContract, AcOtk, UriInfo)

public ApSdk(APEnvironment environment, ApBaseUrl apBaseUrl, AcBaseContract contract, AcOtk otk, AcBaseNode.UriInfo acTargetNode)

Parameters

environment APEnvironment
apBaseUrl ApBaseUrl
contract AcBaseContract
otk AcOtk
acTargetNode AcBaseNode.UriInfo

Methods

Dispose()

public void Dispose()

GetBalanceAsync()

Gets the current balance.

public Task<ApBalanceResult?> GetBalanceAsync()

Returns

Task<ApBalanceResult>

The result containing the balance information, or null if not available.

GetDepositAddressAsync(BaseNetworkSymbol, string, string?, ApCurrencySymbol?, double?)

Gets a deposit address for the specified network, identifier, and optional parameters.

public Task<ApDepositAddressResult> GetDepositAddressAsync(BaseNetworkSymbol networkSymbol, string identifier, string? referenceId = null, ApCurrencySymbol? currencySymbol = null, double? requestedAmount = null)

Parameters

networkSymbol BaseNetworkSymbol

The network symbol.

identifier string

The identifier.

referenceId string

A reference ID for tracking or correlation purposes (optional).

currencySymbol ApCurrencySymbol?

An optional currency symbol specifying the blockchain network and token (e.g., ETH, USDT).

requestedAmount double?

The amount intended to be deposited (optional).

Returns

Task<ApDepositAddressResult>

The result containing the deposit address.

GetDepositUrlAsync(string, string?, ApCurrencySymbol?, double?)

Retrieves the deposit URL for the specified identifier, with optional parameters to customize the deposit request.

public Task<ApDepositUrlResult> GetDepositUrlAsync(string identifier, string? referenceId = null, ApCurrencySymbol? currencySymbol = null, double? requestedAmount = null)

Parameters

identifier string

The unique identifier associated with the deposit.

referenceId string

An optional reference ID provided by the client to track the deposit request.

currencySymbol ApCurrencySymbol?

An optional currency symbol specifying the blockchain network and token (e.g., ETH, USDT).

requestedAmount double?

An optional amount the user intends to deposit.

Returns

Task<ApDepositUrlResult>

A task that represents the asynchronous operation, containing the deposit URL result.

GetKeysByOwnerAndIdentifierAsync(string)

Gets the keys associated with a specific identifier.

public Task<ApKeysByIdentifierResult> GetKeysByOwnerAndIdentifierAsync(string identifier)

Parameters

identifier string

The unique identifier for which the keys are to be retrieved.

Returns

Task<ApKeysByIdentifierResult>

The result containing the keys associated with the identifier.

GetTransactionDetailAsync(string)

Gets the details of a specific transaction by L2 transaction hash.

public Task<ApTransactionDetailResult?> GetTransactionDetailAsync(string l2TxHash)

Parameters

l2TxHash string

The L2 transaction hash.

Returns

Task<ApTransactionDetailResult>

The result containing the transaction details, or null if not available.

GetTransfersAsync(ApTransactionsParam)

Gets the list of transfers based on provided transaction parameters.

public Task<ApTransfersResult> GetTransfersAsync(ApTransactionsParam param)

Parameters

param ApTransactionsParam

The transaction parameters.

Returns

Task<ApTransfersResult>

The result containing the list of transfers.

Init()

Initializes the SDK.

public Task Init()

Returns

Task

KeyBackup()

Backs up the key associated with the OTK (one-time key).

public AcOtk KeyBackup()

Returns

AcOtk

The result containing the OTK details, or null if not available.

PayoutAsync(string, string, double, BaseNetworkSymbol)

Performs a payout operation.

public Task<ApPayoutResult> PayoutAsync(string recipientId, string to, double amount, BaseNetworkSymbol networkSymbol)

Parameters

recipientId string

The recipient's ID.

to string

The address to payout to.

amount double

The amount to payout.

networkSymbol BaseNetworkSymbol

The network symbol.

Returns

Task<ApPayoutResult>

The result of the payout operation.

PayoutAsync(string, string, double, BaseNetworkSymbol, ApTokenSymbol)

Performs a payout operation.

public Task<ApPayoutResult> PayoutAsync(string recipientId, string to, double amount, BaseNetworkSymbol networkSymbol, ApTokenSymbol tokenSymbol)

Parameters

recipientId string

The recipient's ID.

to string

The address to payout to.

amount double

The amount to payout.

networkSymbol BaseNetworkSymbol

The network symbol.

tokenSymbol ApTokenSymbol

The token symbol.

Returns

Task<ApPayoutResult>

The result of the payout operation.