Skip to content

fix(web-client): rename faucet AccountType to FaucetType - #370

Open
kutluhaneth46 wants to merge 1 commit into
0xMiden:nextfrom
kutluhaneth46:fix/faucet-type-rename-361
Open

fix(web-client): rename faucet AccountType to FaucetType#370
kutluhaneth46 wants to merge 1 commit into
0xMiden:nextfrom
kutluhaneth46:fix/faucet-type-rename-361

Conversation

@kutluhaneth46

Copy link
Copy Markdown

Summary

  • Rename the JS faucet-kind const from AccountType to FaucetType so it no longer shadows the WASM/napi AccountType enum (Private / Public).
  • Re-export native AccountType from the Node entry (removed from the manual shadow list) and update docs/tests accordingly.
  • Faucet creation keeps accepting numeric 0/1 and "FungibleFaucet" / "NonFungibleFaucet" strings; the friendly const is now FaucetType.

Fixes #361

Test plan

  • Confirm import { AccountType } from '@miden-sdk/miden-sdk' exposes AccountType.Public / AccountType.Private
  • new AccountBuilder(seed).accountType(AccountType.Public) no longer throws NumberExpected / Undefined
  • accounts.create({ type: FaucetType.FungibleFaucet, ... }) still creates a faucet
  • Playwright miden_client_api suite (uses window.FaucetType) and Node adapter still pass

Stop shadowing the WASM/napi AccountType (Private/Public) so AccountBuilder.accountType(AccountType.Public) works again.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant