starknet 10.6.8 → 10.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +36 -36
- package/dist/index.global.js +15 -15
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
# [10.7.0](https://github.com/starknet-io/starknet.js/compare/v10.6.8...v10.7.0) (2026-08-13)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- **deps:** bump types-js 0.10.4-beta.2 and get-starknet 6.0.4 ([cf26a77](https://github.com/starknet-io/starknet.js/commit/cf26a77dc706c841a207bc76fb2ff7a5a7955be9))
|
|
6
|
+
|
|
1
7
|
## [10.6.8](https://github.com/starknet-io/starknet.js/compare/v10.6.7...v10.6.8) (2026-08-07)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { Abi as Abi$1, TypedContract } from 'abi-wan-kanabi';
|
|
|
10
10
|
import { WalletWithStarknetFeatures, StandardEventsChangeProperties } from '@starknet-io/get-starknet-wallet-standard/features';
|
|
11
11
|
import { WalletWithStarknetFeatures as WalletWithStarknetFeatures$1 } from '@starknet-io/get-starknet-wallet-standard-v6/features';
|
|
12
12
|
import * as _starknet_io_starknet_types_0104 from '@starknet-io/starknet-types-0104';
|
|
13
|
-
import { STRK20_DEPOSIT_ACTION, STRK20_WITHDRAW_ACTION, STRK20_TRANSFER_ACTION, STRK20_INVOKE_ACTION,
|
|
13
|
+
import { STRK20_DEPOSIT_ACTION, STRK20_WITHDRAW_ACTION, STRK20_TRANSFER_ACTION, STRK20_INVOKE_ACTION, STRK20_SHADOW_ACCOUNT_INVOKE_ACTION as STRK20_SHADOW_ACCOUNT_INVOKE_ACTION$1, STRK20_CALL_AND_PROOF as STRK20_CALL_AND_PROOF$1, STRK20_PROOF, Address, STRK20_BALANCE_ENTRY, STRK20_DAPP_NAME, FELT as FELT$1, Permission as Permission$2, WatchAssetParameters as WatchAssetParameters$2, AddStarknetChainParameters as AddStarknetChainParameters$2, ChainId as ChainId$2, AccountDeploymentData as AccountDeploymentData$2, AddInvokeTransactionParameters as AddInvokeTransactionParameters$2, AddInvokeTransactionResult as AddInvokeTransactionResult$2, AddDeclareTransactionParameters as AddDeclareTransactionParameters$2, AddDeclareTransactionResult as AddDeclareTransactionResult$2, TypedData as TypedData$2, Signature as Signature$3, SpecVersion as SpecVersion$2, API_VERSION as API_VERSION$3, STRK20_ACTION as STRK20_ACTION$1 } from '@starknet-io/starknet-types-0104';
|
|
14
14
|
export { STRK20_BALANCE_ENTRY, STRK20_CALLDATA_ITEM, STRK20_CALLDATA_PLACEHOLDER, STRK20_COLLECT_POLICY, STRK20_DAPP_NAME, STRK20_DEPOSIT_ACTION, STRK20_INVOKE_ACTION, STRK20_PROOF, STRK20_TRANSFER_ACTION, STRK20_WITHDRAW_ACTION } from '@starknet-io/starknet-types-0104';
|
|
15
15
|
import * as poseidon from '@noble/curves/abstract/poseidon';
|
|
16
16
|
import * as json$1 from 'lossless-json';
|
|
@@ -6229,17 +6229,17 @@ declare class WalletAccountV5 extends Account {
|
|
|
6229
6229
|
* The raw spec types remain available through the `RPC` namespace.
|
|
6230
6230
|
*/
|
|
6231
6231
|
/**
|
|
6232
|
-
* Invokes one or more contract calls through the user's STRK20
|
|
6233
|
-
* routed via the
|
|
6234
|
-
* `nonce`); each nonce maps to a distinct, deterministic
|
|
6232
|
+
* Invokes one or more contract calls through the user's STRK20 shadow account for a DAPP,
|
|
6233
|
+
* routed via the shadow account anonymizer. The shadow account is selected by (`dapp_name`,
|
|
6234
|
+
* `nonce`); each nonce maps to a distinct, deterministic shadow account.
|
|
6235
6235
|
*
|
|
6236
6236
|
* The proceeds of the calls are settled into the open notes created by `transfer` actions
|
|
6237
6237
|
* with `amount: "OPEN"` in the same transaction, so the number of open notes filled by
|
|
6238
6238
|
* this action must match the number of open notes created in the transaction.
|
|
6239
6239
|
* @example
|
|
6240
6240
|
* ```typescript
|
|
6241
|
-
* const action:
|
|
6242
|
-
* type: '
|
|
6241
|
+
* const action: STRK20_SHADOW_ACCOUNT_INVOKE_ACTION = {
|
|
6242
|
+
* type: 'shadow_account_invoke',
|
|
6243
6243
|
* dapp_name: 'myDapp',
|
|
6244
6244
|
* nonce: '0x0',
|
|
6245
6245
|
* calls: [myContract.populate('stake', { amount: 1000n })],
|
|
@@ -6247,8 +6247,8 @@ declare class WalletAccountV5 extends Account {
|
|
|
6247
6247
|
* };
|
|
6248
6248
|
* ```
|
|
6249
6249
|
*/
|
|
6250
|
-
type
|
|
6251
|
-
/** The contract calls to execute through the
|
|
6250
|
+
type STRK20_SHADOW_ACCOUNT_INVOKE_ACTION = Omit<STRK20_SHADOW_ACCOUNT_INVOKE_ACTION$1, 'calls'> & {
|
|
6251
|
+
/** The contract calls to execute through the shadow account, in order (min 1). */
|
|
6252
6252
|
calls: Call[];
|
|
6253
6253
|
};
|
|
6254
6254
|
/**
|
|
@@ -6257,10 +6257,10 @@ type STRK20_SUBACCOUNT_INVOKE_ACTION = Omit<STRK20_SUBACCOUNT_INVOKE_ACTION$1, '
|
|
|
6257
6257
|
* @example
|
|
6258
6258
|
* ```typescript
|
|
6259
6259
|
* const actions: STRK20_ACTION[] = [
|
|
6260
|
-
* { type: 'withdraw', token: strkAddress, amount: '0x2386f26fc10000', recipient:
|
|
6260
|
+
* { type: 'withdraw', token: strkAddress, amount: '0x2386f26fc10000', recipient: shadowAccountAddr },
|
|
6261
6261
|
* { type: 'transfer', token: strkAddress, amount: 'OPEN', recipient: myAddress },
|
|
6262
6262
|
* {
|
|
6263
|
-
* type: '
|
|
6263
|
+
* type: 'shadow_account_invoke',
|
|
6264
6264
|
* dapp_name: 'myDapp',
|
|
6265
6265
|
* nonce: '0x0',
|
|
6266
6266
|
* calls: [myContract.populate('stake', { amount: 1000n })],
|
|
@@ -6269,7 +6269,7 @@ type STRK20_SUBACCOUNT_INVOKE_ACTION = Omit<STRK20_SUBACCOUNT_INVOKE_ACTION$1, '
|
|
|
6269
6269
|
* ];
|
|
6270
6270
|
* ```
|
|
6271
6271
|
*/
|
|
6272
|
-
type STRK20_ACTION = STRK20_DEPOSIT_ACTION | STRK20_WITHDRAW_ACTION | STRK20_TRANSFER_ACTION | STRK20_INVOKE_ACTION |
|
|
6272
|
+
type STRK20_ACTION = STRK20_DEPOSIT_ACTION | STRK20_WITHDRAW_ACTION | STRK20_TRANSFER_ACTION | STRK20_INVOKE_ACTION | STRK20_SHADOW_ACCOUNT_INVOKE_ACTION;
|
|
6273
6273
|
/**
|
|
6274
6274
|
* A Starknet call built by the wallet, together with the SNIP-36 zero-knowledge proof
|
|
6275
6275
|
* needed to submit it. In simulate mode the proof fields are present but empty, in which
|
|
@@ -6361,24 +6361,24 @@ declare class WalletAccountV6 extends WalletAccountV5 {
|
|
|
6361
6361
|
transaction_hash: string;
|
|
6362
6362
|
}>;
|
|
6363
6363
|
/**
|
|
6364
|
-
* Compute the commitment of a DAPP STRK20
|
|
6364
|
+
* Compute the commitment of a DAPP STRK20 shadow account. The commitment is computed
|
|
6365
6365
|
* locally by the wallet from the user private state ; no transaction is sent.
|
|
6366
6366
|
*
|
|
6367
|
-
* When `nonce` is given, the full commitment of this single
|
|
6367
|
+
* When `nonce` is given, the full commitment of this single shadow account is returned.
|
|
6368
6368
|
* When `nonce` is omitted, the partial (nonce independent) commitment is returned
|
|
6369
|
-
* instead : it is shared by every
|
|
6370
|
-
* be published once to let a DAPP recognize all the
|
|
6371
|
-
* learning any individual nonce.
|
|
6372
|
-
* @param {STRK20_DAPP_NAME} dappName - The DAPP that scopes the
|
|
6373
|
-
* @param {FELT} [nonce] - The
|
|
6374
|
-
* @returns {Promise<FELT>} The
|
|
6369
|
+
* instead : it is shared by every shadow account the user derives for this DAPP, so it
|
|
6370
|
+
* can be published once to let a DAPP recognize all the shadow accounts of a user
|
|
6371
|
+
* without learning any individual nonce.
|
|
6372
|
+
* @param {STRK20_DAPP_NAME} dappName - The DAPP that scopes the shadow account(s).
|
|
6373
|
+
* @param {FELT} [nonce] - The shadow account nonce ; each nonce selects a distinct shadow account for this user + DAPP. Omit it to get the partial commitment.
|
|
6374
|
+
* @returns {Promise<FELT>} The shadow account commitment.
|
|
6375
6375
|
* @example
|
|
6376
6376
|
* ```typescript
|
|
6377
|
-
* const commitment = await myWalletAccount.
|
|
6377
|
+
* const commitment = await myWalletAccount.strk20ShadowAccountCommitment('myDapp', '0x0');
|
|
6378
6378
|
* // commitment = '0x5f2e...'
|
|
6379
6379
|
* ```
|
|
6380
6380
|
*/
|
|
6381
|
-
|
|
6381
|
+
strk20ShadowAccountCommitment(dappName: STRK20_DAPP_NAME, nonce?: FELT$1): Promise<FELT$1>;
|
|
6382
6382
|
static connect(provider: ProviderOptions | ProviderInterface, walletProvider: WalletWithStarknetFeatures$1, cairoVersion?: CairoVersion, paymaster?: PaymasterOptions | PaymasterInterface, silentMode?: boolean): Promise<WalletAccountV6>;
|
|
6383
6383
|
static connectSilent(provider: ProviderOptions | ProviderInterface, walletProvider: WalletWithStarknetFeatures$1, cairoVersion?: CairoVersion, paymaster?: PaymasterOptions | PaymasterInterface): Promise<WalletAccountV6>;
|
|
6384
6384
|
}
|
|
@@ -10700,25 +10700,25 @@ declare function strk20InvokeTransaction(walletWSF: WalletWithStarknetFeatures$1
|
|
|
10700
10700
|
transaction_hash: string;
|
|
10701
10701
|
}>;
|
|
10702
10702
|
/**
|
|
10703
|
-
* Compute the commitment of a DAPP STRK20
|
|
10704
|
-
* by the wallet from the user private state ; no transaction is sent.
|
|
10703
|
+
* Compute the commitment of a DAPP STRK20 shadow account. The commitment is computed
|
|
10704
|
+
* locally by the wallet from the user private state ; no transaction is sent.
|
|
10705
10705
|
*
|
|
10706
|
-
* When `nonce` is given, the full commitment of this single
|
|
10707
|
-
* `nonce` is omitted, the partial (nonce independent) commitment is returned instead :
|
|
10708
|
-
* is shared by every
|
|
10709
|
-
* once to let a DAPP recognize all the
|
|
10710
|
-
* individual nonce.
|
|
10706
|
+
* When `nonce` is given, the full commitment of this single shadow account is returned.
|
|
10707
|
+
* When `nonce` is omitted, the partial (nonce independent) commitment is returned instead :
|
|
10708
|
+
* it is shared by every shadow account the user derives for this DAPP, so it can be
|
|
10709
|
+
* published once to let a DAPP recognize all the shadow accounts of a user without learning
|
|
10710
|
+
* any individual nonce.
|
|
10711
10711
|
* @param {WalletWithStarknetFeaturesV6} walletWSF - The get-starknet V6 wallet object to use.
|
|
10712
|
-
* @param {STRK20_DAPP_NAME} dapp_name - The DAPP that scopes the
|
|
10713
|
-
* @param {FELT} [nonce] - The
|
|
10714
|
-
* @returns {Promise<FELT>} The
|
|
10712
|
+
* @param {STRK20_DAPP_NAME} dapp_name - The DAPP that scopes the shadow account(s).
|
|
10713
|
+
* @param {FELT} [nonce] - The shadow account nonce ; each nonce selects a distinct shadow account for this user + DAPP. Omit it to get the partial commitment.
|
|
10714
|
+
* @returns {Promise<FELT>} The shadow account commitment.
|
|
10715
10715
|
* @example
|
|
10716
10716
|
* ```typescript
|
|
10717
|
-
* const commitment = await
|
|
10717
|
+
* const commitment = await strk20ShadowAccountCommitment(walletWSF, 'myDapp', '0x0');
|
|
10718
10718
|
* // commitment = '0x5f2e...'
|
|
10719
10719
|
* ```
|
|
10720
10720
|
*/
|
|
10721
|
-
declare function
|
|
10721
|
+
declare function strk20ShadowAccountCommitment(walletWSF: WalletWithStarknetFeatures$1, dapp_name: STRK20_DAPP_NAME, nonce?: FELT$1): Promise<FELT$1>;
|
|
10722
10722
|
|
|
10723
10723
|
declare const connectV6_addDeclareTransaction: typeof addDeclareTransaction;
|
|
10724
10724
|
declare const connectV6_addInvokeTransaction: typeof addInvokeTransaction;
|
|
@@ -10732,14 +10732,14 @@ declare const connectV6_standardConnect: typeof standardConnect;
|
|
|
10732
10732
|
declare const connectV6_strk20Balances: typeof strk20Balances;
|
|
10733
10733
|
declare const connectV6_strk20InvokeTransaction: typeof strk20InvokeTransaction;
|
|
10734
10734
|
declare const connectV6_strk20PrepareInvoke: typeof strk20PrepareInvoke;
|
|
10735
|
-
declare const
|
|
10735
|
+
declare const connectV6_strk20ShadowAccountCommitment: typeof strk20ShadowAccountCommitment;
|
|
10736
10736
|
declare const connectV6_subscribeWalletEvent: typeof subscribeWalletEvent;
|
|
10737
10737
|
declare const connectV6_supportedSpecs: typeof supportedSpecs;
|
|
10738
10738
|
declare const connectV6_supportedWalletApi: typeof supportedWalletApi;
|
|
10739
10739
|
declare const connectV6_switchStarknetChain: typeof switchStarknetChain;
|
|
10740
10740
|
declare const connectV6_watchAsset: typeof watchAsset;
|
|
10741
10741
|
declare namespace connectV6 {
|
|
10742
|
-
export { connectV6_addDeclareTransaction as addDeclareTransaction, connectV6_addInvokeTransaction as addInvokeTransaction, connectV6_addStarknetChain as addStarknetChain, connectV6_deploymentData as deploymentData, connectV6_getPermissions as getPermissions, connectV6_requestAccounts as requestAccounts, connectV6_requestChainId as requestChainId, connectV6_signMessage as signMessage, connectV6_standardConnect as standardConnect, connectV6_strk20Balances as strk20Balances, connectV6_strk20InvokeTransaction as strk20InvokeTransaction, connectV6_strk20PrepareInvoke as strk20PrepareInvoke,
|
|
10742
|
+
export { connectV6_addDeclareTransaction as addDeclareTransaction, connectV6_addInvokeTransaction as addInvokeTransaction, connectV6_addStarknetChain as addStarknetChain, connectV6_deploymentData as deploymentData, connectV6_getPermissions as getPermissions, connectV6_requestAccounts as requestAccounts, connectV6_requestChainId as requestChainId, connectV6_signMessage as signMessage, connectV6_standardConnect as standardConnect, connectV6_strk20Balances as strk20Balances, connectV6_strk20InvokeTransaction as strk20InvokeTransaction, connectV6_strk20PrepareInvoke as strk20PrepareInvoke, connectV6_strk20ShadowAccountCommitment as strk20ShadowAccountCommitment, connectV6_subscribeWalletEvent as subscribeWalletEvent, connectV6_supportedSpecs as supportedSpecs, connectV6_supportedWalletApi as supportedWalletApi, connectV6_switchStarknetChain as switchStarknetChain, connectV6_watchAsset as watchAsset };
|
|
10743
10743
|
}
|
|
10744
10744
|
|
|
10745
10745
|
type DefaultConfig = typeof DEFAULT_GLOBAL_CONFIG;
|
|
@@ -10843,4 +10843,4 @@ declare class Logger {
|
|
|
10843
10843
|
*/
|
|
10844
10844
|
declare const logger: Logger;
|
|
10845
10845
|
|
|
10846
|
-
export { type Abi, type AbiEntry, type AbiEntryType, type AbiEnum, type AbiEnums, type AbiEvent, type AbiEvents, type AbiInterfaces, AbiParser1, AbiParser2, AbiParserInterface, type AbiStruct, type AbiStructs, Account, type AccountHooks, AccountInterface, type AccountInvocationItem, type AccountInvocations, type AccountInvocationsFactoryDetails, type AccountOptions, type AllowArray, type ApiEstimateFeeResponse, type Args, type ArgsOrCalldata, type ArgsOrCalldataWithOptions, type ArraySignatureType, type AsyncContractFunction, type BLOCK_HASH, type BLOCK_NUMBER, BatchClient, type BatchClientOptions, type BigNumberish, type Block$1 as Block, type BlockIdentifier, type BlockNumber, BlockStatus, BlockTag, type BlockTransactionTrace, type BlockTransactionsTracesWithInitialReads, type BlockWithTxHashes, BrotherIdImpl, type BrotherIdProviderMethods, type BrotherProfile, type Builtins, type ByteArray, type ByteCode, type CairoAssembly, CairoByteArray, CairoBytes31, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoFelt, CairoFelt252, CairoFixedArray, CairoInt128, CairoInt16, CairoInt32, CairoInt64, CairoInt8, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint128, CairoUint16, CairoUint256, CairoUint32, CairoUint512, CairoUint64, CairoUint8, CairoUint96, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, type CallResult, type Calldata, type CommonContractOptions, type CompiledContract, type CompiledSierra, type CompiledSierraCasm, type CompilerVersion, type CompleteDeclareContractPayload, type CompressedProgram, Contract, type ContractClass, type ContractClassIdentifier, type ContractClassPayload, type ContractClassResponse, type ContractEntryPointFields, type ContractFunction, ContractInterface, type ContractOptions, type ContractVersion, type DeclareAndDeployContractPayload, type DeclareContractPayload, type DeclareContractResponse, type DeclareContractTransaction, type DeclareDeployUDCResponse, type DeclareSignerDetails, type DeclareTransactionReceiptResponse, type DeclaredTransaction, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployAndInvokeTransaction, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransaction, type DeployTransactionReceiptResponse, type DeployedAccountTransaction, Deployer, type DeployerCall, DeployerInterface, type Details, EDAMode, EDataAvailabilityMode, ESubscriptionTag, ETH_ADDRESS, ETraceFlag, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion2, ETransactionVersion3, ETxnResponseFlag, type EVENTS_CHUNK, type EmittedEvent, EntryPointType, type EntryPointsByType, type ErrorReceiptResponseHelper, type EstimateFeeBulk, type EstimateFeeResponseBulkOverhead, type EstimateFeeResponseOverhead, EthSigner, type Event$1 as Event, type EventEntry, type EventFilter, type ExecutableDeployAndInvokeTransaction, type ExecutableDeployTransaction, type ExecutableInvokeTransaction, type ExecutableUserInvoke, type ExecutableUserTransaction, type ExecuteOptions, type ExecutionParameters, type FEE_ESTIMATE, type FELT, type FactoryParams, type FastExecuteAccountMethods, type FastExecuteProviderMethods, type FastExecuteResponse, type FastWaitForTransactionOptions, type FeeEstimate, type FeeMode, type FormatResponse, type FunctionAbi, type GasPrices, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type Hint, type INITIAL_READS, Int, type InterfaceAbi, type Invocation, type Invocations, type InvocationsDetails, type InvocationsDetailsWithNonce, type InvocationsSignerDetails, type InvokeFunctionResponse, type InvokeTransaction, type InvokeTransactionReceiptResponse, type InvokedTransaction, type L1HandlerTransactionReceiptResponse, type L1_HANDLER_TXN, type LedgerPathCalculation, LedgerSigner111 as LedgerSigner, LedgerSigner111, LedgerSigner221, LedgerSigner231, type LegacyCompiledContract, type LegacyContractClass, type LegacyEvent, LibraryError, Literal, type LoadedContract, type LogLevel, LogLevelIndex, type Methods, type MultiDeployContractResponse, type MultiType, NON_ZERO_PREFIX, type Nonce, type OptionalPayload, type OutsideCall, type OutsideExecution, type OutsideExecutionOptions, OutsideExecutionTypesV1, OutsideExecutionTypesV2, OutsideExecutionVersion, type OutsideTransaction, type PRE_CONFIRMED_STATE_UPDATE, type PRICE_UNIT, type ParsedEvent, type ParsedEvents, type ParsedStruct, type ParsingStrategy, type PaymasterDetails, type PaymasterFeeEstimate, PaymasterInterface, type PaymasterOptions, PaymasterRpc, type PaymasterRpcOptions, type PaymasterTimeBounds, type PluginConfig, PluginManager, type PreConfirmedBlock, type PreConfirmedStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, RpcProvider as Provider, type ProviderHooks, ProviderInterface, type ProviderOptions, type ProviderOrAccount, type PythonicHints, type RESOURCE_PRICE, index$4 as RPC, rpc_0_10_2 as RPC0102, rpc_0_10_3 as RPC0103, rpc_0_9_0 as RPC09, RPCResponseParser, type RPC_ERROR, type RPC_ERROR_SET, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, type Receipt, ReceiptTx, type ReconnectOptions, type RequiredKeysOf, type ResourceBounds, type ResourceBoundsBN, type ResourceBoundsOverhead, ResponseParser, type RevertedTransactionReceiptResponse, type RevertedTransactionReceiptResponseHelper, RpcChannel, RpcError, RpcProvider, type RpcProviderOptions, type SIMULATION_FLAG, type STATE_UPDATE, type STRK20_ACTION, type STRK20_CALL_AND_PROOF, type
|
|
10846
|
+
export { type Abi, type AbiEntry, type AbiEntryType, type AbiEnum, type AbiEnums, type AbiEvent, type AbiEvents, type AbiInterfaces, AbiParser1, AbiParser2, AbiParserInterface, type AbiStruct, type AbiStructs, Account, type AccountHooks, AccountInterface, type AccountInvocationItem, type AccountInvocations, type AccountInvocationsFactoryDetails, type AccountOptions, type AllowArray, type ApiEstimateFeeResponse, type Args, type ArgsOrCalldata, type ArgsOrCalldataWithOptions, type ArraySignatureType, type AsyncContractFunction, type BLOCK_HASH, type BLOCK_NUMBER, BatchClient, type BatchClientOptions, type BigNumberish, type Block$1 as Block, type BlockIdentifier, type BlockNumber, BlockStatus, BlockTag, type BlockTransactionTrace, type BlockTransactionsTracesWithInitialReads, type BlockWithTxHashes, BrotherIdImpl, type BrotherIdProviderMethods, type BrotherProfile, type Builtins, type ByteArray, type ByteCode, type CairoAssembly, CairoByteArray, CairoBytes31, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoFelt, CairoFelt252, CairoFixedArray, CairoInt128, CairoInt16, CairoInt32, CairoInt64, CairoInt8, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint128, CairoUint16, CairoUint256, CairoUint32, CairoUint512, CairoUint64, CairoUint8, CairoUint96, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, type CallResult, type Calldata, type CommonContractOptions, type CompiledContract, type CompiledSierra, type CompiledSierraCasm, type CompilerVersion, type CompleteDeclareContractPayload, type CompressedProgram, Contract, type ContractClass, type ContractClassIdentifier, type ContractClassPayload, type ContractClassResponse, type ContractEntryPointFields, type ContractFunction, ContractInterface, type ContractOptions, type ContractVersion, type DeclareAndDeployContractPayload, type DeclareContractPayload, type DeclareContractResponse, type DeclareContractTransaction, type DeclareDeployUDCResponse, type DeclareSignerDetails, type DeclareTransactionReceiptResponse, type DeclaredTransaction, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployAndInvokeTransaction, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransaction, type DeployTransactionReceiptResponse, type DeployedAccountTransaction, Deployer, type DeployerCall, DeployerInterface, type Details, EDAMode, EDataAvailabilityMode, ESubscriptionTag, ETH_ADDRESS, ETraceFlag, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion2, ETransactionVersion3, ETxnResponseFlag, type EVENTS_CHUNK, type EmittedEvent, EntryPointType, type EntryPointsByType, type ErrorReceiptResponseHelper, type EstimateFeeBulk, type EstimateFeeResponseBulkOverhead, type EstimateFeeResponseOverhead, EthSigner, type Event$1 as Event, type EventEntry, type EventFilter, type ExecutableDeployAndInvokeTransaction, type ExecutableDeployTransaction, type ExecutableInvokeTransaction, type ExecutableUserInvoke, type ExecutableUserTransaction, type ExecuteOptions, type ExecutionParameters, type FEE_ESTIMATE, type FELT, type FactoryParams, type FastExecuteAccountMethods, type FastExecuteProviderMethods, type FastExecuteResponse, type FastWaitForTransactionOptions, type FeeEstimate, type FeeMode, type FormatResponse, type FunctionAbi, type GasPrices, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type Hint, type INITIAL_READS, Int, type InterfaceAbi, type Invocation, type Invocations, type InvocationsDetails, type InvocationsDetailsWithNonce, type InvocationsSignerDetails, type InvokeFunctionResponse, type InvokeTransaction, type InvokeTransactionReceiptResponse, type InvokedTransaction, type L1HandlerTransactionReceiptResponse, type L1_HANDLER_TXN, type LedgerPathCalculation, LedgerSigner111 as LedgerSigner, LedgerSigner111, LedgerSigner221, LedgerSigner231, type LegacyCompiledContract, type LegacyContractClass, type LegacyEvent, LibraryError, Literal, type LoadedContract, type LogLevel, LogLevelIndex, type Methods, type MultiDeployContractResponse, type MultiType, NON_ZERO_PREFIX, type Nonce, type OptionalPayload, type OutsideCall, type OutsideExecution, type OutsideExecutionOptions, OutsideExecutionTypesV1, OutsideExecutionTypesV2, OutsideExecutionVersion, type OutsideTransaction, type PRE_CONFIRMED_STATE_UPDATE, type PRICE_UNIT, type ParsedEvent, type ParsedEvents, type ParsedStruct, type ParsingStrategy, type PaymasterDetails, type PaymasterFeeEstimate, PaymasterInterface, type PaymasterOptions, PaymasterRpc, type PaymasterRpcOptions, type PaymasterTimeBounds, type PluginConfig, PluginManager, type PreConfirmedBlock, type PreConfirmedStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, RpcProvider as Provider, type ProviderHooks, ProviderInterface, type ProviderOptions, type ProviderOrAccount, type PythonicHints, type RESOURCE_PRICE, index$4 as RPC, rpc_0_10_2 as RPC0102, rpc_0_10_3 as RPC0103, rpc_0_9_0 as RPC09, RPCResponseParser, type RPC_ERROR, type RPC_ERROR_SET, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, type Receipt, ReceiptTx, type ReconnectOptions, type RequiredKeysOf, type ResourceBounds, type ResourceBoundsBN, type ResourceBoundsOverhead, ResponseParser, type RevertedTransactionReceiptResponse, type RevertedTransactionReceiptResponseHelper, RpcChannel, RpcError, RpcProvider, type RpcProviderOptions, type SIMULATION_FLAG, type STATE_UPDATE, type STRK20_ACTION, type STRK20_CALL_AND_PROOF, type STRK20_SHADOW_ACCOUNT_INVOKE_ACTION, type SierraContractClass, type SierraContractEntryPointFields, type SierraEntryPointsByType, type SierraProgramDebugInfo, type Signature, Signer, SignerInterface, type Simplify, type SimulateTransaction, type SimulateTransactionDetails, type SimulateTransactionOverhead, type SimulateTransactionOverheadResponse, type SimulateTransactionResponse, type SimulationFlags, type StarkProfile, type StarknetIdAccountMethods, StarknetIdImpl, type StarknetIdProviderMethods, type StarknetPlugin, type StateUpdate, type StateUpdateResponse, type StorageResponse, type SubscribeEventsParams, type SubscribeNewHeadsParams, type SubscribeNewTransactionReceiptsParams, type SubscribeNewTransactionsParams, type SubscribeTransactionStatusParams, Subscription, type SubscriptionBlockIdentifier, type SubscriptionNewHeadsEvent, type SubscriptionNewTransactionEvent, type SubscriptionNewTransactionReceiptsEvent, type SubscriptionOptions, type SubscriptionStarknetEventsEvent, type SubscriptionTransactionStatusEvent, type SuccessfulTransactionReceiptResponse, type SuccessfulTransactionReceiptResponseHelper, type TXN_EXECUTION_STATUS, type TXN_HASH, type TXN_STATUS, TimeoutError, type TipAnalysisOptions, type TipEstimate, type TipType, type TokenData, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptValue, type TransactionStatus, type TransactionStatusReceiptSets, type TransactionTrace, TransactionType, type TransactionWithHash, type Tupled, type TypedContractV2, UINT_128_MAX, UINT_128_MIN, UINT_256_HIGH_MAX, UINT_256_HIGH_MIN, UINT_256_LOW_MAX, UINT_256_LOW_MIN, UINT_256_MAX, UINT_256_MIN, UINT_512_MAX, UINT_512_MIN, Uint, type Uint256, type Uint512, type UniversalDeployerContractPayload, type UniversalDetails, type UserInvoke, type UserTransaction, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, WalletAccount, WalletAccountV5, WalletAccountV6, WebSocketChannel, type WebSocketModule, WebSocketNotConnectedError, type WebSocketOptions, type WeierstrassSignatureType, type WithOptions, addAddressPadding, brotherId, byteArray, cairo, compareVersions, config, constants, contractClassResponseToLegacyCompiledContract, contractLoader, createAbiParser, createTransactionReceipt, defaultDeployer, defaultPlugins, ec, encode, eth, index as events, extractContractHashes, fastExecute, fastParsingStrategy, getAbiVersion, type getBlockTransactionsTracesOptions, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getGasPrices, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, getTipStatsFromBlocks, index$3 as hash, hdParsingStrategy, isAccount, isFileSystemAvailable, isNoConstructorValid, isPreConfirmedBlock, isPreConfirmedStateUpdate, isPreConfirmedTransaction, isRPC08Plus_ResourceBounds, isRPC08Plus_ResourceBoundsBN, isSierra, isSupportedSpecVersion, isV3Tx, isVersion, json, legacyDeployer, logger, merkle, num, outsideExecution, parseCalldataField, paymaster, provider, selector, shortString, src5, index$1 as stark, starknetId, starknetId$1 as starknetIdPlugin, toAnyPatchVersion, toApiVersion, index$2 as transaction, typedData, uint256$1 as uint256, units, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, verifyMessageInStarknet, type waitForTransactionOptions, connect as wallet, connectV5 as walletV5, connectV6 as walletV6 };
|
package/dist/index.global.js
CHANGED
|
@@ -18147,7 +18147,7 @@ ${indent}}` : "}";
|
|
|
18147
18147
|
}
|
|
18148
18148
|
function toWalletApiActions(actions) {
|
|
18149
18149
|
return actions.map(
|
|
18150
|
-
(action) => action.type === "
|
|
18150
|
+
(action) => action.type === "shadow_account_invoke" ? { ...action, calls: action.calls.map(toWalletApiCall) } : action
|
|
18151
18151
|
);
|
|
18152
18152
|
}
|
|
18153
18153
|
|
|
@@ -18166,7 +18166,7 @@ ${indent}}` : "}";
|
|
|
18166
18166
|
strk20Balances: () => strk20Balances,
|
|
18167
18167
|
strk20InvokeTransaction: () => strk20InvokeTransaction,
|
|
18168
18168
|
strk20PrepareInvoke: () => strk20PrepareInvoke,
|
|
18169
|
-
|
|
18169
|
+
strk20ShadowAccountCommitment: () => strk20ShadowAccountCommitment,
|
|
18170
18170
|
subscribeWalletEvent: () => subscribeWalletEvent2,
|
|
18171
18171
|
supportedSpecs: () => supportedSpecs3,
|
|
18172
18172
|
supportedWalletApi: () => supportedWalletApi3,
|
|
@@ -18254,9 +18254,9 @@ ${indent}}` : "}";
|
|
|
18254
18254
|
params: { actions }
|
|
18255
18255
|
});
|
|
18256
18256
|
}
|
|
18257
|
-
function
|
|
18257
|
+
function strk20ShadowAccountCommitment(walletWSF, dapp_name, nonce) {
|
|
18258
18258
|
return walletWSF.features["starknet:walletApi"].request({
|
|
18259
|
-
type: "
|
|
18259
|
+
type: "wallet_strk20ShadowAccountCommitment",
|
|
18260
18260
|
params: { dapp_name, nonce }
|
|
18261
18261
|
});
|
|
18262
18262
|
}
|
|
@@ -18348,25 +18348,25 @@ ${indent}}` : "}";
|
|
|
18348
18348
|
return strk20InvokeTransaction(this.v6Provider, toWalletApiActions(actions));
|
|
18349
18349
|
}
|
|
18350
18350
|
/**
|
|
18351
|
-
* Compute the commitment of a DAPP STRK20
|
|
18351
|
+
* Compute the commitment of a DAPP STRK20 shadow account. The commitment is computed
|
|
18352
18352
|
* locally by the wallet from the user private state ; no transaction is sent.
|
|
18353
18353
|
*
|
|
18354
|
-
* When `nonce` is given, the full commitment of this single
|
|
18354
|
+
* When `nonce` is given, the full commitment of this single shadow account is returned.
|
|
18355
18355
|
* When `nonce` is omitted, the partial (nonce independent) commitment is returned
|
|
18356
|
-
* instead : it is shared by every
|
|
18357
|
-
* be published once to let a DAPP recognize all the
|
|
18358
|
-
* learning any individual nonce.
|
|
18359
|
-
* @param {STRK20_DAPP_NAME} dappName - The DAPP that scopes the
|
|
18360
|
-
* @param {FELT} [nonce] - The
|
|
18361
|
-
* @returns {Promise<FELT>} The
|
|
18356
|
+
* instead : it is shared by every shadow account the user derives for this DAPP, so it
|
|
18357
|
+
* can be published once to let a DAPP recognize all the shadow accounts of a user
|
|
18358
|
+
* without learning any individual nonce.
|
|
18359
|
+
* @param {STRK20_DAPP_NAME} dappName - The DAPP that scopes the shadow account(s).
|
|
18360
|
+
* @param {FELT} [nonce] - The shadow account nonce ; each nonce selects a distinct shadow account for this user + DAPP. Omit it to get the partial commitment.
|
|
18361
|
+
* @returns {Promise<FELT>} The shadow account commitment.
|
|
18362
18362
|
* @example
|
|
18363
18363
|
* ```typescript
|
|
18364
|
-
* const commitment = await myWalletAccount.
|
|
18364
|
+
* const commitment = await myWalletAccount.strk20ShadowAccountCommitment('myDapp', '0x0');
|
|
18365
18365
|
* // commitment = '0x5f2e...'
|
|
18366
18366
|
* ```
|
|
18367
18367
|
*/
|
|
18368
|
-
|
|
18369
|
-
return
|
|
18368
|
+
strk20ShadowAccountCommitment(dappName, nonce) {
|
|
18369
|
+
return strk20ShadowAccountCommitment(this.v6Provider, dappName, nonce);
|
|
18370
18370
|
}
|
|
18371
18371
|
static async connect(provider, walletProvider, cairoVersion, paymaster, silentMode = false) {
|
|
18372
18372
|
const { accounts } = await standardConnect2(walletProvider, silentMode);
|