@omnity/ree-client-ts-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/index.d.ts +0 -135
- package/dist/ree-sdk.cjs.js +75 -75
- package/dist/ree-sdk.es.js +5327 -5643
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ActorSubclass } from '@dfinity/agent';
|
|
2
2
|
import * as bitcoin from 'bitcoinjs-lib';
|
|
3
3
|
import { IDL } from '@dfinity/candid';
|
|
4
|
-
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
5
|
-
import { ReactNode } from 'react';
|
|
6
4
|
|
|
7
5
|
export declare const AddressType: {
|
|
8
6
|
P2PKH: {
|
|
@@ -315,28 +313,6 @@ export declare class ReeClient {
|
|
|
315
313
|
}>;
|
|
316
314
|
}
|
|
317
315
|
|
|
318
|
-
declare interface ReeContextValue {
|
|
319
|
-
client: ReeClient;
|
|
320
|
-
exchange: ActorSubclass;
|
|
321
|
-
address: string;
|
|
322
|
-
paymentAddress: string;
|
|
323
|
-
updateWallet: (wallet: {
|
|
324
|
-
address?: string;
|
|
325
|
-
paymentAddress?: string;
|
|
326
|
-
}) => void;
|
|
327
|
-
createTransaction: (params?: {
|
|
328
|
-
feeRate?: number;
|
|
329
|
-
mergeSelfRuneBtcOutputs?: boolean;
|
|
330
|
-
}) => Promise<Transaction>;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
export declare function ReeProvider({ children, config }: ReeProviderProps): JSX_2.Element;
|
|
334
|
-
|
|
335
|
-
declare interface ReeProviderProps {
|
|
336
|
-
children: ReactNode;
|
|
337
|
-
config: Config;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
316
|
export declare interface RuneInfo {
|
|
341
317
|
runeId: string;
|
|
342
318
|
spacedRune: string;
|
|
@@ -552,117 +528,6 @@ export declare interface TransactionConfig {
|
|
|
552
528
|
mergeSelfRuneBtcOutputs?: boolean;
|
|
553
529
|
}
|
|
554
530
|
|
|
555
|
-
declare interface UseBalanceOptions {
|
|
556
|
-
/** Auto-refresh interval in milliseconds (0 to disable) */
|
|
557
|
-
refreshInterval?: number;
|
|
558
|
-
/** Enable automatic refresh when wallet changes */
|
|
559
|
-
autoRefresh?: boolean;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
/**
|
|
563
|
-
* Hook to get and manage Bitcoin balance
|
|
564
|
-
* @returns Object with balance, loading state, error, and refresh function
|
|
565
|
-
*/
|
|
566
|
-
export declare function useBtcBalance(options?: UseBalanceOptions): {
|
|
567
|
-
balance: number | null;
|
|
568
|
-
loading: boolean;
|
|
569
|
-
error: string | null;
|
|
570
|
-
refetch: () => Promise<void>;
|
|
571
|
-
};
|
|
572
|
-
|
|
573
|
-
/**
|
|
574
|
-
* Hook to get and manage Bitcoin UTXOs
|
|
575
|
-
* @returns Object with UTXOs, loading state, error, and refresh function
|
|
576
|
-
*/
|
|
577
|
-
export declare function useBtcUtxos(options?: UseBalanceOptions): {
|
|
578
|
-
utxos: Utxo[];
|
|
579
|
-
loading: boolean;
|
|
580
|
-
error: string | null;
|
|
581
|
-
refetch: () => Promise<void>;
|
|
582
|
-
};
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* Hook to get pool information by address
|
|
586
|
-
* @param poolAddress - The pool address to get info for
|
|
587
|
-
* @returns Object with pool info, loading state, error, and refetch function
|
|
588
|
-
*/
|
|
589
|
-
export declare function usePoolInfo(poolAddress?: string): {
|
|
590
|
-
poolInfo: PoolInfo | null;
|
|
591
|
-
loading: boolean;
|
|
592
|
-
error: string | null;
|
|
593
|
-
refetch: () => Promise<void>;
|
|
594
|
-
};
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* Hook to get list of all pools
|
|
598
|
-
* @returns Object with pools, loading state, error, and refetch function
|
|
599
|
-
*/
|
|
600
|
-
export declare function usePoolList(): {
|
|
601
|
-
pools: Pool[];
|
|
602
|
-
loading: boolean;
|
|
603
|
-
error: string | null;
|
|
604
|
-
refetch: () => Promise<void>;
|
|
605
|
-
};
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* Hook to retrieve the recommended fee rate range
|
|
609
|
-
* @returns Object with minimum/maximum fee rates, loading state, error, and refetch function
|
|
610
|
-
*/
|
|
611
|
-
export declare function useRecommendedFeeRate(options?: UseBalanceOptions): {
|
|
612
|
-
feeRate: {
|
|
613
|
-
min: number;
|
|
614
|
-
max: number;
|
|
615
|
-
} | null;
|
|
616
|
-
loading: boolean;
|
|
617
|
-
error: string | null;
|
|
618
|
-
refetch: () => Promise<void>;
|
|
619
|
-
};
|
|
620
|
-
|
|
621
|
-
export declare function useRee(): ReeContextValue;
|
|
622
|
-
|
|
623
|
-
/**
|
|
624
|
-
* Hook to get and manage Rune balance for a specific rune
|
|
625
|
-
* @param runeId - The rune ID to get balance for
|
|
626
|
-
* @returns Object with balance, loading state, error, and refresh function
|
|
627
|
-
*/
|
|
628
|
-
export declare function useRuneBalance(runeId: string | undefined, options?: UseBalanceOptions): {
|
|
629
|
-
balance: number | null;
|
|
630
|
-
loading: boolean;
|
|
631
|
-
error: string | null;
|
|
632
|
-
refetch: () => Promise<void>;
|
|
633
|
-
};
|
|
634
|
-
|
|
635
|
-
/**
|
|
636
|
-
* Hook to get rune information by ID
|
|
637
|
-
* @param runeId - The rune ID to get info for
|
|
638
|
-
* @returns Object with rune info, loading state, error, and refetch function
|
|
639
|
-
*/
|
|
640
|
-
export declare function useRuneInfo(runeId?: string): {
|
|
641
|
-
runeInfo: RuneInfo | null;
|
|
642
|
-
loading: boolean;
|
|
643
|
-
error: string | null;
|
|
644
|
-
refetch: () => Promise<void>;
|
|
645
|
-
};
|
|
646
|
-
|
|
647
|
-
/**
|
|
648
|
-
* Hook to get and manage Rune UTXOs for a specific rune
|
|
649
|
-
* @param runeId - The rune ID to get UTXOs for
|
|
650
|
-
* @returns Object with UTXOs, loading state, error, and refresh function
|
|
651
|
-
*/
|
|
652
|
-
export declare function useRuneUtxos(runeId: string, options?: UseBalanceOptions): {
|
|
653
|
-
utxos: Utxo[];
|
|
654
|
-
loading: boolean;
|
|
655
|
-
error: string | null;
|
|
656
|
-
refetch: () => Promise<void>;
|
|
657
|
-
};
|
|
658
|
-
|
|
659
|
-
/**
|
|
660
|
-
* Hook to search for runes by keyword
|
|
661
|
-
* @param keyword - Search term (rune ID or partial name)
|
|
662
|
-
* @returns Object with runes, loading state, error, and search function
|
|
663
|
-
*/
|
|
664
|
-
export declare function useSearchRunes(): (searchKeyword?: string) => Promise<RuneInfo[]>;
|
|
665
|
-
|
|
666
531
|
export declare namespace utils {
|
|
667
532
|
export {
|
|
668
533
|
hexToBytes,
|