API reference

The starknetkit package exposes two major methods connect and disconnect. (You could reference the Guides section to see how they are used).

The connect method further exposes other methods you could find useful in your dapps:

  1. isConnected - This method available after an attempt to establish a connection, can be used to confirm if an account was truly connected.

isConnected: true
  1. selectedAddress - This method can be called to get the wallet address of a connected account.

selectedAddress?: string
  1. account - This method gives us access to the account object. It uses starknet.js AccountInterface and extends the starknet.js Provider.

account?: AccountInterface
  1. chainId - This method returns the connected network chain ID.

chainId?: string
  1. provider - This method gives us access to the Provider object when called. It uses starknet.js Provider Interface enabling you to interact with the network without signing transactions or messages.

provider: ProviderInterface
  1. enable - This method can be used to create a connection to a specific get-starknet version.

enable: (options?: { starknetVersion?: 'v3' | 'v4' }) => Promise<string[]>

Last updated