@0xknwn/starknet-modular-account / Exports / SmartrAccount
Class: SmartrAccount
Represents a SmartrAccount.
Hierarchy
-
Account
↳
SmartrAccount
Table of contents
Constructors
Properties
Methods
- accountInvocationsFactory
- addModule
- buildAccountDeployPayload
- buildDeclarePayload
- buildInvocation
- buildUDCContractPayload
- callContract
- callOnModule
- declare
- declareAndDeploy
- declareContract
- declareIfNot
- deploy
- deployAccount
- deployAccountContract
- deployContract
- estimateAccountDeployFee
- estimateDeclareFee
- estimateDeployFee
- estimateFee
- estimateFeeBulk
- estimateInvokeFee
- estimateMessageFee
- execute
- executeMultisig
- executeOnModule
- fetch
- getAddressFromStarkName
- getBlock
- getBlockLatestAccepted
- getBlockNumber
- getBlockStateUpdate
- getBlockTransactionCount
- getBlockTransactionsTraces
- getBlockWithReceipts
- getBlockWithTxHashes
- getBlockWithTxs
- getCairoVersion
- getChainId
- getClass
- getClassAt
- getClassByHash
- getClassHashAt
- getContractVersion
- getDeclareEstimateFee
- getDeployAccountEstimateFee
- getEstimateFee
- getEstimateFeeBulk
- getEvents
- getInvokeEstimateFee
- getL1GasPrice
- getL1MessageHash
- getNonce
- getNonceForAddress
- getNonceSafe
- getPendingTransactions
- getPreferredVersion
- getSimulateTransaction
- getSpecVersion
- getStarkName
- getStarkProfile
- getStorageAt
- getSuggestedFee
- getSyncingStats
- getTransaction
- getTransactionByBlockIdAndIndex
- getTransactionByHash
- getTransactionReceipt
- getTransactionStatus
- getTransactionTrace
- getUniversalSuggestedFee
- hashMessage
- invokeFunction
- isModule
- prepareMultisig
- removeModule
- signMessage
- signMultisig
- simulateTransaction
- upgrade
- verifyMessage
- verifyMessageHash
- waitForBlock
- waitForTransaction
- executeStarkName
- executeStarkProfile
- getAddressFromStarkName
- getStarkName
- getStarkProfile
Constructors
constructor
• new SmartrAccount(providerOrOptions
, address
, pkOrSigner
, module?
, cairoVersion?
, transactionVersion?
): SmartrAccount
Parameters
Name | Type | Default value |
---|---|---|
providerOrOptions | ProviderInterface | ProviderOptions | undefined |
address | string | undefined |
pkOrSigner | string | Uint8Array | SignerInterface | undefined |
module | undefined | AccountModuleInterface | undefined |
cairoVersion? | CairoVersion | undefined |
transactionVersion | any | RPC.ETransactionVersion.V2 |
Returns
Overrides
Account.constructor
Defined in
sdks/account/src/smartr_account.ts:76
Properties
address
• address: string
Inherited from
Account.address
Defined in
node_modules/starknet/dist/index.d.ts:3738
cairoVersion
• cairoVersion: CairoVersion
Inherited from
Account.cairoVersion
Defined in
node_modules/starknet/dist/index.d.ts:3739
channel
• channel: RpcChannel
| RpcChannel$1
Inherited from
Account.channel
Defined in
node_modules/starknet/dist/index.d.ts:3196
deploySelf
• deploySelf: (__namedParameters
: DeployAccountContractPayload
, details?
: UniversalDetails
) => Promise
<DeployContractResponse
>
Type declaration
▸ («destructured»
, details?
): Promise
<DeployContractResponse
>
Parameters
Name | Type |
---|---|
«destructured» | DeployAccountContractPayload |
details? | UniversalDetails |
Returns
Promise
<DeployContractResponse
>
Inherited from
Account.deploySelf
Defined in
node_modules/starknet/dist/index.d.ts:3770
getStateUpdate
• getStateUpdate: () => Promise
<{ block_hash
: never
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>(blockIdentifier
: "pending"
) => Promise
<{ block_hash
: never
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>(blockIdentifier
: "latest"
) => Promise
<{ block_hash
: string
; new_root
: string
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>(blockIdentifier?
: BlockIdentifier
) => Promise
<StateUpdateResponse
>
Type declaration
▸ (): Promise
<{ block_hash
: never
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>
Returns
Promise
<{ block_hash
: never
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>
▸ (blockIdentifier
): Promise
<{ block_hash
: never
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>
Parameters
Name | Type |
---|---|
blockIdentifier | "pending" |
Returns
Promise
<{ block_hash
: never
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>
▸ (blockIdentifier
): Promise
<{ block_hash
: string
; new_root
: string
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>
Parameters
Name | Type |
---|---|
blockIdentifier | "latest" |
Returns
Promise
<{ block_hash
: string
; new_root
: string
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>
▸ (blockIdentifier?
): Promise
<StateUpdateResponse
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise
<StateUpdateResponse
>
Inherited from
Account.getStateUpdate
Defined in
node_modules/starknet/dist/index.d.ts:3233
module
• module: undefined
| AccountModuleInterface
Defined in
sdks/account/src/smartr_account.ts:74
signer
• signer: SignerInterface
Inherited from
Account.signer
Defined in
node_modules/starknet/dist/index.d.ts:3737
transactionVersion
• Readonly
transactionVersion: V2
| V3
Inherited from
Account.transactionVersion
Defined in
node_modules/starknet/dist/index.d.ts:3740
Methods
accountInvocationsFactory
▸ accountInvocationsFactory(invocations
, details
): Promise
<AccountInvocations
>
Parameters
Name | Type |
---|---|
invocations | Invocations |
details | AccountInvocationsFactoryDetails |
Returns
Promise
<AccountInvocations
>
Inherited from
Account.accountInvocationsFactory
Defined in
node_modules/starknet/dist/index.d.ts:3793
addModule
▸ addModule(class_hash
, execute?
): Promise
<{ transaction_hash
: string
}>
Add a module to an account.
Parameters
Name | Type | Description |
---|---|---|
class_hash | string | the module to add |
execute? | true | If true, the transaction is executed, otherwise it is built and returned so that it can be used in a multicall. |
Returns
Promise
<{ transaction_hash
: string
}>
A promise that resolves to the transaction receipt if executes is true, otherwise it returns the transaction call.
Defined in
sdks/account/src/smartr_account.ts:428
▸ addModule(class_hash
, execute
): Promise
<Call
[]>
Parameters
Name | Type |
---|---|
class_hash | string |
execute | false |
Returns
Promise
<Call
[]>
Defined in
sdks/account/src/smartr_account.ts:432
buildAccountDeployPayload
▸ buildAccountDeployPayload(«destructured»
, details
): Promise
<DeployAccountContractTransaction
>
Parameters
Name | Type |
---|---|
«destructured» | DeployAccountContractPayload |
details | InvocationsSignerDetails |
Returns
Promise
<DeployAccountContractTransaction
>
Inherited from
Account.buildAccountDeployPayload
Defined in
node_modules/starknet/dist/index.d.ts:3791
buildDeclarePayload
▸ buildDeclarePayload(payload
, details
): Promise
<DeclareContractTransaction
>
Parameters
Name | Type |
---|---|
payload | DeclareContractPayload |
details | InvocationsSignerDetails |
Returns
Promise
<DeclareContractTransaction
>
Inherited from
Account.buildDeclarePayload
Defined in
node_modules/starknet/dist/index.d.ts:3790
buildInvocation
▸ buildInvocation(call
, details
): Promise
<Invocation
>
Parameters
Name | Type |
---|---|
call | Call [] |
details | InvocationsSignerDetails |
Returns
Promise
<Invocation
>
Inherited from
Account.buildInvocation
Defined in
node_modules/starknet/dist/index.d.ts:3789
buildUDCContractPayload
▸ buildUDCContractPayload(payload
): Call
[]
Parameters
Name | Type |
---|---|
payload | UniversalDeployerContractPayload | UniversalDeployerContractPayload [] |
Returns
Call
[]
Inherited from
Account.buildUDCContractPayload
Defined in
node_modules/starknet/dist/index.d.ts:3792
callContract
▸ callContract(call
, blockIdentifier?
): Promise
<string
[]>
Parameters
Name | Type |
---|---|
call | Call |
blockIdentifier? | BlockIdentifier |
Returns
Promise
<string
[]>
Inherited from
Account.callContract
Defined in
node_modules/starknet/dist/index.d.ts:3287
callOnModule
▸ callOnModule(module_class_hash
, module_entrypoint
, calldata
): Promise
<BigNumberish
[]>
Call an entrypoint on the module account.
Parameters
Name | Type | Description |
---|---|---|
module_class_hash | string | The installed module class_hash. |
module_entrypoint | string | The module entrypoint to call. |
calldata | string [] | The entrypoint calldata. |
Returns
Promise
<BigNumberish
[]>
A promise that resolves to the call output.
Defined in
sdks/account/src/smartr_account.ts:374
declare
▸ declare(payload
, details?
): Promise
<{ class_hash
: string
; transaction_hash
: string
}>
Parameters
Name | Type |
---|---|
payload | DeclareContractPayload |
details? | UniversalDetails |
Returns
Promise
<{ class_hash
: string
; transaction_hash
: string
}>
Inherited from
Account.declare
Defined in
node_modules/starknet/dist/index.d.ts:3766
declareAndDeploy
▸ declareAndDeploy(payload
, details?
): Promise
<DeclareDeployUDCResponse
>
Parameters
Name | Type |
---|---|
payload | DeclareAndDeployContractPayload |
details? | UniversalDetails |
Returns
Promise
<DeclareDeployUDCResponse
>
Inherited from
Account.declareAndDeploy
Defined in
node_modules/starknet/dist/index.d.ts:3769
declareContract
▸ declareContract(transaction
, details
): Promise
<DeclaredTransaction
>
Parameters
Name | Type |
---|---|
transaction | DeclareContractTransaction |
details | InvocationsDetailsWithNonce |
Returns
Promise
<DeclaredTransaction
>
Inherited from
Account.declareContract
Defined in
node_modules/starknet/dist/index.d.ts:3285
declareIfNot
▸ declareIfNot(payload
, transactionsDetail?
): Promise
<{ class_hash
: string
; transaction_hash
: string
}>
First check if contract is already declared, if not declare it If contract already declared returned transaction_hash is ''. Method will pass even if contract is already declared
Parameters
Name | Type | Description |
---|---|---|
payload | DeclareContractPayload | - |
transactionsDetail? | UniversalDetails | (optional) |
Returns
Promise
<{ class_hash
: string
; transaction_hash
: string
}>
Inherited from
Account.declareIfNot
Defined in
node_modules/starknet/dist/index.d.ts:3765
deploy
▸ deploy(payload
, details?
): Promise
<MultiDeployContractResponse
>
Parameters
Name | Type |
---|---|
payload | UniversalDeployerContractPayload | UniversalDeployerContractPayload [] |
details? | UniversalDetails |
Returns
Promise
<MultiDeployContractResponse
>
Inherited from
Account.deploy
Defined in
node_modules/starknet/dist/index.d.ts:3767
deployAccount
▸ deployAccount(«destructured»
, details?
): Promise
<DeployContractResponse
>
Parameters
Name | Type |
---|---|
«destructured» | DeployAccountContractPayload |
details? | UniversalDetails |
Returns
Promise
<DeployContractResponse
>
Inherited from
Account.deployAccount
Defined in
node_modules/starknet/dist/index.d.ts:3771
deployAccountContract
▸ deployAccountContract(transaction
, details
): Promise
<DeployedAccountTransaction
>
Parameters
Name | Type |
---|---|
transaction | DeployAccountContractTransaction |
details | InvocationsDetailsWithNonce |
Returns
Promise
<DeployedAccountTransaction
>
Inherited from
Account.deployAccountContract
Defined in
node_modules/starknet/dist/index.d.ts:3286
deployContract
▸ deployContract(payload
, details?
): Promise
<DeployContractUDCResponse
>
Parameters
Name | Type |
---|---|
payload | UniversalDeployerContractPayload | UniversalDeployerContractPayload [] |
details? | UniversalDetails |
Returns
Promise
<DeployContractUDCResponse
>
Inherited from
Account.deployContract
Defined in
node_modules/starknet/dist/index.d.ts:3768
estimateAccountDeployFee
▸ estimateAccountDeployFee(«destructured»
, details?
): Promise
<EstimateFee
>
Parameters
Name | Type |
---|---|
«destructured» | DeployAccountContractPayload |
details? | UniversalDetails |
Returns
Promise
<EstimateFee
>
Inherited from
Account.estimateAccountDeployFee
Defined in
node_modules/starknet/dist/index.d.ts:3753
estimateDeclareFee
▸ estimateDeclareFee(payload
, details?
): Promise
<EstimateFee
>
Parameters
Name | Type |
---|---|
payload | DeclareContractPayload |
details? | UniversalDetails |
Returns
Promise
<EstimateFee
>
Inherited from
Account.estimateDeclareFee
Defined in
node_modules/starknet/dist/index.d.ts:3752
estimateDeployFee
▸ estimateDeployFee(payload
, details?
): Promise
<EstimateFee
>
Parameters
Name | Type |
---|---|
payload | UniversalDeployerContractPayload | UniversalDeployerContractPayload [] |
details? | UniversalDetails |
Returns
Promise
<EstimateFee
>
Inherited from
Account.estimateDeployFee
Defined in
node_modules/starknet/dist/index.d.ts:3754
estimateFee
▸ estimateFee(calls
, estimateFeeDetails?
): Promise
<EstimateFee
>
Parameters
Name | Type |
---|---|
calls | AllowArray <Call > |
estimateFeeDetails? | UniversalDetails |
Returns
Promise
<EstimateFee
>
Inherited from
Account.estimateFee
Defined in
node_modules/starknet/dist/index.d.ts:3750
estimateFeeBulk
▸ estimateFeeBulk(invocations
, details?
): Promise
<EstimateFeeBulk
>
Parameters
Name | Type |
---|---|
invocations | Invocations |
details? | UniversalDetails |
Returns
Promise
<EstimateFeeBulk
>
Inherited from
Account.estimateFeeBulk
Defined in
node_modules/starknet/dist/index.d.ts:3755
estimateInvokeFee
▸ estimateInvokeFee(calls
, details?
): Promise
<EstimateFee
>
Parameters
Name | Type |
---|---|
calls | AllowArray <Call > |
details? | UniversalDetails |
Returns
Promise
<EstimateFee
>
Inherited from
Account.estimateInvokeFee
Defined in
node_modules/starknet/dist/index.d.ts:3751
estimateMessageFee
▸ estimateMessageFee(message
, blockIdentifier?
): Promise
<FEE_ESTIMATE
>
NEW: Estimate the fee for a message from L1
Parameters
Name | Type | Description |
---|---|---|
message | MSG_FROM_L1 | Message From L1 |
blockIdentifier? | BlockIdentifier | - |
Returns
Promise
<FEE_ESTIMATE
>
Inherited from
Account.estimateMessageFee
Defined in
node_modules/starknet/dist/index.d.ts:3292
execute
▸ execute(transactions
, transactionsDetail?
): Promise
<{ transaction_hash
: string
}>
Executes a set of transactions on the StarkNet network.
Parameters
Name | Type | Description |
---|---|---|
transactions | AllowArray <Call > | An array of transactions to be executed. |
transactionsDetail? | UniversalDetails | Optional object containing additional details for the transactions. |
Returns
Promise
<{ transaction_hash
: string
}>
A Promise that resolves to an InvokeFunctionResponse object representing the result of the execution.
Overrides
Account.execute
Defined in
sdks/account/src/smartr_account.ts:236
▸ execute(transactions
, abis?
, transactionsDetail?
): Promise
<{ transaction_hash
: string
}>
Executes a set of transactions on the StarkNet network.
Parameters
Name | Type | Description |
---|---|---|
transactions | AllowArray <Call > | An array of transactions to be executed. |
abis? | Abi [] | Optional argument that can be an array of ABIs. |
transactionsDetail? | UniversalDetails | Optional object containing additional details for the transactions. |
Returns
Promise
<{ transaction_hash
: string
}>
A Promise that resolves to an InvokeFunctionResponse object representing the result of the execution.
Overrides
Account.execute
Defined in
sdks/account/src/smartr_account.ts:249
executeMultisig
▸ executeMultisig(transactions
, details
, signature
): Promise
<{ transaction_hash
: string
}>
Executes a set of transactions, assuming they have been signed by all parties.
Parameters
Name | Type | Description |
---|---|---|
transactions | Call [] | An array of transactions to be executed. |
details | InvocationsDetailsWithNonce | Optional object containing additional details for the transactions. |
signature | ArraySignatureType | The signature of the transactions. |
Returns
Promise
<{ transaction_hash
: string
}>
A Promise that resolves to the transactions invocation response.
Defined in
sdks/account/src/smartr_account.ts:195
executeOnModule
▸ executeOnModule(module_class_hash
, module_entrypoint
, calldata
, execute?
): Promise
<{ transaction_hash
: string
}>
Execute or build a transaction on the module account.
Parameters
Name | Type | Description |
---|---|---|
module_class_hash | string | The installed module class_hash. |
module_entrypoint | string | The module entrypoint to execute. |
calldata | string [] | The entrypoint calldata. |
execute? | true | If true, the transaction is executed, otherwise it is built and returned so that it can be used in a multicall. |
Returns
Promise
<{ transaction_hash
: string
}>
A promise that resolves to the transaction receipt if executes is true, otherwise it returns the transaction call.
Defined in
sdks/account/src/smartr_account.ts:329
▸ executeOnModule(module_class_hash
, module_entrypoint
, calldata
, execute
): Promise
<Call
[]>
Parameters
Name | Type |
---|---|
module_class_hash | string |
module_entrypoint | string |
calldata | string [] |
execute | false |
Returns
Promise
<Call
[]>
Defined in
sdks/account/src/smartr_account.ts:335
fetch
▸ fetch(method
, params?
, id?
): Promise
<Response
>
Parameters
Name | Type |
---|---|
method | string |
params? | object |
id? | string | number |
Returns
Promise
<Response
>
Inherited from
Account.fetch
Defined in
node_modules/starknet/dist/index.d.ts:3198
getAddressFromStarkName
▸ getAddressFromStarkName(name
, StarknetIdContract?
): Promise
<string
>
Parameters
Name | Type |
---|---|
name | string |
StarknetIdContract? | string |
Returns
Promise
<string
>
Inherited from
Account.getAddressFromStarkName
Defined in
node_modules/starknet/dist/index.d.ts:3307
getBlock
▸ getBlock(): Promise
<PendingBlock
>
Returns
Promise
<PendingBlock
>
Inherited from
Account.getBlock
Defined in
node_modules/starknet/dist/index.d.ts:3202
▸ getBlock(blockIdentifier
): Promise
<PendingBlock
>
Parameters
Name | Type |
---|---|
blockIdentifier | "pending" |
Returns
Promise
<PendingBlock
>
Inherited from
Account.getBlock
Defined in
node_modules/starknet/dist/index.d.ts:3203
▸ getBlock(blockIdentifier
): Promise
<Block$1
>
Parameters
Name | Type |
---|---|
blockIdentifier | "latest" |
Returns
Promise
<Block$1
>
Inherited from
Account.getBlock
Defined in
node_modules/starknet/dist/index.d.ts:3204
▸ getBlock(blockIdentifier?
): Promise
<GetBlockResponse
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise
<GetBlockResponse
>
Inherited from
Account.getBlock
Defined in
node_modules/starknet/dist/index.d.ts:3205
getBlockLatestAccepted
▸ getBlockLatestAccepted(): Promise
<BlockHashAndNumber
>
Get the most recent accepted block hash and number
Returns
Promise
<BlockHashAndNumber
>
Inherited from
Account.getBlockLatestAccepted
Defined in
node_modules/starknet/dist/index.d.ts:3209
getBlockNumber
▸ getBlockNumber(): Promise
<number
>
Get the most recent accepted block number redundant use getBlockLatestAccepted();
Returns
Promise
<number
>
Number of the latest block
Inherited from
Account.getBlockNumber
Defined in
node_modules/starknet/dist/index.d.ts:3215
getBlockStateUpdate
▸ getBlockStateUpdate(): Promise
<{ block_hash
: never
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>
Returns
Promise
<{ block_hash
: never
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>
Inherited from
Account.getBlockStateUpdate
Defined in
node_modules/starknet/dist/index.d.ts:3239
▸ getBlockStateUpdate(blockIdentifier
): Promise
<{ block_hash
: never
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>
Parameters
Name | Type |
---|---|
blockIdentifier | "pending" |
Returns
Promise
<{ block_hash
: never
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>
Inherited from
Account.getBlockStateUpdate
Defined in
node_modules/starknet/dist/index.d.ts:3240
▸ getBlockStateUpdate(blockIdentifier
): Promise
<{ block_hash
: string
; new_root
: string
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>
Parameters
Name | Type |
---|---|
blockIdentifier | "latest" |
Returns
Promise
<{ block_hash
: string
; new_root
: string
; old_root
: string
; state_diff
: { declared_classes
: { class_hash
: string
; compiled_class_hash
: string
}[] ; deployed_contracts
: { address
: string
; class_hash
: string
}[] ; deprecated_declared_classes
: string
[] ; nonces
: { contract_address
: string
; nonce
: string
}[] ; replaced_classes
: { class_hash
: string
; contract_address
: string
}[] ; storage_diffs
: { address
: string
; storage_entries
: { key
: string
; value
: string
}[] }[] } }>
Inherited from
Account.getBlockStateUpdate
Defined in
node_modules/starknet/dist/index.d.ts:3241
▸ getBlockStateUpdate(blockIdentifier?
): Promise
<StateUpdateResponse
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise
<StateUpdateResponse
>
Inherited from
Account.getBlockStateUpdate
Defined in
node_modules/starknet/dist/index.d.ts:3242
getBlockTransactionCount
▸ getBlockTransactionCount(blockIdentifier?
): Promise
<number
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise
<number
>
Inherited from
Account.getBlockTransactionCount
Defined in
node_modules/starknet/dist/index.d.ts:3244
getBlockTransactionsTraces
▸ getBlockTransactionsTraces(blockIdentifier?
): Promise
<BlockTransactionsTraces
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise
<BlockTransactionsTraces
>
Inherited from
Account.getBlockTransactionsTraces
Defined in
node_modules/starknet/dist/index.d.ts:3243
getBlockWithReceipts
▸ getBlockWithReceipts(blockIdentifier?
): Promise
<BlockWithTxReceipts
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise
<BlockWithTxReceipts
>
Inherited from
Account.getBlockWithReceipts
Defined in
node_modules/starknet/dist/index.d.ts:3232
getBlockWithTxHashes
▸ getBlockWithTxHashes(blockIdentifier?
): Promise
<BlockWithTxHashes$1
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise
<BlockWithTxHashes$1
>
Inherited from
Account.getBlockWithTxHashes
Defined in
node_modules/starknet/dist/index.d.ts:3216
getBlockWithTxs
▸ getBlockWithTxs(blockIdentifier?
): Promise
<BlockWithTxs
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise
<BlockWithTxs
>
Inherited from
Account.getBlockWithTxs
Defined in
node_modules/starknet/dist/index.d.ts:3217
getCairoVersion
▸ getCairoVersion(classHash?
): Promise
<CairoVersion
>
Retrieves the Cairo version from the network and sets cairoVersion
if not already set in the constructor.
Parameters
Name | Type | Description |
---|---|---|
classHash? | string | if provided detects Cairo version from classHash, otherwise from the account address |
Returns
Promise
<CairoVersion
>
Inherited from
Account.getCairoVersion
Defined in
node_modules/starknet/dist/index.d.ts:3749
getChainId
▸ getChainId(): Promise
<StarknetChainId
>
Returns
Promise
<StarknetChainId
>
Inherited from
Account.getChainId
Defined in
node_modules/starknet/dist/index.d.ts:3199
getClass
▸ getClass(classHash
, blockIdentifier?
): Promise
<LegacyContractClass
| Omit
<CompiledSierra
, "sierra_program_debug_info"
>>
Parameters
Name | Type |
---|---|
classHash | BigNumberish |
blockIdentifier? | BlockIdentifier |
Returns
Promise
<LegacyContractClass
| Omit
<CompiledSierra
, "sierra_program_debug_info"
>>
Inherited from
Account.getClass
Defined in
node_modules/starknet/dist/index.d.ts:3272
getClassAt
▸ getClassAt(contractAddress
, blockIdentifier?
): Promise
<LegacyContractClass
| Omit
<CompiledSierra
, "sierra_program_debug_info"
>>
Parameters
Name | Type |
---|---|
contractAddress | BigNumberish |
blockIdentifier? | BlockIdentifier |
Returns
Promise
<LegacyContractClass
| Omit
<CompiledSierra
, "sierra_program_debug_info"
>>
Inherited from
Account.getClassAt
Defined in
node_modules/starknet/dist/index.d.ts:3273
getClassByHash
▸ getClassByHash(classHash
): Promise
<LegacyContractClass
| Omit
<CompiledSierra
, "sierra_program_debug_info"
>>
Parameters
Name | Type |
---|---|
classHash | BigNumberish |
Returns
Promise
<LegacyContractClass
| Omit
<CompiledSierra
, "sierra_program_debug_info"
>>
Inherited from
Account.getClassByHash
Defined in
node_modules/starknet/dist/index.d.ts:3271
getClassHashAt
▸ getClassHashAt(contractAddress
, blockIdentifier?
): Promise
<string
>
Parameters
Name | Type |
---|---|
contractAddress | BigNumberish |
blockIdentifier? | BlockIdentifier |
Returns
Promise
<string
>
Inherited from
Account.getClassHashAt
Defined in
node_modules/starknet/dist/index.d.ts:3270
getContractVersion
▸ getContractVersion(contractAddress
, classHash?
, options?
): Promise
<ContractVersion
>
Parameters
Name | Type |
---|---|
contractAddress | BigNumberish |
classHash? | undefined |
options? | getContractVersionOptions |
Returns
Promise
<ContractVersion
>
Inherited from
Account.getContractVersion
Defined in
node_modules/starknet/dist/index.d.ts:3274
▸ getContractVersion(contractAddress
, classHash
, options?
): Promise
<ContractVersion
>
Parameters
Name | Type |
---|---|
contractAddress | undefined |
classHash | BigNumberish |
options? | getContractVersionOptions |
Returns
Promise
<ContractVersion
>
Inherited from
Account.getContractVersion
Defined in
node_modules/starknet/dist/index.d.ts:3275
getDeclareEstimateFee
▸ getDeclareEstimateFee(invocation
, details
, blockIdentifier?
, skipValidate?
): Promise
<EstimateFeeResponse
>
Parameters
Name | Type |
---|---|
invocation | DeclareContractTransaction |
details | InvocationsDetailsWithNonce |
blockIdentifier? | BlockIdentifier |
skipValidate? | boolean |
Returns
Promise
<EstimateFeeResponse
>
Inherited from
Account.getDeclareEstimateFee
Defined in
node_modules/starknet/dist/index.d.ts:3281
getDeployAccountEstimateFee
▸ getDeployAccountEstimateFee(invocation
, details
, blockIdentifier?
, skipValidate?
): Promise
<EstimateFeeResponse
>
Parameters
Name | Type |
---|---|
invocation | DeployAccountContractTransaction |
details | InvocationsDetailsWithNonce |
blockIdentifier? | BlockIdentifier |
skipValidate? | boolean |
Returns
Promise
<EstimateFeeResponse
>
Inherited from
Account.getDeployAccountEstimateFee
Defined in
node_modules/starknet/dist/index.d.ts:3282
getEstimateFee
▸ getEstimateFee(invocation
, invocationDetails
, blockIdentifier?
, skipValidate?
): Promise
<EstimateFeeResponse
>
Parameters
Name | Type |
---|---|
invocation | Invocation |
invocationDetails | InvocationsDetailsWithNonce |
blockIdentifier? | BlockIdentifier |
skipValidate? | boolean |
Returns
Promise
<EstimateFeeResponse
>
Deprecated
use gettypeEstimateFee (will be refactored based on type after sequencer deprecation)
Inherited from
Account.getEstimateFee
Defined in
node_modules/starknet/dist/index.d.ts:3279
getEstimateFeeBulk
▸ getEstimateFeeBulk(invocations
, options
): Promise
<EstimateFeeResponseBulk
>
Parameters
Name | Type |
---|---|
invocations | AccountInvocations |
options | getEstimateFeeBulkOptions |
Returns
Promise
<EstimateFeeResponseBulk
>
Inherited from
Account.getEstimateFeeBulk
Defined in
node_modules/starknet/dist/index.d.ts:3283
getEvents
▸ getEvents(eventFilter
): Promise
<EVENTS_CHUNK
>
Returns all events matching the given filter
Parameters
Name | Type |
---|---|
eventFilter | EventFilter |
Returns
Promise
<EVENTS_CHUNK
>
events and the pagination of the events
Inherited from
Account.getEvents
Defined in
node_modules/starknet/dist/index.d.ts:3302
getInvokeEstimateFee
▸ getInvokeEstimateFee(invocation
, invocationDetails
, blockIdentifier?
, skipValidate?
): Promise
<EstimateFeeResponse
>
Parameters
Name | Type |
---|---|
invocation | Invocation |
invocationDetails | InvocationsDetailsWithNonce |
blockIdentifier? | BlockIdentifier |
skipValidate? | boolean |
Returns
Promise
<EstimateFeeResponse
>
Inherited from
Account.getInvokeEstimateFee
Defined in
node_modules/starknet/dist/index.d.ts:3280
getL1GasPrice
▸ getL1GasPrice(blockIdentifier?
): Promise
<string
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise
<string
>
Inherited from
Account.getL1GasPrice
Defined in
node_modules/starknet/dist/index.d.ts:3230
getL1MessageHash
▸ getL1MessageHash(l2TxHash
): Promise
<string
>
Parameters
Name | Type |
---|---|
l2TxHash | BigNumberish |
Returns
Promise
<string
>
Inherited from
Account.getL1MessageHash
Defined in
node_modules/starknet/dist/index.d.ts:3231
getNonce
▸ getNonce(blockIdentifier?
): Promise
<string
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise
<string
>
Inherited from
Account.getNonce
Defined in
node_modules/starknet/dist/index.d.ts:3743
getNonceForAddress
▸ getNonceForAddress(contractAddress
, blockIdentifier?
): Promise
<string
>
Parameters
Name | Type |
---|---|
contractAddress | BigNumberish |
blockIdentifier? | BlockIdentifier |
Returns
Promise
<string
>
Inherited from
Account.getNonceForAddress
Defined in
node_modules/starknet/dist/index.d.ts:3201
getNonceSafe
▸ getNonceSafe(nonce?
): Promise
<bigint
>
Parameters
Name | Type |
---|---|
nonce? | BigNumberish |
Returns
Promise
<bigint
>
Inherited from
Account.getNonceSafe
Defined in
node_modules/starknet/dist/index.d.ts:3744
getPendingTransactions
▸ getPendingTransactions(): Promise
<TransactionWithHash$1
[]>
Return transactions from pending block
Returns
Promise
<TransactionWithHash$1
[]>
Deprecated
Instead use getBlock(BlockTag.pending); (will be removed in next minor version) Utility method, same result can be achieved using getBlockWithTxHashes(BlockTag.pending);
Inherited from
Account.getPendingTransactions
Defined in
node_modules/starknet/dist/index.d.ts:3250
getPreferredVersion
▸ getPreferredVersion(type12
, type3
): ETransactionVersion
Parameters
Name | Type |
---|---|
type12 | ETransactionVersion |
type3 | ETransactionVersion |
Returns
ETransactionVersion
Inherited from
Account.getPreferredVersion
Defined in
node_modules/starknet/dist/index.d.ts:3742
getSimulateTransaction
▸ getSimulateTransaction(invocations
, options?
): Promise
<SimulateTransactionResponse
>
Parameters
Name | Type | Description |
---|---|---|
invocations | AccountInvocations | AccountInvocations |
options? | getSimulateTransactionOptions | blockIdentifier and flags to skip validation and fee charge - blockIdentifier - skipValidate (default false) - skipFeeCharge (default true) |
Returns
Promise
<SimulateTransactionResponse
>
Inherited from
Account.getSimulateTransaction
Defined in
node_modules/starknet/dist/index.d.ts:3267
getSpecVersion
▸ getSpecVersion(): Promise
<string
>
Returns
Promise
<string
>
Inherited from
Account.getSpecVersion
Defined in
node_modules/starknet/dist/index.d.ts:3200
getStarkName
▸ getStarkName(address?
, StarknetIdContract?
): Promise
<string
>
Parameters
Name | Type |
---|---|
address? | BigNumberish |
StarknetIdContract? | string |
Returns
Promise
<string
>
Inherited from
Account.getStarkName
Defined in
node_modules/starknet/dist/index.d.ts:3794
getStarkProfile
▸ getStarkProfile(address
, StarknetIdContract?
, StarknetIdIdentityContract?
, StarknetIdVerifierContract?
, StarknetIdPfpContract?
, StarknetIdPopContract?
, StarknetIdMulticallContract?
): Promise
<StarkProfile
>
Parameters
Name | Type |
---|---|
address | BigNumberish |
StarknetIdContract? | string |
StarknetIdIdentityContract? | string |
StarknetIdVerifierContract? | string |
StarknetIdPfpContract? | string |
StarknetIdPopContract? | string |
StarknetIdMulticallContract? | string |
Returns
Promise
<StarkProfile
>
Inherited from
Account.getStarkProfile
Defined in
node_modules/starknet/dist/index.d.ts:3308
getStorageAt
▸ getStorageAt(contractAddress
, key
, blockIdentifier?
): Promise
<string
>
Parameters
Name | Type |
---|---|
contractAddress | BigNumberish |
key | BigNumberish |
blockIdentifier? | BlockIdentifier |
Returns
Promise
<string
>
Inherited from
Account.getStorageAt
Defined in
node_modules/starknet/dist/index.d.ts:3269
getSuggestedFee
▸ getSuggestedFee(«destructured»
, details
): Promise
<EstimateFee
>
Parameters
Name | Type |
---|---|
«destructured» | EstimateFeeAction |
details | UniversalDetails |
Returns
Promise
<EstimateFee
>
Inherited from
Account.getSuggestedFee
Defined in
node_modules/starknet/dist/index.d.ts:3788
getSyncingStats
▸ getSyncingStats(): Promise
<Syncing
>
Returns an object about the sync status, or false if the node is not synching
Returns
Promise
<Syncing
>
Object with the stats data
Inherited from
Account.getSyncingStats
Defined in
node_modules/starknet/dist/index.d.ts:3297
getTransaction
▸ getTransaction(txHash
): Promise
<TransactionWithHash$1
>
Parameters
Name | Type |
---|---|
txHash | BigNumberish |
Returns
Promise
<TransactionWithHash$1
>
Inherited from
Account.getTransaction
Defined in
node_modules/starknet/dist/index.d.ts:3251
getTransactionByBlockIdAndIndex
▸ getTransactionByBlockIdAndIndex(blockIdentifier
, index
): Promise
<TransactionWithHash$1
>
Parameters
Name | Type |
---|---|
blockIdentifier | BlockIdentifier |
index | number |
Returns
Promise
<TransactionWithHash$1
>
Inherited from
Account.getTransactionByBlockIdAndIndex
Defined in
node_modules/starknet/dist/index.d.ts:3253
getTransactionByHash
▸ getTransactionByHash(txHash
): Promise
<TransactionWithHash$1
>
Parameters
Name | Type |
---|---|
txHash | BigNumberish |
Returns
Promise
<TransactionWithHash$1
>
Inherited from
Account.getTransactionByHash
Defined in
node_modules/starknet/dist/index.d.ts:3252
getTransactionReceipt
▸ getTransactionReceipt(txHash
): Promise
<GetTransactionReceiptResponse
>
Parameters
Name | Type |
---|---|
txHash | BigNumberish |
Returns
Promise
<GetTransactionReceiptResponse
>
Inherited from
Account.getTransactionReceipt
Defined in
node_modules/starknet/dist/index.d.ts:3254
getTransactionStatus
▸ getTransactionStatus(transactionHash
): Promise
<TransactionStatus$1
>
Get the status of a transaction
Parameters
Name | Type |
---|---|
transactionHash | BigNumberish |
Returns
Promise
<TransactionStatus$1
>
Inherited from
Account.getTransactionStatus
Defined in
node_modules/starknet/dist/index.d.ts:3259
getTransactionTrace
▸ getTransactionTrace(txHash
): Promise
<TRANSACTION_TRACE
>
Parameters
Name | Type |
---|---|
txHash | BigNumberish |
Returns
Promise
<TRANSACTION_TRACE
>
Inherited from
Account.getTransactionTrace
Defined in
node_modules/starknet/dist/index.d.ts:3255
getUniversalSuggestedFee
▸ getUniversalSuggestedFee(version
, «destructured»
, details
): Promise
<{ maxFee
: BigNumberish
; resourceBounds
: RESOURCE_BOUNDS_MAPPING
}>
Parameters
Name | Type |
---|---|
version | ETransactionVersion |
«destructured» | EstimateFeeAction |
details | UniversalDetails |
Returns
Promise
<{ maxFee
: BigNumberish
; resourceBounds
: RESOURCE_BOUNDS_MAPPING
}>
Inherited from
Account.getUniversalSuggestedFee
Defined in
node_modules/starknet/dist/index.d.ts:3784
hashMessage
▸ hashMessage(typedData
): Promise
<string
>
Parameters
Name | Type |
---|---|
typedData | TypedData |
Returns
Promise
<string
>
Inherited from
Account.hashMessage
Defined in
node_modules/starknet/dist/index.d.ts:3773
invokeFunction
▸ invokeFunction(functionInvocation
, details
): Promise
<InvokedTransaction
>
Parameters
Name | Type |
---|---|
functionInvocation | Invocation |
details | InvocationsDetailsWithNonce |
Returns
Promise
<InvokedTransaction
>
Inherited from
Account.invokeFunction
Defined in
node_modules/starknet/dist/index.d.ts:3284
isModule
▸ isModule(class_hash
): Promise
<boolean
>
Call an entrypoint on the module account.
Parameters
Name | Type | Description |
---|---|---|
class_hash | string | the module to test |
Returns
Promise
<boolean
>
A promise that is true if the module is installed with the account.
Defined in
sdks/account/src/smartr_account.ts:413
prepareMultisig
▸ prepareMultisig(transactions
, transactionsDetail?
): Promise
<InvocationsDetailsWithNonce
>
generates the details, i.e nonce, version, fee, module prefix, to execute transactions on the StarkNet network.
Parameters
Name | Type | Description |
---|---|---|
transactions | AllowArray <Call > | An array of transactions to be executed. |
transactionsDetail? | UniversalDetails | Optional object containing additional details for the transactions. |
Returns
Promise
<InvocationsDetailsWithNonce
>
A Promise that resolves to the transaction details.
Defined in
sdks/account/src/smartr_account.ts:105
removeModule
▸ removeModule(class_hash
, execute?
): Promise
<{ transaction_hash
: string
}>
remove a module from an account.
Parameters
Name | Type | Description |
---|---|---|
class_hash | string | the module to remove |
execute? | true | If true, the transaction is executed, otherwise it is built and returned so that it can be used in a multicall. |
Returns
Promise
<{ transaction_hash
: string
}>
A promise that resolves to the transaction receipt if executes is true, otherwise it returns the transaction call.
Defined in
sdks/account/src/smartr_account.ts:454
▸ removeModule(class_hash
, execute
): Promise
<Call
[]>
Parameters
Name | Type |
---|---|
class_hash | string |
execute | false |
Returns
Promise
<Call
[]>
Defined in
sdks/account/src/smartr_account.ts:458
signMessage
▸ signMessage(typedData
): Promise
<Signature
>
Parameters
Name | Type |
---|---|
typedData | TypedData |
Returns
Promise
<Signature
>
Inherited from
Account.signMessage
Defined in
node_modules/starknet/dist/index.d.ts:3772
signMultisig
▸ signMultisig(transactions
, details
): Promise
<ArraySignatureType
>
Signs a set of transactions to be executed on the StarkNet network.
Parameters
Name | Type | Description |
---|---|---|
transactions | Call [] | An array of transactions to be executed. |
details | InvocationsDetailsWithNonce | Optional object containing additional details for the transactions. |
Returns
Promise
<ArraySignatureType
>
A Promise that resolves to the signature of the transactions.
Defined in
sdks/account/src/smartr_account.ts:151
simulateTransaction
▸ simulateTransaction(invocations
, details?
): Promise
<SimulateTransactionResponse
>
Parameters
Name | Type |
---|---|
invocations | Invocations |
details? | SimulateTransactionDetails |
Returns
Promise
<SimulateTransactionResponse
>
Inherited from
Account.simulateTransaction
Defined in
node_modules/starknet/dist/index.d.ts:3756
upgrade
▸ upgrade(classHash
): Promise
<{ transaction_hash
: string
}>
Upgrades the SmartrAccount to a new class.
Parameters
Name | Type | Description |
---|---|---|
classHash | string | The hash of the new class. |
Returns
Promise
<{ transaction_hash
: string
}>
A promise that resolves to the transaction receipt if executes is true, otherwise it returns the transaction call.
Defined in
sdks/account/src/smartr_account.ts:398
verifyMessage
▸ verifyMessage(typedData
, signature
, signatureVerificationFunctionName?
, signatureVerificationResponse?
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
typedData | TypedData |
signature | Signature |
signatureVerificationFunctionName? | string |
signatureVerificationResponse? | Object |
signatureVerificationResponse.error | string [] |
signatureVerificationResponse.nokResponse | string [] |
signatureVerificationResponse.okResponse | string [] |
Returns
Promise
<boolean
>
Inherited from
Account.verifyMessage
Defined in
node_modules/starknet/dist/index.d.ts:3779
verifyMessageHash
▸ verifyMessageHash(hash
, signature
, signatureVerificationFunctionName?
, signatureVerificationResponse?
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
hash | BigNumberish |
signature | Signature |
signatureVerificationFunctionName? | string |
signatureVerificationResponse? | Object |
signatureVerificationResponse.error | string [] |
signatureVerificationResponse.nokResponse | string [] |
signatureVerificationResponse.okResponse | string [] |
Returns
Promise
<boolean
>
Inherited from
Account.verifyMessageHash
Defined in
node_modules/starknet/dist/index.d.ts:3774
waitForBlock
▸ waitForBlock(blockIdentifier?
, retryInterval?
): Promise
<void
>
Pause the execution of the script until a specified block is created.
Parameters
Name | Type | Description |
---|---|---|
blockIdentifier? | BlockIdentifier | bloc number (BigNumberisk) or 'pending' or 'latest'. Use of 'latest" or of a block already created will generate no pause. |
retryInterval? | number | number of milliseconds between 2 requests to the node |
Returns
Promise
<void
>
Example
await myProvider.waitForBlock();
// wait the creation of the pending block
Inherited from
Account.waitForBlock
Defined in
node_modules/starknet/dist/index.d.ts:3229
waitForTransaction
▸ waitForTransaction(txHash
, options?
): Promise
<GetTransactionReceiptResponse
>
Parameters
Name | Type |
---|---|
txHash | BigNumberish |
options? | waitForTransactionOptions |
Returns
Promise
<GetTransactionReceiptResponse
>
Inherited from
Account.waitForTransaction
Defined in
node_modules/starknet/dist/index.d.ts:3268
executeStarkName
▸ executeStarkName(provider
, address
, contract
): Promise
<CallContractResponse
>
Parameters
Name | Type |
---|---|
provider | ProviderInterface |
address | string |
contract | string |
Returns
Promise
<CallContractResponse
>
Inherited from
Account.executeStarkName
Defined in
node_modules/starknet/dist/index.d.ts:3310
executeStarkProfile
▸ executeStarkProfile(provider
, contract
, functionName
, initialCalldata
, fallbackCalldata
): Promise
<CallContractResponse
>
Parameters
Name | Type |
---|---|
provider | ProviderInterface |
contract | string |
functionName | string |
initialCalldata | RawArgsArray |
fallbackCalldata | RawArgsArray |
Returns
Promise
<CallContractResponse
>
Inherited from
Account.executeStarkProfile
Defined in
node_modules/starknet/dist/index.d.ts:3313
getAddressFromStarkName
▸ getAddressFromStarkName(provider
, name
, StarknetIdContract?
): Promise
<string
>
Parameters
Name | Type |
---|---|
provider | ProviderInterface |
name | string |
StarknetIdContract? | string |
Returns
Promise
<string
>
Inherited from
Account.getAddressFromStarkName
Defined in
node_modules/starknet/dist/index.d.ts:3311
getStarkName
▸ getStarkName(provider
, address
, StarknetIdContract?
): Promise
<string
>
Parameters
Name | Type |
---|---|
provider | ProviderInterface |
address | BigNumberish |
StarknetIdContract? | string |
Returns
Promise
<string
>
Inherited from
Account.getStarkName
Defined in
node_modules/starknet/dist/index.d.ts:3309
getStarkProfile
▸ getStarkProfile(provider
, address
, StarknetIdContract?
, StarknetIdIdentityContract?
, StarknetIdVerifierContract?
, StarknetIdPfpContract?
, StarknetIdPopContract?
, StarknetIdMulticallContract?
): Promise
<StarkProfile
>
Parameters
Name | Type |
---|---|
provider | ProviderInterface |
address | BigNumberish |
StarknetIdContract? | string |
StarknetIdIdentityContract? | string |
StarknetIdVerifierContract? | string |
StarknetIdPfpContract? | string |
StarknetIdPopContract? | string |
StarknetIdMulticallContract? | string |
Returns
Promise
<StarkProfile
>
Inherited from
Account.getStarkProfile
Defined in
node_modules/starknet/dist/index.d.ts:3312