starknet 8.4.0 → 8.5.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 CHANGED
@@ -1,3 +1,9 @@
1
+ # [8.5.0](https://github.com/starknet-io/starknet.js/compare/v8.4.0...v8.5.0) (2025-08-18)
2
+
3
+ ### Features
4
+
5
+ - **provider:** Add Brother ID domain resolution support ([#1313](https://github.com/starknet-io/starknet.js/issues/1313)) ([0bea966](https://github.com/starknet-io/starknet.js/commit/0bea966d29b51b026c6ed5d9916d9039d5fd6a17))
6
+
1
7
  # [8.4.0](https://github.com/starknet-io/starknet.js/compare/v8.3.1...v8.4.0) (2025-08-15)
2
8
 
3
9
  ### Features
package/dist/index.d.ts CHANGED
@@ -4812,7 +4812,78 @@ declare class StarknetId {
4812
4812
  static getStarkProfile(provider: ProviderInterface, address: BigNumberish, StarknetIdContract?: string, StarknetIdIdentityContract?: string, StarknetIdVerifierContract?: string, StarknetIdPfpContract?: string, StarknetIdPopContract?: string, StarknetIdMulticallContract?: string): Promise<StarkProfile>;
4813
4813
  }
4814
4814
 
4815
- declare const RpcProvider_base: ts_mixer_dist_types_types.Class<any[], RpcProvider$1 & StarknetId, typeof RpcProvider$1 & typeof StarknetId>;
4815
+ /**
4816
+ * Interface representing a Brother domain profile
4817
+ * @property name - The domain name without .brother suffix
4818
+ * @property resolver - The address that resolves to this domain
4819
+ * @property tokenId - The unique identifier of the domain NFT
4820
+ * @property expiryDate - Unix timestamp when the domain expires
4821
+ * @property lastTransferTime - Unix timestamp of the last transfer
4822
+ */
4823
+ interface BrotherProfile {
4824
+ name: string;
4825
+ resolver: string;
4826
+ tokenId: string;
4827
+ expiryDate: number;
4828
+ lastTransferTime: number;
4829
+ }
4830
+ /**
4831
+ * Class providing methods to interact with Brother Identity contracts.
4832
+ *
4833
+ * This implementation uses the same domain encoding and decoding logic as StarknetId,
4834
+ * allowing for consistent handling of domain names between the two systems.
4835
+ * The encoding/decoding functions (encodeBrotherDomain/decodeBrotherDomain) are direct
4836
+ * adaptations of StarknetId's useEncoded/useDecoded functions to work with .brother domains.
4837
+ */
4838
+ declare class BrotherId {
4839
+ /**
4840
+ * Gets the primary Brother domain name for an address
4841
+ * @param address - The address to get the domain for
4842
+ * @param BrotherIdContract - Optional contract address
4843
+ * @returns The domain name with .brother suffix
4844
+ */
4845
+ getBrotherName(address: BigNumberish, BrotherIdContract?: string): Promise<string>;
4846
+ /**
4847
+ * Gets the address associated with a Brother domain name
4848
+ * @param name - The domain name (with or without .brother suffix)
4849
+ * @param BrotherIdContract - Optional contract address
4850
+ * @returns The resolver address for the domain
4851
+ */
4852
+ getAddressFromBrotherName(name: string, BrotherIdContract?: string): Promise<string>;
4853
+ /**
4854
+ * Gets the complete profile information for a Brother domain
4855
+ * @param address - The address to get the profile for
4856
+ * @param BrotherIdContract - Optional contract address
4857
+ * @returns The complete Brother profile information
4858
+ */
4859
+ getBrotherProfile(address: BigNumberish, BrotherIdContract?: string): Promise<BrotherProfile>;
4860
+ /**
4861
+ * Static implementation of getBrotherName
4862
+ * @param provider - The provider interface
4863
+ * @param address - The address to get the domain for
4864
+ * @param BrotherIdContract - Optional contract address
4865
+ * @returns The domain name with .brother suffix
4866
+ */
4867
+ static getBrotherName(provider: ProviderInterface, address: BigNumberish, BrotherIdContract?: string): Promise<string>;
4868
+ /**
4869
+ * Static implementation of getAddressFromBrotherName
4870
+ * @param provider - The provider interface
4871
+ * @param name - The domain name
4872
+ * @param BrotherIdContract - Optional contract address
4873
+ * @returns The resolver address
4874
+ */
4875
+ static getAddressFromBrotherName(provider: ProviderInterface, name: string, BrotherIdContract?: string): Promise<string>;
4876
+ /**
4877
+ * Static implementation of getBrotherProfile
4878
+ * @param provider - The provider interface
4879
+ * @param address - The address to get the profile for
4880
+ * @param BrotherIdContract - Optional contract address
4881
+ * @returns The complete Brother profile
4882
+ */
4883
+ static getBrotherProfile(provider: ProviderInterface, address: BigNumberish, BrotherIdContract?: string): Promise<BrotherProfile>;
4884
+ }
4885
+
4886
+ declare const RpcProvider_base: ts_mixer_dist_types_types.Class<any[], RpcProvider$1 & StarknetId & BrotherId, typeof RpcProvider$1 & typeof StarknetId & typeof BrotherId>;
4816
4887
  declare class RpcProvider extends RpcProvider_base {
4817
4888
  }
4818
4889
 
@@ -8452,6 +8523,12 @@ declare class CairoBytes31 {
8452
8523
  static factoryFromApiResponse(responseIterator: Iterator<string>): CairoBytes31;
8453
8524
  }
8454
8525
 
8526
+ /**
8527
+ * @deprecated use the CairoFelt252 class instead, this one is limited to ASCII strings
8528
+ * Create felt Cairo type (cairo type helper)
8529
+ * @returns format: felt-string
8530
+ */
8531
+ declare function CairoFelt(it: BigNumberish): string;
8455
8532
  /**
8456
8533
  * felt252 is the basic field element used in Cairo.
8457
8534
  * It corresponds to an integer in the range 0 ≤ x < P where P is a very large prime number currently equal to 2^251 + 17⋅2^192 + 1.
@@ -9295,4 +9372,4 @@ declare class Logger {
9295
9372
  */
9296
9373
  declare const logger: Logger;
9297
9374
 
9298
- 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, 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 BlockWithTxHashes, type Builtins, type ByteArray, type ByteCode, type CairoAssembly, CairoByteArray, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoFixedArray, CairoInt128, CairoInt16, CairoInt32, CairoInt64, CairoInt8, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint128, CairoUint16, CairoUint256, 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, ETH_ADDRESS, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion2, ETransactionVersion3, 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 FeeEstimate, type FeeMode, type FormatResponse, type FunctionAbi, type GasPrices, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type Hint, 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 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 PENDING_DECLARE_TXN_RECEIPT, type PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT, type PENDING_INVOKE_TXN_RECEIPT, type PENDING_L1_HANDLER_TXN_RECEIPT, type PENDING_STATE_UPDATE, 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 PendingBlock, type PendingReceipt, type PendingStateUpdate, type PreConfirmedStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, RpcProvider as Provider, ProviderInterface, type ProviderOptions, type ProviderOrAccount, type PythonicHints, type RESOURCE_PRICE, index$4 as RPC, rpc_0_8_1 as RPC08, 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 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 StateUpdate, type StateUpdateResponse, type Storage, 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, WebSocketChannel, type WebSocketModule, WebSocketNotConnectedError, type WebSocketOptions, type WeierstrassSignatureType, type WithOptions, addAddressPadding, byteArray, cairo, config, constants, contractClassResponseToLegacyCompiledContract, createAbiParser, createTransactionReceipt, defaultDeployer, defaultPaymaster, defaultProvider, ec, encode, eth, index as events, extractContractHashes, type fastExecuteResponse, fastParsingStrategy, type fastWaitForTransactionOptions, getAbiVersion, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getGasPrices, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, getTipStatsFromBlocks, index$3 as hash, hdParsingStrategy, isAccount, isNoConstructorValid, isPendingBlock, isPendingStateUpdate, isPendingTransaction, 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, 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 };
9375
+ 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, 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 BlockWithTxHashes, 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, ETH_ADDRESS, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion2, ETransactionVersion3, 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 FeeEstimate, type FeeMode, type FormatResponse, type FunctionAbi, type GasPrices, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type Hint, 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 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 PENDING_DECLARE_TXN_RECEIPT, type PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT, type PENDING_INVOKE_TXN_RECEIPT, type PENDING_L1_HANDLER_TXN_RECEIPT, type PENDING_STATE_UPDATE, 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 PendingBlock, type PendingReceipt, type PendingStateUpdate, type PreConfirmedStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, RpcProvider as Provider, ProviderInterface, type ProviderOptions, type ProviderOrAccount, type PythonicHints, type RESOURCE_PRICE, index$4 as RPC, rpc_0_8_1 as RPC08, 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 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 StateUpdate, type StateUpdateResponse, type Storage, 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, WebSocketChannel, type WebSocketModule, WebSocketNotConnectedError, type WebSocketOptions, type WeierstrassSignatureType, type WithOptions, addAddressPadding, byteArray, cairo, config, constants, contractClassResponseToLegacyCompiledContract, createAbiParser, createTransactionReceipt, defaultDeployer, defaultPaymaster, defaultProvider, ec, encode, eth, index as events, extractContractHashes, type fastExecuteResponse, fastParsingStrategy, type fastWaitForTransactionOptions, getAbiVersion, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getGasPrices, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, getTipStatsFromBlocks, index$3 as hash, hdParsingStrategy, isAccount, isNoConstructorValid, isPendingBlock, isPendingStateUpdate, isPendingTransaction, 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, 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 };
@@ -30,7 +30,10 @@ var starknet = (() => {
30
30
  BlockStatus: () => BlockStatus,
31
31
  BlockTag: () => BlockTag,
32
32
  CairoByteArray: () => CairoByteArray,
33
+ CairoBytes31: () => CairoBytes31,
33
34
  CairoCustomEnum: () => CairoCustomEnum,
35
+ CairoFelt: () => CairoFelt,
36
+ CairoFelt252: () => CairoFelt252,
34
37
  CairoFixedArray: () => CairoFixedArray,
35
38
  CairoInt128: () => CairoInt128,
36
39
  CairoInt16: () => CairoInt16,
@@ -44,6 +47,7 @@ var starknet = (() => {
44
47
  CairoUint128: () => CairoUint128,
45
48
  CairoUint16: () => CairoUint16,
46
49
  CairoUint256: () => CairoUint256,
50
+ CairoUint32: () => CairoUint32,
47
51
  CairoUint512: () => CairoUint512,
48
52
  CairoUint64: () => CairoUint64,
49
53
  CairoUint8: () => CairoUint8,
@@ -257,7 +261,6 @@ var starknet = (() => {
257
261
  STATUS_PRE_CONFIRMED: () => STATUS_PRE_CONFIRMED,
258
262
  STATUS_PRE_CONFIRMED_LOWERCASE: () => STATUS_PRE_CONFIRMED_LOWERCASE,
259
263
  STATUS_RECEIVED: () => STATUS_RECEIVED2,
260
- STATUS_REJECTED: () => STATUS_REJECTED2,
261
264
  STATUS_REVERTED: () => STATUS_REVERTED2,
262
265
  STATUS_SUCCEEDED: () => STATUS_SUCCEEDED2,
263
266
  STRUCT_ABI_TYPE: () => STRUCT_ABI_TYPE2,
@@ -530,7 +533,6 @@ var starknet = (() => {
530
533
  STATUS_PRE_CONFIRMED: () => STATUS_PRE_CONFIRMED,
531
534
  STATUS_PRE_CONFIRMED_LOWERCASE: () => STATUS_PRE_CONFIRMED_LOWERCASE,
532
535
  STATUS_RECEIVED: () => STATUS_RECEIVED2,
533
- STATUS_REJECTED: () => STATUS_REJECTED2,
534
536
  STATUS_REVERTED: () => STATUS_REVERTED2,
535
537
  STATUS_SUCCEEDED: () => STATUS_SUCCEEDED2,
536
538
  STRUCT_ABI_TYPE: () => STRUCT_ABI_TYPE2,
@@ -576,7 +578,6 @@ var starknet = (() => {
576
578
  STATUS_PRE_CONFIRMED: () => STATUS_PRE_CONFIRMED,
577
579
  STATUS_PRE_CONFIRMED_LOWERCASE: () => STATUS_PRE_CONFIRMED_LOWERCASE,
578
580
  STATUS_RECEIVED: () => STATUS_RECEIVED2,
579
- STATUS_REJECTED: () => STATUS_REJECTED2,
580
581
  STATUS_REVERTED: () => STATUS_REVERTED2,
581
582
  STATUS_SUCCEEDED: () => STATUS_SUCCEEDED2,
582
583
  STRUCT_ABI_TYPE: () => STRUCT_ABI_TYPE2,
@@ -595,7 +596,6 @@ var starknet = (() => {
595
596
  var STATUS_ACCEPTED_ON_L12 = "ACCEPTED_ON_L1";
596
597
  var STATUS_SUCCEEDED2 = "SUCCEEDED";
597
598
  var STATUS_REVERTED2 = "REVERTED";
598
- var STATUS_REJECTED2 = "REJECTED";
599
599
  var STATUS_RECEIVED2 = "RECEIVED";
600
600
  var STATUS_CANDIDATE = "CANDIDATE";
601
601
  var STATUS_PRE_CONFIRMED = "PRE_CONFIRMED";
@@ -17729,8 +17729,181 @@ ${indent}}` : "}";
17729
17729
  }
17730
17730
  };
17731
17731
 
17732
+ // src/provider/extensions/brotherId.ts
17733
+ function isBrotherDomain(domain) {
17734
+ return domain.endsWith(".brother");
17735
+ }
17736
+ function encodeBrotherDomain(domain) {
17737
+ const brotherName = domain.endsWith(".brother") ? domain.replace(".brother", "") : domain;
17738
+ return useEncoded(brotherName);
17739
+ }
17740
+ function decodeBrotherDomain(encoded) {
17741
+ const decoded = useDecoded([encoded]);
17742
+ if (decoded.endsWith(".stark")) {
17743
+ return decoded.replace(".stark", ".brother");
17744
+ }
17745
+ return decoded ? `${decoded}.brother` : decoded;
17746
+ }
17747
+ function getBrotherIdContract(chainId) {
17748
+ switch (chainId) {
17749
+ case _StarknetChainId.SN_MAIN:
17750
+ return "0x0212f1c57700f5a3913dd11efba540196aad4cf67772f7090c62709dd804fa74";
17751
+ default:
17752
+ return "0x0212f1c57700f5a3913dd11efba540196aad4cf67772f7090c62709dd804fa74";
17753
+ }
17754
+ }
17755
+ var BrotherId = class _BrotherId {
17756
+ /**
17757
+ * Gets the primary Brother domain name for an address
17758
+ * @param address - The address to get the domain for
17759
+ * @param BrotherIdContract - Optional contract address
17760
+ * @returns The domain name with .brother suffix
17761
+ */
17762
+ async getBrotherName(address, BrotherIdContract) {
17763
+ return _BrotherId.getBrotherName(
17764
+ // After Mixin, this is ProviderInterface
17765
+ this,
17766
+ address,
17767
+ BrotherIdContract
17768
+ );
17769
+ }
17770
+ /**
17771
+ * Gets the address associated with a Brother domain name
17772
+ * @param name - The domain name (with or without .brother suffix)
17773
+ * @param BrotherIdContract - Optional contract address
17774
+ * @returns The resolver address for the domain
17775
+ */
17776
+ async getAddressFromBrotherName(name, BrotherIdContract) {
17777
+ return _BrotherId.getAddressFromBrotherName(
17778
+ // After Mixin, this is ProviderInterface
17779
+ this,
17780
+ name,
17781
+ BrotherIdContract
17782
+ );
17783
+ }
17784
+ /**
17785
+ * Gets the complete profile information for a Brother domain
17786
+ * @param address - The address to get the profile for
17787
+ * @param BrotherIdContract - Optional contract address
17788
+ * @returns The complete Brother profile information
17789
+ */
17790
+ async getBrotherProfile(address, BrotherIdContract) {
17791
+ return _BrotherId.getBrotherProfile(
17792
+ // After Mixin, this is ProviderInterface
17793
+ this,
17794
+ address,
17795
+ BrotherIdContract
17796
+ );
17797
+ }
17798
+ /**
17799
+ * Static implementation of getBrotherName
17800
+ * @param provider - The provider interface
17801
+ * @param address - The address to get the domain for
17802
+ * @param BrotherIdContract - Optional contract address
17803
+ * @returns The domain name with .brother suffix
17804
+ */
17805
+ static async getBrotherName(provider, address, BrotherIdContract) {
17806
+ const chainId = await provider.getChainId();
17807
+ const contract = BrotherIdContract ?? getBrotherIdContract(chainId);
17808
+ try {
17809
+ const primaryDomain = await provider.callContract({
17810
+ contractAddress: contract,
17811
+ entrypoint: "getPrimary",
17812
+ calldata: CallData.compile({
17813
+ user: address
17814
+ })
17815
+ });
17816
+ if (!primaryDomain[0] || primaryDomain[0] === "0x0") {
17817
+ throw Error("Brother name not found");
17818
+ }
17819
+ const encodedDomain = BigInt(primaryDomain[0]);
17820
+ return decodeBrotherDomain(encodedDomain);
17821
+ } catch (e) {
17822
+ if (e instanceof Error && e.message === "Brother name not found") {
17823
+ throw e;
17824
+ }
17825
+ throw Error("Could not get brother name");
17826
+ }
17827
+ }
17828
+ /**
17829
+ * Static implementation of getAddressFromBrotherName
17830
+ * @param provider - The provider interface
17831
+ * @param name - The domain name
17832
+ * @param BrotherIdContract - Optional contract address
17833
+ * @returns The resolver address
17834
+ */
17835
+ static async getAddressFromBrotherName(provider, name, BrotherIdContract) {
17836
+ const brotherName = name.endsWith(".brother") ? name : `${name}.brother`;
17837
+ if (!isBrotherDomain(brotherName)) {
17838
+ throw new Error("Invalid domain, must be a valid .brother domain");
17839
+ }
17840
+ const chainId = await provider.getChainId();
17841
+ const contract = BrotherIdContract ?? getBrotherIdContract(chainId);
17842
+ try {
17843
+ const domainDetails = await provider.callContract({
17844
+ contractAddress: contract,
17845
+ entrypoint: "get_details_by_domain",
17846
+ calldata: CallData.compile({
17847
+ domain: encodeBrotherDomain(brotherName)
17848
+ })
17849
+ });
17850
+ if (!domainDetails[0] || domainDetails[1] === "0x0") {
17851
+ throw Error("Could not get address from brother name");
17852
+ }
17853
+ return domainDetails[1];
17854
+ } catch {
17855
+ throw Error("Could not get address from brother name");
17856
+ }
17857
+ }
17858
+ /**
17859
+ * Static implementation of getBrotherProfile
17860
+ * @param provider - The provider interface
17861
+ * @param address - The address to get the profile for
17862
+ * @param BrotherIdContract - Optional contract address
17863
+ * @returns The complete Brother profile
17864
+ */
17865
+ static async getBrotherProfile(provider, address, BrotherIdContract) {
17866
+ const chainId = await provider.getChainId();
17867
+ const contract = BrotherIdContract ?? getBrotherIdContract(chainId);
17868
+ try {
17869
+ const primaryDomain = await provider.callContract({
17870
+ contractAddress: contract,
17871
+ entrypoint: "getPrimary",
17872
+ calldata: CallData.compile({
17873
+ user: address
17874
+ })
17875
+ });
17876
+ if (!primaryDomain[0] || primaryDomain[0] === "0x0") {
17877
+ throw Error("Brother profile not found");
17878
+ }
17879
+ const encodedDomain = BigInt(primaryDomain[0]);
17880
+ const decodedDomain = decodeBrotherDomain(encodedDomain);
17881
+ const domain = decodedDomain.replace(".brother", "");
17882
+ const domainDetails = await provider.callContract({
17883
+ contractAddress: contract,
17884
+ entrypoint: "get_details_by_domain",
17885
+ calldata: CallData.compile({
17886
+ domain: encodeBrotherDomain(domain)
17887
+ })
17888
+ });
17889
+ return {
17890
+ name: domain,
17891
+ resolver: domainDetails[1],
17892
+ tokenId: domainDetails[2],
17893
+ expiryDate: parseInt(domainDetails[3], 16),
17894
+ lastTransferTime: parseInt(domainDetails[4], 16)
17895
+ };
17896
+ } catch (e) {
17897
+ if (e instanceof Error && e.message === "Brother profile not found") {
17898
+ throw e;
17899
+ }
17900
+ throw Error("Could not get brother profile");
17901
+ }
17902
+ }
17903
+ };
17904
+
17732
17905
  // src/provider/extensions/default.ts
17733
- var RpcProvider2 = class extends Mixin(RpcProvider, StarknetId) {
17906
+ var RpcProvider2 = class extends Mixin(RpcProvider, StarknetId, BrotherId) {
17734
17907
  };
17735
17908
 
17736
17909
  // src/provider/interface.ts