@explorins/pers-signer 1.0.32 → 1.0.34
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/browser.cjs.js +6 -2
- package/dist/browser.cjs.js.map +1 -1
- package/dist/browser.d.ts +9 -17
- package/dist/browser.esm.js +6 -2
- package/dist/browser.esm.js.map +1 -1
- package/dist/index.cjs.js +6 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +391 -399
- package/dist/index.esm.js +6 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/react-native.cjs.js +6 -2
- package/dist/react-native.cjs.js.map +1 -1
- package/dist/react-native.d.ts +9 -17
- package/dist/react-native.esm.js +6 -2
- package/dist/react-native.esm.js.map +1 -1
- package/dist/types.cjs.js +38 -0
- package/dist/types.cjs.js.map +1 -0
- package/dist/types.d.ts +130 -0
- package/dist/types.esm.js +36 -0
- package/dist/types.esm.js.map +1 -0
- package/package.json +6 -1
package/dist/react-native.d.ts
CHANGED
|
@@ -353,7 +353,7 @@ interface TransactionSigningResult {
|
|
|
353
353
|
shouldShowStatus?: boolean;
|
|
354
354
|
}
|
|
355
355
|
/**
|
|
356
|
-
* Transaction submission result
|
|
356
|
+
* Transaction submission result
|
|
357
357
|
*/
|
|
358
358
|
interface SubmissionResult {
|
|
359
359
|
submitResult: TransactionRequestResponseDTO;
|
|
@@ -363,9 +363,6 @@ interface SubmissionResult {
|
|
|
363
363
|
success: boolean;
|
|
364
364
|
error?: string;
|
|
365
365
|
}
|
|
366
|
-
/**
|
|
367
|
-
* Metadata for transaction parameters - string values only
|
|
368
|
-
*/
|
|
369
366
|
/**
|
|
370
367
|
* Authentication tokens required for transaction signing
|
|
371
368
|
*/
|
|
@@ -519,24 +516,19 @@ declare class KeyWallet extends AbstractSigner {
|
|
|
519
516
|
*/
|
|
520
517
|
|
|
521
518
|
/**
|
|
522
|
-
* Configuration
|
|
523
|
-
*
|
|
524
|
-
* @interface PersSignerConfig
|
|
525
|
-
* @property {string} [tenantId] - Optional tenant identifier for multi-tenant applications
|
|
526
|
-
* @property {string} [ethersProviderUrl] - Custom Ethereum RPC provider URL
|
|
527
|
-
* @property {WebAuthnProvider} webAuthnProvider - WebAuthn provider for secure authentication
|
|
528
|
-
* @property {string} [apiUrl] - Custom API base URL (defaults to production)
|
|
529
|
-
* @property {string} [relyingPartyName] - WebAuthn relying party name for authentication
|
|
530
|
-
* @property {StatusCallback} [globalStatusCallback] - Optional global status callback for all operations
|
|
519
|
+
* Configuration options for the PERS Signer SDK
|
|
531
520
|
*/
|
|
532
|
-
interface
|
|
521
|
+
interface PersSignerConfig {
|
|
533
522
|
ethersProviderUrl?: string;
|
|
534
|
-
webAuthnProvider: WebAuthnProvider;
|
|
535
523
|
apiUrl?: string;
|
|
536
524
|
relyingPartyName?: string;
|
|
537
525
|
globalStatusCallback?: StatusCallback;
|
|
538
526
|
}
|
|
539
|
-
|
|
527
|
+
/**
|
|
528
|
+
* Extended configuration that includes the WebAuthn provider
|
|
529
|
+
*/
|
|
530
|
+
interface ExtendedPersSignerConfig extends PersSignerConfig {
|
|
531
|
+
webAuthnProvider: WebAuthnProvider;
|
|
540
532
|
}
|
|
541
533
|
/**
|
|
542
534
|
* PERS Blockchain Signer SDK Class
|
|
@@ -1068,4 +1060,4 @@ declare function getReactNativeWebAuthnProvider(): Promise<WebAuthnProvider>;
|
|
|
1068
1060
|
declare function createPersSignerSDK(config: PersSignerConfig): Promise<PersSignerSDK>;
|
|
1069
1061
|
|
|
1070
1062
|
export { AuthenticationService, FetchHttpClient, KeyWallet, PersService, PersSignerSDK, ReactNativeConfigProvider, SigningService, SigningStatus, StaticConfigProvider, TransactionErrorHandler, TransactionSigningService, TransactionSubmissionHandler, TransactionValidator, WalletService, WebAuthnCoordinator, WebConfigProvider, createPersSignerSDK, getConfigProvider, getHttpClient, getServiceConfig, getReactNativeWebAuthnProvider as getWebAuthnProvider, setConfigProvider, setHttpClient };
|
|
1071
|
-
export type { AuthenticatedUser, ConfigProvider, HttpClient, HttpRequestOptions, HttpResponse, PersSignerConfig, PlatformConfig, StatusCallback, StatusUpdateData, SubmissionResult, TransactionSigningResult, WebAuthnConfig, WebAuthnProvider };
|
|
1063
|
+
export type { AuthenticatedUser, ConfigProvider, ExtendedPersSignerConfig, HttpClient, HttpRequestOptions, HttpResponse, PersSignerConfig, PlatformConfig, StatusCallback, StatusUpdateData, SubmissionResult, TransactionSigningResult, WebAuthnConfig, WebAuthnProvider };
|
package/dist/react-native.esm.js
CHANGED
|
@@ -1779,12 +1779,16 @@ class PersSignerSDK {
|
|
|
1779
1779
|
*/
|
|
1780
1780
|
constructor(config) {
|
|
1781
1781
|
this.config = config;
|
|
1782
|
+
// Safe hostname/origin extraction - window.location may be undefined in React Native
|
|
1783
|
+
const hasWindowLocation = typeof window !== 'undefined' && typeof window.location !== 'undefined';
|
|
1784
|
+
const hostname = hasWindowLocation ? window.location.hostname : 'localhost';
|
|
1785
|
+
const origin = hasWindowLocation ? window.location.origin : undefined;
|
|
1782
1786
|
setConfigProvider(new WebConfigProvider({
|
|
1783
1787
|
apiUrl: config.apiUrl || SIGNER_CONFIG.DEFAULT_SIGNER_API_URL,
|
|
1784
1788
|
relyingParty: {
|
|
1785
|
-
id:
|
|
1789
|
+
id: hostname,
|
|
1786
1790
|
name: config.relyingPartyName || SIGNER_CONFIG.DEFAULT_RELYING_PARTY_NAME,
|
|
1787
|
-
origin:
|
|
1791
|
+
origin: origin,
|
|
1788
1792
|
},
|
|
1789
1793
|
}));
|
|
1790
1794
|
this.authenticationService = new AuthenticationService(this.config);
|