@explorins/pers-signer 1.0.5 → 1.0.8

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.d.ts CHANGED
@@ -424,11 +424,6 @@ interface SigningResult$1 {
424
424
  transactionHash?: string;
425
425
  rawTransaction?: string;
426
426
  }
427
- /**
428
- * Environment variable types for shared services
429
- */
430
- interface SharedLibEnvironment {
431
- }
432
427
  /**
433
428
  * Service configuration options
434
429
  */
@@ -1205,4 +1200,4 @@ declare function createSigningService(): Promise<SigningService>;
1205
1200
  declare function createPersSignerSDK(config: Omit<PersSignerConfig, 'webAuthnProvider'>): Promise<PersSignerSDK>;
1206
1201
 
1207
1202
  export { AuthenticationService, FetchHttpClient, KeyWallet, PersService, PersSignerSDK, ReactNativeConfigProvider, SIGNABLE_STATUSES, SigningService, StaticConfigProvider, TransactionErrorHandler, TransactionSigningErrorCode, TransactionSigningService, TransactionSubmissionHandler, TransactionValidator, WalletService, WebAuthnCoordinator, WebConfigProvider, createAuthenticationService, createPersSignerSDK, createSearchParamLogger, createSearchString, createSigningService, createUrlWithSearchParams, generateAnonymousUsername, generateGuestUsername, generateUUID, getAllSearchParams, getBrowserWebAuthnProvider, getConfigProvider, getHttpClient, getSearchParam, getServiceConfig, getBrowserWebAuthnProvider as getWebAuthnProvider, initTenantAnalytics, logSearchParams, mergeSearchParams, removeSearchParam, setConfigProvider, setHttpClient, updateSearchParam };
1208
- export type { ApiResponse, AuthResponse, AuthState, AuthToken, AuthenticationResult, CombinedTransactionStatus, ConfigProvider, HashSigningRequest, HttpClient, HttpRequestOptions, HttpResponse, JWTExtractionResult, JWTPayload, WalletItem$1 as KeyWalletItem, WalletListResponse$1 as KeyWalletListResponse, PersAuthResult, PersSignerConfig, PreparedTransaction, RegistrationChallenge, RegistrationResult, RelyingPartyConfig, ServiceConfig$1 as ServiceConfig, ServiceError, SharedLibEnvironment, SignResponse, SignerAuthenticatedUser, SignerUserInfo, SigningAuthTokens, SigningChallenge, SigningRequest, SigningResult$1 as SigningResult, StoredTransactionResult, SubmissionResult, TenantConfig, TransactionMetadata, TransactionSigningError, TransactionSigningParams, TransactionSigningResult, TransactionStatusInfo, TypedDataSigningRequest, UserCredentials, UserProfile, WalletConfig, WalletItem, WalletListResponse, WebAuthnConfig, WebAuthnProvider };
1203
+ export type { ApiResponse, AuthResponse, AuthState, AuthToken, AuthenticationResult, CombinedTransactionStatus, ConfigProvider, HashSigningRequest, HttpClient, HttpRequestOptions, HttpResponse, JWTExtractionResult, JWTPayload, WalletItem$1 as KeyWalletItem, WalletListResponse$1 as KeyWalletListResponse, PersAuthResult, PersSignerConfig, PreparedTransaction, RegistrationChallenge, RegistrationResult, RelyingPartyConfig, ServiceConfig$1 as ServiceConfig, ServiceError, SignResponse, SignerAuthenticatedUser, SignerUserInfo, SigningAuthTokens, SigningChallenge, SigningRequest, SigningResult$1 as SigningResult, StoredTransactionResult, SubmissionResult, TenantConfig, TransactionMetadata, TransactionSigningError, TransactionSigningParams, TransactionSigningResult, TransactionStatusInfo, TypedDataSigningRequest, UserCredentials, UserProfile, WalletConfig, WalletItem, WalletListResponse, WebAuthnConfig, WebAuthnProvider };
@@ -251,7 +251,8 @@ const SIGNER_CONFIG = {
251
251
  * Default relying party name for WebAuthn operations
252
252
  * This appears in the browser's authentication prompts
253
253
  */
254
- DEFAULT_RELYING_PARTY_NAME: 'PERS Signer'};
254
+ DEFAULT_RELYING_PARTY_NAME: 'PERS Signer',
255
+ DEFAULT_RELYING_PARTY_ID: 'signer.pers.ninja'};
255
256
 
256
257
  /**
257
258
  * Get PERS API base URL with staging option
@@ -2251,9 +2252,9 @@ class DfnsBrowserWebAuthnProvider {
2251
2252
  async function getBrowserWebAuthnProvider() {
2252
2253
  const config = {
2253
2254
  relyingParty: {
2254
- id: typeof window !== 'undefined' ? window.location.hostname : 'pers.ninja',
2255
- name: 'PERS Blockchain Signer',
2256
- origin: typeof window !== 'undefined' ? window.location.origin : 'https://pers.ninja',
2255
+ id: typeof window !== 'undefined' ? window.location.hostname : SIGNER_CONFIG.DEFAULT_RELYING_PARTY_ID,
2256
+ name: SIGNER_CONFIG.DEFAULT_RELYING_PARTY_NAME,
2257
+ origin: typeof window !== 'undefined' ? window.location.origin : SIGNER_CONFIG.DEFAULT_RELYING_PARTY_ID,
2257
2258
  }
2258
2259
  };
2259
2260
  return new DfnsBrowserWebAuthnProvider(config);