Skip to content

Commit

Permalink
chore: exports
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Feb 2, 2024
1 parent 4b54154 commit 8b629e0
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,15 @@ test('exports', () => {
"offchainLookup",
"offchainLookupAbiItem",
"offchainLookupSignature",
"blobsToCommitments",
"commitmentToVersionedHash",
"commitmentsToVersionedHashes",
"sidecarsToVersionedHashes",
"toBlobProofs",
"toBlobSidecars",
"toBlobs",
"defineKzg",
"setupKzg",
"concat",
"concatBytes",
"concatHex",
Expand Down
54 changes: 54 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,60 @@ export {
offchainLookupAbiItem,
offchainLookupSignature,
} from './utils/ccip.js'
export {
type BlobsToCommitmentsErrorType,
type BlobsToCommitmentsParameters,
type BlobsToCommitmentsReturnType,
blobsToCommitments,
} from './utils/blob/blobsToCommitments.js'
export {
type CommitmentToVersionedHashErrorType,
type CommitmentToVersionedHashParameters,
type CommitmentToVersionedHashReturnType,
commitmentToVersionedHash,
} from './utils/blob/commitmentToVersionedHash.js'
export {
type CommitmentsToVersionedHashesErrorType,
type CommitmentsToVersionedHashesParameters,
type CommitmentsToVersionedHashesReturnType,
commitmentsToVersionedHashes,
} from './utils/blob/commitmentsToVersionedHashes.js'
export {
type SidecarsToVersionedHashesErrorType,
type SidecarsToVersionedHashesParameters,
type SidecarsToVersionedHashesReturnType,
sidecarsToVersionedHashes,
} from './utils/blob/sidecarsToVersionedHashes.js'
export {
type ToBlobProofsErrorType,
type ToBlobProofsParameters,
type ToBlobProofsReturnType,
toBlobProofs,
} from './utils/blob/toBlobProofs.js'
export {
type ToBlobSidecarsErrorType,
type ToBlobSidecarsParameters,
type ToBlobSidecarsReturnType,
toBlobSidecars,
} from './utils/blob/toBlobSidecars.js'
export {
type ToBlobsErrorType,
type ToBlobsParameters,
type ToBlobsReturnType,
toBlobs,
} from './utils/blob/toBlobs.js'
export {
type DefineKzgErrorType,
type DefineKzgParameters,
type DefineKzgReturnType,
defineKzg,
} from './utils/kzg/defineKzg.js'
export {
type SetupKzgErrorType,
type SetupKzgOptions,
type SetupKzgReturnType,
setupKzg,
} from './utils/kzg/setupKzg.js'
export {
type ConcatBytesErrorType,
type ConcatErrorType,
Expand Down
6 changes: 3 additions & 3 deletions src/utils/blob/toBlobProofs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export type ToBlobProofsParameters<
to?: to | To | undefined
}

export type toBlobProofsReturnType<to extends To> =
export type ToBlobProofsReturnType<to extends To> =
| (to extends 'bytes' ? ByteArray[] : never)
| (to extends 'hex' ? Hex[] : never)

Expand Down Expand Up @@ -63,7 +63,7 @@ export function toBlobProofs<
| (blobs extends ByteArray[] ? 'bytes' : never),
>(
parameters: ToBlobProofsParameters<blobs, commitments, to>,
): toBlobProofsReturnType<to> {
): ToBlobProofsReturnType<to> {
const { kzg } = parameters

const to =
Expand All @@ -89,5 +89,5 @@ export function toBlobProofs<

return (to === 'bytes'
? proofs
: proofs.map((x) => bytesToHex(x))) as {} as toBlobProofsReturnType<to>
: proofs.map((x) => bytesToHex(x))) as {} as ToBlobProofsReturnType<to>
}

0 comments on commit 8b629e0

Please sign in to comment.