@zubari/sdk 0.1.0
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/LICENSE +21 -0
- package/README.md +324 -0
- package/dist/SecureStorage-jO783AhC.d.mts +89 -0
- package/dist/SecureStorage-jO783AhC.d.ts +89 -0
- package/dist/SwapService-C0G8IXW2.d.mts +35 -0
- package/dist/SwapService-DZD0OJI_.d.ts +35 -0
- package/dist/WalletManager-DJjdq89b.d.mts +6106 -0
- package/dist/WalletManager-TiAdzqrn.d.ts +6106 -0
- package/dist/index-BLuxEdLp.d.mts +156 -0
- package/dist/index-BLuxEdLp.d.ts +156 -0
- package/dist/index-DO3T2HVe.d.ts +135 -0
- package/dist/index-fXVD8_D0.d.mts +135 -0
- package/dist/index.d.mts +67 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.js +2411 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2386 -0
- package/dist/index.mjs.map +1 -0
- package/dist/protocols/index.d.mts +181 -0
- package/dist/protocols/index.d.ts +181 -0
- package/dist/protocols/index.js +415 -0
- package/dist/protocols/index.js.map +1 -0
- package/dist/protocols/index.mjs +410 -0
- package/dist/protocols/index.mjs.map +1 -0
- package/dist/react/index.d.mts +49 -0
- package/dist/react/index.d.ts +49 -0
- package/dist/react/index.js +1573 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/index.mjs +1570 -0
- package/dist/react/index.mjs.map +1 -0
- package/dist/services/index.d.mts +198 -0
- package/dist/services/index.d.ts +198 -0
- package/dist/services/index.js +554 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/index.mjs +547 -0
- package/dist/services/index.mjs.map +1 -0
- package/dist/storage/index.d.mts +57 -0
- package/dist/storage/index.d.ts +57 -0
- package/dist/storage/index.js +442 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/index.mjs +435 -0
- package/dist/storage/index.mjs.map +1 -0
- package/dist/wallet/index.d.mts +8 -0
- package/dist/wallet/index.d.ts +8 -0
- package/dist/wallet/index.js +1678 -0
- package/dist/wallet/index.js.map +1 -0
- package/dist/wallet/index.mjs +1674 -0
- package/dist/wallet/index.mjs.map +1 -0
- package/package.json +136 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export { P as PLATFORM_CONFIG, a as ZUBARI_CONTRACTS, Z as ZubariWallet, g as getContractAddresses } from './index-DO3T2HVe.js';
|
|
2
|
+
export { D as DERIVATION_PATHS, N as NETWORKS, T as TESTNET_NETWORKS, W as WalletManager, b as WalletManagerConfig, a as WalletState, g as getNetworkConfig } from './WalletManager-TiAdzqrn.js';
|
|
3
|
+
export { M as MemoryStorageAdapter, S as SecureStorageAdapter, W as WebEncryptedStorageAdapter, c as createSecureStorage } from './SecureStorage-jO783AhC.js';
|
|
4
|
+
export { ZubariNFTProtocol, ZubariPayoutsProtocol, ZubariSubscriptionProtocol, ZubariTipsProtocol } from './protocols/index.js';
|
|
5
|
+
export { S as SwapService } from './SwapService-DZD0OJI_.js';
|
|
6
|
+
export { A as Account, E as EarningsBreakdown, L as LazyMintVoucher, f as ListingParams, e as NFT, d as NFTMetadata, a as NetworkBalance, N as NetworkType, R as RevenueSplit, c as SendParams, k as Subscription, j as SubscriptionPlan, l as SwapParams, S as SwapQuote, g as TipData, h as TipResult, i as TipStats, b as TokenBalance, T as TxResult, n as ZubariError, m as ZubariErrorCode, Z as ZubariWalletConfig } from './index-BLuxEdLp.js';
|
|
7
|
+
export { UseWalletManagerOptions, UseWalletManagerReturn, useWalletManager } from './react/index.js';
|
|
8
|
+
import 'node_modules/viem/_types/actions/siwe/verifySiweMessage';
|
|
9
|
+
import 'node_modules/viem/_types/utils/ccip';
|
|
10
|
+
import 'viem';
|
|
11
|
+
import 'ethers';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* KeyManager - Secure key storage and encryption
|
|
15
|
+
*
|
|
16
|
+
* Handles seed phrase encryption using AES-256-GCM
|
|
17
|
+
* with PBKDF2 key derivation from user password.
|
|
18
|
+
*/
|
|
19
|
+
declare class KeyManager {
|
|
20
|
+
private static readonly ALGORITHM;
|
|
21
|
+
private static readonly KEY_LENGTH;
|
|
22
|
+
private static readonly IV_LENGTH;
|
|
23
|
+
private static readonly SALT_LENGTH;
|
|
24
|
+
private static readonly PBKDF2_ITERATIONS;
|
|
25
|
+
/**
|
|
26
|
+
* Encrypt a seed phrase with a password
|
|
27
|
+
*/
|
|
28
|
+
static encryptSeed(seed: string, password: string): Promise<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Decrypt a seed phrase with a password
|
|
31
|
+
*/
|
|
32
|
+
static decryptSeed(encryptedData: string, password: string): Promise<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Derive encryption key from password using PBKDF2
|
|
35
|
+
*/
|
|
36
|
+
private static deriveKey;
|
|
37
|
+
/**
|
|
38
|
+
* Validate a BIP-39 seed phrase (basic validation)
|
|
39
|
+
*/
|
|
40
|
+
static validateSeedPhrase(seed: string): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Generate a random encryption key (for backup purposes)
|
|
43
|
+
*/
|
|
44
|
+
static generateBackupKey(): string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Utility functions for wallet operations
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* Format address for display (truncate middle)
|
|
52
|
+
*/
|
|
53
|
+
declare function formatAddress(address: string, chars?: number): string;
|
|
54
|
+
/**
|
|
55
|
+
* Format balance for display
|
|
56
|
+
*/
|
|
57
|
+
declare function formatBalance(balance: bigint, decimals?: number, precision?: number): string;
|
|
58
|
+
/**
|
|
59
|
+
* Check if string is a valid Ethereum address
|
|
60
|
+
*/
|
|
61
|
+
declare function isValidAddress(address: string): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Normalize an Ethereum address to checksum format
|
|
64
|
+
*/
|
|
65
|
+
declare function normalizeAddress(address: string): string;
|
|
66
|
+
|
|
67
|
+
export { KeyManager, formatAddress, formatBalance, isValidAddress, normalizeAddress };
|