Skip to content

Commit

Permalink
fix: move internal functions to main (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
paolodamico authored Feb 22, 2023
1 parent 5b66608 commit 9feec7c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion idkit/esbuild/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const configs = {
esm: {
...baseConfig,

entryPoints: [require.resolve('../src/index.ts'), require.resolve('../src/internal.ts')],
entryPoints: [require.resolve('../src/index.ts')],
outdir: 'build/',
define: {
...baseConfig.define,
Expand Down
10 changes: 9 additions & 1 deletion idkit/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ import type { ISuccessResult } from '@/types'
import { solidityEncode } from './lib/hashing'
import IDKitWidget from '@/components/IDKitWidget'
import type { WidgetProps, Config } from '@/types/config'
import { hashToField, validateABILikeEncoding, generateExternalNullifier } from './lib/hashing'

export { IDKitWidget, useIDKit, solidityEncode }
// NOTE: For internal use in other Worldcoin packages
const internal = {
hashToField,
validateABILikeEncoding,
generateExternalNullifier,
}

export { IDKitWidget, useIDKit, solidityEncode, internal }
export type { ISuccessResult, Config, WidgetProps }
1 change: 0 additions & 1 deletion idkit/src/internal.ts

This file was deleted.

1 comment on commit 9feec7c

@vercel
Copy link

@vercel vercel bot commented on 9feec7c Feb 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.