Skip to content

Commit

Permalink
import JWKS from @interledger/open-payments
Browse files Browse the repository at this point in the history
  • Loading branch information
sidvishnoi committed Oct 10, 2024
1 parent 56f791d commit 88df0c5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/shared/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SuccessResponse } from '@/shared/messages';
import type { WalletAddress } from '@interledger/open-payments/dist/types';
import type { WalletAddress, JWKS } from '@interledger/open-payments';
import { cx, CxOptions } from 'class-variance-authority';
import { twMerge } from 'tailwind-merge';
import { addSeconds } from 'date-fns/addSeconds';
Expand Down Expand Up @@ -68,8 +68,6 @@ export const getWalletInformation = async (
};

export const getJWKS = async (walletAddressUrl: string) => {
type JWK = { kid: string; alg: string; x: string; crv: string; kty: string };
type JWKS = { keys: JWK[] };
const jwksUrl = new URL('jwks.json', ensureEnd(walletAddressUrl, '/'));
const res = await fetch(jwksUrl.href);
const json = await res.json();
Expand Down

0 comments on commit 88df0c5

Please sign in to comment.