@tonconnect/ui-react 0.0.13 → 1.0.0-beta.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/lib/components/TonConnectUIProvider.d.ts +4 -15
- package/lib/hooks/useTonWallet.d.ts +3 -2
- package/lib/index.js +5845 -4757
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +5205 -4117
- package/lib/index.umd.js.map +1 -1
- package/package.json +7 -8
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { ActionConfiguration, Locales, TonConnectUI, UIPreferences, WalletsListConfiguration } from '@tonconnect/ui';
|
|
2
|
-
import type {
|
|
3
|
+
import type { ITonConnect } from '@tonconnect/sdk';
|
|
3
4
|
export declare const TonConnectUIContext: import("react").Context<TonConnectUI | null>;
|
|
4
5
|
export declare type TonConnectUIProviderProps = {
|
|
5
|
-
children:
|
|
6
|
+
children: ReactNode;
|
|
6
7
|
} & Partial<TonConnectUIProviderPropsBase> & Partial<TonConnectUIProviderPropsWithManifest | TonConnectUIProviderPropsWithConnector>;
|
|
7
8
|
export interface TonConnectUIProviderPropsWithManifest {
|
|
8
9
|
/**
|
|
@@ -40,23 +41,11 @@ export interface TonConnectUIProviderPropsBase {
|
|
|
40
41
|
/**
|
|
41
42
|
* Configuration for the wallets list in the connect wallet modal.
|
|
42
43
|
*/
|
|
43
|
-
|
|
44
|
+
walletsListConfiguration?: WalletsListConfiguration;
|
|
44
45
|
/**
|
|
45
46
|
* Configuration for action-period (e.g. sendTransaction) UI elements: modals and notifications and wallet behaviour (return strategy).
|
|
46
47
|
*/
|
|
47
48
|
actionsConfiguration?: ActionConfiguration;
|
|
48
|
-
/**
|
|
49
|
-
* Redefine wallets list source URL. Must be a link to a json file with [following structure]{@link https://github.com/ton-connect/wallets-list}
|
|
50
|
-
* @default https://raw.githubusercontent.com/ton-connect/wallets-list/main/wallets.json
|
|
51
|
-
* @
|
|
52
|
-
*/
|
|
53
|
-
walletsListSource?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Use it to customize ConnectRequest and add `tonProof` payload.
|
|
56
|
-
* The function will be called after wallets modal opens, and wallets selection will be blocked until it's resolved.
|
|
57
|
-
* If you have to make a http-request to your backend, it is better to do it after app initialization (if possible) and return (probably completed) promise to reduce loading time for the user.
|
|
58
|
-
*/
|
|
59
|
-
getConnectParameters?: () => Promise<ConnectAdditionalRequest>;
|
|
60
49
|
}
|
|
61
50
|
declare const _default: import("react").NamedExoticComponent<TonConnectUIProviderProps>;
|
|
62
51
|
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Wallet
|
|
1
|
+
import { Wallet } from '@tonconnect/sdk';
|
|
2
|
+
import { WalletInfoWithOpenMethod } from '@tonconnect/ui';
|
|
2
3
|
/**
|
|
3
4
|
* Use it to get user's current ton wallet. If wallet is not connected hook will return null.
|
|
4
5
|
*/
|
|
5
|
-
export declare function useTonWallet(): (Wallet &
|
|
6
|
+
export declare function useTonWallet(): (Wallet & WalletInfoWithOpenMethod) | null;
|