DeployedStarkCurveWallet
Defined in: atomiq-chain-starknet/src/starknet/wallet/accounts/DeployedStarkCurveWallet.ts:40
Wallet for an already-deployed Starknet account controlled by a single Stark-curve private key,
bound to an explicit address (Starknet addresses depend on the account class hash, so a key
maps to a different address per wallet vendor). Never self-deploys.
Use this when bringing in the key from an already deployed wallet account (Braavos, Xverse or Argent/Ready wallets).
If you are creating a new wallet consider using StarknetKeypairWallet.
Remarks
Prefer createAndVerify, or call verifyWallet before use after using the constructor, these perform an actual check on whether a given key actually controls the wallet account at a given address.
Extends
unknown
Constructors
Constructor
new DeployedStarkCurveWallet(
provider,
privateKey,
address): DeployedStarkCurveWallet;
Defined in: atomiq-chain-starknet/src/starknet/wallet/accounts/DeployedStarkCurveWallet.ts:52
The constructor does not validate anything. Prefer createAndVerify, or call
verifyWallet before use — until then the key is not checked to control address.
Parameters
| Parameter | Type | Description |
|---|---|---|
provider | Provider | Starknet RPC provider |
privateKey | string | Stark-curve private key of the account, in the 0x... format |
address | string | Address of the already deployed account |
Returns
DeployedStarkCurveWallet
Overrides
Account.constructor
Properties
publicKey
readonly publicKey: string;
Defined in: atomiq-chain-starknet/src/starknet/wallet/accounts/DeployedStarkCurveWallet.ts:42
Methods
createAndVerify()
static createAndVerify(
provider,
privateKey,
address): Promise<DeployedStarkCurveWallet>;
Defined in: atomiq-chain-starknet/src/starknet/wallet/accounts/DeployedStarkCurveWallet.ts:119
Use this to create a new wallet instance, prefer it over just using the constructor!
Constructs the wallet and verifies wallet account ownership (by running verifyWallet).
Parameters
| Parameter | Type |
|---|---|
provider | Provider |
privateKey | string |
address | string |
Returns
Promise<DeployedStarkCurveWallet>
getDeploymentData()
getDeploymentData(): any;
Defined in: atomiq-chain-starknet/src/starknet/wallet/accounts/DeployedStarkCurveWallet.ts:60
Always null — wraps an already-deployed account and never self-deploys.
Returns
any
verifyWallet()
verifyWallet(): Promise<void>;
Defined in: atomiq-chain-starknet/src/starknet/wallet/accounts/DeployedStarkCurveWallet.ts:106
Verifies the private key controls the bound account by signing a SNIP-12 message and validating it
against the account's own on-chain is_valid_signature — the canonical check, independent of the
account's class hash or signature scheme.
Returns
Promise<void>
Throws
AccountNotDeployedError if the account is not deployed
Throws
WalletVerificationError if the account does not accept the key's signature
assertDeployed()
protected assertDeployed(): Promise<void>;
Defined in: atomiq-chain-starknet/src/starknet/wallet/accounts/DeployedStarkCurveWallet.ts:67
Returns
Promise<void>
Throws
AccountNotDeployedError on CONTRACT_NOT_FOUND; other errors (rate limit, network) propagate.
getOwnershipMessage()
protected getOwnershipMessage(): Promise<TypedData>;
Defined in: atomiq-chain-starknet/src/starknet/wallet/accounts/DeployedStarkCurveWallet.ts:81
A fixed SNIP-12 message — the contents are irrelevant, it only needs to be signed and validated.
Returns
Promise<TypedData>