@phantom/react-native-sdk 1.0.0 → 1.0.3
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.js +15 -15
- package/dist/index.mjs +4 -4
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var src_exports = {};
|
|
32
32
|
__export(src_exports, {
|
|
33
33
|
AddressType: () => import_client.AddressType,
|
|
34
|
-
NetworkId: () =>
|
|
34
|
+
NetworkId: () => import_constants4.NetworkId,
|
|
35
35
|
PhantomProvider: () => PhantomProvider,
|
|
36
36
|
darkTheme: () => import_wallet_sdk_ui6.darkTheme,
|
|
37
37
|
lightTheme: () => import_wallet_sdk_ui6.lightTheme,
|
|
@@ -48,7 +48,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
48
48
|
// src/PhantomProvider.tsx
|
|
49
49
|
var import_react8 = require("react");
|
|
50
50
|
var import_embedded_provider_core = require("@phantom/embedded-provider-core");
|
|
51
|
-
var
|
|
51
|
+
var import_constants3 = require("@phantom/constants");
|
|
52
52
|
var import_wallet_sdk_ui5 = require("@phantom/wallet-sdk-ui");
|
|
53
53
|
|
|
54
54
|
// src/ModalProvider.tsx
|
|
@@ -557,7 +557,7 @@ var ExpoAuthProvider = class {
|
|
|
557
557
|
// OAuth session management - defaults to allow refresh unless explicitly clearing after logout
|
|
558
558
|
clear_previous_session: (phantomOptions.clearPreviousSession ?? false).toString(),
|
|
559
559
|
allow_refresh: (phantomOptions.allowRefresh ?? true).toString(),
|
|
560
|
-
sdk_version: "1.0.
|
|
560
|
+
sdk_version: "1.0.3",
|
|
561
561
|
sdk_type: "react-native",
|
|
562
562
|
platform: import_react_native5.Platform.OS
|
|
563
563
|
});
|
|
@@ -703,15 +703,15 @@ var ExpoURLParamsAccessor = class {
|
|
|
703
703
|
// src/providers/embedded/stamper.ts
|
|
704
704
|
var SecureStore2 = __toESM(require("expo-secure-store"));
|
|
705
705
|
var import_api_key_stamper = require("@phantom/api-key-stamper");
|
|
706
|
+
var import_constants2 = require("@phantom/constants");
|
|
706
707
|
var import_crypto = require("@phantom/crypto");
|
|
707
708
|
var import_base64url = require("@phantom/base64url");
|
|
708
|
-
var import_sdk_types = require("@phantom/sdk-types");
|
|
709
709
|
var ReactNativeStamper = class {
|
|
710
710
|
// Optional for PKI, required for OIDC
|
|
711
711
|
constructor(config = {}) {
|
|
712
712
|
this.activeKeyRecord = null;
|
|
713
713
|
this.pendingKeyRecord = null;
|
|
714
|
-
this.algorithm =
|
|
714
|
+
this.algorithm = import_constants2.DEFAULT_AUTHENTICATOR_ALGORITHM;
|
|
715
715
|
this.type = "PKI";
|
|
716
716
|
this.keyPrefix = config.keyPrefix || "phantom-rn-stamper";
|
|
717
717
|
this.appId = config.appId || "default";
|
|
@@ -929,12 +929,12 @@ function PhantomProvider({ children, config, debugConfig, theme, appIcon, appNam
|
|
|
929
929
|
const redirectUrl = config.authOptions?.redirectUrl || `${config.scheme}://phantom-auth-callback`;
|
|
930
930
|
return {
|
|
931
931
|
...config,
|
|
932
|
-
apiBaseUrl: config.apiBaseUrl ||
|
|
933
|
-
embeddedWalletType: config.embeddedWalletType ||
|
|
932
|
+
apiBaseUrl: config.apiBaseUrl || import_constants3.DEFAULT_WALLET_API_URL,
|
|
933
|
+
embeddedWalletType: config.embeddedWalletType || import_constants3.DEFAULT_EMBEDDED_WALLET_TYPE,
|
|
934
934
|
authOptions: {
|
|
935
935
|
...config.authOptions || {},
|
|
936
936
|
redirectUrl,
|
|
937
|
-
authUrl: config.authOptions?.authUrl ||
|
|
937
|
+
authUrl: config.authOptions?.authUrl || import_constants3.DEFAULT_AUTH_URL
|
|
938
938
|
}
|
|
939
939
|
};
|
|
940
940
|
}, [config]);
|
|
@@ -956,12 +956,12 @@ function PhantomProvider({ children, config, debugConfig, theme, appIcon, appNam
|
|
|
956
956
|
phantomAppProvider: new ReactNativePhantomAppProvider(),
|
|
957
957
|
name: platformName,
|
|
958
958
|
analyticsHeaders: {
|
|
959
|
-
[
|
|
960
|
-
[
|
|
961
|
-
[
|
|
962
|
-
[
|
|
963
|
-
[
|
|
964
|
-
[
|
|
959
|
+
[import_constants3.ANALYTICS_HEADERS.SDK_TYPE]: "react-native",
|
|
960
|
+
[import_constants3.ANALYTICS_HEADERS.PLATFORM]: import_react_native7.Platform.OS,
|
|
961
|
+
[import_constants3.ANALYTICS_HEADERS.PLATFORM_VERSION]: `${import_react_native7.Platform.Version}`,
|
|
962
|
+
[import_constants3.ANALYTICS_HEADERS.APP_ID]: config.appId,
|
|
963
|
+
[import_constants3.ANALYTICS_HEADERS.WALLET_TYPE]: config.embeddedWalletType,
|
|
964
|
+
[import_constants3.ANALYTICS_HEADERS.SDK_VERSION]: "1.0.3"
|
|
965
965
|
// Replaced at build time
|
|
966
966
|
}
|
|
967
967
|
};
|
|
@@ -1075,7 +1075,7 @@ function useEthereum() {
|
|
|
1075
1075
|
|
|
1076
1076
|
// src/index.ts
|
|
1077
1077
|
var import_client = require("@phantom/client");
|
|
1078
|
-
var
|
|
1078
|
+
var import_constants4 = require("@phantom/constants");
|
|
1079
1079
|
var import_wallet_sdk_ui6 = require("@phantom/wallet-sdk-ui");
|
|
1080
1080
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1081
1081
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -515,7 +515,7 @@ var ExpoAuthProvider = class {
|
|
|
515
515
|
// OAuth session management - defaults to allow refresh unless explicitly clearing after logout
|
|
516
516
|
clear_previous_session: (phantomOptions.clearPreviousSession ?? false).toString(),
|
|
517
517
|
allow_refresh: (phantomOptions.allowRefresh ?? true).toString(),
|
|
518
|
-
sdk_version: "1.0.
|
|
518
|
+
sdk_version: "1.0.3",
|
|
519
519
|
sdk_type: "react-native",
|
|
520
520
|
platform: Platform.OS
|
|
521
521
|
});
|
|
@@ -661,15 +661,15 @@ var ExpoURLParamsAccessor = class {
|
|
|
661
661
|
// src/providers/embedded/stamper.ts
|
|
662
662
|
import * as SecureStore2 from "expo-secure-store";
|
|
663
663
|
import { ApiKeyStamper } from "@phantom/api-key-stamper";
|
|
664
|
+
import { DEFAULT_AUTHENTICATOR_ALGORITHM } from "@phantom/constants";
|
|
664
665
|
import { generateKeyPair } from "@phantom/crypto";
|
|
665
666
|
import { base64urlEncode } from "@phantom/base64url";
|
|
666
|
-
import { Algorithm } from "@phantom/sdk-types";
|
|
667
667
|
var ReactNativeStamper = class {
|
|
668
668
|
// Optional for PKI, required for OIDC
|
|
669
669
|
constructor(config = {}) {
|
|
670
670
|
this.activeKeyRecord = null;
|
|
671
671
|
this.pendingKeyRecord = null;
|
|
672
|
-
this.algorithm =
|
|
672
|
+
this.algorithm = DEFAULT_AUTHENTICATOR_ALGORITHM;
|
|
673
673
|
this.type = "PKI";
|
|
674
674
|
this.keyPrefix = config.keyPrefix || "phantom-rn-stamper";
|
|
675
675
|
this.appId = config.appId || "default";
|
|
@@ -919,7 +919,7 @@ function PhantomProvider({ children, config, debugConfig, theme, appIcon, appNam
|
|
|
919
919
|
[ANALYTICS_HEADERS.PLATFORM_VERSION]: `${Platform2.Version}`,
|
|
920
920
|
[ANALYTICS_HEADERS.APP_ID]: config.appId,
|
|
921
921
|
[ANALYTICS_HEADERS.WALLET_TYPE]: config.embeddedWalletType,
|
|
922
|
-
[ANALYTICS_HEADERS.SDK_VERSION]: "1.0.
|
|
922
|
+
[ANALYTICS_HEADERS.SDK_VERSION]: "1.0.3"
|
|
923
923
|
// Replaced at build time
|
|
924
924
|
}
|
|
925
925
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phantom/react-native-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Phantom Wallet SDK for React Native and Expo applications",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
"directory": "packages/react-native-sdk"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@phantom/api-key-stamper": "^1.0.
|
|
49
|
-
"@phantom/base64url": "^1.0.
|
|
50
|
-
"@phantom/chain-interfaces": "^1.0.
|
|
51
|
-
"@phantom/client": "^1.0.
|
|
52
|
-
"@phantom/constants": "^1.0.
|
|
53
|
-
"@phantom/crypto": "^1.0.
|
|
54
|
-
"@phantom/embedded-provider-core": "^1.0.
|
|
55
|
-
"@phantom/sdk-types": "^1.0.
|
|
56
|
-
"@phantom/wallet-sdk-ui": "^1.0.
|
|
48
|
+
"@phantom/api-key-stamper": "^1.0.3",
|
|
49
|
+
"@phantom/base64url": "^1.0.3",
|
|
50
|
+
"@phantom/chain-interfaces": "^1.0.3",
|
|
51
|
+
"@phantom/client": "^1.0.3",
|
|
52
|
+
"@phantom/constants": "^1.0.3",
|
|
53
|
+
"@phantom/crypto": "^1.0.3",
|
|
54
|
+
"@phantom/embedded-provider-core": "^1.0.3",
|
|
55
|
+
"@phantom/sdk-types": "^1.0.3",
|
|
56
|
+
"@phantom/wallet-sdk-ui": "^1.0.3",
|
|
57
57
|
"@types/bs58": "^5.0.0",
|
|
58
58
|
"bs58": "^6.0.0",
|
|
59
59
|
"buffer": "^6.0.3"
|