Skip to content

Commit

Permalink
Fixing type/const separation in sdk root
Browse files Browse the repository at this point in the history
  • Loading branch information
mattschoch committed Aug 29, 2024
1 parent 905fd96 commit bf531c9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
5 changes: 3 additions & 2 deletions apps/devtool/src/app/_hooks/useVaultApi.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
Alg,
DeriveAccountRequest,
GenerateKeyRequest,
ImportPrivateKeyRequest,
Expand Down Expand Up @@ -85,13 +86,13 @@ const useVaultApi = () => {
} = vaultClientData

const getJwkFromRsaPem = async (pem: string): Promise<RsaPublicKey | null> => {
const key = await importSPKI(pem, SigningAlg.RS256, { extractable: true })
const key = await importSPKI(pem, Alg.RS256, { extractable: true })
const jwk = await exportJWK(key)
const kid = rsaKeyToKid(jwk as Jwk)

return rsaPublicKeySchema.parse({
...jwk,
alg: SigningAlg.RS256,
alg: Alg.RS256,
kid
})
}
Expand Down
25 changes: 13 additions & 12 deletions packages/armory-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ export * from './lib/vault'

export { resourceId } from './lib/utils'

export type { Alg, Jwk, PrivateKey, PublicKey, RsaPublicKey } from '@narval/signature'
export type { Jwk, PrivateKey, PublicKey, RsaPublicKey } from '@narval/signature'

export {
Alg,
Curves,
KeyTypes,
SigningAlg,
Expand All @@ -33,38 +34,38 @@ export {
} from '@narval/signature'

export type {
AccessToken,
AccountEntity,
Address,
CreateAuthorizationRequest,
CredentialEntity,
Criterion,
Decision,
Eip712TypedData,
Entities,
EntityType,
EvaluationRequest,
Hex,
JwtString,
Policy,
PolicyCriterion,
Request,
Then,
TransactionRequest,
UserAccountEntity,
UserEntity,
ValueOperators
UserEntity
} from '@narval/policy-engine-shared'

export {
AccessToken,
AccountType,
Action,
CreateAuthorizationRequest,
Criterion,
Eip712TypedData,
EntityData,
EntityStore,
EntityType,
EntityUtil,
JwtString,
PolicyData,
PolicyStore,
Request,
Then,
TransactionRequest,
UserRole,
ValueOperators,
getAddress,
hexSchema,
isAddress,
Expand Down

0 comments on commit bf531c9

Please sign in to comment.