@bluxcc/core 0.2.13 → 0.2.15

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/store.d.ts CHANGED
@@ -122,7 +122,7 @@ export interface IStoreMethods {
122
122
  setDetailsToken: (token: ICustomToken | undefined) => void;
123
123
  setTransactions: (transactions: UseTransactionsResult) => void;
124
124
  setWalletConnectClient: (client: SignClient, connection: any) => void;
125
- cleanUp: (method: 'sendTransaction' | 'signMessage') => void;
125
+ cleanUp: (method: 'sendTransaction' | 'signMessage' | 'signAuthEntry') => void;
126
126
  setNetworkSyncDisabled: (isDisabled: boolean) => void;
127
127
  setAppearance: (newAppearance: Partial<IAppearance>) => void;
128
128
  setApiResponse: (res: AuthenticateApiResponse) => void;
package/dist/types.d.ts CHANGED
@@ -69,7 +69,7 @@ export interface IConfig {
69
69
  walletConnect?: IWalletConnectMetaData;
70
70
  /** Trezor manifest metadata; required to enable Trezor. */
71
71
  trezor?: ITrezorMetaData;
72
- /** Prompt the user when their wallet is on a different network. Defaults to `true`. */
72
+ /** Show a modal when the connected wallet is on a network outside `networks`. Opt-in — defaults to `false`. */
73
73
  promptOnWrongNetwork?: boolean;
74
74
  }
75
75
  export interface IInternalConfig extends IConfig {
@@ -25,6 +25,7 @@ type ApiGetUserResponse = {
25
25
  export declare const apiGetUser: (JWT: string) => Promise<ApiGetUserResponse>;
26
26
  export declare const apiSignMessage: (JWT: string, message: string) => Promise<string>;
27
27
  export declare const apiSignTransaction: (JWT: string, xdr: string, network: string) => Promise<string>;
28
+ export declare const apiSignAuthEntry: (JWT: string, authEntry: string, network: string) => Promise<string>;
28
29
  /** Mirrors the API's `TokenView`. The API only buckets tokens mainnet/testnet. */
29
30
  export type ApiTokenView = {
30
31
  id: number;
@@ -1,3 +1,15 @@
1
1
  import { IWallet } from '../types';
2
2
  import { SupportedWallet } from '../enums';
3
3
  export declare const walletsConfig: Record<SupportedWallet, IWallet>;
4
+ /**
5
+ * Resolves the wallet config that signs for the given user. Wallet logins sign
6
+ * with their own wallet; every other auth method (email, socials, passkey)
7
+ * signs through the Blux API with the session JWT. The API pseudo-wallet never
8
+ * appears in the store's available-wallets list (its `isAvailable` is false so
9
+ * it stays out of the onboarding UI), which is why it is resolved from
10
+ * `walletsConfig` here instead of from `availableWallets`.
11
+ */
12
+ export declare const getSigningWallet: (user: {
13
+ authMethod: string;
14
+ authValue: string;
15
+ }, availableWallets: IWallet[]) => IWallet | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluxcc/core",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "homepage": "https://blux.cc",
5
5
  "description": "Blux is a wallet infra for the Stellar network",
6
6
  "type": "module",