@dogeos/dogeos-sdk 4.0.7 → 4.1.0-beta.1
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/README.md +46 -0
- package/dist/dogeos-sdk.css +1 -1
- package/dist/index.d.ts +66 -2
- package/dist/index.js +13563 -13329
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -352,6 +352,24 @@ export declare type EvmChain = Chain_2;
|
|
|
352
352
|
|
|
353
353
|
declare type FlowId = BrandedId<"FlowId">;
|
|
354
354
|
|
|
355
|
+
/** Options for `WalletConnectKitConfig.forceAccountSelection`. */
|
|
356
|
+
export declare interface ForceAccountSelectionOptions {
|
|
357
|
+
/**
|
|
358
|
+
* Revoke this site's existing account permission first, so wallets that
|
|
359
|
+
* skip their picker for an approved site show it again. The permission is
|
|
360
|
+
* per site, so this also ends a main connection to the same wallet on the
|
|
361
|
+
* page; leave it off when the page has one.
|
|
362
|
+
* @default false
|
|
363
|
+
*/
|
|
364
|
+
revokePermissions?: boolean;
|
|
365
|
+
/**
|
|
366
|
+
* Addresses the user has already linked. If the wallet returns one of them
|
|
367
|
+
* and supports neither permission request, the connection fails and asks
|
|
368
|
+
* the user to disconnect the site in their wallet and try again.
|
|
369
|
+
*/
|
|
370
|
+
blockedAddresses?: readonly string[];
|
|
371
|
+
}
|
|
372
|
+
|
|
355
373
|
/**
|
|
356
374
|
* Get all available chains
|
|
357
375
|
* Fetches chains from backend API and returns all supported chains in config format
|
|
@@ -581,9 +599,9 @@ export declare const useWalletHost: () => UseWalletHost;
|
|
|
581
599
|
* Uses a hidden Modal wrapper to provide required Modal context for UI components
|
|
582
600
|
* but renders as inline content instead of an overlay, so it can be used as a child element
|
|
583
601
|
*/
|
|
584
|
-
export declare const WalletConnectEmbed: ({ className, style }: WalletConnectEmbedProps) => JSX_2.Element | null;
|
|
602
|
+
export declare const WalletConnectEmbed: ({ className, style, initialView, hideHeader, keepPickerAfterConnect, }: WalletConnectEmbedProps) => JSX_2.Element | null;
|
|
585
603
|
|
|
586
|
-
declare interface WalletConnectEmbedProps {
|
|
604
|
+
export declare interface WalletConnectEmbedProps {
|
|
587
605
|
/**
|
|
588
606
|
* Optional container class name
|
|
589
607
|
*/
|
|
@@ -592,8 +610,28 @@ declare interface WalletConnectEmbedProps {
|
|
|
592
610
|
* Optional container style
|
|
593
611
|
*/
|
|
594
612
|
style?: React.CSSProperties;
|
|
613
|
+
/**
|
|
614
|
+
* Picker the embed starts on and returns to. Defaults to the provider's
|
|
615
|
+
* starting view, which follows `config.login`. Ignored inside MyDoge.
|
|
616
|
+
*/
|
|
617
|
+
initialView?: WalletConnectEmbedView;
|
|
618
|
+
/**
|
|
619
|
+
* Leave out the starting view's title, for pages that give the embed their
|
|
620
|
+
* own heading. Controls in that row, such as a link to the wallet list,
|
|
621
|
+
* stay. Later views keep their titles.
|
|
622
|
+
*/
|
|
623
|
+
hideHeader?: boolean;
|
|
624
|
+
/**
|
|
625
|
+
* Keep showing the starting view after a wallet connects, instead of the
|
|
626
|
+
* account view. For pages that use the connection for one step, such as
|
|
627
|
+
* proving ownership of a wallet to link it.
|
|
628
|
+
*/
|
|
629
|
+
keepPickerAfterConnect?: boolean;
|
|
595
630
|
}
|
|
596
631
|
|
|
632
|
+
/** A wallet picker `WalletConnectEmbed` can start on. */
|
|
633
|
+
export declare type WalletConnectEmbedView = "walletList" | "walletSearch";
|
|
634
|
+
|
|
597
635
|
export declare interface WalletConnectKitConfig {
|
|
598
636
|
/**
|
|
599
637
|
* Gateway origin for proof-bound product requests such as the wallet
|
|
@@ -636,6 +674,32 @@ export declare interface WalletConnectKitConfig {
|
|
|
636
674
|
* };
|
|
637
675
|
*/
|
|
638
676
|
defaultConnectChain?: ChainType;
|
|
677
|
+
/**
|
|
678
|
+
* Reconnect a saved connection when the page loads, and inside MyDoge
|
|
679
|
+
* reconnect silently when MyDoge already approved this dApp.
|
|
680
|
+
* Set to false for a provider that should connect only on the user's own
|
|
681
|
+
* action, such as a second provider that links another wallet.
|
|
682
|
+
* It does not cover the DogeOS sign-in: with social logins enabled, a
|
|
683
|
+
* signed-in user's Social Wallet still connects on load. Limit `login` to
|
|
684
|
+
* external wallets to keep it out.
|
|
685
|
+
* @default true
|
|
686
|
+
*/
|
|
687
|
+
autoRestore?: boolean;
|
|
688
|
+
/**
|
|
689
|
+
* Save this provider's connection so a later page load can restore it.
|
|
690
|
+
* Set to false so a second provider on the page neither saves its
|
|
691
|
+
* connection nor replaces or clears the main provider's.
|
|
692
|
+
* @default true
|
|
693
|
+
*/
|
|
694
|
+
persistConnection?: boolean;
|
|
695
|
+
/**
|
|
696
|
+
* Ask an EVM browser wallet to show its account picker on every connect,
|
|
697
|
+
* even for a site it already approved. Use it when the user must choose
|
|
698
|
+
* which account to link. `true` uses the defaults below.
|
|
699
|
+
* Ignored inside MyDoge and for the embedded wallet, which hold the page's
|
|
700
|
+
* main session.
|
|
701
|
+
*/
|
|
702
|
+
forceAccountSelection?: boolean | ForceAccountSelectionOptions;
|
|
639
703
|
/***
|
|
640
704
|
* WalletConnect project ID
|
|
641
705
|
* Supply your application's own project ID to enable WalletConnect.
|