+91
-1
@@ -610,2 +610,79 @@ /** | ||
| type GetSwapRateInput = { | ||
| fromCurrency: string; | ||
| toCurrency: string; | ||
| amount: number; | ||
| }; | ||
| type ExecuteSwapInput = { | ||
| fromCurrency: string; | ||
| toCurrency: string; | ||
| amount: number; | ||
| client: string; | ||
| clientPassword: string; | ||
| }; | ||
| type SwapRatesData = { | ||
| rate_dollar: string; | ||
| rate_naira: string; | ||
| rate_euro: string; | ||
| rate_pound: string; | ||
| rate_egp: string; | ||
| rate_ksh: string; | ||
| rate_zar: string; | ||
| rate_rmb: string; | ||
| rate_cad: string; | ||
| rate_jpy: string; | ||
| rate_krw: string; | ||
| rate_aed: string; | ||
| rate_sgd: string; | ||
| rate_hkd: string; | ||
| rate_myr: string; | ||
| rate_idr: string; | ||
| rate_xof: string; | ||
| rate_xaf: string; | ||
| rate_ghs: string; | ||
| rate_ugx: string; | ||
| rate_tzs: string; | ||
| rate_mad: string; | ||
| rate_espees: string; | ||
| rate_plast: string; | ||
| rate_auth: string; | ||
| rate_eth: string; | ||
| rate_btc: string; | ||
| rate_sol: string; | ||
| rate_xrp: string; | ||
| rate_bnb: string; | ||
| rate_usdt: string; | ||
| rate_usdc: string; | ||
| rate_ltc: string; | ||
| rate_trx: string; | ||
| rate_ton: string; | ||
| rate_avax: string; | ||
| rate_pol: string; | ||
| rate_arb: string; | ||
| rate_ada: string; | ||
| rate_doge: string; | ||
| rate_dot: string; | ||
| result: boolean; | ||
| message: string; | ||
| }; | ||
| type SwapRateOutput = { | ||
| result: boolean; | ||
| message: string; | ||
| fromCurrency: string; | ||
| toCurrency: string; | ||
| amount: number; | ||
| convertedAmount: number; | ||
| rate: number; | ||
| rates: SwapRatesData; | ||
| }; | ||
| /** | ||
| * Get a swap quote โ preview how much you'll receive before executing. | ||
| */ | ||
| declare const getSwapQuote: ({ fromCurrency, toCurrency, amount, }: GetSwapRateInput) => Promise<SwapRateOutput>; | ||
| /** | ||
| * Execute a currency swap on-chain for a user. | ||
| */ | ||
| declare const swapCurrency: ({ fromCurrency, toCurrency, amount, client, clientPassword, }: ExecuteSwapInput) => Promise<any>; | ||
| type StorageQueryInput = { | ||
@@ -1884,2 +1961,15 @@ address?: string; | ||
| /** | ||
| * Get swap rate/quote for a currency conversion | ||
| * Endpoint: GET https://payments.connectw.com/api/swap | ||
| * Public โ no authentication required | ||
| */ | ||
| declare const getSwapRate: ({ fromCurrency, toCurrency, amount, }: GetSwapRateInput) => Promise<any>; | ||
| /** | ||
| * Execute a currency swap on-chain | ||
| * Endpoint: POST https://payments.connectw.com/api/swap | ||
| * Client-authenticated (wallet credentials in body) | ||
| */ | ||
| declare const executeSwap: ({ fromCurrency, toCurrency, amount, client, clientPassword, }: ExecuteSwapInput) => Promise<any>; | ||
| declare class SDKConfiguration { | ||
@@ -1911,2 +2001,2 @@ private config; | ||
| export { BridgeNetwork, type BridgeTokenParams, type CreateKeystoreInput, type CreateSolanaAddressParams, type CreateToronetSolanaAddressParams, type CreateWalletInput, Currency, type CurrencyOperationInput, type DateRangeQueryInput, type DeleteKeyInput, type DeployContractInput, type DeployContractOutput, type DepositFundsInput, type GetAddressBalanceInput, type GetAddressBalanceOutput, type GetBalanceInput, type GetBalanceParams, type GetBridgeTokenFeeParams, type GetProjectInput, type GetTokenBalanceParams, type GetTokenTransactionsParams, type GetTransactionInput, type GetTransactionOutput, type GetTransactionsParams, type InitializeDepositInput, type KYCParams, type Network, type PaymentExtrasInput, type PaymentInitializeCryptoParams, type ProductInput, type QueryRangeInput, type RecordPaymentParams, type RecordTransactionInput, type RoleDebuggerInput, type RoleOwnerInput, type RoleQueryInput, type RoleSuperAdminInput, type SDKConfig, type SDKConfigOptions, type SetNameInput, type StorageOwnerInput, type StorageQueryInput, type TNSAdminInput, type TNSClientInput, type TNSPermissionInput, type TNSQueryInput, type TokenQueryInput, type TransactionData, type TransferSolTokenParams, type TransferSolanaParams, type UpdateKeyPasswordInput, WebhookEvent, type WebhookEventPayload, type WebhookTransactionData, type WebhookVerificationInput, type WithdrawalInput, addAdmin, addDebugger, addSuperAdmin, adminDeleteName, adminSetName, adminUpdateName, allowBurn, allowMint, allowTransfer, bridgeTokenArbitrum, bridgeTokenBSC, bridgeTokenBase, bridgeTokenFromChain, bridgeTokenPolygon, bridgeTokenSol, burnCurrency, checkAddressVerified, configureTNS, confirmDeposit, createKeystore, createSolanaAddress, createToronetSolanaAddress, createVirtualWallet, createWallet, decreaseStorageVersion, deleteKey, deleteName, deleteWallet, deployContract, deploySmartContract, depositFunds, disallowBurn, disallowMint, disallowTransfer, enrollAddress, fetchVirtualWallet, fetchVirtualWalletByAddress, freezeAddress, generateVirtualWallet, getAddr, getAddressBalance, getAddressRole, getAddressTransactions, getAddressTransactionsAuth, getAddressTransactionsDollar, getAddressTransactionsEGP, getAddressTransactionsETH, getAddressTransactionsEuro, getAddressTransactionsKSH, getAddressTransactionsNaira, getAddressTransactionsPound, getAddressTransactionsToro, getAddressTransactionsZAR, getAdminByIndex, getAdminIndex, getAllowSelfAllowance, getAllowSelfEnroll, getAllowSelfTransactionFee, getAllowance, getBalance, getBalanceArbitrum, getBalanceBSC, getBalanceBase, getBalancePolygon, getBankListNGN, getBankListUSD, getBlockById, getBlockchainStatus, getBlockchainTransactions, getBlocksData, getBridgeBalance, getBridgeTokenBalance, getBridgeTokenFeeArbitrum, getBridgeTokenFeeBSC, getBridgeTokenFeeBase, getBridgeTokenFeeEstimate, getBridgeTokenFeePolygon, getBridgeTokenFeeSol, getBridgeTokenTransactions, getBridgeTransactions, getCommissionAddress, getCommissionPercentage, getCurrencyBalance, getDebuggerByIndex, getDebuggerIndex, getEventById, getFiatTransactionByTxid, getFiatTransactionsAddressRange, getFiatTransactionsRecorderRange, getFiatWithdrawalByTxid, getFiatWithdrawalsAddressRange, getFiatWithdrawalsRecorderRange, getKey, getLatestBlockData, getMaximumAllowance, getMinimumAllowance, getName, getNumberOfAdmin, getNumberOfDebugger, getNumberOfSuperAdmin, getOwner, getPaymentTransaction, getPaymentTransactionStatus, getPendingTransaction, getProduct, getProject, getReceipt, getReserve, getRevertReason, getSDKConfig, getSelfAllowance, getSelfMaximumAllowance, getSelfMinimumAllowance, getSelfTransactionFee, getSelfTransactionFeeFixed, getSelfTransactionFeePercentage, getSolBalance, getSolLatestBlock, getSolTokenBalance, getSolTokenTransactions, getSolTransactions, getStorageVersion, getSuperAdminByIndex, getSuperAdminIndex, getSupportedAssetsExchangeRates, getTokenBalance, getTokenBalanceArbitrum, getTokenBalanceBSC, getTokenBalanceBase, getTokenBalancePolygon, getTokenDecimal, getTokenName, getTokenSymbol, getTokenTransactionsArbitrum, getTokenTransactionsBSC, getTokenTransactionsBase, getTokenTransactionsPolygon, getToller, getTotalCap, getTotalCirculating, getTotalReserving, getTransaction, getTransactionByHash, getTransactionFee, getTransactionFeeFixed, getTransactionFeePercentage, getTransactionReceiptById, getTransactionsArbitrum, getTransactionsBSC, getTransactionsBase, getTransactionsDollarWrapper, getTransactionsEGPWrapper, getTransactionsETHWrapper, getTransactionsEuroWrapper, getTransactionsKSHWrapper, getTransactionsNairaWrapper, getTransactionsPolygon, getTransactionsPoundWrapper, getTransactionsRangeWrapper, getTransactionsToroWrapper, getTransactionsZARWrapper, getVirtualWalletByAddress, getWalletKey, importKey, importWalletFromPrivateKeyAndPassword, increaseStorageVersion, initAdmin, initDebugger, initSuperAdmin, initTNS, initializeDeposit, initializeSDK, isAddrAssigned, isAddressKYCVerified, isAddressUtil, isAdmin, isBurnOn, isContractRegistered, isDebugger, isDeleteOn, isEnrolled, isFrozen, isMintOn, isNameUsed, isOwner, isSetOn, isStorageOn, isSuperAdmin, isTNSAvailable, isTransferOn, isUpdateOn, isValidSolanaAddress, makeInterWalletTransfer, makeInterWalletTransferTxn, mintCurrency, paymentInitializeCrypto, performKYCForCustomer, recordCryptoPayment, recordFiatWithdrawal, recordPaymentTransaction, recordPaymentTransactionStatus, recordProduct, registerContract, removeAdmin, removeAllAdmins, removeAllDebuggers, removeAllSuperAdmins, removeDebugger, removeSuperAdmin, resetSDKConfig, retrieveVirtualWallet, setAllowance, setDeleteNameOff, setDeleteNameOn, setMaximumAllowance, setMinimumAllowance, setName, setSetNameOff, setSetNameOn, setStorageOff, setStorageOn, setStorageVersion, setTransactionFee, setTransactionFeeFixed, setTransactionFeePercentage, setUpdateNameOff, setUpdateNameOn, setupKYC, transferCurrency, transferOwnership, transferSolToken, transferSolana, unfreezeAddress, unregisterContract, updateKeyPassword, updateName, updatePassword, updateProduct, updateVirtualWalletTransactions, updateVirtualWalletTxs, validateEvmAddress, verifyBankAccountNameNGN, verifyDeposit, verifyKey, verifySolanaVirtualAddress, verifySolanaVirtualAddressEnc, verifyWalletPassword, verifyWebhookSignature }; | ||
| export { BridgeNetwork, type BridgeTokenParams, type CreateKeystoreInput, type CreateSolanaAddressParams, type CreateToronetSolanaAddressParams, type CreateWalletInput, Currency, type CurrencyOperationInput, type DateRangeQueryInput, type DeleteKeyInput, type DeployContractInput, type DeployContractOutput, type DepositFundsInput, type ExecuteSwapInput, type GetAddressBalanceInput, type GetAddressBalanceOutput, type GetBalanceInput, type GetBalanceParams, type GetBridgeTokenFeeParams, type GetProjectInput, type GetSwapRateInput, type GetTokenBalanceParams, type GetTokenTransactionsParams, type GetTransactionInput, type GetTransactionOutput, type GetTransactionsParams, type InitializeDepositInput, type KYCParams, type Network, type PaymentExtrasInput, type PaymentInitializeCryptoParams, type ProductInput, type QueryRangeInput, type RecordPaymentParams, type RecordTransactionInput, type RoleDebuggerInput, type RoleOwnerInput, type RoleQueryInput, type RoleSuperAdminInput, type SDKConfig, type SDKConfigOptions, type SetNameInput, type StorageOwnerInput, type StorageQueryInput, type SwapRateOutput, type SwapRatesData, type TNSAdminInput, type TNSClientInput, type TNSPermissionInput, type TNSQueryInput, type TokenQueryInput, type TransactionData, type TransferSolTokenParams, type TransferSolanaParams, type UpdateKeyPasswordInput, WebhookEvent, type WebhookEventPayload, type WebhookTransactionData, type WebhookVerificationInput, type WithdrawalInput, addAdmin, addDebugger, addSuperAdmin, adminDeleteName, adminSetName, adminUpdateName, allowBurn, allowMint, allowTransfer, bridgeTokenArbitrum, bridgeTokenBSC, bridgeTokenBase, bridgeTokenFromChain, bridgeTokenPolygon, bridgeTokenSol, burnCurrency, checkAddressVerified, configureTNS, confirmDeposit, createKeystore, createSolanaAddress, createToronetSolanaAddress, createVirtualWallet, createWallet, decreaseStorageVersion, deleteKey, deleteName, deleteWallet, deployContract, deploySmartContract, depositFunds, disallowBurn, disallowMint, disallowTransfer, enrollAddress, executeSwap, fetchVirtualWallet, fetchVirtualWalletByAddress, freezeAddress, generateVirtualWallet, getAddr, getAddressBalance, getAddressRole, getAddressTransactions, getAddressTransactionsAuth, getAddressTransactionsDollar, getAddressTransactionsEGP, getAddressTransactionsETH, getAddressTransactionsEuro, getAddressTransactionsKSH, getAddressTransactionsNaira, getAddressTransactionsPound, getAddressTransactionsToro, getAddressTransactionsZAR, getAdminByIndex, getAdminIndex, getAllowSelfAllowance, getAllowSelfEnroll, getAllowSelfTransactionFee, getAllowance, getBalance, getBalanceArbitrum, getBalanceBSC, getBalanceBase, getBalancePolygon, getBankListNGN, getBankListUSD, getBlockById, getBlockchainStatus, getBlockchainTransactions, getBlocksData, getBridgeBalance, getBridgeTokenBalance, getBridgeTokenFeeArbitrum, getBridgeTokenFeeBSC, getBridgeTokenFeeBase, getBridgeTokenFeeEstimate, getBridgeTokenFeePolygon, getBridgeTokenFeeSol, getBridgeTokenTransactions, getBridgeTransactions, getCommissionAddress, getCommissionPercentage, getCurrencyBalance, getDebuggerByIndex, getDebuggerIndex, getEventById, getFiatTransactionByTxid, getFiatTransactionsAddressRange, getFiatTransactionsRecorderRange, getFiatWithdrawalByTxid, getFiatWithdrawalsAddressRange, getFiatWithdrawalsRecorderRange, getKey, getLatestBlockData, getMaximumAllowance, getMinimumAllowance, getName, getNumberOfAdmin, getNumberOfDebugger, getNumberOfSuperAdmin, getOwner, getPaymentTransaction, getPaymentTransactionStatus, getPendingTransaction, getProduct, getProject, getReceipt, getReserve, getRevertReason, getSDKConfig, getSelfAllowance, getSelfMaximumAllowance, getSelfMinimumAllowance, getSelfTransactionFee, getSelfTransactionFeeFixed, getSelfTransactionFeePercentage, getSolBalance, getSolLatestBlock, getSolTokenBalance, getSolTokenTransactions, getSolTransactions, getStorageVersion, getSuperAdminByIndex, getSuperAdminIndex, getSupportedAssetsExchangeRates, getSwapQuote, getSwapRate, getTokenBalance, getTokenBalanceArbitrum, getTokenBalanceBSC, getTokenBalanceBase, getTokenBalancePolygon, getTokenDecimal, getTokenName, getTokenSymbol, getTokenTransactionsArbitrum, getTokenTransactionsBSC, getTokenTransactionsBase, getTokenTransactionsPolygon, getToller, getTotalCap, getTotalCirculating, getTotalReserving, getTransaction, getTransactionByHash, getTransactionFee, getTransactionFeeFixed, getTransactionFeePercentage, getTransactionReceiptById, getTransactionsArbitrum, getTransactionsBSC, getTransactionsBase, getTransactionsDollarWrapper, getTransactionsEGPWrapper, getTransactionsETHWrapper, getTransactionsEuroWrapper, getTransactionsKSHWrapper, getTransactionsNairaWrapper, getTransactionsPolygon, getTransactionsPoundWrapper, getTransactionsRangeWrapper, getTransactionsToroWrapper, getTransactionsZARWrapper, getVirtualWalletByAddress, getWalletKey, importKey, importWalletFromPrivateKeyAndPassword, increaseStorageVersion, initAdmin, initDebugger, initSuperAdmin, initTNS, initializeDeposit, initializeSDK, isAddrAssigned, isAddressKYCVerified, isAddressUtil, isAdmin, isBurnOn, isContractRegistered, isDebugger, isDeleteOn, isEnrolled, isFrozen, isMintOn, isNameUsed, isOwner, isSetOn, isStorageOn, isSuperAdmin, isTNSAvailable, isTransferOn, isUpdateOn, isValidSolanaAddress, makeInterWalletTransfer, makeInterWalletTransferTxn, mintCurrency, paymentInitializeCrypto, performKYCForCustomer, recordCryptoPayment, recordFiatWithdrawal, recordPaymentTransaction, recordPaymentTransactionStatus, recordProduct, registerContract, removeAdmin, removeAllAdmins, removeAllDebuggers, removeAllSuperAdmins, removeDebugger, removeSuperAdmin, resetSDKConfig, retrieveVirtualWallet, setAllowance, setDeleteNameOff, setDeleteNameOn, setMaximumAllowance, setMinimumAllowance, setName, setSetNameOff, setSetNameOn, setStorageOff, setStorageOn, setStorageVersion, setTransactionFee, setTransactionFeeFixed, setTransactionFeePercentage, setUpdateNameOff, setUpdateNameOn, setupKYC, swapCurrency, transferCurrency, transferOwnership, transferSolToken, transferSolana, unfreezeAddress, unregisterContract, updateKeyPassword, updateName, updatePassword, updateProduct, updateVirtualWalletTransactions, updateVirtualWalletTxs, validateEvmAddress, verifyBankAccountNameNGN, verifyDeposit, verifyKey, verifySolanaVirtualAddress, verifySolanaVirtualAddressEnc, verifyWalletPassword, verifyWebhookSignature }; |
+91
-1
@@ -610,2 +610,79 @@ /** | ||
| type GetSwapRateInput = { | ||
| fromCurrency: string; | ||
| toCurrency: string; | ||
| amount: number; | ||
| }; | ||
| type ExecuteSwapInput = { | ||
| fromCurrency: string; | ||
| toCurrency: string; | ||
| amount: number; | ||
| client: string; | ||
| clientPassword: string; | ||
| }; | ||
| type SwapRatesData = { | ||
| rate_dollar: string; | ||
| rate_naira: string; | ||
| rate_euro: string; | ||
| rate_pound: string; | ||
| rate_egp: string; | ||
| rate_ksh: string; | ||
| rate_zar: string; | ||
| rate_rmb: string; | ||
| rate_cad: string; | ||
| rate_jpy: string; | ||
| rate_krw: string; | ||
| rate_aed: string; | ||
| rate_sgd: string; | ||
| rate_hkd: string; | ||
| rate_myr: string; | ||
| rate_idr: string; | ||
| rate_xof: string; | ||
| rate_xaf: string; | ||
| rate_ghs: string; | ||
| rate_ugx: string; | ||
| rate_tzs: string; | ||
| rate_mad: string; | ||
| rate_espees: string; | ||
| rate_plast: string; | ||
| rate_auth: string; | ||
| rate_eth: string; | ||
| rate_btc: string; | ||
| rate_sol: string; | ||
| rate_xrp: string; | ||
| rate_bnb: string; | ||
| rate_usdt: string; | ||
| rate_usdc: string; | ||
| rate_ltc: string; | ||
| rate_trx: string; | ||
| rate_ton: string; | ||
| rate_avax: string; | ||
| rate_pol: string; | ||
| rate_arb: string; | ||
| rate_ada: string; | ||
| rate_doge: string; | ||
| rate_dot: string; | ||
| result: boolean; | ||
| message: string; | ||
| }; | ||
| type SwapRateOutput = { | ||
| result: boolean; | ||
| message: string; | ||
| fromCurrency: string; | ||
| toCurrency: string; | ||
| amount: number; | ||
| convertedAmount: number; | ||
| rate: number; | ||
| rates: SwapRatesData; | ||
| }; | ||
| /** | ||
| * Get a swap quote โ preview how much you'll receive before executing. | ||
| */ | ||
| declare const getSwapQuote: ({ fromCurrency, toCurrency, amount, }: GetSwapRateInput) => Promise<SwapRateOutput>; | ||
| /** | ||
| * Execute a currency swap on-chain for a user. | ||
| */ | ||
| declare const swapCurrency: ({ fromCurrency, toCurrency, amount, client, clientPassword, }: ExecuteSwapInput) => Promise<any>; | ||
| type StorageQueryInput = { | ||
@@ -1884,2 +1961,15 @@ address?: string; | ||
| /** | ||
| * Get swap rate/quote for a currency conversion | ||
| * Endpoint: GET https://payments.connectw.com/api/swap | ||
| * Public โ no authentication required | ||
| */ | ||
| declare const getSwapRate: ({ fromCurrency, toCurrency, amount, }: GetSwapRateInput) => Promise<any>; | ||
| /** | ||
| * Execute a currency swap on-chain | ||
| * Endpoint: POST https://payments.connectw.com/api/swap | ||
| * Client-authenticated (wallet credentials in body) | ||
| */ | ||
| declare const executeSwap: ({ fromCurrency, toCurrency, amount, client, clientPassword, }: ExecuteSwapInput) => Promise<any>; | ||
| declare class SDKConfiguration { | ||
@@ -1911,2 +2001,2 @@ private config; | ||
| export { BridgeNetwork, type BridgeTokenParams, type CreateKeystoreInput, type CreateSolanaAddressParams, type CreateToronetSolanaAddressParams, type CreateWalletInput, Currency, type CurrencyOperationInput, type DateRangeQueryInput, type DeleteKeyInput, type DeployContractInput, type DeployContractOutput, type DepositFundsInput, type GetAddressBalanceInput, type GetAddressBalanceOutput, type GetBalanceInput, type GetBalanceParams, type GetBridgeTokenFeeParams, type GetProjectInput, type GetTokenBalanceParams, type GetTokenTransactionsParams, type GetTransactionInput, type GetTransactionOutput, type GetTransactionsParams, type InitializeDepositInput, type KYCParams, type Network, type PaymentExtrasInput, type PaymentInitializeCryptoParams, type ProductInput, type QueryRangeInput, type RecordPaymentParams, type RecordTransactionInput, type RoleDebuggerInput, type RoleOwnerInput, type RoleQueryInput, type RoleSuperAdminInput, type SDKConfig, type SDKConfigOptions, type SetNameInput, type StorageOwnerInput, type StorageQueryInput, type TNSAdminInput, type TNSClientInput, type TNSPermissionInput, type TNSQueryInput, type TokenQueryInput, type TransactionData, type TransferSolTokenParams, type TransferSolanaParams, type UpdateKeyPasswordInput, WebhookEvent, type WebhookEventPayload, type WebhookTransactionData, type WebhookVerificationInput, type WithdrawalInput, addAdmin, addDebugger, addSuperAdmin, adminDeleteName, adminSetName, adminUpdateName, allowBurn, allowMint, allowTransfer, bridgeTokenArbitrum, bridgeTokenBSC, bridgeTokenBase, bridgeTokenFromChain, bridgeTokenPolygon, bridgeTokenSol, burnCurrency, checkAddressVerified, configureTNS, confirmDeposit, createKeystore, createSolanaAddress, createToronetSolanaAddress, createVirtualWallet, createWallet, decreaseStorageVersion, deleteKey, deleteName, deleteWallet, deployContract, deploySmartContract, depositFunds, disallowBurn, disallowMint, disallowTransfer, enrollAddress, fetchVirtualWallet, fetchVirtualWalletByAddress, freezeAddress, generateVirtualWallet, getAddr, getAddressBalance, getAddressRole, getAddressTransactions, getAddressTransactionsAuth, getAddressTransactionsDollar, getAddressTransactionsEGP, getAddressTransactionsETH, getAddressTransactionsEuro, getAddressTransactionsKSH, getAddressTransactionsNaira, getAddressTransactionsPound, getAddressTransactionsToro, getAddressTransactionsZAR, getAdminByIndex, getAdminIndex, getAllowSelfAllowance, getAllowSelfEnroll, getAllowSelfTransactionFee, getAllowance, getBalance, getBalanceArbitrum, getBalanceBSC, getBalanceBase, getBalancePolygon, getBankListNGN, getBankListUSD, getBlockById, getBlockchainStatus, getBlockchainTransactions, getBlocksData, getBridgeBalance, getBridgeTokenBalance, getBridgeTokenFeeArbitrum, getBridgeTokenFeeBSC, getBridgeTokenFeeBase, getBridgeTokenFeeEstimate, getBridgeTokenFeePolygon, getBridgeTokenFeeSol, getBridgeTokenTransactions, getBridgeTransactions, getCommissionAddress, getCommissionPercentage, getCurrencyBalance, getDebuggerByIndex, getDebuggerIndex, getEventById, getFiatTransactionByTxid, getFiatTransactionsAddressRange, getFiatTransactionsRecorderRange, getFiatWithdrawalByTxid, getFiatWithdrawalsAddressRange, getFiatWithdrawalsRecorderRange, getKey, getLatestBlockData, getMaximumAllowance, getMinimumAllowance, getName, getNumberOfAdmin, getNumberOfDebugger, getNumberOfSuperAdmin, getOwner, getPaymentTransaction, getPaymentTransactionStatus, getPendingTransaction, getProduct, getProject, getReceipt, getReserve, getRevertReason, getSDKConfig, getSelfAllowance, getSelfMaximumAllowance, getSelfMinimumAllowance, getSelfTransactionFee, getSelfTransactionFeeFixed, getSelfTransactionFeePercentage, getSolBalance, getSolLatestBlock, getSolTokenBalance, getSolTokenTransactions, getSolTransactions, getStorageVersion, getSuperAdminByIndex, getSuperAdminIndex, getSupportedAssetsExchangeRates, getTokenBalance, getTokenBalanceArbitrum, getTokenBalanceBSC, getTokenBalanceBase, getTokenBalancePolygon, getTokenDecimal, getTokenName, getTokenSymbol, getTokenTransactionsArbitrum, getTokenTransactionsBSC, getTokenTransactionsBase, getTokenTransactionsPolygon, getToller, getTotalCap, getTotalCirculating, getTotalReserving, getTransaction, getTransactionByHash, getTransactionFee, getTransactionFeeFixed, getTransactionFeePercentage, getTransactionReceiptById, getTransactionsArbitrum, getTransactionsBSC, getTransactionsBase, getTransactionsDollarWrapper, getTransactionsEGPWrapper, getTransactionsETHWrapper, getTransactionsEuroWrapper, getTransactionsKSHWrapper, getTransactionsNairaWrapper, getTransactionsPolygon, getTransactionsPoundWrapper, getTransactionsRangeWrapper, getTransactionsToroWrapper, getTransactionsZARWrapper, getVirtualWalletByAddress, getWalletKey, importKey, importWalletFromPrivateKeyAndPassword, increaseStorageVersion, initAdmin, initDebugger, initSuperAdmin, initTNS, initializeDeposit, initializeSDK, isAddrAssigned, isAddressKYCVerified, isAddressUtil, isAdmin, isBurnOn, isContractRegistered, isDebugger, isDeleteOn, isEnrolled, isFrozen, isMintOn, isNameUsed, isOwner, isSetOn, isStorageOn, isSuperAdmin, isTNSAvailable, isTransferOn, isUpdateOn, isValidSolanaAddress, makeInterWalletTransfer, makeInterWalletTransferTxn, mintCurrency, paymentInitializeCrypto, performKYCForCustomer, recordCryptoPayment, recordFiatWithdrawal, recordPaymentTransaction, recordPaymentTransactionStatus, recordProduct, registerContract, removeAdmin, removeAllAdmins, removeAllDebuggers, removeAllSuperAdmins, removeDebugger, removeSuperAdmin, resetSDKConfig, retrieveVirtualWallet, setAllowance, setDeleteNameOff, setDeleteNameOn, setMaximumAllowance, setMinimumAllowance, setName, setSetNameOff, setSetNameOn, setStorageOff, setStorageOn, setStorageVersion, setTransactionFee, setTransactionFeeFixed, setTransactionFeePercentage, setUpdateNameOff, setUpdateNameOn, setupKYC, transferCurrency, transferOwnership, transferSolToken, transferSolana, unfreezeAddress, unregisterContract, updateKeyPassword, updateName, updatePassword, updateProduct, updateVirtualWalletTransactions, updateVirtualWalletTxs, validateEvmAddress, verifyBankAccountNameNGN, verifyDeposit, verifyKey, verifySolanaVirtualAddress, verifySolanaVirtualAddressEnc, verifyWalletPassword, verifyWebhookSignature }; | ||
| export { BridgeNetwork, type BridgeTokenParams, type CreateKeystoreInput, type CreateSolanaAddressParams, type CreateToronetSolanaAddressParams, type CreateWalletInput, Currency, type CurrencyOperationInput, type DateRangeQueryInput, type DeleteKeyInput, type DeployContractInput, type DeployContractOutput, type DepositFundsInput, type ExecuteSwapInput, type GetAddressBalanceInput, type GetAddressBalanceOutput, type GetBalanceInput, type GetBalanceParams, type GetBridgeTokenFeeParams, type GetProjectInput, type GetSwapRateInput, type GetTokenBalanceParams, type GetTokenTransactionsParams, type GetTransactionInput, type GetTransactionOutput, type GetTransactionsParams, type InitializeDepositInput, type KYCParams, type Network, type PaymentExtrasInput, type PaymentInitializeCryptoParams, type ProductInput, type QueryRangeInput, type RecordPaymentParams, type RecordTransactionInput, type RoleDebuggerInput, type RoleOwnerInput, type RoleQueryInput, type RoleSuperAdminInput, type SDKConfig, type SDKConfigOptions, type SetNameInput, type StorageOwnerInput, type StorageQueryInput, type SwapRateOutput, type SwapRatesData, type TNSAdminInput, type TNSClientInput, type TNSPermissionInput, type TNSQueryInput, type TokenQueryInput, type TransactionData, type TransferSolTokenParams, type TransferSolanaParams, type UpdateKeyPasswordInput, WebhookEvent, type WebhookEventPayload, type WebhookTransactionData, type WebhookVerificationInput, type WithdrawalInput, addAdmin, addDebugger, addSuperAdmin, adminDeleteName, adminSetName, adminUpdateName, allowBurn, allowMint, allowTransfer, bridgeTokenArbitrum, bridgeTokenBSC, bridgeTokenBase, bridgeTokenFromChain, bridgeTokenPolygon, bridgeTokenSol, burnCurrency, checkAddressVerified, configureTNS, confirmDeposit, createKeystore, createSolanaAddress, createToronetSolanaAddress, createVirtualWallet, createWallet, decreaseStorageVersion, deleteKey, deleteName, deleteWallet, deployContract, deploySmartContract, depositFunds, disallowBurn, disallowMint, disallowTransfer, enrollAddress, executeSwap, fetchVirtualWallet, fetchVirtualWalletByAddress, freezeAddress, generateVirtualWallet, getAddr, getAddressBalance, getAddressRole, getAddressTransactions, getAddressTransactionsAuth, getAddressTransactionsDollar, getAddressTransactionsEGP, getAddressTransactionsETH, getAddressTransactionsEuro, getAddressTransactionsKSH, getAddressTransactionsNaira, getAddressTransactionsPound, getAddressTransactionsToro, getAddressTransactionsZAR, getAdminByIndex, getAdminIndex, getAllowSelfAllowance, getAllowSelfEnroll, getAllowSelfTransactionFee, getAllowance, getBalance, getBalanceArbitrum, getBalanceBSC, getBalanceBase, getBalancePolygon, getBankListNGN, getBankListUSD, getBlockById, getBlockchainStatus, getBlockchainTransactions, getBlocksData, getBridgeBalance, getBridgeTokenBalance, getBridgeTokenFeeArbitrum, getBridgeTokenFeeBSC, getBridgeTokenFeeBase, getBridgeTokenFeeEstimate, getBridgeTokenFeePolygon, getBridgeTokenFeeSol, getBridgeTokenTransactions, getBridgeTransactions, getCommissionAddress, getCommissionPercentage, getCurrencyBalance, getDebuggerByIndex, getDebuggerIndex, getEventById, getFiatTransactionByTxid, getFiatTransactionsAddressRange, getFiatTransactionsRecorderRange, getFiatWithdrawalByTxid, getFiatWithdrawalsAddressRange, getFiatWithdrawalsRecorderRange, getKey, getLatestBlockData, getMaximumAllowance, getMinimumAllowance, getName, getNumberOfAdmin, getNumberOfDebugger, getNumberOfSuperAdmin, getOwner, getPaymentTransaction, getPaymentTransactionStatus, getPendingTransaction, getProduct, getProject, getReceipt, getReserve, getRevertReason, getSDKConfig, getSelfAllowance, getSelfMaximumAllowance, getSelfMinimumAllowance, getSelfTransactionFee, getSelfTransactionFeeFixed, getSelfTransactionFeePercentage, getSolBalance, getSolLatestBlock, getSolTokenBalance, getSolTokenTransactions, getSolTransactions, getStorageVersion, getSuperAdminByIndex, getSuperAdminIndex, getSupportedAssetsExchangeRates, getSwapQuote, getSwapRate, getTokenBalance, getTokenBalanceArbitrum, getTokenBalanceBSC, getTokenBalanceBase, getTokenBalancePolygon, getTokenDecimal, getTokenName, getTokenSymbol, getTokenTransactionsArbitrum, getTokenTransactionsBSC, getTokenTransactionsBase, getTokenTransactionsPolygon, getToller, getTotalCap, getTotalCirculating, getTotalReserving, getTransaction, getTransactionByHash, getTransactionFee, getTransactionFeeFixed, getTransactionFeePercentage, getTransactionReceiptById, getTransactionsArbitrum, getTransactionsBSC, getTransactionsBase, getTransactionsDollarWrapper, getTransactionsEGPWrapper, getTransactionsETHWrapper, getTransactionsEuroWrapper, getTransactionsKSHWrapper, getTransactionsNairaWrapper, getTransactionsPolygon, getTransactionsPoundWrapper, getTransactionsRangeWrapper, getTransactionsToroWrapper, getTransactionsZARWrapper, getVirtualWalletByAddress, getWalletKey, importKey, importWalletFromPrivateKeyAndPassword, increaseStorageVersion, initAdmin, initDebugger, initSuperAdmin, initTNS, initializeDeposit, initializeSDK, isAddrAssigned, isAddressKYCVerified, isAddressUtil, isAdmin, isBurnOn, isContractRegistered, isDebugger, isDeleteOn, isEnrolled, isFrozen, isMintOn, isNameUsed, isOwner, isSetOn, isStorageOn, isSuperAdmin, isTNSAvailable, isTransferOn, isUpdateOn, isValidSolanaAddress, makeInterWalletTransfer, makeInterWalletTransferTxn, mintCurrency, paymentInitializeCrypto, performKYCForCustomer, recordCryptoPayment, recordFiatWithdrawal, recordPaymentTransaction, recordPaymentTransactionStatus, recordProduct, registerContract, removeAdmin, removeAllAdmins, removeAllDebuggers, removeAllSuperAdmins, removeDebugger, removeSuperAdmin, resetSDKConfig, retrieveVirtualWallet, setAllowance, setDeleteNameOff, setDeleteNameOn, setMaximumAllowance, setMinimumAllowance, setName, setSetNameOff, setSetNameOn, setStorageOff, setStorageOn, setStorageVersion, setTransactionFee, setTransactionFeeFixed, setTransactionFeePercentage, setUpdateNameOff, setUpdateNameOn, setupKYC, swapCurrency, transferCurrency, transferOwnership, transferSolToken, transferSolana, unfreezeAddress, unregisterContract, updateKeyPassword, updateName, updatePassword, updateProduct, updateVirtualWalletTransactions, updateVirtualWalletTxs, validateEvmAddress, verifyBankAccountNameNGN, verifyDeposit, verifyKey, verifySolanaVirtualAddress, verifySolanaVirtualAddressEnc, verifyWalletPassword, verifyWebhookSignature }; |
+1
-1
| { | ||
| "name": "torosdk", | ||
| "version": "0.4.0", | ||
| "version": "0.5.0", | ||
| "description": "A comprehensive Node.js library for interacting with the Toronet blockchain. This package simplifies wallet management, TNS setup, balance queries, fiat deposits, inter-wallet transfers, KYC verification, and smart contract deployment on Toronet's EVM-compatible network. Perfect for developers building blockchain-based applications with Toronet.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
+64
-0
@@ -89,2 +89,6 @@ # Toronet SDK | ||
| - **Currency Swap** | ||
| - Get live exchange rate quotes between 40+ currencies and TORO. | ||
| - Execute on-chain currency swaps via ConnectW. | ||
| - **Advanced Query Operations** | ||
@@ -1106,2 +1110,62 @@ - Address transactions with date range and token filtering. | ||
| ### ๐ Webhook Verification | ||
| Verify incoming ConnectW webhook signatures in your backend to ensure authenticity. | ||
| ```typescript | ||
| import { verifyWebhookSignature, WebhookEventPayload } from "torosdk"; | ||
| export async function POST(request: Request) { | ||
| const payload = await request.text(); | ||
| const secret = process.env.WEBHOOK_SECRET!; // "whsec_XXXXXXXX..." | ||
| try { | ||
| verifyWebhookSignature({ | ||
| payload, | ||
| secret, | ||
| svixId: request.headers.get("svix-id")!, | ||
| svixTimestamp: request.headers.get("svix-timestamp")!, | ||
| svixSignature: request.headers.get("svix-signature")!, | ||
| }); | ||
| const event: WebhookEventPayload = JSON.parse(payload); | ||
| console.log("Event:", event.event, "Status:", event.data.status); | ||
| return new Response(JSON.stringify({ received: true }), { status: 200 }); | ||
| } catch (error) { | ||
| return new Response(JSON.stringify({ error: "Invalid signature" }), { status: 401 }); | ||
| } | ||
| } | ||
| ``` | ||
| --- | ||
| ### ๐ฑ Currency Swap | ||
| Get live exchange rates and execute on-chain swaps between 40+ currencies and TORO. | ||
| ```typescript | ||
| import { getSwapQuote, swapCurrency } from "torosdk"; | ||
| // 1. Preview the rate (no auth required) | ||
| const quote = await getSwapQuote({ | ||
| fromCurrency: "ngn", | ||
| toCurrency: "toro", | ||
| amount: 1400, | ||
| }); | ||
| console.log(`Rate: ${quote.rate}, You receive: ${quote.convertedAmount} TORO`); | ||
| // 2. Execute the swap | ||
| const result = await swapCurrency({ | ||
| fromCurrency: "ngn", | ||
| toCurrency: "toro", | ||
| amount: 1400, | ||
| client: "0xYourWalletAddress", | ||
| clientPassword: "yourWalletPassword", | ||
| }); | ||
| console.log("Swap result:", result); | ||
| ``` | ||
| --- | ||
| ## Supported Currencies | ||
@@ -1108,0 +1172,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
511170
2.24%14630
1.63%1249
5.4%