@bluxcc/core 0.2.6 → 0.2.7
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.cjs.js +14 -14
- package/dist/index.esm.js +14 -14
- package/dist/types.d.ts +0 -2
- package/dist/utils/api.d.ts +0 -1
- package/dist/utils/helpers.d.ts +1 -0
- package/dist/utils/socialLogin.d.ts +3 -8
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
package/dist/utils/api.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ type ApiPasskeyChallenge = {
|
|
|
7
7
|
challenge_id: number;
|
|
8
8
|
};
|
|
9
9
|
export declare const authenticateAppId: (appId: string) => Promise<AuthenticateApiResponse>;
|
|
10
|
-
export declare const apiSocialLogin: (appId: string, provider: string, code: string) => Promise<string>;
|
|
11
10
|
export declare const apiRegisterPasskeyChallenge: (appId: string) => Promise<ApiPasskeyChallenge>;
|
|
12
11
|
export declare const apiRegisterPasskey: (appId: string, challenge: ApiPasskeyChallenge, passkeyResult: PasskeyFlowResult) => Promise<string>;
|
|
13
12
|
export declare const apiSendOtp: (appId: string, authValue: string) => Promise<boolean>;
|
package/dist/utils/helpers.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { IAsset, IWallet, IExplorer, LanguageKey, ITransports, IWalletNames } fr
|
|
|
5
5
|
import { INetworkTransports } from '../constants/networkDetails';
|
|
6
6
|
import { HorizonApi } from '@stellar/stellar-sdk/lib/horizon';
|
|
7
7
|
export declare const bufferToBase64Url: (buf: ArrayBuffer) => string;
|
|
8
|
+
export declare const base64UrlToBuffer: (value: string) => ArrayBuffer;
|
|
8
9
|
export declare const getAssetTitle: (asset: HorizonApi.BalanceLineNative | HorizonApi.BalanceLineAsset<"credit_alphanum4"> | HorizonApi.BalanceLineAsset<"credit_alphanum12"> | HorizonApi.BalanceLineLiquidityPool) => string;
|
|
9
10
|
export declare const getAssetSubtitle: (asset: HorizonApi.BalanceLineNative | HorizonApi.BalanceLineAsset<"credit_alphanum4"> | HorizonApi.BalanceLineAsset<"credit_alphanum12"> | HorizonApi.BalanceLineLiquidityPool) => string;
|
|
10
11
|
export declare const iAssetToAsset: (asset: IAsset) => Asset;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import CDNFiles from '../constants/cdnFiles';
|
|
2
|
-
import { ILoginMethods,
|
|
2
|
+
import { ILoginMethods, AuthenticateApiResponse } from '../types';
|
|
3
3
|
type SocialProviderMeta = {
|
|
4
4
|
displayName: string;
|
|
5
|
-
authUrl: string;
|
|
6
|
-
scopes: string[];
|
|
7
5
|
icon: CDNFiles;
|
|
8
|
-
extraParams?: Record<string, string>;
|
|
9
6
|
};
|
|
10
7
|
export declare const SOCIAL_PROVIDERS: Record<string, SocialProviderMeta>;
|
|
11
8
|
export declare const isSocialProvider: (method: string) => boolean;
|
|
@@ -13,12 +10,10 @@ export declare const getEnabledSocials: (loginMethods: ILoginMethods | string[],
|
|
|
13
10
|
export type ISocialSession = {
|
|
14
11
|
provider: string;
|
|
15
12
|
popup: Window | null;
|
|
16
|
-
state: string;
|
|
17
|
-
redirectUri: string;
|
|
18
13
|
error?: string;
|
|
19
14
|
};
|
|
20
15
|
export declare const getActiveSocialSession: () => ISocialSession | null;
|
|
21
16
|
export declare const cancelActiveSocialSession: () => void;
|
|
22
|
-
export declare const beginSocialLogin: (provider: string,
|
|
23
|
-
export declare const
|
|
17
|
+
export declare const beginSocialLogin: (provider: string, appId: string) => ISocialSession;
|
|
18
|
+
export declare const awaitSocialLogin: (session: ISocialSession) => Promise<string>;
|
|
24
19
|
export {};
|