@medialane/sdk 0.123.0 → 0.124.0

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.
@@ -559,6 +559,7 @@ interface RequestSiwsTokenArgs {
559
559
  backendUrl: string;
560
560
  walletAddress: string;
561
561
  signer: SiwsSigner;
562
+ appSource?: string;
562
563
  }
563
564
 
564
565
  declare function getSiwsStorageKey(address: string): string;
@@ -566,7 +567,7 @@ declare function isSiwsTokenValid(token: string | null | undefined): token is st
566
567
  declare function getStoredSiwsToken(address: string): string | null;
567
568
  declare function storeSiwsToken(address: string, token: string): void;
568
569
  declare function normalizeSiwsSignature(signature: unknown): string[];
569
- declare function requestSiwsToken({ backendUrl, walletAddress, signer, }: RequestSiwsTokenArgs): Promise<string>;
570
+ declare function requestSiwsToken({ backendUrl, walletAddress, signer, appSource, }: RequestSiwsTokenArgs): Promise<string>;
570
571
 
571
572
  declare const IPMarketplaceABI: readonly [{
572
573
  readonly type: "impl";
@@ -559,6 +559,7 @@ interface RequestSiwsTokenArgs {
559
559
  backendUrl: string;
560
560
  walletAddress: string;
561
561
  signer: SiwsSigner;
562
+ appSource?: string;
562
563
  }
563
564
 
564
565
  declare function getSiwsStorageKey(address: string): string;
@@ -566,7 +567,7 @@ declare function isSiwsTokenValid(token: string | null | undefined): token is st
566
567
  declare function getStoredSiwsToken(address: string): string | null;
567
568
  declare function storeSiwsToken(address: string, token: string): void;
568
569
  declare function normalizeSiwsSignature(signature: unknown): string[];
569
- declare function requestSiwsToken({ backendUrl, walletAddress, signer, }: RequestSiwsTokenArgs): Promise<string>;
570
+ declare function requestSiwsToken({ backendUrl, walletAddress, signer, appSource, }: RequestSiwsTokenArgs): Promise<string>;
570
571
 
571
572
  declare const IPMarketplaceABI: readonly [{
572
573
  readonly type: "impl";
@@ -11578,7 +11578,8 @@ function normalizeSiwsSignature(signature) {
11578
11578
  async function requestSiwsToken({
11579
11579
  backendUrl,
11580
11580
  walletAddress,
11581
- signer
11581
+ signer,
11582
+ appSource
11582
11583
  }) {
11583
11584
  const base = backendUrl.replace(/\/$/, "");
11584
11585
  const nonceRes = await fetch(`${base}/v1/auth/siws/nonce`, {
@@ -11594,7 +11595,7 @@ async function requestSiwsToken({
11594
11595
  const verifyRes = await fetch(`${base}/v1/auth/siws/verify`, {
11595
11596
  method: "POST",
11596
11597
  headers: { "Content-Type": "application/json" },
11597
- body: JSON.stringify({ walletAddress, nonce, signature })
11598
+ body: JSON.stringify({ walletAddress, nonce, signature, ...appSource ? { appSource } : {} })
11598
11599
  });
11599
11600
  if (!verifyRes.ok) {
11600
11601
  let backendMessage;