Skip to content

Impossible to use computeHintedClassHash hash function #1135

@PhilippeR26

Description

@PhilippeR26

Describe the bug
In utils/hash, the computeHintedClassHash() function is set a default export :

export default function computeHintedClassHash(compiledContract: LegacyCompiledContract) {

As a Starknet.js library user, I am not able to import and use this function.
Error message :

TSError: ⨯ Unable to compile TypeScript:
src/tmp/26.testSepolia.ts:33:25 - error TS2551: Property 'computeHintedClassHash' does not exist on type 'typeof index$1'. Did you mean 'computeCompiledClassHash'?

33     const result = hash.computeHintedClassHash()
                           ~~~~~~~~~~~~~~~~~~~~~~

To Reproduce
In a ts-node script :

import { hash } from "starknet";
const result = hash.computeHintedClassHash();

Expected behavior
To be able to use this function.

Screenshots
N/A
Desktop (please complete the following information):

  • Browser & version [e.g. chrome, safari, webworker] : any
  • Node version [e.g. 16.0.1] : [email protected]
  • Starknet.js version : v6.9.0
  • Network [devnet, testnet]: any

Additional context

Warning

Currently not open to contributors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions