支援代幣
AkashicPay 目前支援四個網路/鏈: 以太坊 (Ethereum) 和,波場 (Tron),幣安智能鏈 (BNB Smart Chain (BSC)) 和索拉拉 (Solana)。計劃在不久的將來支援其他區塊鏈,例如比特幣 (Bitcoin)。
請注意,只要 SDK 中需要網路參數 (network parameter),就會指定交易使用的區塊鏈(例如 Ethereum 或 Tron)。交易的貨幣(ETH、USDT-ERC20、TRX、USDT-TRC20、BNB、BSC-USD-BEP20、SOL、USDT-SPL)由_代幣_參數 (token parameter) 決定 - 原生交易不需要代幣參數(null 或 undefined 或類似)。更多詳情和範例請參閱下文。
Tron (波場)
在 Tron 網路上,AkashicPay 支援涉及原生代幣 (TRX) 和 Tether 穩定代幣 (USDT-TRC20) 的交易。以下是使用 SDK 以這兩種貨幣進行提幣的範例。所有其他接受網路和代幣參數的函式都以相同的方式運作。
TRX
- TypeScript
- PHP
- Java
- C#
- Go
const { l2Hash } = await akashicPay.payout(
"user123",
"TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
"100",
NetworkSymbol.Tron
);
$result = $akashicPay->payout(
"user123",
"TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
"100",
NetworkSymbol::TRON
);
APPayoutResult result = akashicPay.payout(
"user123",
"TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
"100",
APNetworkSymbol.TRX,
APTokenSymbol.NATIVE // or exclude this argument
);
var trxPayoutResult = await sdk.PayoutAsync(
"user123",
"TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
"100",
TronNetworkSymbol.Value,
ApTokenSymbol.Native // Or exclude this argument
);
ap.Payout("user123",
"TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
"100",
akashicpay.Tron,
"")
USDT (TRC20)1
- TypeScript
- PHP
- Java
- C#
- Go
const { l2Hash } = await akashicPay.payout(
"user123",
"TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
"100",
NetworkSymbol.Tron,
TokenSymbol.USDT // Note the token here
);
$result = $akashicPay->payout(
"user123",
"TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
"100",
NetworkSymbol::TRON,
TokenSymbol::USDT // Note the token here
);
APPayoutResult result = akashicPay.payout(
"user123",
"TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
"100",
APNetworkSymbol.TRX,
APTokenSymbol.USDT // Note the token here
);
var trxPayoutResult = await sdk.PayoutAsync(
"user123",
"TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
"100",
TronNetworkSymbol.Value,
ApTokenSymbol.Usdt // Note the token here
);
ap.Payout("user123",
"TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
"100",
akashicpay.Tron,
akashicpay.USDT) // Note the token here
Ethereum (以太坊)
與 Tron 相似,AkashicPay 也支援原生代幣 (ETH),Tether 穩定代幣 (USDT-ERC20) 和 Circle 穩定代幣 (USDC-ERC20) 的交易。以下是使用 SDK 以這兩種貨幣進行提幣的範例。所有其他接受網路和代幣參數的函式都以相同的方式運作 。
ETH
- TypeScript
- PHP
- Java
- C#
- Go
const { l2Hash } = await akashicPay.payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
NetworkSymbol.Ethereum_Mainnet
);
$result = $akashicPay->payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
NetworkSymbol::ETHEREUM_MAINNET
);
APPayoutResult result = akashicPay.payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
APNetworkSymbol.ETH,
APTokenSymbol.NATIVE // or exclude this argument
);
var trxPayoutResult = await sdk.PayoutAsync(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
EthNetworkSymbol.Value,
ApTokenSymbol.Native // Or exclude this argument
);
ap.Payout("user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
akashicpay.Ethereum_Mainnet,
"")
USDT (ERC20)2
- TypeScript
- PHP
- Java
- C#
- Go
const { l2Hash } = await akashicPay.payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
NetworkSymbol.Ethereum_Mainnet,
TokenSymbol.USDT // Note the token here
);
$result = $akashicPay->payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
NetworkSymbol::ETHEREUM_MAINNET,
TokenSymbol::USDT // Note the token here
);
APPayoutResult result = akashicPay.payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
APNetworkSymbol.ETH,
APTokenSymbol.USDT // Note the token here
);
var trxPayoutResult = await sdk.PayoutAsync(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
EthNetworkSymbol.Value,
ApTokenSymbol.Usdt // Note the token here
);
ap.Payout("user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
akashicpay.Ethereum_Mainnet,
akashicpay.USDT) // Note the token here
USDC (ERC20)3
- TypeScript
- PHP
- Java
- C#
- Go
const { l2Hash } = await akashicPay.payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
NetworkSymbol.Ethereum_Mainnet,
TokenSymbol.USDC // Note the token here
);
$result = $akashicPay->payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
NetworkSymbol::ETHEREUM_MAINNET,
TokenSymbol::USDC // Note the token here
);
APPayoutResult result = akashicPay.payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
APNetworkSymbol.ETH,
APTokenSymbol.USDC // Note the token here
);
var trxPayoutResult = await sdk.PayoutAsync(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
EthNetworkSymbol.Value,
ApTokenSymbol.Usdc // Note the token here
);
ap.Payout("user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
akashicpay.Ethereum_Mainnet,
akashicpay.USDC) // Note the token here
幣安智能鏈 (BNB Smart Chain (BSC))
BNB
- TypeScript
- PHP
- Java
- C#
- Go
const { l2Hash } = await akashicPay.payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
NetworkSymbol.Binance_Smart_Chain_Mainnet
);
$result = $akashicPay->payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
NetworkSymbol::BINANCE_SMART_CHAIN_MAINNET
);
APPayoutResult result = akashicPay.payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
APNetworkSymbol.BNB,
APTokenSymbol.NATIVE // or exclude this argument
);
var trxPayoutResult = await sdk.PayoutAsync(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
BnbNetworkSymbol.Value,
ApTokenSymbol.Native // Or exclude this argument
);
ap.Payout("user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
akashicpay.Binance_Smart_Chain_Mainnet,
"")
USDT (BSC-USD4)
- TypeScript
- PHP
- Java
- C#
- Go
const { l2Hash } = await akashicPay.payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
NetworkSymbol.Binance_Smart_Chain_Mainnet,
TokenSymbol.USDT // Note the token here
);
$result = $akashicPay->payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
NetworkSymbol::BINANCE_SMART_CHAIN_MAINNET,
TokenSymbol::USDT // Note the token here
);
APPayoutResult result = akashicPay.payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
APNetworkSymbol.BNB,
APTokenSymbol.USDT // Note the token here
);
var trxPayoutResult = await sdk.PayoutAsync(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
BnbNetworkSymbol.Value,
ApTokenSymbol.Usdt // Note the token here
);
ap.Payout("user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
akashicpay.Binance_Smart_Chain_Mainnet,
akashicpay.USDT) // Note the token here
USDC (BSC-USD)5
- TypeScript
- PHP
- Java
- C#
- Go
const { l2Hash } = await akashicPay.payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
NetworkSymbol.Binance_Smart_Chain_Mainnet,
TokenSymbol.USDC // Note the token here
);
$result = $akashicPay->payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
NetworkSymbol::BINANCE_SMART_CHAIN_MAINNET,
TokenSymbol::USDC // Note the token here
);
APPayoutResult result = akashicPay.payout(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
APNetworkSymbol.BNB,
APTokenSymbol.USDC // Note the token here
);
var trxPayoutResult = await sdk.PayoutAsync(
"user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
BnbNetworkSymbol.Value,
ApTokenSymbol.Usdc // Note the token here
);
ap.Payout("user123",
"0x352ad0b65ccaaddd2c3e3b1a78be555171c239f3",
"100",
akashicpay.Binance_Smart_Chain_Mainnet,
akashicpay.USDC) // Note the token here
Solana (索拉拉)
SOL
- TypeScript
- PHP
- Java
- C#
- Go
const { l2Hash } = await akashicPay.payout(
"user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
NetworkSymbol.Solana
);
$result = $akashicPay->payout(
"user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
NetworkSymbol::SOLANA
);
APPayoutResult result = akashicPay.payout(
"user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
APNetworkSymbol.SOL,
APTokenSymbol.NATIVE // or exclude this argument
);
var payoutResult = await sdk.PayoutAsync(
"user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
SolanaNetworkSymbol.Value,
ApTokenSymbol.Native // Or exclude this argument
);
ap.Payout("user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
akashicpay.Solana,
"")
USDT (SPL)
- TypeScript
- PHP
- Java
- C#
- Go
const { l2Hash } = await akashicPay.payout(
"user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
NetworkSymbol.Solana,
TokenSymbol.USDT // Note the token here
);
$result = $akashicPay->payout(
"user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
NetworkSymbol::SOLANA,
TokenSymbol::USDT // Note the token here
);
APPayoutResult result = akashicPay.payout(
"user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
APNetworkSymbol.SOL,
APTokenSymbol.USDT // Note the token here
);
var payoutResult = await sdk.PayoutAsync(
"user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
SolanaNetworkSymbol.Value,
ApTokenSymbol.Usdt // Note the token here
);
ap.Payout("user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
akashicpay.Solana,
akashicpay.USDT) // Note the token here
USDC (SPL)
- TypeScript
- PHP
- Java
- C#
- Go
const { l2Hash } = await akashicPay.payout(
"user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
NetworkSymbol.Solana,
TokenSymbol.USDC // Note the token here
);
$result = $akashicPay->payout(
"user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
NetworkSymbol::SOLANA,
TokenSymbol::USDC // Note the token here
);
APPayoutResult result = akashicPay.payout(
"user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
APNetworkSymbol.SOL,
APTokenSymbol.USDC // Note the token here
);
var payoutResult = await sdk.PayoutAsync(
"user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
SolanaNetworkSymbol.Value,
ApTokenSymbol.Usdc // Note the token here
);
ap.Payout("user123",
"8Yza6M8SfB3JWoyhmCL35aWBiEKz7wepWq19fHxcZ9mN",
"100",
akashicpay.Solana,
akashicpay.USDC) // Note the token here