@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.
Files changed (35) hide show
  1. package/dist/{TransactionService-Djonkbp4.d.ts → TransactionService-BtWUjKt_.d.ts} +14 -2
  2. package/dist/{TransactionService-1Jt8ZRqO.d.mts → TransactionService-Lr_WS6iR.d.mts} +14 -2
  3. package/dist/{WalletManager-BJaLBfX5.d.ts → WalletManager-DQQwVkoa.d.ts} +52 -131
  4. package/dist/{WalletManager-pVFpurEi.d.mts → WalletManager-Sbpx4E1-.d.mts} +52 -131
  5. package/dist/{index-Da7SaweH.d.mts → contracts-B842YprC.d.mts} +152 -82
  6. package/dist/{index-ARbXbNI-.d.ts → contracts-s_CDIruh.d.ts} +152 -82
  7. package/dist/index.d.mts +65 -6
  8. package/dist/index.d.ts +65 -6
  9. package/dist/index.js +1268 -240
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +1250 -240
  12. package/dist/index.mjs.map +1 -1
  13. package/dist/protocols/index.js +23 -5
  14. package/dist/protocols/index.js.map +1 -1
  15. package/dist/protocols/index.mjs +23 -5
  16. package/dist/protocols/index.mjs.map +1 -1
  17. package/dist/react/index.d.mts +3 -4
  18. package/dist/react/index.d.ts +3 -4
  19. package/dist/react/index.js +1011 -151
  20. package/dist/react/index.js.map +1 -1
  21. package/dist/react/index.mjs +1010 -150
  22. package/dist/react/index.mjs.map +1 -1
  23. package/dist/services/index.d.mts +1 -1
  24. package/dist/services/index.d.ts +1 -1
  25. package/dist/services/index.js +838 -112
  26. package/dist/services/index.js.map +1 -1
  27. package/dist/services/index.mjs +836 -110
  28. package/dist/services/index.mjs.map +1 -1
  29. package/dist/wallet/index.d.mts +3 -4
  30. package/dist/wallet/index.d.ts +3 -4
  31. package/dist/wallet/index.js +1042 -171
  32. package/dist/wallet/index.js.map +1 -1
  33. package/dist/wallet/index.mjs +1041 -170
  34. package/dist/wallet/index.mjs.map +1 -1
  35. 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 ZubariWdkServiceConfig as o, TransactionService as p, getTransactionService as q, createTransactionService as r, type TransactionParams as s, type TransactionResult as t, type TransactionHistoryItem as u, type FeeEstimate as v, type TransactionServiceConfig as w };
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 ZubariWdkServiceConfig as o, TransactionService as p, getTransactionService as q, createTransactionService as r, type TransactionParams as s, type TransactionResult as t, type TransactionHistoryItem as u, type FeeEstimate as v, type TransactionServiceConfig as w };
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 };