+124
-1
@@ -137,2 +137,60 @@ /** | ||
| }; | ||
| type GetTransactionInput = { | ||
| transactionId: string; | ||
| admin: string; | ||
| adminpwd: string; | ||
| }; | ||
| type RecordTransactionInput = { | ||
| transactionId: string; | ||
| admin: string; | ||
| adminpwd: string; | ||
| }; | ||
| type TransactionData = { | ||
| TX_ID: string; | ||
| TX_Time: string; | ||
| TX_Currency: string; | ||
| TX_Token: string; | ||
| TX_Gateway: string; | ||
| TX_PayerName: string; | ||
| TX_PayerEmail: string; | ||
| TX_PayerAddress: string; | ||
| TX_PayerCode: string | null; | ||
| TX_PayerCity: string; | ||
| TX_PayerState: string; | ||
| TX_PayerCountry: string; | ||
| TX_PayerZipCode: string; | ||
| TX_PayerPhone: string; | ||
| TX_Description: string; | ||
| TX_SuccessURL: string; | ||
| TX_CancelURL: string; | ||
| TX_AccountName: string; | ||
| TX_AccountNumber: string; | ||
| TX_Provider: string; | ||
| TX_Text: string; | ||
| TX_Project: string; | ||
| TX_ChainTXID: string | null; | ||
| TX_PaidAmount: string; | ||
| TX_AmountToken: string; | ||
| TX_Fee: string; | ||
| TX_Amount: string; | ||
| TX_Commission: string; | ||
| TX_StatusID: number; | ||
| TX_FeeType: number; | ||
| TX_Passthrough: number; | ||
| TX_Exchange: number; | ||
| TX_Approved: number; | ||
| TX_NeedKYC: number; | ||
| TX_Recorder: string; | ||
| TX_Address: string; | ||
| status: string; | ||
| payment_id: string | null; | ||
| called: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| }; | ||
| type GetTransactionOutput = { | ||
| result: boolean; | ||
| data: TransactionData; | ||
| message: string; | ||
| }; | ||
@@ -173,2 +231,4 @@ declare const createWallet: ({ password, username }: CreateWalletInput) => Promise<string>; | ||
| declare const makeInterWalletTransferTxn: (senderAddr: string, senderPwd: string, receiverAddr: string, amount: string, currencyName: string) => Promise<any>; | ||
| declare const getPaymentTransactionStatus: ({ transactionId, admin, adminpwd, }: GetTransactionInput) => Promise<any>; | ||
| declare const recordPaymentTransactionStatus: ({ transactionId, admin, adminpwd, }: RecordTransactionInput) => Promise<any>; | ||
@@ -632,2 +692,33 @@ /** | ||
| type WebhookVerificationInput = { | ||
| payload: string; | ||
| secret: string; | ||
| svixId: string; | ||
| svixTimestamp: string; | ||
| svixSignature: string; | ||
| tolerance?: number; | ||
| }; | ||
| declare enum WebhookEvent { | ||
| TransactionCompleted = "transaction.completed", | ||
| TransactionApproved = "transaction.approved" | ||
| } | ||
| type WebhookTransactionData = { | ||
| TX_AccountName: string; | ||
| TX_AccountNumber: string; | ||
| TX_Address: string; | ||
| TX_Amount: string; | ||
| TX_AmountToken: string; | ||
| TX_Approved: number; | ||
| TX_ChainTXID: string; | ||
| TX_Currency: string; | ||
| TX_Project: string; | ||
| TX_Provider: string; | ||
| status: string; | ||
| createdAt: string; | ||
| }; | ||
| type WebhookEventPayload = { | ||
| data: WebhookTransactionData; | ||
| event: WebhookEvent | string; | ||
| }; | ||
| declare const importWalletFromPrivateKeyAndPassword: ({ pvKey, password, }: { | ||
@@ -888,2 +979,22 @@ pvKey: string; | ||
| /** | ||
| * Get a ConnectW payment transaction by ID | ||
| * Endpoint: GET https://payments.connectw.com/api/payment/:transactionId | ||
| */ | ||
| declare const getPaymentTransaction: ({ transactionId, admin, adminpwd, }: { | ||
| transactionId: string; | ||
| admin: string; | ||
| adminpwd: string; | ||
| }) => Promise<any>; | ||
| /** | ||
| * Record a ConnectW payment transaction by ID | ||
| * Endpoint: POST https://payments.connectw.com/api/payment/:transactionId | ||
| * Note: Recording happens automatically in most cases; this forces a manual record. | ||
| */ | ||
| declare const recordPaymentTransaction: ({ transactionId, admin, adminpwd, }: { | ||
| transactionId: string; | ||
| admin: string; | ||
| adminpwd: string; | ||
| }) => Promise<any>; | ||
| declare const generateVirtualWallet: ({ address, payername, currency, admin, adminpwd }: { | ||
@@ -1790,2 +1901,14 @@ address: string; | ||
| 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 GetTransactionsParams, type InitializeDepositInput, type KYCParams, type Network, type PaymentExtrasInput, type PaymentInitializeCryptoParams, type ProductInput, type QueryRangeInput, type RecordPaymentParams, 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 TransferSolTokenParams, type TransferSolanaParams, type UpdateKeyPasswordInput, 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, 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, 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, verifyBankAccountNameNGN, verifyDeposit, verifyKey, verifySolanaVirtualAddress, verifySolanaVirtualAddressEnc, verifyWalletPassword }; | ||
| declare const validateEvmAddress: (address: string) => boolean; | ||
| /** | ||
| * Verify a ConnectW webhook signature. | ||
| * Uses HMAC-SHA256 with the svix signing standard. | ||
| * | ||
| * @param input - The verification input containing payload, secret, and svix headers | ||
| * @returns true if the signature is valid | ||
| * @throws Error if the signature is invalid or the timestamp is stale | ||
| */ | ||
| declare const verifyWebhookSignature: ({ payload, secret, svixId, svixTimestamp, svixSignature, tolerance, }: WebhookVerificationInput) => boolean; | ||
| 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 }; |
+124
-1
@@ -137,2 +137,60 @@ /** | ||
| }; | ||
| type GetTransactionInput = { | ||
| transactionId: string; | ||
| admin: string; | ||
| adminpwd: string; | ||
| }; | ||
| type RecordTransactionInput = { | ||
| transactionId: string; | ||
| admin: string; | ||
| adminpwd: string; | ||
| }; | ||
| type TransactionData = { | ||
| TX_ID: string; | ||
| TX_Time: string; | ||
| TX_Currency: string; | ||
| TX_Token: string; | ||
| TX_Gateway: string; | ||
| TX_PayerName: string; | ||
| TX_PayerEmail: string; | ||
| TX_PayerAddress: string; | ||
| TX_PayerCode: string | null; | ||
| TX_PayerCity: string; | ||
| TX_PayerState: string; | ||
| TX_PayerCountry: string; | ||
| TX_PayerZipCode: string; | ||
| TX_PayerPhone: string; | ||
| TX_Description: string; | ||
| TX_SuccessURL: string; | ||
| TX_CancelURL: string; | ||
| TX_AccountName: string; | ||
| TX_AccountNumber: string; | ||
| TX_Provider: string; | ||
| TX_Text: string; | ||
| TX_Project: string; | ||
| TX_ChainTXID: string | null; | ||
| TX_PaidAmount: string; | ||
| TX_AmountToken: string; | ||
| TX_Fee: string; | ||
| TX_Amount: string; | ||
| TX_Commission: string; | ||
| TX_StatusID: number; | ||
| TX_FeeType: number; | ||
| TX_Passthrough: number; | ||
| TX_Exchange: number; | ||
| TX_Approved: number; | ||
| TX_NeedKYC: number; | ||
| TX_Recorder: string; | ||
| TX_Address: string; | ||
| status: string; | ||
| payment_id: string | null; | ||
| called: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| }; | ||
| type GetTransactionOutput = { | ||
| result: boolean; | ||
| data: TransactionData; | ||
| message: string; | ||
| }; | ||
@@ -173,2 +231,4 @@ declare const createWallet: ({ password, username }: CreateWalletInput) => Promise<string>; | ||
| declare const makeInterWalletTransferTxn: (senderAddr: string, senderPwd: string, receiverAddr: string, amount: string, currencyName: string) => Promise<any>; | ||
| declare const getPaymentTransactionStatus: ({ transactionId, admin, adminpwd, }: GetTransactionInput) => Promise<any>; | ||
| declare const recordPaymentTransactionStatus: ({ transactionId, admin, adminpwd, }: RecordTransactionInput) => Promise<any>; | ||
@@ -632,2 +692,33 @@ /** | ||
| type WebhookVerificationInput = { | ||
| payload: string; | ||
| secret: string; | ||
| svixId: string; | ||
| svixTimestamp: string; | ||
| svixSignature: string; | ||
| tolerance?: number; | ||
| }; | ||
| declare enum WebhookEvent { | ||
| TransactionCompleted = "transaction.completed", | ||
| TransactionApproved = "transaction.approved" | ||
| } | ||
| type WebhookTransactionData = { | ||
| TX_AccountName: string; | ||
| TX_AccountNumber: string; | ||
| TX_Address: string; | ||
| TX_Amount: string; | ||
| TX_AmountToken: string; | ||
| TX_Approved: number; | ||
| TX_ChainTXID: string; | ||
| TX_Currency: string; | ||
| TX_Project: string; | ||
| TX_Provider: string; | ||
| status: string; | ||
| createdAt: string; | ||
| }; | ||
| type WebhookEventPayload = { | ||
| data: WebhookTransactionData; | ||
| event: WebhookEvent | string; | ||
| }; | ||
| declare const importWalletFromPrivateKeyAndPassword: ({ pvKey, password, }: { | ||
@@ -888,2 +979,22 @@ pvKey: string; | ||
| /** | ||
| * Get a ConnectW payment transaction by ID | ||
| * Endpoint: GET https://payments.connectw.com/api/payment/:transactionId | ||
| */ | ||
| declare const getPaymentTransaction: ({ transactionId, admin, adminpwd, }: { | ||
| transactionId: string; | ||
| admin: string; | ||
| adminpwd: string; | ||
| }) => Promise<any>; | ||
| /** | ||
| * Record a ConnectW payment transaction by ID | ||
| * Endpoint: POST https://payments.connectw.com/api/payment/:transactionId | ||
| * Note: Recording happens automatically in most cases; this forces a manual record. | ||
| */ | ||
| declare const recordPaymentTransaction: ({ transactionId, admin, adminpwd, }: { | ||
| transactionId: string; | ||
| admin: string; | ||
| adminpwd: string; | ||
| }) => Promise<any>; | ||
| declare const generateVirtualWallet: ({ address, payername, currency, admin, adminpwd }: { | ||
@@ -1790,2 +1901,14 @@ address: string; | ||
| 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 GetTransactionsParams, type InitializeDepositInput, type KYCParams, type Network, type PaymentExtrasInput, type PaymentInitializeCryptoParams, type ProductInput, type QueryRangeInput, type RecordPaymentParams, 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 TransferSolTokenParams, type TransferSolanaParams, type UpdateKeyPasswordInput, 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, 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, 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, verifyBankAccountNameNGN, verifyDeposit, verifyKey, verifySolanaVirtualAddress, verifySolanaVirtualAddressEnc, verifyWalletPassword }; | ||
| declare const validateEvmAddress: (address: string) => boolean; | ||
| /** | ||
| * Verify a ConnectW webhook signature. | ||
| * Uses HMAC-SHA256 with the svix signing standard. | ||
| * | ||
| * @param input - The verification input containing payload, secret, and svix headers | ||
| * @returns true if the signature is valid | ||
| * @throws Error if the signature is invalid or the timestamp is stale | ||
| */ | ||
| declare const verifyWebhookSignature: ({ payload, secret, svixId, svixTimestamp, svixSignature, tolerance, }: WebhookVerificationInput) => boolean; | ||
| 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 }; |
+2
-1
| { | ||
| "name": "torosdk", | ||
| "version": "0.3.0", | ||
| "version": "0.4.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.", | ||
@@ -39,2 +39,3 @@ "main": "./dist/index.js", | ||
| "devDependencies": { | ||
| "@types/node": "^26.1.1", | ||
| "tsup": "^8.3.5", | ||
@@ -41,0 +42,0 @@ "typescript": "^5.7.3" |
+64
-0
@@ -82,3 +82,9 @@ # Toronet SDK | ||
| - Date range queries for transactions and withdrawals. | ||
| - Get/record ConnectW payment transactions by ID. | ||
| - **Webhook Verification** | ||
| - Verify ConnectW webhook signatures (HMAC-SHA256, svix standard). | ||
| - Timestamp tolerance checks for stale events. | ||
| - No additional dependencies required. | ||
| - **Advanced Query Operations** | ||
@@ -1042,2 +1048,60 @@ - Address transactions with date range and token filtering. | ||
| ### ๐งพ Payment Transaction Management | ||
| Get and record ConnectW payment transactions by their transaction ID. | ||
| ```typescript | ||
| import { getPaymentTransactionStatus, recordPaymentTransactionStatus } from "torosdk"; | ||
| // Get a payment transaction by ID | ||
| const transaction = await getPaymentTransactionStatus({ | ||
| transactionId: "0100120106_222691821e91a0fee6a0d73a6a1b5c06", | ||
| admin: "0xAdminAddress", | ||
| adminpwd: "adminPassword", | ||
| }); | ||
| console.log("Status:", transaction.data.status); | ||
| console.log("Amount:", transaction.data.TX_Amount); | ||
| // Manually record/trigger a payment transaction | ||
| const recorded = await recordPaymentTransactionStatus({ | ||
| transactionId: "0100120106_222691821e91a0fee6a0d73a6a1b5c06", | ||
| admin: "0xAdminAddress", | ||
| adminpwd: "adminPassword", | ||
| }); | ||
| ``` | ||
| --- | ||
| ### ๐ 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 }); | ||
| } | ||
| } | ||
| ``` | ||
| --- | ||
| ## Supported Currencies | ||
@@ -1044,0 +1108,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
499988
3.66%14395
2.7%1185
5.71%3
50%