@zubari/sdk 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{TransactionService-Djonkbp4.d.ts → TransactionService-BtWUjKt_.d.ts} +14 -2
- package/dist/{TransactionService-1Jt8ZRqO.d.mts → TransactionService-Lr_WS6iR.d.mts} +14 -2
- package/dist/{WalletManager-BJaLBfX5.d.ts → WalletManager-DQQwVkoa.d.ts} +52 -131
- package/dist/{WalletManager-pVFpurEi.d.mts → WalletManager-Sbpx4E1-.d.mts} +52 -131
- package/dist/{index-Da7SaweH.d.mts → contracts-B842YprC.d.mts} +152 -82
- package/dist/{index-ARbXbNI-.d.ts → contracts-s_CDIruh.d.ts} +152 -82
- package/dist/index.d.mts +65 -6
- package/dist/index.d.ts +65 -6
- package/dist/index.js +1268 -240
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1250 -240
- package/dist/index.mjs.map +1 -1
- package/dist/protocols/index.js +23 -5
- package/dist/protocols/index.js.map +1 -1
- package/dist/protocols/index.mjs +23 -5
- package/dist/protocols/index.mjs.map +1 -1
- package/dist/react/index.d.mts +3 -4
- package/dist/react/index.d.ts +3 -4
- package/dist/react/index.js +1011 -151
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +1010 -150
- package/dist/react/index.mjs.map +1 -1
- package/dist/services/index.d.mts +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.js +838 -112
- package/dist/services/index.js.map +1 -1
- package/dist/services/index.mjs +836 -110
- package/dist/services/index.mjs.map +1 -1
- package/dist/wallet/index.d.mts +3 -4
- package/dist/wallet/index.d.ts +3 -4
- package/dist/wallet/index.js +1042 -171
- package/dist/wallet/index.js.map +1 -1
- package/dist/wallet/index.mjs +1041 -170
- package/dist/wallet/index.mjs.map +1 -1
- package/package.json +16 -14
|
@@ -319,7 +319,9 @@ interface TransactionResult$1 {
|
|
|
319
319
|
chain?: string;
|
|
320
320
|
network?: string;
|
|
321
321
|
error?: string;
|
|
322
|
+
errorCode?: TransactionErrorCode;
|
|
322
323
|
}
|
|
324
|
+
type TransactionErrorCode = 'INSUFFICIENT_FUNDS' | 'INVALID_ADDRESS' | 'NETWORK_ERROR' | 'TIMEOUT' | 'REJECTED' | 'GAS_TOO_LOW' | 'NONCE_TOO_LOW' | 'MEMPOOL_FULL' | 'DUST_AMOUNT' | 'UNKNOWN';
|
|
323
325
|
interface ZubariWdkServiceConfig {
|
|
324
326
|
/** Network to use (mainnet or testnet) */
|
|
325
327
|
network: 'mainnet' | 'testnet';
|
|
@@ -399,9 +401,19 @@ declare class ZubariWdkService {
|
|
|
399
401
|
symbol: string;
|
|
400
402
|
}>;
|
|
401
403
|
/**
|
|
402
|
-
* Send a transaction
|
|
404
|
+
* Send a transaction on any supported chain
|
|
405
|
+
*
|
|
406
|
+
* @param seed - BIP-39 seed phrase
|
|
407
|
+
* @param chain - Target blockchain (ethereum, bitcoin, solana, ton, tron, spark)
|
|
408
|
+
* @param to - Recipient address
|
|
409
|
+
* @param amount - Amount to send (in native units: ETH, BTC, SOL, etc.)
|
|
410
|
+
* @returns Transaction result with hash on success, or error details on failure
|
|
403
411
|
*/
|
|
404
412
|
sendTransaction(seed: string, chain: SupportedChain, to: string, amount: string): Promise<TransactionResult$1>;
|
|
413
|
+
/**
|
|
414
|
+
* Validate transaction hash format for a specific chain
|
|
415
|
+
*/
|
|
416
|
+
private validateTxHash;
|
|
405
417
|
/**
|
|
406
418
|
* Get the network configuration
|
|
407
419
|
*/
|
|
@@ -600,4 +612,4 @@ declare function getTransactionService(config?: Partial<TransactionServiceConfig
|
|
|
600
612
|
*/
|
|
601
613
|
declare function createTransactionService(config?: Partial<TransactionServiceConfig>): TransactionService;
|
|
602
614
|
|
|
603
|
-
export { BrowserAddressDerivation as B, type ChainAddress$1 as C, type DeriveAddressResponse as D, type FeeRates as F, type GenerateSeedResponse as G, type MultiChainAddresses as M, SwapService as S, type TransactionHistoryItem$1 as T, type ValidateSeedResponse as V, WdkApiClient as W, ZubariWdkService as Z, type BrowserMultiChainAddresses as a, type WdkApiConfig as b, type DeriveAllAddressesResponse as c, type TransactionHistoryResponse as d, type SendTransactionResponse as e, type TransactionStatusResponse as f, getWdkApiClient as g, getZubariWdkService as h, createZubariWdkService as i, isBrowser as j, type SupportedChain as k, type ChainAddress as l, type ChainBalance as m, type TransactionResult$1 as n, type
|
|
615
|
+
export { BrowserAddressDerivation as B, type ChainAddress$1 as C, type DeriveAddressResponse as D, type FeeRates as F, type GenerateSeedResponse as G, type MultiChainAddresses as M, SwapService as S, type TransactionHistoryItem$1 as T, type ValidateSeedResponse as V, WdkApiClient as W, ZubariWdkService as Z, type BrowserMultiChainAddresses as a, type WdkApiConfig as b, type DeriveAllAddressesResponse as c, type TransactionHistoryResponse as d, type SendTransactionResponse as e, type TransactionStatusResponse as f, getWdkApiClient as g, getZubariWdkService as h, createZubariWdkService as i, isBrowser as j, type SupportedChain as k, type ChainAddress as l, type ChainBalance as m, type TransactionResult$1 as n, type TransactionErrorCode as o, type ZubariWdkServiceConfig as p, TransactionService as q, getTransactionService as r, createTransactionService as s, type TransactionParams as t, type TransactionResult as u, type TransactionHistoryItem as v, type FeeEstimate as w, type TransactionServiceConfig as x };
|
|
@@ -319,7 +319,9 @@ interface TransactionResult$1 {
|
|
|
319
319
|
chain?: string;
|
|
320
320
|
network?: string;
|
|
321
321
|
error?: string;
|
|
322
|
+
errorCode?: TransactionErrorCode;
|
|
322
323
|
}
|
|
324
|
+
type TransactionErrorCode = 'INSUFFICIENT_FUNDS' | 'INVALID_ADDRESS' | 'NETWORK_ERROR' | 'TIMEOUT' | 'REJECTED' | 'GAS_TOO_LOW' | 'NONCE_TOO_LOW' | 'MEMPOOL_FULL' | 'DUST_AMOUNT' | 'UNKNOWN';
|
|
323
325
|
interface ZubariWdkServiceConfig {
|
|
324
326
|
/** Network to use (mainnet or testnet) */
|
|
325
327
|
network: 'mainnet' | 'testnet';
|
|
@@ -399,9 +401,19 @@ declare class ZubariWdkService {
|
|
|
399
401
|
symbol: string;
|
|
400
402
|
}>;
|
|
401
403
|
/**
|
|
402
|
-
* Send a transaction
|
|
404
|
+
* Send a transaction on any supported chain
|
|
405
|
+
*
|
|
406
|
+
* @param seed - BIP-39 seed phrase
|
|
407
|
+
* @param chain - Target blockchain (ethereum, bitcoin, solana, ton, tron, spark)
|
|
408
|
+
* @param to - Recipient address
|
|
409
|
+
* @param amount - Amount to send (in native units: ETH, BTC, SOL, etc.)
|
|
410
|
+
* @returns Transaction result with hash on success, or error details on failure
|
|
403
411
|
*/
|
|
404
412
|
sendTransaction(seed: string, chain: SupportedChain, to: string, amount: string): Promise<TransactionResult$1>;
|
|
413
|
+
/**
|
|
414
|
+
* Validate transaction hash format for a specific chain
|
|
415
|
+
*/
|
|
416
|
+
private validateTxHash;
|
|
405
417
|
/**
|
|
406
418
|
* Get the network configuration
|
|
407
419
|
*/
|
|
@@ -600,4 +612,4 @@ declare function getTransactionService(config?: Partial<TransactionServiceConfig
|
|
|
600
612
|
*/
|
|
601
613
|
declare function createTransactionService(config?: Partial<TransactionServiceConfig>): TransactionService;
|
|
602
614
|
|
|
603
|
-
export { BrowserAddressDerivation as B, type ChainAddress$1 as C, type DeriveAddressResponse as D, type FeeRates as F, type GenerateSeedResponse as G, type MultiChainAddresses as M, SwapService as S, type TransactionHistoryItem$1 as T, type ValidateSeedResponse as V, WdkApiClient as W, ZubariWdkService as Z, type BrowserMultiChainAddresses as a, type WdkApiConfig as b, type DeriveAllAddressesResponse as c, type TransactionHistoryResponse as d, type SendTransactionResponse as e, type TransactionStatusResponse as f, getWdkApiClient as g, getZubariWdkService as h, createZubariWdkService as i, isBrowser as j, type SupportedChain as k, type ChainAddress as l, type ChainBalance as m, type TransactionResult$1 as n, type
|
|
615
|
+
export { BrowserAddressDerivation as B, type ChainAddress$1 as C, type DeriveAddressResponse as D, type FeeRates as F, type GenerateSeedResponse as G, type MultiChainAddresses as M, SwapService as S, type TransactionHistoryItem$1 as T, type ValidateSeedResponse as V, WdkApiClient as W, ZubariWdkService as Z, type BrowserMultiChainAddresses as a, type WdkApiConfig as b, type DeriveAllAddressesResponse as c, type TransactionHistoryResponse as d, type SendTransactionResponse as e, type TransactionStatusResponse as f, getWdkApiClient as g, getZubariWdkService as h, createZubariWdkService as i, isBrowser as j, type SupportedChain as k, type ChainAddress as l, type ChainBalance as m, type TransactionResult$1 as n, type TransactionErrorCode as o, type ZubariWdkServiceConfig as p, TransactionService as q, getTransactionService as r, createTransactionService as s, type TransactionParams as t, type TransactionResult as u, type TransactionHistoryItem as v, type FeeEstimate as w, type TransactionServiceConfig as x };
|