Skip to content

Commit

Permalink
fix: export hashStruct (#3103)
Browse files Browse the repository at this point in the history
* fix: export

* Create cool-tips-lick.md

---------

Co-authored-by: jxom <[email protected]>
  • Loading branch information
iamacook and jxom authored Dec 7, 2024
1 parent a8865d5 commit 42fbfca
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cool-tips-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Exported `hashStruct`.
1 change: 1 addition & 0 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ test('exports', () => {
"getSerializedTransactionType",
"getTransactionType",
"hashDomain",
"hashStruct",
"hashTypedData",
"compactSignatureToSignature",
"hexToCompactSignature",
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1272,10 +1272,12 @@ export {
} from './utils/transaction/getTransactionType.js'
export {
type HashDomainErrorType,
type HashStructErrorType,
type HashTypedDataErrorType,
type HashTypedDataParameters,
type HashTypedDataReturnType,
hashDomain,
hashStruct,
hashTypedData,
} from './utils/signature/hashTypedData.js'
export {
Expand Down
2 changes: 2 additions & 0 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,10 @@ export { type Sha256ErrorType, sha256 } from './hash/sha256.js'
export { type Ripemd160ErrorType, ripemd160 } from './hash/ripemd160.js'
export {
type HashDomainErrorType,
type HashStructErrorType,
type HashTypedDataParameters,
type HashTypedDataReturnType,
hashStruct,
hashTypedData,
} from './signature/hashTypedData.js'
export {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/signature/hashTypedData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function hashDomain({
})
}

type HashStructErrorType = EncodeDataErrorType | Keccak256ErrorType | ErrorType
export type HashStructErrorType = EncodeDataErrorType | Keccak256ErrorType | ErrorType

export function hashStruct({
data,
Expand Down

0 comments on commit 42fbfca

Please sign in to comment.