@zubari/sdk 0.1.1 → 0.1.3

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 (38) hide show
  1. package/README.md +2 -2
  2. package/dist/TransactionService-CxwB1kpN.d.mts +205 -0
  3. package/dist/TransactionService-DdL6H6M-.d.ts +205 -0
  4. package/dist/{WalletManager-TiAdzqrn.d.ts → WalletManager-CYJNiww6.d.ts} +49 -132
  5. package/dist/{WalletManager-DJjdq89b.d.mts → WalletManager-Dmmcbtiw.d.mts} +49 -132
  6. package/dist/{index-BLuxEdLp.d.mts → index-DhluuR9H.d.mts} +1 -1
  7. package/dist/{index-BLuxEdLp.d.ts → index-DhluuR9H.d.ts} +1 -1
  8. package/dist/{index-DO3T2HVe.d.ts → index-OxzgPoRG.d.ts} +2 -2
  9. package/dist/{index-fXVD8_D0.d.mts → index-poGbMJzn.d.mts} +2 -2
  10. package/dist/index.d.mts +5 -6
  11. package/dist/index.d.ts +5 -6
  12. package/dist/index.js +3057 -2
  13. package/dist/index.js.map +1 -1
  14. package/dist/index.mjs +3055 -3
  15. package/dist/index.mjs.map +1 -1
  16. package/dist/protocols/index.d.mts +1 -1
  17. package/dist/protocols/index.d.ts +1 -1
  18. package/dist/react/index.d.mts +4 -5
  19. package/dist/react/index.d.ts +4 -5
  20. package/dist/react/index.js +2649 -3
  21. package/dist/react/index.js.map +1 -1
  22. package/dist/react/index.mjs +2649 -3
  23. package/dist/react/index.mjs.map +1 -1
  24. package/dist/services/index.d.mts +87 -3
  25. package/dist/services/index.d.ts +87 -3
  26. package/dist/services/index.js +3065 -2
  27. package/dist/services/index.js.map +1 -1
  28. package/dist/services/index.mjs +3062 -3
  29. package/dist/services/index.mjs.map +1 -1
  30. package/dist/wallet/index.d.mts +4 -5
  31. package/dist/wallet/index.d.ts +4 -5
  32. package/dist/wallet/index.js +2650 -2
  33. package/dist/wallet/index.js.map +1 -1
  34. package/dist/wallet/index.mjs +2650 -2
  35. package/dist/wallet/index.mjs.map +1 -1
  36. package/package.json +6 -1
  37. package/dist/SwapService-C0G8IXW2.d.mts +0 -35
  38. package/dist/SwapService-DZD0OJI_.d.ts +0 -35
@@ -1,5 +1,5 @@
1
- export { S as SwapService } from '../SwapService-C0G8IXW2.mjs';
2
- import { N as NetworkType } from '../index-BLuxEdLp.mjs';
1
+ export { F as FeeEstimate, S as SwapService, d as TransactionHistoryItem, a as TransactionParams, b as TransactionResult, T as TransactionService, e as TransactionServiceConfig, c as createTransactionService, g as getTransactionService } from '../TransactionService-CxwB1kpN.mjs';
2
+ import { N as NetworkType } from '../index-DhluuR9H.mjs';
3
3
 
4
4
  /**
5
5
  * WDK API Client
@@ -73,6 +73,90 @@ declare class WdkApiClient {
73
73
  */
74
74
  declare function getWdkApiClient(baseUrl?: string): WdkApiClient;
75
75
 
76
+ /**
77
+ * Browser-Compatible Address Derivation
78
+ *
79
+ * This module provides multi-chain address derivation that works in browser environments.
80
+ * It uses the @scure libraries which are pure JS and don't require Node.js polyfills.
81
+ *
82
+ * Supported chains:
83
+ * - Ethereum: ethers.js (BIP-44)
84
+ * - Bitcoin: @scure/bip32 + @scure/base (BIP-84 native SegWit)
85
+ * - Solana: ed25519-hd-key + tweetnacl (SLIP-0010)
86
+ * - TON: ed25519 derivation with TON address format
87
+ * - TRON: secp256k1 + base58check
88
+ * - Spark: Bitcoin-based with custom derivation
89
+ */
90
+
91
+ interface ChainAddress$1 {
92
+ chain: NetworkType;
93
+ address: string;
94
+ path: string;
95
+ }
96
+ interface BrowserMultiChainAddresses {
97
+ ethereum: string | null;
98
+ bitcoin: string | null;
99
+ ton: string | null;
100
+ tron: string | null;
101
+ solana: string | null;
102
+ spark: string | null;
103
+ }
104
+ /**
105
+ * Derive Ethereum address from seed phrase
106
+ */
107
+ declare function deriveEthereumAddress(seed: string): string;
108
+ /**
109
+ * Derive Bitcoin address from seed phrase (BIP-84 native SegWit)
110
+ * Uses @scure libraries for browser compatibility
111
+ */
112
+ declare function deriveBitcoinAddress(seed: string, network?: 'mainnet' | 'testnet'): string;
113
+ /**
114
+ * Derive Solana address from seed phrase using SLIP-0010 (ed25519)
115
+ */
116
+ declare function deriveSolanaAddress(seed: string): Promise<string>;
117
+ /**
118
+ * Derive TON address from seed phrase
119
+ * Uses proper BIP-44 derivation path m/44'/607'/0'/0'/0'
120
+ */
121
+ declare function deriveTonAddress(seed: string): Promise<string>;
122
+ /**
123
+ * Derive TRON address from seed phrase
124
+ * TRON uses secp256k1 like Ethereum but with base58check encoding
125
+ */
126
+ declare function deriveTronAddress(seed: string): Promise<string>;
127
+ /**
128
+ * Derive Spark address from seed phrase
129
+ * Spark uses its own derivation path and bech32 format
130
+ * Uses @scure libraries for browser compatibility
131
+ */
132
+ declare function deriveSparkAddress(seed: string, network?: 'mainnet' | 'testnet'): string;
133
+ /**
134
+ * Derive addresses for all supported chains
135
+ */
136
+ declare function deriveAllAddresses(seed: string, network?: 'mainnet' | 'testnet'): Promise<BrowserMultiChainAddresses>;
137
+ /**
138
+ * Validate a BIP-39 seed phrase using @scure/bip39
139
+ */
140
+ declare function isValidSeed(seed: string): boolean;
141
+ /**
142
+ * Generate a random BIP-39 seed phrase using @scure/bip39
143
+ */
144
+ declare function generateSeedPhrase(): string;
145
+
146
+ type BrowserAddressDerivation_BrowserMultiChainAddresses = BrowserMultiChainAddresses;
147
+ declare const BrowserAddressDerivation_deriveAllAddresses: typeof deriveAllAddresses;
148
+ declare const BrowserAddressDerivation_deriveBitcoinAddress: typeof deriveBitcoinAddress;
149
+ declare const BrowserAddressDerivation_deriveEthereumAddress: typeof deriveEthereumAddress;
150
+ declare const BrowserAddressDerivation_deriveSolanaAddress: typeof deriveSolanaAddress;
151
+ declare const BrowserAddressDerivation_deriveSparkAddress: typeof deriveSparkAddress;
152
+ declare const BrowserAddressDerivation_deriveTonAddress: typeof deriveTonAddress;
153
+ declare const BrowserAddressDerivation_deriveTronAddress: typeof deriveTronAddress;
154
+ declare const BrowserAddressDerivation_generateSeedPhrase: typeof generateSeedPhrase;
155
+ declare const BrowserAddressDerivation_isValidSeed: typeof isValidSeed;
156
+ declare namespace BrowserAddressDerivation {
157
+ export { type BrowserAddressDerivation_BrowserMultiChainAddresses as BrowserMultiChainAddresses, type ChainAddress$1 as ChainAddress, BrowserAddressDerivation_deriveAllAddresses as deriveAllAddresses, BrowserAddressDerivation_deriveBitcoinAddress as deriveBitcoinAddress, BrowserAddressDerivation_deriveEthereumAddress as deriveEthereumAddress, BrowserAddressDerivation_deriveSolanaAddress as deriveSolanaAddress, BrowserAddressDerivation_deriveSparkAddress as deriveSparkAddress, BrowserAddressDerivation_deriveTonAddress as deriveTonAddress, BrowserAddressDerivation_deriveTronAddress as deriveTronAddress, BrowserAddressDerivation_generateSeedPhrase as generateSeedPhrase, BrowserAddressDerivation_isValidSeed as isValidSeed };
158
+ }
159
+
76
160
  /**
77
161
  * WDK Service for SDK
78
162
  *
@@ -195,4 +279,4 @@ declare function getWdkService(config?: Partial<WdkServiceConfig>): WdkService;
195
279
  */
196
280
  declare function createWdkService(config?: Partial<WdkServiceConfig>): WdkService;
197
281
 
198
- export { type ChainAddress, type DeriveAddressResponse, type DeriveAllAddressesResponse, type GenerateSeedResponse, type MultiChainAddresses, type SupportedChain, type ValidateSeedResponse, WdkApiClient, type WdkApiConfig, WdkService, type WdkServiceConfig, createWdkService, getWdkApiClient, getWdkService };
282
+ export { BrowserAddressDerivation, type ChainAddress$1 as BrowserChainAddress, type BrowserMultiChainAddresses, type ChainAddress, type DeriveAddressResponse, type DeriveAllAddressesResponse, type GenerateSeedResponse, type MultiChainAddresses, type SupportedChain, type ValidateSeedResponse, WdkApiClient, type WdkApiConfig, WdkService, type WdkServiceConfig, createWdkService, getWdkApiClient, getWdkService };
@@ -1,5 +1,5 @@
1
- export { S as SwapService } from '../SwapService-DZD0OJI_.js';
2
- import { N as NetworkType } from '../index-BLuxEdLp.js';
1
+ export { F as FeeEstimate, S as SwapService, d as TransactionHistoryItem, a as TransactionParams, b as TransactionResult, T as TransactionService, e as TransactionServiceConfig, c as createTransactionService, g as getTransactionService } from '../TransactionService-DdL6H6M-.js';
2
+ import { N as NetworkType } from '../index-DhluuR9H.js';
3
3
 
4
4
  /**
5
5
  * WDK API Client
@@ -73,6 +73,90 @@ declare class WdkApiClient {
73
73
  */
74
74
  declare function getWdkApiClient(baseUrl?: string): WdkApiClient;
75
75
 
76
+ /**
77
+ * Browser-Compatible Address Derivation
78
+ *
79
+ * This module provides multi-chain address derivation that works in browser environments.
80
+ * It uses the @scure libraries which are pure JS and don't require Node.js polyfills.
81
+ *
82
+ * Supported chains:
83
+ * - Ethereum: ethers.js (BIP-44)
84
+ * - Bitcoin: @scure/bip32 + @scure/base (BIP-84 native SegWit)
85
+ * - Solana: ed25519-hd-key + tweetnacl (SLIP-0010)
86
+ * - TON: ed25519 derivation with TON address format
87
+ * - TRON: secp256k1 + base58check
88
+ * - Spark: Bitcoin-based with custom derivation
89
+ */
90
+
91
+ interface ChainAddress$1 {
92
+ chain: NetworkType;
93
+ address: string;
94
+ path: string;
95
+ }
96
+ interface BrowserMultiChainAddresses {
97
+ ethereum: string | null;
98
+ bitcoin: string | null;
99
+ ton: string | null;
100
+ tron: string | null;
101
+ solana: string | null;
102
+ spark: string | null;
103
+ }
104
+ /**
105
+ * Derive Ethereum address from seed phrase
106
+ */
107
+ declare function deriveEthereumAddress(seed: string): string;
108
+ /**
109
+ * Derive Bitcoin address from seed phrase (BIP-84 native SegWit)
110
+ * Uses @scure libraries for browser compatibility
111
+ */
112
+ declare function deriveBitcoinAddress(seed: string, network?: 'mainnet' | 'testnet'): string;
113
+ /**
114
+ * Derive Solana address from seed phrase using SLIP-0010 (ed25519)
115
+ */
116
+ declare function deriveSolanaAddress(seed: string): Promise<string>;
117
+ /**
118
+ * Derive TON address from seed phrase
119
+ * Uses proper BIP-44 derivation path m/44'/607'/0'/0'/0'
120
+ */
121
+ declare function deriveTonAddress(seed: string): Promise<string>;
122
+ /**
123
+ * Derive TRON address from seed phrase
124
+ * TRON uses secp256k1 like Ethereum but with base58check encoding
125
+ */
126
+ declare function deriveTronAddress(seed: string): Promise<string>;
127
+ /**
128
+ * Derive Spark address from seed phrase
129
+ * Spark uses its own derivation path and bech32 format
130
+ * Uses @scure libraries for browser compatibility
131
+ */
132
+ declare function deriveSparkAddress(seed: string, network?: 'mainnet' | 'testnet'): string;
133
+ /**
134
+ * Derive addresses for all supported chains
135
+ */
136
+ declare function deriveAllAddresses(seed: string, network?: 'mainnet' | 'testnet'): Promise<BrowserMultiChainAddresses>;
137
+ /**
138
+ * Validate a BIP-39 seed phrase using @scure/bip39
139
+ */
140
+ declare function isValidSeed(seed: string): boolean;
141
+ /**
142
+ * Generate a random BIP-39 seed phrase using @scure/bip39
143
+ */
144
+ declare function generateSeedPhrase(): string;
145
+
146
+ type BrowserAddressDerivation_BrowserMultiChainAddresses = BrowserMultiChainAddresses;
147
+ declare const BrowserAddressDerivation_deriveAllAddresses: typeof deriveAllAddresses;
148
+ declare const BrowserAddressDerivation_deriveBitcoinAddress: typeof deriveBitcoinAddress;
149
+ declare const BrowserAddressDerivation_deriveEthereumAddress: typeof deriveEthereumAddress;
150
+ declare const BrowserAddressDerivation_deriveSolanaAddress: typeof deriveSolanaAddress;
151
+ declare const BrowserAddressDerivation_deriveSparkAddress: typeof deriveSparkAddress;
152
+ declare const BrowserAddressDerivation_deriveTonAddress: typeof deriveTonAddress;
153
+ declare const BrowserAddressDerivation_deriveTronAddress: typeof deriveTronAddress;
154
+ declare const BrowserAddressDerivation_generateSeedPhrase: typeof generateSeedPhrase;
155
+ declare const BrowserAddressDerivation_isValidSeed: typeof isValidSeed;
156
+ declare namespace BrowserAddressDerivation {
157
+ export { type BrowserAddressDerivation_BrowserMultiChainAddresses as BrowserMultiChainAddresses, type ChainAddress$1 as ChainAddress, BrowserAddressDerivation_deriveAllAddresses as deriveAllAddresses, BrowserAddressDerivation_deriveBitcoinAddress as deriveBitcoinAddress, BrowserAddressDerivation_deriveEthereumAddress as deriveEthereumAddress, BrowserAddressDerivation_deriveSolanaAddress as deriveSolanaAddress, BrowserAddressDerivation_deriveSparkAddress as deriveSparkAddress, BrowserAddressDerivation_deriveTonAddress as deriveTonAddress, BrowserAddressDerivation_deriveTronAddress as deriveTronAddress, BrowserAddressDerivation_generateSeedPhrase as generateSeedPhrase, BrowserAddressDerivation_isValidSeed as isValidSeed };
158
+ }
159
+
76
160
  /**
77
161
  * WDK Service for SDK
78
162
  *
@@ -195,4 +279,4 @@ declare function getWdkService(config?: Partial<WdkServiceConfig>): WdkService;
195
279
  */
196
280
  declare function createWdkService(config?: Partial<WdkServiceConfig>): WdkService;
197
281
 
198
- export { type ChainAddress, type DeriveAddressResponse, type DeriveAllAddressesResponse, type GenerateSeedResponse, type MultiChainAddresses, type SupportedChain, type ValidateSeedResponse, WdkApiClient, type WdkApiConfig, WdkService, type WdkServiceConfig, createWdkService, getWdkApiClient, getWdkService };
282
+ export { BrowserAddressDerivation, type ChainAddress$1 as BrowserChainAddress, type BrowserMultiChainAddresses, type ChainAddress, type DeriveAddressResponse, type DeriveAllAddressesResponse, type GenerateSeedResponse, type MultiChainAddresses, type SupportedChain, type ValidateSeedResponse, WdkApiClient, type WdkApiConfig, WdkService, type WdkServiceConfig, createWdkService, getWdkApiClient, getWdkService };