# ReactiveDOT ## search - [Search the documentation](/search.md) ## react ### api - [@reactive-dot/core](/react/api/core.md): Modules - [index](/react/api/core/index.md): Classes - [BaseError](/react/api/core/index/classes/BaseError.md): Defined in1 - [MutationError](/react/api/core/index/classes/MutationError.md): Defined in11 - [Query](/react/api/core/index/classes/Query.md): Defined in269 - [QueryError](/react/api/core/index/classes/QueryError.md): Defined in9 - [Storage](/react/api/core/index/classes/Storage.md): Defined in8 - [defineConfig()](/react/api/core/index/functions/defineConfig.md): Defined in36 - [defineContract()](/react/api/core/index/functions/defineContract.md): Call Signature - [unsafeDescriptor()](/react/api/core/index/functions/unsafeDescriptor.md): Defined in23 - [whenAccountsChanged()](/react/api/core/index/functions/whenAccountsChanged.md): Defined in17 - [whenClientChanged()](/react/api/core/index/functions/whenClientChanged.md): Defined in13 - [whenConnectedWalletsChanged()](/react/api/core/index/functions/whenConnectedWalletsChanged.md): Defined in12 - [whenWalletsChanged()](/react/api/core/index/functions/whenWalletsChanged.md): Defined in11 - [Register](/react/api/core/index/interfaces/Register.md): Defined in4 - [Address](/react/api/core/index/type-aliases/Address.md): Defined in4 - [AsyncValue](/react/api/core/index/type-aliases/AsyncValue.md): Defined in3 - [ChainConfig](/react/api/core/index/type-aliases/ChainConfig.md): Defined in8 - [ChainId](/react/api/core/index/type-aliases/ChainId.md): Defined in15 - [Config](/react/api/core/index/type-aliases/Config.md): Defined in13 - [idle](/react/api/core/index/variables/idle.md): Defined in1 - [pending](/react/api/core/index/variables/pending.md): Defined in3 - [ReactiveDotError](/react/api/core/index/variables/ReactiveDotError.md): Defined in16 - [providers/light-client](/react/api/core/providers/light-client.md): Functions - [createLightClientProvider()](/react/api/core/providers/light-client/functions/createLightClientProvider.md): Defined in43 - [wallets](/react/api/core/wallets.md): Classes - [DeepLinkWallet](/react/api/core/wallets/classes/DeepLinkWallet.md): Defined in9 - [InjectedWallet](/react/api/core/wallets/classes/InjectedWallet.md): Defined in9 - [InjectedWalletProvider](/react/api/core/wallets/classes/InjectedWalletProvider.md): Defined in4 - [LocalWallet](/react/api/core/wallets/classes/LocalWallet.md): Defined in22 - [Wallet](/react/api/core/wallets/classes/Wallet.md): Defined in10 - [WalletProvider](/react/api/core/wallets/classes/WalletProvider.md): Defined in4 - [initializeWallets()](/react/api/core/wallets/functions/initializeWallets.md): Defined in5 - [PolkadotAccount](/react/api/core/wallets/type-aliases/PolkadotAccount.md): Defined in25 - [PolkadotSignerAccount](/react/api/core/wallets/type-aliases/PolkadotSignerAccount.md): Defined in19 - [WalletAccount](/react/api/core/wallets/type-aliases/WalletAccount.md): Defined in30 - [WalletOptions](/react/api/core/wallets/type-aliases/WalletOptions.md): Defined in6 - [@reactive-dot/react](/react/api/react.md): Functions - [Await()](/react/api/react/functions/Await.md): Defined in22 - [ChainProvider()](/react/api/react/functions/ChainProvider.md): Defined in17 - [QueryOptionsProvider()](/react/api/react/functions/QueryOptionsProvider.md): Defined in16 - [QueryRenderer()](/react/api/react/functions/QueryRenderer.md): Defined in22 - [ReactiveDotProvider()](/react/api/react/functions/ReactiveDotProvider.md): Defined in24 - [SignerProvider()](/react/api/react/functions/SignerProvider.md): Defined in21 - [useAccounts()](/react/api/react/functions/useAccounts.md): Defined in31 - [useBlock()](/react/api/react/functions/useBlock.md): Defined in22 - [useChainId()](/react/api/react/functions/useChainId.md): Defined in23 - [useChainIds()](/react/api/react/functions/useChainIds.md): Defined in13 - [useChainSpecData()](/react/api/react/functions/useChainSpecData.md): Defined in19 - [useClient()](/react/api/react/functions/useClient.md): Defined in20 - [useConfig()](/react/api/react/functions/useConfig.md): Defined in11 - [useConnectedWallets()](/react/api/react/functions/useConnectedWallets.md): Defined in38 - [useContractEventListener()](/react/api/react/functions/useContractEventListener.md): Defined in22 - [useContractMutation()](/react/api/react/functions/useContractMutation.md): Defined in34 - [useLazyLoadQuery()](/react/api/react/functions/useLazyLoadQuery.md): Defined in67 - [useLazyLoadQueryWithRefresh()](/react/api/react/functions/useLazyLoadQueryWithRefresh.md): Defined in112 - [useMutation()](/react/api/react/functions/useMutation.md): Defined in30 - [useMutationListener()](/react/api/react/functions/useMutationListener.md): Defined in10 - [useNativeTokenAmountFromNumber()](/react/api/react/functions/useNativeTokenAmountFromNumber.md): Call Signature - [useNativeTokenAmountFromPlanck()](/react/api/react/functions/useNativeTokenAmountFromPlanck.md): Call Signature - [usePromises()](/react/api/react/functions/usePromises.md): Defined in12 - [usePromiseValue()](/react/api/react/functions/usePromiseValue.md): Defined in13 - [useQueryErrorResetter()](/react/api/react/functions/useQueryErrorResetter.md): Defined in11 - [useQueryLoader()](/react/api/react/functions/useQueryLoader.md): Defined in17 - [useQueryRefresher()](/react/api/react/functions/useQueryRefresher.md): Defined in15 - [useSigner()](/react/api/react/functions/useSigner.md): Defined in10 - [useSpendableBalance()](/react/api/react/functions/useSpendableBalance.md): Defined in45 - [useSpendableBalances()](/react/api/react/functions/useSpendableBalances.md): Defined in72 - [useStore()](/react/api/react/functions/useStore.md): Defined in18 - [useTypedApi()](/react/api/react/functions/useTypedApi.md): Defined in22 - [useWalletConnector()](/react/api/react/functions/useWalletConnector.md): Defined in16 - [useWalletDisconnector()](/react/api/react/functions/useWalletDisconnector.md): Defined in16 - [useWallets()](/react/api/react/functions/useWallets.md): Defined in21 - [useMutationEffect](/react/api/react/variables/useMutationEffect.md): Defined in25 - [usePromiseState](/react/api/react/variables/usePromiseState.md): Defined in70 - [@reactive-dot/utils](/react/api/utils.md): Classes - [DenominatedNumber](/react/api/utils/classes/DenominatedNumber.md): Defined in1 - [BigIntMath](/react/api/utils/variables/BigIntMath.md): Defined in1 ### category - [API](/react/category/api.md) - [Getting started](/react/category/getting-started.md) - [Guides](/react/category/guides.md) - [Smart contracts](/react/category/smart-contracts.md) ### getting-started - [Connect wallets](/react/getting-started/connect-wallets.md): Wallets & accounts connection can by managed via useWallets, useConnectedWallets & useAccounts hooks. - [Mutation](/react/getting-started/mutation.md): The useMutation hook allow you to sign & submit transaction to a chain. - [Query](/react/getting-started/query.md): The useLazyLoadQuery hook allow you to read any data from chain, while maintaining updates, concurrency, caching & deduplication behind the scene for you. - [Setup](/react/getting-started/setup.md): This walks you through the process of creating a simple ReactiveDOT application. ### guides - [Advanced async handling](/react/guides/async.md): ReactiveDOT provides flexible async handling patterns that work seamlessly with React 19's concurrent features. By default, all hooks suspend, but you can opt-out to gain fine-grained control over loading states and error handling. - [Bulk refresh](/react/guides/bulk-refresh.md): Sometimes you need to refresh multiple queries at once based on certain criteria. The store provides methods to invalidate queries in bulk using a filter function. - [FAQ](/react/guides/faq.md) - [Incremental loading](/react/guides/incremental-loading.md): defer - [Multichain](/react/guides/multichain.md): Setup - [Number utility](/react/guides/number-utility.md): Denominated number - [Query performance](/react/guides/performance.md): All query hooks in ReactiveDOT create subscriptions to the underlying data sources. These subscriptions ensure that your components always reflect the latest data changes. However, it's important to manage these subscriptions effectively to avoid performance issues. - [Using Polkadot-API (PAPI)](/react/guides/using-papi.md): ReactiveDOT is designed as a convenient layer over PAPI for enhanced developer quality of life. For more advanced use cases and data manipulation, it's recommended to use PAPI directly. You can access PAPI APIs through two hooks: useClient and useTypedApi. ### smart-contract - [Ink!](/react/smart-contract/ink.md): ReactiveDOT works with Ink! contracts on chains with PolkaVM support, such as Polkadot Asset Hub. - [Solidity](/react/smart-contract/solidity.md): ReactiveDOT works with Solidity contracts on chains with PolkaVM support, such as Polkadot Asset Hub. ## vue ### api - [@reactive-dot/core](/vue/api/core.md): Modules - [index](/vue/api/core/index.md): Classes - [BaseError](/vue/api/core/index/classes/BaseError.md): Defined in1 - [MutationError](/vue/api/core/index/classes/MutationError.md): Defined in11 - [Query](/vue/api/core/index/classes/Query.md): Defined in269 - [QueryError](/vue/api/core/index/classes/QueryError.md): Defined in9 - [Storage](/vue/api/core/index/classes/Storage.md): Defined in8 - [defineConfig()](/vue/api/core/index/functions/defineConfig.md): Defined in36 - [defineContract()](/vue/api/core/index/functions/defineContract.md): Call Signature - [unsafeDescriptor()](/vue/api/core/index/functions/unsafeDescriptor.md): Defined in23 - [whenAccountsChanged()](/vue/api/core/index/functions/whenAccountsChanged.md): Defined in17 - [whenClientChanged()](/vue/api/core/index/functions/whenClientChanged.md): Defined in13 - [whenConnectedWalletsChanged()](/vue/api/core/index/functions/whenConnectedWalletsChanged.md): Defined in12 - [whenWalletsChanged()](/vue/api/core/index/functions/whenWalletsChanged.md): Defined in11 - [Register](/vue/api/core/index/interfaces/Register.md): Defined in4 - [Address](/vue/api/core/index/type-aliases/Address.md): Defined in4 - [AsyncValue](/vue/api/core/index/type-aliases/AsyncValue.md): Defined in3 - [ChainConfig](/vue/api/core/index/type-aliases/ChainConfig.md): Defined in8 - [ChainId](/vue/api/core/index/type-aliases/ChainId.md): Defined in15 - [Config](/vue/api/core/index/type-aliases/Config.md): Defined in13 - [idle](/vue/api/core/index/variables/idle.md): Defined in1 - [pending](/vue/api/core/index/variables/pending.md): Defined in3 - [ReactiveDotError](/vue/api/core/index/variables/ReactiveDotError.md): Defined in16 - [providers/light-client](/vue/api/core/providers/light-client.md): Functions - [createLightClientProvider()](/vue/api/core/providers/light-client/functions/createLightClientProvider.md): Defined in43 - [wallets](/vue/api/core/wallets.md): Classes - [DeepLinkWallet](/vue/api/core/wallets/classes/DeepLinkWallet.md): Defined in9 - [InjectedWallet](/vue/api/core/wallets/classes/InjectedWallet.md): Defined in9 - [InjectedWalletProvider](/vue/api/core/wallets/classes/InjectedWalletProvider.md): Defined in4 - [LocalWallet](/vue/api/core/wallets/classes/LocalWallet.md): Defined in22 - [Wallet](/vue/api/core/wallets/classes/Wallet.md): Defined in10 - [WalletProvider](/vue/api/core/wallets/classes/WalletProvider.md): Defined in4 - [initializeWallets()](/vue/api/core/wallets/functions/initializeWallets.md): Defined in5 - [PolkadotAccount](/vue/api/core/wallets/type-aliases/PolkadotAccount.md): Defined in25 - [PolkadotSignerAccount](/vue/api/core/wallets/type-aliases/PolkadotSignerAccount.md): Defined in19 - [WalletAccount](/vue/api/core/wallets/type-aliases/WalletAccount.md): Defined in30 - [WalletOptions](/vue/api/core/wallets/type-aliases/WalletOptions.md): Defined in6 - [@reactive-dot/utils](/vue/api/utils.md): Classes - [DenominatedNumber](/vue/api/utils/classes/DenominatedNumber.md): Defined in1 - [BigIntMath](/vue/api/utils/variables/BigIntMath.md): Defined in1 - [@reactive-dot/vue](/vue/api/vue.md): Variables - [provideChain()](/vue/api/vue/functions/provideChain.md): Defined in5 - [provideSigner()](/vue/api/vue/functions/provideSigner.md): Defined in5 - [useAccounts()](/vue/api/vue/functions/useAccounts.md): Defined in23 - [useBlock()](/vue/api/vue/functions/useBlock.md): Defined in17 - [useChainId()](/vue/api/vue/functions/useChainId.md): Defined in21 - [useChainIds()](/vue/api/vue/functions/useChainIds.md): Defined in12 - [useChainSpecData()](/vue/api/vue/functions/useChainSpecData.md): Defined in14 - [useClient()](/vue/api/vue/functions/useClient.md): Defined in15 - [useConfig()](/vue/api/vue/functions/useConfig.md): Defined in12 - [useConnectedWallets()](/vue/api/vue/functions/useConnectedWallets.md): Defined in29 - [useContractMutation()](/vue/api/vue/functions/useContractMutation.md): Defined in31 - [useMutation()](/vue/api/vue/functions/useMutation.md): Defined in27 - [useNativeToken()](/vue/api/vue/functions/useNativeToken.md): Defined in15 - [useQuery()](/vue/api/vue/functions/useQuery.md): Defined in55 - [useQueryErrorResetter()](/vue/api/vue/functions/useQueryErrorResetter.md): Defined in9 - [useSigner()](/vue/api/vue/functions/useSigner.md): Defined in9 - [useSpendableBalance()](/vue/api/vue/functions/useSpendableBalance.md): Call Signature - [useSpendableBalances()](/vue/api/vue/functions/useSpendableBalances.md): Defined in119 - [useStore()](/vue/api/vue/functions/useStore.md): Defined in17 - [useTypedApi()](/vue/api/vue/functions/useTypedApi.md): Defined in18 - [useWalletConnector()](/vue/api/vue/functions/useWalletConnector.md): Defined in12 - [useWalletDisconnector()](/vue/api/vue/functions/useWalletDisconnector.md): Defined in13 - [useWallets()](/vue/api/vue/functions/useWallets.md): Defined in11 - [watchContractEvent()](/vue/api/vue/functions/watchContractEvent.md): Defined in21 - [watchMutation()](/vue/api/vue/functions/watchMutation.md): Defined in10 - [ReactiveDotPlugin](/vue/api/vue/variables/ReactiveDotPlugin.md): Defined in6 - [watchMutationEffect](/vue/api/vue/variables/watchMutationEffect.md): Defined in21 ### category - [API](/vue/category/api.md) - [Getting started](/vue/category/getting-started.md) - [Guides](/vue/category/guides.md) - [Smart contracts](/vue/category/smart-contracts.md) ### getting-started - [Connect wallets](/vue/getting-started/connect-wallets.md): Wallets & accounts connection can by managed via useWallets, useConnectedWallets & useAccounts composables. - [Mutation](/vue/getting-started/mutation.md): The useMutation composable allow you to sign & submit transaction to a chain. - [Query](/vue/getting-started/query.md): The useQuery composable allow you to read any data from chain, while maintaining updates, concurrency, caching & deduplication behind the scene for you. - [Setup](/vue/getting-started/setup.md): This walks you through the process of creating a simple ReactiveDOT application. ### guides - [Bulk refresh](/vue/guides/bulk-refresh.md): Sometimes you need to refresh multiple queries at once based on certain criteria. The store provides methods to invalidate queries in bulk using a filter function. - [FAQ](/vue/guides/faq.md) - [Incremental loading](/vue/guides/incremental-loading.md): defer - [Multichain](/vue/guides/multichain.md): Setup - [Number utility](/vue/guides/number-utility.md): Denominated number - [Using Polkadot-API (PAPI)](/vue/guides/using-papi.md): ReactiveDOT is designed as a convenient layer over PAPI for enhanced developer quality of life. For more advanced use cases and data manipulation, it's recommended to use PAPI directly. You can access PAPI APIs through two composables: useClient and useTypedApi. ### smart-contract - [Ink!](/vue/smart-contract/ink.md): ReactiveDOT works with Ink! contracts on chains with PolkaVM support, such as Polkadot Asset Hub. - [Solidity](/vue/smart-contract/solidity.md): ReactiveDOT works with Solidity contracts on chains with PolkaVM support, such as Polkadot Asset Hub. --- # Full Documentation Content [Skip to main content](#__docusaurus_skipToContent_fallback) [![ReactiveDOT logo](/img/logo.svg)![ReactiveDOT logo](/img/logo-dark.svg)](/) [**ReactiveDOT**](/)[React](/react/category/getting-started.md)[Vue](/vue/category/getting-started.md) [GitHub](https://github.com/buffed-labs/reactive-dot) Search # Search the documentation Type your search here Powered by[](https://www.algolia.com/) Learn * [Getting started](/react/getting-started/setup.md) * [Smart contracts](/react/smart-contract/ink.md) * [Guides](/react/category/guides.md) Community * [Matrix](https://matrix.to/#/#reactive-dot:matrix.org) More * [GitHub](https://github.com/buffed-labs/reactive-dot) * [X](https://x.com/TienNguyenK) Copyright Β© 2026 Buffed Labs. Made with a literal πŸ’» by [TiαΊΏn](https://tien.zone/) --- # @reactive-dot/core ## Modules[​](#modules "Direct link to Modules") | Module | Description | | -------------------------------------------------------------------- | ----------- | | [index](/react/api/core/index/.md) | - | | [providers/light-client](/react/api/core/providers/light-client/.md) | - | | [wallets](/react/api/core/wallets/.md) | - | --- # index ## Classes[​](#classes "Direct link to Classes") | Class | Description | | --------------------------------------------------------------- | ----------- | | [BaseError](/react/api/core/index/classes/BaseError.md) | - | | [MutationError](/react/api/core/index/classes/MutationError.md) | - | | [Query](/react/api/core/index/classes/Query.md) | - | | [QueryError](/react/api/core/index/classes/QueryError.md) | - | | [Storage](/react/api/core/index/classes/Storage.md) | - | ## Interfaces[​](#interfaces "Direct link to Interfaces") | Interface | Description | | -------------------------------------------------------- | ----------- | | [Register](/react/api/core/index/interfaces/Register.md) | - | ## Type Aliases[​](#type-aliases "Direct link to Type Aliases") | Type Alias | Description | | ---------------------------------------------------------------- | ----------- | | [Address](/react/api/core/index/type-aliases/Address.md) | - | | [AsyncValue](/react/api/core/index/type-aliases/AsyncValue.md) | - | | [ChainConfig](/react/api/core/index/type-aliases/ChainConfig.md) | - | | [ChainId](/react/api/core/index/type-aliases/ChainId.md) | - | | [Config](/react/api/core/index/type-aliases/Config.md) | - | ## Variables[​](#variables "Direct link to Variables") | Variable | Description | | --------------------------------------------------------------------------- | ----------- | | [idle](/react/api/core/index/variables/idle.md) | - | | [pending](/react/api/core/index/variables/pending.md) | - | | [~~ReactiveDotError~~](/react/api/core/index/variables/ReactiveDotError.md) | - | ## Functions[​](#functions "Direct link to Functions") | Function | Description | | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [defineConfig](/react/api/core/index/functions/defineConfig.md) | - | | [~~defineContract~~](/react/api/core/index/functions/defineContract.md) | - | | [unsafeDescriptor](/react/api/core/index/functions/unsafeDescriptor.md) | Create an unsafe chain descriptor for use in [ChainConfig](/react/api/core/index/type-aliases/ChainConfig.md). This descriptor will only be used for type checking and will not be used at runtime to create a Polkadot-API client. | | [whenAccountsChanged](/react/api/core/index/functions/whenAccountsChanged.md) | Subscribe to accounts changes. | | [whenClientChanged](/react/api/core/index/functions/whenClientChanged.md) | Subscribe to client changes. | | [whenConnectedWalletsChanged](/react/api/core/index/functions/whenConnectedWalletsChanged.md) | Subscribe to connected wallets changes. | | [whenWalletsChanged](/react/api/core/index/functions/whenWalletsChanged.md) | Subscribe to available wallets changes. | --- # BaseError Defined in: [packages/core/src/errors.ts:1](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/errors.ts#L1) ## Extends[​](#extends "Direct link to Extends") * `Error` ## Extended by[​](#extended-by "Direct link to Extended by") * [`MutationError`](/react/api/core/index/classes/MutationError.md) * [`QueryError`](/react/api/core/index/classes/QueryError.md) ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new BaseError(message?): BaseError; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1080 #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | -------- | | `message?` | `string` | #### Returns[​](#returns "Direct link to Returns") `BaseError` #### Inherited from[​](#inherited-from "Direct link to Inherited from") ``` Error.constructor ``` ### Constructor[​](#constructor-1 "Direct link to Constructor") ``` new BaseError(message?, options?): BaseError; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1080 #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | ---------- | -------------- | | `message?` | `string` | | `options?` | `ErrorOptions` | #### Returns[​](#returns-1 "Direct link to Returns") `BaseError` #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") ``` Error.constructor ``` ## Properties[​](#properties "Direct link to Properties") ### cause?[​](#cause "Direct link to cause?") ``` optional cause?: unknown; ``` Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24 #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") ``` Error.cause ``` *** ### message[​](#message "Direct link to message") ``` message: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1075 #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") ``` Error.message ``` *** ### name[​](#name "Direct link to name") ``` name: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1074 #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") ``` Error.name ``` *** ### stack?[​](#stack "Direct link to stack?") ``` optional stack?: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") ``` Error.stack ``` ## Methods[​](#methods "Direct link to Methods") ### from()[​](#from "Direct link to from()") ``` static from(error, message?): BaseError; ``` Defined in: [packages/core/src/errors.ts:2](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/errors.ts#L2) #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------- | | `T` | #### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | ---------- | -------- | | `error` | `T` | | `message?` | `string` | #### Returns[​](#returns-2 "Direct link to Returns") `BaseError` *** ### isError()[​](#iserror "Direct link to isError()") ``` static isError(error): error is Error; ``` Defined in: node\_modules/typescript/lib/lib.esnext.error.d.ts:21 Indicates whether the argument provided is a built-in Error instance or not. #### Parameters[​](#parameters-3 "Direct link to Parameters") | Parameter | Type | | --------- | --------- | | `error` | `unknown` | #### Returns[​](#returns-3 "Direct link to Returns") `error is Error` #### Inherited from[​](#inherited-from-6 "Direct link to Inherited from") ``` Error.isError ``` --- # MutationError Defined in: [packages/core/src/errors.ts:11](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/errors.ts#L11) ## Extends[​](#extends "Direct link to Extends") * [`BaseError`](/react/api/core/index/classes/BaseError.md) ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new MutationError(message?): MutationError; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1080 #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | -------- | | `message?` | `string` | #### Returns[​](#returns "Direct link to Returns") `MutationError` #### Inherited from[​](#inherited-from "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`constructor`](/react/api/core/index/classes/BaseError.md#constructor) ### Constructor[​](#constructor-1 "Direct link to Constructor") ``` new MutationError(message?, options?): MutationError; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1080 #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | ---------- | -------------- | | `message?` | `string` | | `options?` | `ErrorOptions` | #### Returns[​](#returns-1 "Direct link to Returns") `MutationError` #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`constructor`](/react/api/core/index/classes/BaseError.md#constructor) ## Properties[​](#properties "Direct link to Properties") ### cause?[​](#cause "Direct link to cause?") ``` optional cause?: unknown; ``` Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24 #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`cause`](/react/api/core/index/classes/BaseError.md#cause) *** ### message[​](#message "Direct link to message") ``` message: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1075 #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`message`](/react/api/core/index/classes/BaseError.md#message) *** ### name[​](#name "Direct link to name") ``` name: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1074 #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`name`](/react/api/core/index/classes/BaseError.md#name) *** ### stack?[​](#stack "Direct link to stack?") ``` optional stack?: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`stack`](/react/api/core/index/classes/BaseError.md#stack) ## Methods[​](#methods "Direct link to Methods") ### from()[​](#from "Direct link to from()") ``` static from(error, message?): BaseError; ``` Defined in: [packages/core/src/errors.ts:2](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/errors.ts#L2) #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------- | | `T` | #### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | ---------- | -------- | | `error` | `T` | | `message?` | `string` | #### Returns[​](#returns-2 "Direct link to Returns") [`BaseError`](/react/api/core/index/classes/BaseError.md) #### Inherited from[​](#inherited-from-6 "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`from`](/react/api/core/index/classes/BaseError.md#from) *** ### isError()[​](#iserror "Direct link to isError()") ``` static isError(error): error is Error; ``` Defined in: node\_modules/typescript/lib/lib.esnext.error.d.ts:21 Indicates whether the argument provided is a built-in Error instance or not. #### Parameters[​](#parameters-3 "Direct link to Parameters") | Parameter | Type | | --------- | --------- | | `error` | `unknown` | #### Returns[​](#returns-3 "Direct link to Returns") `error is Error` #### Inherited from[​](#inherited-from-7 "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`isError`](/react/api/core/index/classes/BaseError.md#iserror) --- # Query\ Defined in: [packages/core/src/query-builder.ts:269](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L269) ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------------------------- | --------------------- | | `TInstructions` *extends* `QueryInstruction`\[] | `QueryInstruction`\[] | | `TDescriptor` *extends* `ChainDefinition` | `CommonDescriptor` | ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new Query(instructions?): Query; ``` Defined in: [packages/core/src/query-builder.ts:275](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L275) #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | -------------- | --------------- | | `instructions` | `TInstructions` | #### Returns[​](#returns "Direct link to Returns") `Query`<`TInstructions`, `TDescriptor`> ## Properties[​](#properties "Direct link to Properties") ### ~~callApi~~[​](#callapi "Direct link to callapi") ``` callApi: (api, method, ...__namedParameters) => Query<[...TInstructions[], { api: TApi; args: [unknown] | never[]; at: Finality | undefined; directives: { defer: NoInfer; }; method: TMethod; type: "runtime-api"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:431](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L431) #### Type Parameters[​](#type-parameters-1 "Direct link to Type Parameters") | Type Parameter | Default type | | ---------------------------- | ------------ | | `TApi` *extends* `string` | - | | `TMethod` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `api` | `TApi` | | `method` | `TMethod` | | ...`__namedParameters` | `InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<`TDescriptor`\[`"descriptors"`]\[`"apis"`]>>\[`TApi`]\[`TMethod`]>\[`"args"`] *extends* \[] ? \[`any`\[`any`], `object`] : \[`InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<...\[...]\[`"apis"`]>>\[`TApi`]\[`TMethod`]>\[`"args"`], `object`] | #### Returns[​](#returns-1 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `api`: `TApi`; `args`: \[`unknown`] | `never`\[]; `at`: `Finality` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `method`: `TMethod`; `type`: `"runtime-api"`; }], `TDescriptor`> #### Deprecated[​](#deprecated "Direct link to Deprecated") Use [Query.runtimeApi](#runtimeapi) instead. *** ### ~~callApis~~[​](#callapis "Direct link to callapis") ``` callApis: (api, method, args, options?) => Query<[...TInstructions[], { api: TApi; args: InferPapiRuntimeCall>[TApi][TMethod]>["args"][]; at: Finality | undefined; directives: { defer: NoInfer; stream: NoInfer; }; method: TMethod; multi: true; type: "runtime-api"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:461](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L461) #### Type Parameters[​](#type-parameters-2 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TApi` *extends* `string` | - | | `TMethod` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | | `TStream` *extends* `boolean` | `false` | #### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `api` | `TApi` | | `method` | `TMethod` | | `args` | `InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<`TDescriptor`\[`"descriptors"`]\[`"apis"`]>>\[`TApi`]\[`TMethod`]>\[`"args"`]\[] | | `options?` | { `at?`: `Finality`; `defer?`: `TDefer`; `stream?`: `TStream`; } | | `options.at?` | `Finality` | | `options.defer?` | `TDefer` | | `options.stream?` | `TStream` | #### Returns[​](#returns-2 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `api`: `TApi`; `args`: `InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<...>>\[`TApi`]\[`TMethod`]>\[`"args"`]\[]; `at`: `Finality` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; `stream`: `NoInfer`<`TStream`>; }; `method`: `TMethod`; `multi`: `true`; `type`: `"runtime-api"`; }], `TDescriptor`> #### Deprecated[​](#deprecated-1 "Direct link to Deprecated") Use [Query.runtimeApis](#runtimeapis) instead. *** ### ~~getConstant~~[​](#getconstant "Direct link to getconstant") ``` getConstant: (pallet, constant, options?) => Query<[...TInstructions[], { constant: TConstant; directives: { defer: NoInfer; }; pallet: TPallet; type: "constant"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:301](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L301) #### Type Parameters[​](#type-parameters-3 "Direct link to Type Parameters") | Type Parameter | Default type | | ------------------------------ | ------------ | | `TPallet` *extends* `string` | - | | `TConstant` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-3 "Direct link to Parameters") | Parameter | Type | | ---------------- | ----------------------- | | `pallet` | `TPallet` | | `constant` | `TConstant` | | `options?` | { `defer?`: `TDefer`; } | | `options.defer?` | `TDefer` | #### Returns[​](#returns-3 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `constant`: `TConstant`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `pallet`: `TPallet`; `type`: `"constant"`; }], `TDescriptor`> #### Deprecated[​](#deprecated-2 "Direct link to Deprecated") Use [Query.constant](#constant) instead. *** ### ~~readStorage~~[​](#readstorage "Direct link to readstorage") ``` readStorage: (pallet, storage, ...__namedParameters) => Query<[...TInstructions[], { at: At | undefined; directives: { defer: NoInfer; }; keys: any[]; pallet: TPallet; storage: TStorage; type: "storage"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:337](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L337) #### Type Parameters[​](#type-parameters-4 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TPallet` *extends* `string` | - | | `TStorage` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-4 "Direct link to Parameters") | Parameter | Type | | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `pallet` | `TPallet` | | `storage` | `TStorage` | | ...`__namedParameters` | `InferPapiStorageEntry`<`StorageApi`<`ExtractStorage`<...\[...]\[`"pallets"`]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`] *extends* \[] ? \[`any`\[`any`], `object`] : \[`InferPapiStorageEntry`<`StorageApi`<`ExtractStorage`<...\[...]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`], `object`] | #### Returns[​](#returns-4 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `at`: `At` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `keys`: `any`\[]; `pallet`: `TPallet`; `storage`: `TStorage`; `type`: `"storage"`; }], `TDescriptor`> #### Deprecated[​](#deprecated-3 "Direct link to Deprecated") Use [Query.storage](#storage) instead. *** ### ~~readStorageEntries~~[​](#readstorageentries "Direct link to readstorageentries") ``` readStorageEntries: (pallet, storage, args?, options?) => Query<[...TInstructions[], { args: unknown[]; at: At | undefined; directives: { defer: NoInfer; }; pallet: TPallet; storage: TStorage; type: "storage-entries"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:397](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L397) #### Type Parameters[​](#type-parameters-5 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TPallet` *extends* `string` | - | | `TStorage` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-5 "Direct link to Parameters") | Parameter | Type | | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `pallet` | `TPallet` | | `storage` | `TStorage` | | `args?` | `InferPapiStorageEntries`<`StorageApi`<`ExtractStorage`<...\[...]\[`"pallets"`]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`] | | `options?` | { `at?`: `At`; `defer?`: `TDefer`; } | | `options.at?` | `At` | | `options.defer?` | `TDefer` | #### Returns[​](#returns-5 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `args`: `unknown`\[]; `at`: `At` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `pallet`: `TPallet`; `storage`: `TStorage`; `type`: `"storage-entries"`; }], `TDescriptor`> #### Deprecated[​](#deprecated-4 "Direct link to Deprecated") Use [Query.storageEntries](#storageentries) instead. *** ### ~~readStorages~~[​](#readstorages "Direct link to readstorages") ``` readStorages: (pallet, storage, keys, options?) => Query<[...TInstructions[], { at: At | undefined; directives: { defer: NoInfer; stream: NoInfer; }; keys: NoInfer[TPallet][TStorage]>["args"][]>; multi: true; pallet: TPallet; storage: TStorage; type: "storage"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:370](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L370) #### Type Parameters[​](#type-parameters-6 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TPallet` *extends* `string` | - | | `TStorage` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | | `TStream` *extends* `boolean` | `false` | #### Parameters[​](#parameters-6 "Direct link to Parameters") | Parameter | Type | | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | `pallet` | `TPallet` | | `storage` | `TStorage` | | `keys` | `InferPapiStorageEntry`<`StorageApi`<`ExtractStorage`<...\[...]\[`"pallets"`]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`]\[] | | `options?` | { `at?`: `At`; `defer?`: `TDefer`; `stream?`: `TStream`; } | | `options.at?` | `At` | | `options.defer?` | `TDefer` | | `options.stream?` | `TStream` | #### Returns[​](#returns-6 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `at`: `At` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; `stream`: `NoInfer`<`TStream`>; }; `keys`: `NoInfer`<`InferPapiStorageEntry`<`StorageApi`<...>\[`TPallet`]\[`TStorage`]>\[`"args"`]\[]>; `multi`: `true`; `pallet`: `TPallet`; `storage`: `TStorage`; `type`: `"storage"`; }], `TDescriptor`> #### Deprecated[​](#deprecated-5 "Direct link to Deprecated") Use [Query.storages](#storages) instead. ## Accessors[​](#accessors "Direct link to Accessors") ### instructions[​](#instructions "Direct link to instructions") #### Get Signature[​](#get-signature "Direct link to Get Signature") ``` get instructions(): TInstructions; ``` Defined in: [packages/core/src/query-builder.ts:279](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L279) ##### Returns[​](#returns-7 "Direct link to Returns") `TInstructions` ## Methods[​](#methods "Direct link to Methods") ### concat()[​](#concat "Direct link to concat()") ``` concat(...queries): Query<[...TInstructions[], ...Flatten<{ [P in string | number | symbol]: TQueries[P] extends Query ? Instructions : never }>[]], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:635](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L635) #### Type Parameters[​](#type-parameters-7 "Direct link to Type Parameters") | Type Parameter | | ------------------------------------------------------------------------- | | `TQueries` *extends* `Query`<`QueryInstruction`\[], `ChainDefinition`>\[] | #### Parameters[​](#parameters-7 "Direct link to Parameters") | Parameter | Type | | ------------ | ---------- | | ...`queries` | `TQueries` | #### Returns[​](#returns-8 "Direct link to Returns") `Query`<\[`...TInstructions[]`, ...Flatten<{ \[P in string | number | symbol]: TQueries\[P] extends Query\ ? Instructions : never }>\[]], `TDescriptor`> *** ### constant()[​](#constant "Direct link to constant()") ``` constant( pallet, constant, options?): Query<[...TInstructions[], { constant: TConstant; directives: { defer: NoInfer; }; pallet: TPallet; type: "constant"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:283](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L283) #### Type Parameters[​](#type-parameters-8 "Direct link to Type Parameters") | Type Parameter | Default type | | ------------------------------ | ------------ | | `TPallet` *extends* `string` | - | | `TConstant` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-8 "Direct link to Parameters") | Parameter | Type | | ---------------- | ----------------------- | | `pallet` | `TPallet` | | `constant` | `TConstant` | | `options?` | { `defer?`: `TDefer`; } | | `options.defer?` | `TDefer` | #### Returns[​](#returns-9 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `constant`: `TConstant`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `pallet`: `TPallet`; `type`: `"constant"`; }], `TDescriptor`> *** ### contract()[​](#contract "Direct link to contract()") #### Call Signature[​](#call-signature "Direct link to Call Signature") ``` contract( contract, address, builder, options?): Query<[...TInstructions[], { address: Address; contract: InkContract; directives: { defer: NoInfer; }; instructions: TContractInstructions; type: "contract"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:463](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L463) ##### Type Parameters[​](#type-parameters-9 "Direct link to Type Parameters") | Type Parameter | Default type | | ---------------------------------------------------------- | ------------ | | `TContractDescriptor` *extends* `GenericInkDescriptors` | - | | `TContractInstructions` *extends* `InkQueryInstruction`\[] | - | | `TDefer` *extends* `boolean` | `false` | ##### Parameters[​](#parameters-9 "Direct link to Parameters") | Parameter | Type | | ---------------- | ----------------------------------------------------------------------- | | `contract` | `InkContract`<`TContractDescriptor`> | | `address` | [`Address`](/react/api/core/index/type-aliases/Address.md) | | `builder` | (`query`) => `InkQuery`<`TContractDescriptor`, `TContractInstructions`> | | `options?` | { `defer?`: `TDefer`; } | | `options.defer?` | `TDefer` | ##### Returns[​](#returns-10 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `address`: [`Address`](/react/api/core/index/type-aliases/Address.md); `contract`: `InkContract`<`TContractDescriptor`>; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `instructions`: `TContractInstructions`; `type`: `"contract"`; }], `TDescriptor`> #### Call Signature[​](#call-signature-1 "Direct link to Call Signature") ``` contract( contract, address, builder, options?): Query<[...TInstructions[], { address: Address; contract: SolidityContract; directives: { defer: NoInfer; }; instructions: TContractInstructions; type: "contract"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:489](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L489) ##### Type Parameters[​](#type-parameters-10 "Direct link to Type Parameters") | Type Parameter | Default type | | --------------------------------------------------------------- | ------------ | | `TAbi` *extends* `Abi` | - | | `TContractInstructions` *extends* `SolidityQueryInstruction`\[] | - | | `TDefer` *extends* `boolean` | `false` | ##### Parameters[​](#parameters-10 "Direct link to Parameters") | Parameter | Type | | ---------------- | ------------------------------------------------------------- | | `contract` | `SolidityContract`<`TAbi`> | | `address` | [`Address`](/react/api/core/index/type-aliases/Address.md) | | `builder` | (`query`) => `SolidityQuery`<`TAbi`, `TContractInstructions`> | | `options?` | { `defer?`: `TDefer`; } | | `options.defer?` | `TDefer` | ##### Returns[​](#returns-11 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `address`: [`Address`](/react/api/core/index/type-aliases/Address.md); `contract`: `SolidityContract`<`TAbi`>; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `instructions`: `TContractInstructions`; `type`: `"contract"`; }], `TDescriptor`> *** ### contracts()[​](#contracts "Direct link to contracts()") #### Call Signature[​](#call-signature-2 "Direct link to Call Signature") ``` contracts( contract, addresses, builder, options?): Query<[...TInstructions[], { addresses: Address[]; contract: InkContract; directives: { defer: NoInfer; stream: NoInfer; }; instructions: TContractInstructions; multi: true; type: "contract"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:539](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L539) ##### Type Parameters[​](#type-parameters-11 "Direct link to Type Parameters") | Type Parameter | Default type | | ---------------------------------------------------------- | ------------ | | `TContractDescriptor` *extends* `GenericInkDescriptors` | - | | `TContractInstructions` *extends* `InkQueryInstruction`\[] | - | | `TDefer` *extends* `boolean` | `false` | | `TStream` *extends* `boolean` | `false` | ##### Parameters[​](#parameters-11 "Direct link to Parameters") | Parameter | Type | | ----------------- | ----------------------------------------------------------------------- | | `contract` | `InkContract`<`TContractDescriptor`> | | `addresses` | [`Address`](/react/api/core/index/type-aliases/Address.md)\[] | | `builder` | (`query`) => `InkQuery`<`TContractDescriptor`, `TContractInstructions`> | | `options?` | { `defer?`: `TDefer`; `stream?`: `TStream`; } | | `options.defer?` | `TDefer` | | `options.stream?` | `TStream` | ##### Returns[​](#returns-12 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `addresses`: [`Address`](/react/api/core/index/type-aliases/Address.md)\[]; `contract`: `InkContract`<`TContractDescriptor`>; `directives`: { `defer`: `NoInfer`<`TDefer`>; `stream`: `NoInfer`<`TStream`>; }; `instructions`: `TContractInstructions`; `multi`: `true`; `type`: `"contract"`; }], `TDescriptor`> #### Call Signature[​](#call-signature-3 "Direct link to Call Signature") ``` contracts( contract, addresses, builder, options?): Query<[...TInstructions[], { addresses: Address[]; contract: SolidityContract; directives: { defer: NoInfer; stream: NoInfer; }; instructions: TContractInstructions; multi: true; type: "contract"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:571](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L571) ##### Type Parameters[​](#type-parameters-12 "Direct link to Type Parameters") | Type Parameter | Default type | | --------------------------------------------------------------- | ------------ | | `TAbi` *extends* `Abi` | - | | `TContractInstructions` *extends* `SolidityQueryInstruction`\[] | - | | `TDefer` *extends* `boolean` | `false` | | `TStream` *extends* `boolean` | `false` | ##### Parameters[​](#parameters-12 "Direct link to Parameters") | Parameter | Type | | ----------------- | ------------------------------------------------------------- | | `contract` | `SolidityContract`<`TAbi`> | | `addresses` | [`Address`](/react/api/core/index/type-aliases/Address.md)\[] | | `builder` | (`query`) => `SolidityQuery`<`TAbi`, `TContractInstructions`> | | `options?` | { `defer?`: `TDefer`; `stream?`: `TStream`; } | | `options.defer?` | `TDefer` | | `options.stream?` | `TStream` | ##### Returns[​](#returns-13 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `addresses`: [`Address`](/react/api/core/index/type-aliases/Address.md)\[]; `contract`: `SolidityContract`<`TAbi`>; `directives`: { `defer`: `NoInfer`<`TDefer`>; `stream`: `NoInfer`<`TStream`>; }; `instructions`: `TContractInstructions`; `multi`: `true`; `type`: `"contract"`; }], `TDescriptor`> *** ### runtimeApi()[​](#runtimeapi "Direct link to runtimeApi()") ``` runtimeApi( api, method, ... __namedParameters): Query<[...TInstructions[], { api: TApi; args: [unknown] | never[]; at: Finality | undefined; directives: { defer: NoInfer; }; method: TMethod; type: "runtime-api"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:399](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L399) #### Type Parameters[​](#type-parameters-13 "Direct link to Type Parameters") | Type Parameter | Default type | | ---------------------------- | ------------ | | `TApi` *extends* `string` | - | | `TMethod` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-13 "Direct link to Parameters") | Parameter | Type | | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `api` | `TApi` | | `method` | `TMethod` | | ...`__namedParameters` | `InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<`TDescriptor`\[`"descriptors"`]\[`"apis"`]>>\[`TApi`]\[`TMethod`]>\[`"args"`] *extends* \[] ? \[`any`\[`any`], `object`] : \[`InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<`TDescriptor`\[`"descriptors"`]\[`"apis"`]>>\[`TApi`]\[`TMethod`]>\[`"args"`], `object`] | #### Returns[​](#returns-14 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `api`: `TApi`; `args`: \[`unknown`] | `never`\[]; `at`: `Finality` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `method`: `TMethod`; `type`: `"runtime-api"`; }], `TDescriptor`> *** ### runtimeApis()[​](#runtimeapis "Direct link to runtimeApis()") ``` runtimeApis( api, method, args, options?): Query<[...TInstructions[], { api: TApi; args: InferPapiRuntimeCall>[TApi][TMethod]>["args"][]; at: Finality | undefined; directives: { defer: NoInfer; stream: NoInfer; }; method: TMethod; multi: true; type: "runtime-api"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:433](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L433) #### Type Parameters[​](#type-parameters-14 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TApi` *extends* `string` | - | | `TMethod` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | | `TStream` *extends* `boolean` | `false` | #### Parameters[​](#parameters-14 "Direct link to Parameters") | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `api` | `TApi` | | `method` | `TMethod` | | `args` | `InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<`TDescriptor`\[`"descriptors"`]\[`"apis"`]>>\[`TApi`]\[`TMethod`]>\[`"args"`]\[] | | `options?` | { `at?`: `Finality`; `defer?`: `TDefer`; `stream?`: `TStream`; } | | `options.at?` | `Finality` | | `options.defer?` | `TDefer` | | `options.stream?` | `TStream` | #### Returns[​](#returns-15 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `api`: `TApi`; `args`: `InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<...\[...]>>\[`TApi`]\[`TMethod`]>\[`"args"`]\[]; `at`: `Finality` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; `stream`: `NoInfer`<`TStream`>; }; `method`: `TMethod`; `multi`: `true`; `type`: `"runtime-api"`; }], `TDescriptor`> *** ### storage()[​](#storage "Direct link to storage()") ``` storage( pallet, storage, ... __namedParameters): Query<[...TInstructions[], { at: At | undefined; directives: { defer: NoInfer; }; keys: any[]; pallet: TPallet; storage: TStorage; type: "storage"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:303](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L303) #### Type Parameters[​](#type-parameters-15 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TPallet` *extends* `string` | - | | `TStorage` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-15 "Direct link to Parameters") | Parameter | Type | | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `pallet` | `TPallet` | | `storage` | `TStorage` | | ...`__namedParameters` | `InferPapiStorageEntry`<`StorageApi`<`ExtractStorage`<`TDescriptor`\[`"descriptors"`]\[`"pallets"`]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`] *extends* \[] ? \[`any`\[`any`], `object`] : \[`InferPapiStorageEntry`<`StorageApi`<`ExtractStorage`<...\[...]\[`"pallets"`]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`], `object`] | #### Returns[​](#returns-16 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `at`: `At` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `keys`: `any`\[]; `pallet`: `TPallet`; `storage`: `TStorage`; `type`: `"storage"`; }], `TDescriptor`> *** ### storageEntries()[​](#storageentries "Direct link to storageEntries()") ``` storageEntries( pallet, storage, args?, options?): Query<[...TInstructions[], { args: unknown[]; at: At | undefined; directives: { defer: NoInfer; }; pallet: TPallet; storage: TStorage; type: "storage-entries"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:372](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L372) #### Type Parameters[​](#type-parameters-16 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TPallet` *extends* `string` | - | | `TStorage` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-16 "Direct link to Parameters") | Parameter | Type | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `pallet` | `TPallet` | | `storage` | `TStorage` | | `args?` | `InferPapiStorageEntries`<`StorageApi`<`ExtractStorage`<`TDescriptor`\[`"descriptors"`]\[`"pallets"`]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`] | | `options?` | { `at?`: `At`; `defer?`: `TDefer`; } | | `options.at?` | `At` | | `options.defer?` | `TDefer` | #### Returns[​](#returns-17 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `args`: `unknown`\[]; `at`: `At` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `pallet`: `TPallet`; `storage`: `TStorage`; `type`: `"storage-entries"`; }], `TDescriptor`> *** ### storages()[​](#storages "Direct link to storages()") ``` storages( pallet, storage, keys, options?): Query<[...TInstructions[], { at: At | undefined; directives: { defer: NoInfer; stream: NoInfer; }; keys: NoInfer>[TPallet][TStorage]>["args"][]>; multi: true; pallet: TPallet; storage: TStorage; type: "storage"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:339](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L339) #### Type Parameters[​](#type-parameters-17 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TPallet` *extends* `string` | - | | `TStorage` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | | `TStream` *extends* `boolean` | `false` | #### Parameters[​](#parameters-17 "Direct link to Parameters") | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `pallet` | `TPallet` | | `storage` | `TStorage` | | `keys` | `InferPapiStorageEntry`<`StorageApi`<`ExtractStorage`<`TDescriptor`\[`"descriptors"`]\[`"pallets"`]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`]\[] | | `options?` | { `at?`: `At`; `defer?`: `TDefer`; `stream?`: `TStream`; } | | `options.at?` | `At` | | `options.defer?` | `TDefer` | | `options.stream?` | `TStream` | #### Returns[​](#returns-18 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `at`: `At` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; `stream`: `NoInfer`<`TStream`>; }; `keys`: `NoInfer`<`InferPapiStorageEntry`<`StorageApi`<`ExtractStorage`<...>>\[`TPallet`]\[`TStorage`]>\[`"args"`]\[]>; `multi`: `true`; `pallet`: `TPallet`; `storage`: `TStorage`; `type`: `"storage"`; }], `TDescriptor`> --- # QueryError Defined in: [packages/core/src/errors.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/errors.ts#L9) ## Extends[​](#extends "Direct link to Extends") * [`BaseError`](/react/api/core/index/classes/BaseError.md) ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new QueryError(message?): QueryError; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1080 #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | -------- | | `message?` | `string` | #### Returns[​](#returns "Direct link to Returns") `QueryError` #### Inherited from[​](#inherited-from "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`constructor`](/react/api/core/index/classes/BaseError.md#constructor) ### Constructor[​](#constructor-1 "Direct link to Constructor") ``` new QueryError(message?, options?): QueryError; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1080 #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | ---------- | -------------- | | `message?` | `string` | | `options?` | `ErrorOptions` | #### Returns[​](#returns-1 "Direct link to Returns") `QueryError` #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`constructor`](/react/api/core/index/classes/BaseError.md#constructor) ## Properties[​](#properties "Direct link to Properties") ### cause?[​](#cause "Direct link to cause?") ``` optional cause?: unknown; ``` Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24 #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`cause`](/react/api/core/index/classes/BaseError.md#cause) *** ### message[​](#message "Direct link to message") ``` message: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1075 #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`message`](/react/api/core/index/classes/BaseError.md#message) *** ### name[​](#name "Direct link to name") ``` name: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1074 #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`name`](/react/api/core/index/classes/BaseError.md#name) *** ### stack?[​](#stack "Direct link to stack?") ``` optional stack?: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`stack`](/react/api/core/index/classes/BaseError.md#stack) ## Methods[​](#methods "Direct link to Methods") ### from()[​](#from "Direct link to from()") ``` static from(error, message?): BaseError; ``` Defined in: [packages/core/src/errors.ts:2](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/errors.ts#L2) #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------- | | `T` | #### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | ---------- | -------- | | `error` | `T` | | `message?` | `string` | #### Returns[​](#returns-2 "Direct link to Returns") [`BaseError`](/react/api/core/index/classes/BaseError.md) #### Inherited from[​](#inherited-from-6 "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`from`](/react/api/core/index/classes/BaseError.md#from) *** ### isError()[​](#iserror "Direct link to isError()") ``` static isError(error): error is Error; ``` Defined in: node\_modules/typescript/lib/lib.esnext.error.d.ts:21 Indicates whether the argument provided is a built-in Error instance or not. #### Parameters[​](#parameters-3 "Direct link to Parameters") | Parameter | Type | | --------- | --------- | | `error` | `unknown` | #### Returns[​](#returns-3 "Direct link to Returns") `error is Error` #### Inherited from[​](#inherited-from-7 "Direct link to Inherited from") [`BaseError`](/react/api/core/index/classes/BaseError.md).[`isError`](/react/api/core/index/classes/BaseError.md#iserror) --- # Storage\ Defined in: [packages/core/src/storage.ts:8](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/storage.ts#L8) ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | ------------------------- | ------------ | | `TKey` *extends* `string` | `string` | ## Implements[​](#implements "Direct link to Implements") * `SimpleStorage` ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new Storage(options): Storage; ``` Defined in: [packages/core/src/storage.ts:13](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/storage.ts#L13) #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | --------- | ---------------- | | `options` | `StorageOptions` | #### Returns[​](#returns "Direct link to Returns") `Storage`<`TKey`> ## Properties[​](#properties "Direct link to Properties") ### prefix[​](#prefix "Direct link to prefix") ``` readonly prefix: string; ``` Defined in: [packages/core/src/storage.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/storage.ts#L9) ## Methods[​](#methods "Direct link to Methods") ### getItem()[​](#getitem "Direct link to getItem()") ``` getItem(key): string | null; ``` Defined in: [packages/core/src/storage.ts:18](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/storage.ts#L18) The **`getItem()`** method of the Storage interface, when passed a key name, will return that key's value, or null if the key does not exist, in the given Storage object. [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/getItem) #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | --------- | ------ | | `key` | `TKey` | #### Returns[​](#returns-1 "Direct link to Returns") `string` | `null` #### Implementation of[​](#implementation-of "Direct link to Implementation of") ``` SimpleStorage.getItem ``` *** ### join()[​](#join "Direct link to join()") ``` join(path): Storage; ``` Defined in: [packages/core/src/storage.ts:30](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/storage.ts#L30) #### Type Parameters[​](#type-parameters-1 "Direct link to Type Parameters") | Type Parameter | Default type | | ------------------------------------------- | ------------ | | `TKeyOverride` *extends* `string` \| `void` | `void` | #### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | --------- | -------- | | `path` | `string` | #### Returns[​](#returns-2 "Direct link to Returns") `Storage`<`TKeyOverride` *extends* `void` ? `TKey` : `TKeyOverride`> *** ### removeItem()[​](#removeitem "Direct link to removeItem()") ``` removeItem(key): void; ``` Defined in: [packages/core/src/storage.ts:22](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/storage.ts#L22) The **`removeItem()`** method of the Storage interface, when passed a key name, will remove that key from the given Storage object if it exists. The Storage interface of the Web Storage API provides access to a particular domain's session or local storage. [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/removeItem) #### Parameters[​](#parameters-3 "Direct link to Parameters") | Parameter | Type | | --------- | ------ | | `key` | `TKey` | #### Returns[​](#returns-3 "Direct link to Returns") `void` #### Implementation of[​](#implementation-of-1 "Direct link to Implementation of") ``` SimpleStorage.removeItem ``` *** ### setItem()[​](#setitem "Direct link to setItem()") ``` setItem(key, value): void; ``` Defined in: [packages/core/src/storage.ts:26](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/storage.ts#L26) The **`setItem()`** method of the Storage interface, when passed a key name and value, will add that key to the given Storage object, or update that key's value if it already exists. [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/setItem) #### Parameters[​](#parameters-4 "Direct link to Parameters") | Parameter | Type | | --------- | -------- | | `key` | `TKey` | | `value` | `string` | #### Returns[​](#returns-4 "Direct link to Returns") `void` #### Implementation of[​](#implementation-of-2 "Direct link to Implementation of") ``` SimpleStorage.setItem ``` --- # defineConfig() ``` function defineConfig(config): Config; ``` Defined in: [packages/core/src/config.ts:36](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L36) ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | ---------------------------------------------------------------------------------------------------------------------- | | `TChains` *extends* `Readonly`<`Record`<`string`, [`ChainConfig`](/react/api/core/index/type-aliases/ChainConfig.md)>> | | `TTargetChainIds` *extends* `Extract`\\[] | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | --------- | -------------------------------------------------------------------------------------- | | `config` | [`Config`](/react/api/core/index/type-aliases/Config.md)<`TChains`, `TTargetChainIds`> | ## Returns[​](#returns "Direct link to Returns") [`Config`](/react/api/core/index/type-aliases/Config.md)<`TChains`, `TTargetChainIds`> --- # ~~defineContract()~~ ## Call Signature[​](#call-signature "Direct link to Call Signature") ``` function defineContract(config): InkContract; ``` Defined in: [packages/core/src/contract/contract.ts:25](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/contract/contract.ts#L25) ### Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | ------------------------------------- | | `T` *extends* `GenericInkDescriptors` | ### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ------------------- | --------------------------------------- | | `config` | { `descriptor`: `T`; `id?`: `string`; } | | `config.descriptor` | `T` | | `config.id?` | `string` | ### Returns[​](#returns "Direct link to Returns") `InkContract`<`T`> ### Deprecated[​](#deprecated "Direct link to Deprecated") Specify the contract type explicitly ## Call Signature[​](#call-signature-1 "Direct link to Call Signature") ``` function defineContract(config): InkContract; ``` Defined in: [packages/core/src/contract/contract.ts:29](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/contract/contract.ts#L29) ### Type Parameters[​](#type-parameters-1 "Direct link to Type Parameters") | Type Parameter | | ------------------------------------- | | `T` *extends* `GenericInkDescriptors` | ### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | ------------------- | -------------------------------------------------------- | | `config` | { `descriptor`: `T`; `id?`: `string`; `type`: `"ink"`; } | | `config.descriptor` | `T` | | `config.id?` | `string` | | `config.type` | `"ink"` | ### Returns[​](#returns-1 "Direct link to Returns") `InkContract`<`T`> ### Deprecated[​](#deprecated-1 "Direct link to Deprecated") Specify the contract type explicitly ## Call Signature[​](#call-signature-2 "Direct link to Call Signature") ``` function defineContract(config): SolidityContract; ``` Defined in: [packages/core/src/contract/contract.ts:34](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/contract/contract.ts#L34) ### Type Parameters[​](#type-parameters-2 "Direct link to Type Parameters") | Type Parameter | | ------------------- | | `T` *extends* `Abi` | ### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | ------------- | ------------------------------------------------------ | | `config` | { `abi`: `T`; `id?`: `string`; `type`: `"solidity"`; } | | `config.abi` | `T` | | `config.id?` | `string` | | `config.type` | `"solidity"` | ### Returns[​](#returns-2 "Direct link to Returns") `SolidityContract`<`T`> ### Deprecated[​](#deprecated-2 "Direct link to Deprecated") Specify the contract type explicitly --- # unsafeDescriptor() ``` function unsafeDescriptor(): UnsafeDescriptor; ``` Defined in: [packages/core/src/unsafe-descriptor.ts:23](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/unsafe-descriptor.ts#L23) **`Experimental`** Create an unsafe chain descriptor for use in [ChainConfig](/react/api/core/index/type-aliases/ChainConfig.md). This descriptor will only be used for type checking and will not be used at runtime to create a Polkadot-API client. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Description | | ------------------------------- | ------------------------- | | `T` *extends* `ChainDefinition` | The chain definition type | ## Returns[​](#returns "Direct link to Returns") `UnsafeDescriptor`<`T`> A descriptor that will only be used for type checking --- # whenAccountsChanged() ``` function whenAccountsChanged(config, options?): Observable; ``` Defined in: [packages/core/src/apis/when-accounts-changed.ts:17](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/apis/when-accounts-changed.ts#L17) Subscribe to accounts changes. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | ---------------------------------------------------------------------------- | | `TConfig` *extends* [`Config`](/react/api/core/index/type-aliases/Config.md) | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | -------------------- | ------------------------------------------------------------------------------------------ | ------------------ | | `config` | `TConfig` | The configuration | | `options?` | { `chainId?`: keyof `TConfig`\[`"chains"`]; `chainSpec?`: `MaybeAsync`<`ChainSpecData`>; } | Additional options | | `options.chainId?` | keyof `TConfig`\[`"chains"`] | - | | `options.chainSpec?` | `MaybeAsync`<`ChainSpecData`> | - | ## Returns[​](#returns "Direct link to Returns") `Observable`<[`WalletAccount`](/react/api/core/wallets/type-aliases/WalletAccount.md)\[]> The currently connected accounts observable --- # whenClientChanged() ``` function whenClientChanged(config, options): Observable; ``` Defined in: [packages/core/src/apis/when-client-changed.ts:13](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/apis/when-client-changed.ts#L13) Subscribe to client changes. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | ---------------------------------------------------------------------------- | | `TConfig` *extends* [`Config`](/react/api/core/index/type-aliases/Config.md) | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ----------------- | -------------------------------------------- | ------------------ | | `config` | `TConfig` | The configuration | | `options` | { `chainId`: keyof `TConfig`\[`"chains"`]; } | Additional options | | `options.chainId` | keyof `TConfig`\[`"chains"`] | - | ## Returns[​](#returns "Direct link to Returns") `Observable`<`PolkadotClient`> The currently configured client observable --- # whenConnectedWalletsChanged() ``` function whenConnectedWalletsChanged(config): Observable[]>; ``` Defined in: [packages/core/src/apis/when-connected-wallets-changed.ts:12](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/apis/when-connected-wallets-changed.ts#L12) Subscribe to connected wallets changes. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | --------- | -------------------------------------------------------- | ----------------- | | `config` | [`Config`](/react/api/core/index/type-aliases/Config.md) | The configuration | ## Returns[​](#returns "Direct link to Returns") `Observable`<[`Wallet`](/react/api/core/wallets/classes/Wallet.md)<[`WalletOptions`](/react/api/core/wallets/type-aliases/WalletOptions.md), `string`>\[]> The currently connected wallets observable --- # whenWalletsChanged() ``` function whenWalletsChanged(config): Observable[]>; ``` Defined in: [packages/core/src/apis/when-wallets-changed.ts:11](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/apis/when-wallets-changed.ts#L11) Subscribe to available wallets changes. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | --------- | -------------------------------------------------------- | ----------------- | | `config` | [`Config`](/react/api/core/index/type-aliases/Config.md) | The configuration | ## Returns[​](#returns "Direct link to Returns") `Observable`<[`Wallet`](/react/api/core/wallets/classes/Wallet.md)<[`WalletOptions`](/react/api/core/wallets/type-aliases/WalletOptions.md), `string`>\[]> The currently available wallets observable --- # Register Defined in: [packages/core/src/register.ts:4](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/register.ts#L4) --- # Address ``` type Address = SS58String | `0x${string}`; ``` Defined in: [packages/core/src/address.ts:4](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/address.ts#L4) --- # AsyncValue\ ``` type AsyncValue = | typeof idle | typeof pending | TError | TResult; ``` Defined in: [packages/core/src/async-state.ts:3](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/async-state.ts#L3) ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------- | ------------ | | `TResult` | - | | `TError` *extends* `Error` | `Error` | --- # ChainConfig ``` type ChainConfig = object; ``` Defined in: [packages/core/src/config.ts:8](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L8) ## Properties[​](#properties "Direct link to Properties") ### descriptor[​](#descriptor "Direct link to descriptor") ``` readonly descriptor: ChainDefinition | UnsafeDescriptor; ``` Defined in: [packages/core/src/config.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L9) *** ### provider[​](#provider "Direct link to provider") ``` readonly provider: Gettable; ``` Defined in: [packages/core/src/config.ts:10](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L10) --- # ChainId ``` type ChainId = keyof Chains; ``` Defined in: [packages/core/src/chains.ts:15](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/chains.ts#L15) --- # Config\ ``` type Config = object; ``` Defined in: [packages/core/src/config.ts:13](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L13) ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `TChains` *extends* `Readonly`<`Record`<`string`, [`ChainConfig`](/react/api/core/index/type-aliases/ChainConfig.md)>> | `Readonly`<`Record`<`string`, [`ChainConfig`](/react/api/core/index/type-aliases/ChainConfig.md)>> | | `TTargetChainIds` *extends* `Extract`\\[] | `Extract`\\[] | ## Properties[​](#properties "Direct link to Properties") ### chains[​](#chains "Direct link to chains") ``` readonly chains: TChains; ``` Defined in: [packages/core/src/config.ts:17](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L17) *** ### includeEvmAccounts?[​](#includeevmaccounts "Direct link to includeEvmAccounts?") ``` readonly optional includeEvmAccounts?: boolean; ``` Defined in: [packages/core/src/config.ts:26](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L26) Include EVM accounts from wallets. When `false`, EVM accounts will be filtered out #### Default Value[​](#default-value "Direct link to Default Value") ``` false ``` *** ### ssr?[​](#ssr "Direct link to ssr?") ``` readonly optional ssr?: boolean; ``` Defined in: [packages/core/src/config.ts:33](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L33) **`Experimental`** Enable SSR support & optimizations #### Default Value[​](#default-value-1 "Direct link to Default Value") ``` false ``` *** ### targetChains?[​](#targetchains "Direct link to targetChains?") ``` readonly optional targetChains?: TTargetChainIds; ``` Defined in: [packages/core/src/config.ts:18](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L18) *** ### wallets?[​](#wallets "Direct link to wallets?") ``` readonly optional wallets?: ( | WalletProvider | Wallet)[]; ``` Defined in: [packages/core/src/config.ts:19](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L19) --- # idle ``` const idle: typeof idle; ``` Defined in: [packages/core/src/symbols.ts:1](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/symbols.ts#L1) --- # pending ``` const pending: typeof pending; ``` Defined in: [packages/core/src/symbols.ts:3](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/symbols.ts#L3) --- # ~~ReactiveDotError~~ ``` const ReactiveDotError: typeof BaseError = BaseError; ``` Defined in: [packages/core/src/errors.ts:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/errors.ts#L16) ## Deprecated[​](#deprecated "Direct link to Deprecated") Renamed to [BaseError](/react/api/core/index/classes/BaseError.md). --- # providers/light-client ## Functions[​](#functions "Direct link to Functions") | Function | Description | | ---------------------------------------------------------------------------------------------------------- | ----------- | | [createLightClientProvider](/react/api/core/providers/light-client/functions/createLightClientProvider.md) | - | --- # createLightClientProvider() ``` function createLightClientProvider(__namedParameters?): RootLightClientProvider; ``` Defined in: [packages/core/src/providers/light-client/provider.ts:43](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/providers/light-client/provider.ts#L43) ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ------------------- | -------------------- | | `__namedParameters` | `LightClientOptions` | ## Returns[​](#returns "Direct link to Returns") `RootLightClientProvider` --- # wallets ## Classes[​](#classes "Direct link to Classes") | Class | Description | | ----------------------------------------------------------------------------------- | ----------- | | [DeepLinkWallet](/react/api/core/wallets/classes/DeepLinkWallet.md) | - | | [InjectedWallet](/react/api/core/wallets/classes/InjectedWallet.md) | - | | [InjectedWalletProvider](/react/api/core/wallets/classes/InjectedWalletProvider.md) | - | | [LocalWallet](/react/api/core/wallets/classes/LocalWallet.md) | - | | [Wallet](/react/api/core/wallets/classes/Wallet.md) | - | | [WalletProvider](/react/api/core/wallets/classes/WalletProvider.md) | - | ## Type Aliases[​](#type-aliases "Direct link to Type Aliases") | Type Alias | Description | | -------------------------------------------------------------------------------------- | ----------- | | [PolkadotAccount](/react/api/core/wallets/type-aliases/PolkadotAccount.md) | - | | [PolkadotSignerAccount](/react/api/core/wallets/type-aliases/PolkadotSignerAccount.md) | - | | [WalletAccount](/react/api/core/wallets/type-aliases/WalletAccount.md) | - | | [WalletOptions](/react/api/core/wallets/type-aliases/WalletOptions.md) | - | ## Functions[​](#functions "Direct link to Functions") | Function | Description | | --------------------------------------------------------------------------- | ----------- | | [initializeWallets](/react/api/core/wallets/functions/initializeWallets.md) | - | --- # DeepLinkWallet\ Defined in: [packages/core/src/wallets/deep-link-wallet.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/deep-link-wallet.ts#L9) ## Extends[​](#extends "Direct link to Extends") * [`Wallet`](/react/api/core/wallets/classes/Wallet.md)<`TOptions`, `TStorageKey`> ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | | `TOptions` *extends* [`WalletOptions`](/react/api/core/wallets/type-aliases/WalletOptions.md) | [`WalletOptions`](/react/api/core/wallets/type-aliases/WalletOptions.md) | | `TStorageKey` *extends* `string` | `string` | ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new DeepLinkWallet(options?): DeepLinkWallet; ``` Defined in: [packages/core/src/wallets/wallet.ts:24](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L24) #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | ---------- | | `options?` | `TOptions` | #### Returns[​](#returns "Direct link to Returns") `DeepLinkWallet`<`TOptions`, `TStorageKey`> #### Inherited from[​](#inherited-from "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`constructor`](/react/api/core/wallets/classes/Wallet.md#constructor) ## Properties[​](#properties "Direct link to Properties") ### accounts$[​](#accounts "Direct link to accounts$") ``` abstract readonly accounts$: Observable; ``` Defined in: [packages/core/src/wallets/wallet.ts:36](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L36) #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`accounts$`](/react/api/core/wallets/classes/Wallet.md#accounts) *** ### connected$[​](#connected "Direct link to connected$") ``` abstract readonly connected$: Observable; ``` Defined in: [packages/core/src/wallets/wallet.ts:30](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L30) #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`connected$`](/react/api/core/wallets/classes/Wallet.md#connected) *** ### id[​](#id "Direct link to id") ``` abstract readonly id: string; ``` Defined in: [packages/core/src/wallets/wallet.ts:14](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L14) #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`id`](/react/api/core/wallets/classes/Wallet.md#id) *** ### name[​](#name "Direct link to name") ``` abstract readonly name: string; ``` Defined in: [packages/core/src/wallets/wallet.ts:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L16) #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`name`](/react/api/core/wallets/classes/Wallet.md#name) *** ### options?[​](#options "Direct link to options?") ``` protected readonly optional options?: TOptions; ``` Defined in: [packages/core/src/wallets/wallet.ts:24](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L24) #### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`options`](/react/api/core/wallets/classes/Wallet.md#options) ## Accessors[​](#accessors "Direct link to Accessors") ### storage[​](#storage "Direct link to storage") #### Get Signature[​](#get-signature "Direct link to Get Signature") ``` get protected storage(): Storage; ``` Defined in: [packages/core/src/wallets/wallet.ts:20](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L20) ##### Returns[​](#returns-1 "Direct link to Returns") [`Storage`](/react/api/core/index/classes/Storage.md)<`TStorageKey` *extends* `void` ? `string` : `TStorageKey`> #### Inherited from[​](#inherited-from-6 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`storage`](/react/api/core/wallets/classes/Wallet.md#storage) ## Methods[​](#methods "Direct link to Methods") ### connect()[​](#connect "Direct link to connect()") ``` abstract connect(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:32](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L32) #### Returns[​](#returns-2 "Direct link to Returns") `MaybePromise`<`void`> #### Inherited from[​](#inherited-from-7 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`connect`](/react/api/core/wallets/classes/Wallet.md#connect) *** ### disconnect()[​](#disconnect "Direct link to disconnect()") ``` abstract disconnect(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:34](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L34) #### Returns[​](#returns-3 "Direct link to Returns") `MaybePromise`<`void`> #### Inherited from[​](#inherited-from-8 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`disconnect`](/react/api/core/wallets/classes/Wallet.md#disconnect) *** ### getAccounts()[​](#getaccounts "Direct link to getAccounts()") ``` getAccounts(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:38](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L38) #### Returns[​](#returns-4 "Direct link to Returns") `MaybePromise`<[`PolkadotSignerAccount`](/react/api/core/wallets/type-aliases/PolkadotSignerAccount.md)\[]> #### Inherited from[​](#inherited-from-9 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`getAccounts`](/react/api/core/wallets/classes/Wallet.md#getaccounts) *** ### initialize()[​](#initialize "Direct link to initialize()") ``` abstract initialize(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:28](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L28) #### Returns[​](#returns-5 "Direct link to Returns") `MaybePromise`<`void`> #### Inherited from[​](#inherited-from-10 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`initialize`](/react/api/core/wallets/classes/Wallet.md#initialize) *** ### initiateConnectionHandshake()[​](#initiateconnectionhandshake "Direct link to initiateConnectionHandshake()") ``` abstract initiateConnectionHandshake(): MaybePromise; ``` Defined in: [packages/core/src/wallets/deep-link-wallet.ts:13](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/deep-link-wallet.ts#L13) #### Returns[​](#returns-6 "Direct link to Returns") `MaybePromise`<`ConnectionHandshake`> --- # InjectedWallet Defined in: [packages/core/src/wallets/injected/wallet.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L9) ## Extends[​](#extends "Direct link to Extends") * [`Wallet`](/react/api/core/wallets/classes/Wallet.md)<`InjectedWalletOptions`, `"connected"`> ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new InjectedWallet(name, options?): InjectedWallet; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L16) #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | ----------------------- | | `name` | `string` | | `options?` | `InjectedWalletOptions` | #### Returns[​](#returns "Direct link to Returns") `InjectedWallet` #### Overrides[​](#overrides "Direct link to Overrides") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`constructor`](/react/api/core/wallets/classes/Wallet.md#constructor) ## Properties[​](#properties "Direct link to Properties") ### accounts$[​](#accounts "Direct link to accounts$") ``` readonly accounts$: Observable; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:51](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L51) #### Overrides[​](#overrides-1 "Direct link to Overrides") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`accounts$`](/react/api/core/wallets/classes/Wallet.md#accounts) *** ### connected$[​](#connected "Direct link to connected$") ``` readonly connected$: Observable; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:34](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L34) #### Overrides[​](#overrides-2 "Direct link to Overrides") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`connected$`](/react/api/core/wallets/classes/Wallet.md#connected) *** ### name[​](#name "Direct link to name") ``` readonly name: string; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:17](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L17) #### Inherited from[​](#inherited-from "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`name`](/react/api/core/wallets/classes/Wallet.md#name) *** ### options?[​](#options "Direct link to options?") ``` protected readonly optional options?: InjectedWalletOptions; ``` Defined in: [packages/core/src/wallets/wallet.ts:24](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L24) #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`options`](/react/api/core/wallets/classes/Wallet.md#options) ## Accessors[​](#accessors "Direct link to Accessors") ### id[​](#id "Direct link to id") #### Get Signature[​](#get-signature "Direct link to Get Signature") ``` get id(): string; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:12](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L12) ##### Returns[​](#returns-1 "Direct link to Returns") `string` #### Overrides[​](#overrides-3 "Direct link to Overrides") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`id`](/react/api/core/wallets/classes/Wallet.md#id) *** ### storage[​](#storage "Direct link to storage") #### Get Signature[​](#get-signature-1 "Direct link to Get Signature") ``` get protected storage(): Storage; ``` Defined in: [packages/core/src/wallets/wallet.ts:20](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L20) ##### Returns[​](#returns-2 "Direct link to Returns") [`Storage`](/react/api/core/index/classes/Storage.md)<`TStorageKey` *extends* `void` ? `string` : `TStorageKey`> #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`storage`](/react/api/core/wallets/classes/Wallet.md#storage) ## Methods[​](#methods "Direct link to Methods") ### connect()[​](#connect "Direct link to connect()") ``` connect(): Promise; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:36](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L36) #### Returns[​](#returns-3 "Direct link to Returns") `Promise`<`void`> #### Overrides[​](#overrides-4 "Direct link to Overrides") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`connect`](/react/api/core/wallets/classes/Wallet.md#connect) *** ### disconnect()[​](#disconnect "Direct link to disconnect()") ``` disconnect(): void; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:45](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L45) #### Returns[​](#returns-4 "Direct link to Returns") `void` #### Overrides[​](#overrides-5 "Direct link to Overrides") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`disconnect`](/react/api/core/wallets/classes/Wallet.md#disconnect) *** ### getAccounts()[​](#getaccounts "Direct link to getAccounts()") ``` getAccounts(): object[]; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:64](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L64) #### Returns[​](#returns-5 "Direct link to Returns") `object`\[] #### Overrides[​](#overrides-6 "Direct link to Overrides") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`getAccounts`](/react/api/core/wallets/classes/Wallet.md#getaccounts) *** ### initialize()[​](#initialize "Direct link to initialize()") ``` initialize(): Promise; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:23](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L23) #### Returns[​](#returns-6 "Direct link to Returns") `Promise`<`void`> #### Overrides[​](#overrides-7 "Direct link to Overrides") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`initialize`](/react/api/core/wallets/classes/Wallet.md#initialize) --- # InjectedWalletProvider Defined in: [packages/core/src/wallets/injected/provider.ts:4](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/provider.ts#L4) ## Extends[​](#extends "Direct link to Extends") * [`WalletProvider`](/react/api/core/wallets/classes/WalletProvider.md) ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new InjectedWalletProvider(options?): InjectedWalletProvider; ``` Defined in: [packages/core/src/wallets/injected/provider.ts:5](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/provider.ts#L5) #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | ----------------------- | | `options?` | `InjectedWalletOptions` | #### Returns[​](#returns "Direct link to Returns") `InjectedWalletProvider` #### Overrides[​](#overrides "Direct link to Overrides") [`WalletProvider`](/react/api/core/wallets/classes/WalletProvider.md).[`constructor`](/react/api/core/wallets/classes/WalletProvider.md#constructor) ## Methods[​](#methods "Direct link to Methods") ### getWallets()[​](#getwallets "Direct link to getWallets()") ``` getWallets(): Promise; ``` Defined in: [packages/core/src/wallets/injected/provider.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/provider.ts#L9) #### Returns[​](#returns-1 "Direct link to Returns") `Promise`<[`InjectedWallet`](/react/api/core/wallets/classes/InjectedWallet.md)\[]> #### Overrides[​](#overrides-1 "Direct link to Overrides") [`WalletProvider`](/react/api/core/wallets/classes/WalletProvider.md).[`getWallets`](/react/api/core/wallets/classes/WalletProvider.md#getwallets) --- # LocalWallet\ Defined in: [packages/core/src/wallets/local-wallet.ts:22](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L22) **`Experimental`** ## Extends[​](#extends "Direct link to Extends") * [`Wallet`](/react/api/core/wallets/classes/Wallet.md)<`TOptions`, `"accounts"` | `TStorageKey`> ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | | `TAccount` *extends* `Pick`<[`PolkadotSignerAccount`](/react/api/core/wallets/type-aliases/PolkadotSignerAccount.md), `"id"`> | `Pick`<[`PolkadotSignerAccount`](/react/api/core/wallets/type-aliases/PolkadotSignerAccount.md), `"id"`> | | `TJsonAccount` | `TAccount` | | `TOptions` *extends* [`WalletOptions`](/react/api/core/wallets/type-aliases/WalletOptions.md) | [`WalletOptions`](/react/api/core/wallets/type-aliases/WalletOptions.md) | | `TStorageKey` *extends* `string` | `string` | ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new LocalWallet(options?): LocalWallet; ``` Defined in: [packages/core/src/wallets/local-wallet.ts:36](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L36) **`Experimental`** #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | ---------- | | `options?` | `TOptions` | #### Returns[​](#returns "Direct link to Returns") `LocalWallet`<`TAccount`, `TJsonAccount`, `TOptions`, `TStorageKey`> #### Overrides[​](#overrides "Direct link to Overrides") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`constructor`](/react/api/core/wallets/classes/Wallet.md#constructor) ## Properties[​](#properties "Direct link to Properties") ### accounts$[​](#accounts "Direct link to accounts$") ``` abstract readonly accounts$: Observable; ``` Defined in: [packages/core/src/wallets/wallet.ts:36](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L36) **`Experimental`** #### Inherited from[​](#inherited-from "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`accounts$`](/react/api/core/wallets/classes/Wallet.md#accounts) *** ### accountStore[​](#accountstore "Direct link to accountStore") ``` accountStore: AccountStore; ``` Defined in: [packages/core/src/wallets/local-wallet.ts:66](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L66) **`Experimental`** *** ### connected$[​](#connected "Direct link to connected$") ``` abstract readonly connected$: Observable; ``` Defined in: [packages/core/src/wallets/wallet.ts:30](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L30) **`Experimental`** #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`connected$`](/react/api/core/wallets/classes/Wallet.md#connected) *** ### id[​](#id "Direct link to id") ``` abstract readonly id: string; ``` Defined in: [packages/core/src/wallets/wallet.ts:14](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L14) **`Experimental`** #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`id`](/react/api/core/wallets/classes/Wallet.md#id) *** ### localAccounts$[​](#localaccounts "Direct link to localAccounts$") ``` protected localAccounts$: BehaviorSubject; ``` Defined in: [packages/core/src/wallets/local-wallet.ts:34](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L34) **`Experimental`** *** ### name[​](#name "Direct link to name") ``` abstract readonly name: string; ``` Defined in: [packages/core/src/wallets/wallet.ts:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L16) **`Experimental`** #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`name`](/react/api/core/wallets/classes/Wallet.md#name) *** ### options?[​](#options "Direct link to options?") ``` protected readonly optional options?: TOptions; ``` Defined in: [packages/core/src/wallets/wallet.ts:24](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L24) **`Experimental`** #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`options`](/react/api/core/wallets/classes/Wallet.md#options) ## Accessors[​](#accessors "Direct link to Accessors") ### storage[​](#storage "Direct link to storage") #### Get Signature[​](#get-signature "Direct link to Get Signature") ``` get protected storage(): Storage; ``` Defined in: [packages/core/src/wallets/wallet.ts:20](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L20) **`Experimental`** ##### Returns[​](#returns-1 "Direct link to Returns") [`Storage`](/react/api/core/index/classes/Storage.md)<`TStorageKey` *extends* `void` ? `string` : `TStorageKey`> #### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`storage`](/react/api/core/wallets/classes/Wallet.md#storage) ## Methods[​](#methods "Direct link to Methods") ### accountFromJson()[​](#accountfromjson "Direct link to accountFromJson()") ``` abstract protected accountFromJson(jsonAccount): Omit; ``` Defined in: [packages/core/src/wallets/local-wallet.ts:32](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L32) **`Experimental`** #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | ------------- | -------------- | | `jsonAccount` | `TJsonAccount` | #### Returns[​](#returns-2 "Direct link to Returns") `Omit`<`TAccount`, `"id"`> *** ### accountId()[​](#accountid "Direct link to accountId()") ``` abstract protected accountId(account): string; ``` Defined in: [packages/core/src/wallets/local-wallet.ts:28](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L28) **`Experimental`** #### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | --------- | -------------------------- | | `account` | `Omit`<`TAccount`, `"id"`> | #### Returns[​](#returns-3 "Direct link to Returns") `string` *** ### accountToJson()[​](#accounttojson "Direct link to accountToJson()") ``` abstract protected accountToJson(account): TJsonAccount; ``` Defined in: [packages/core/src/wallets/local-wallet.ts:30](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L30) **`Experimental`** #### Parameters[​](#parameters-3 "Direct link to Parameters") | Parameter | Type | | --------- | -------------------------- | | `account` | `Omit`<`TAccount`, `"id"`> | #### Returns[​](#returns-4 "Direct link to Returns") `TJsonAccount` *** ### connect()[​](#connect "Direct link to connect()") ``` abstract connect(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:32](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L32) **`Experimental`** #### Returns[​](#returns-5 "Direct link to Returns") `MaybePromise`<`void`> #### Inherited from[​](#inherited-from-6 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`connect`](/react/api/core/wallets/classes/Wallet.md#connect) *** ### disconnect()[​](#disconnect "Direct link to disconnect()") ``` abstract disconnect(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:34](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L34) **`Experimental`** #### Returns[​](#returns-6 "Direct link to Returns") `MaybePromise`<`void`> #### Inherited from[​](#inherited-from-7 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`disconnect`](/react/api/core/wallets/classes/Wallet.md#disconnect) *** ### getAccounts()[​](#getaccounts "Direct link to getAccounts()") ``` getAccounts(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:38](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L38) **`Experimental`** #### Returns[​](#returns-7 "Direct link to Returns") `MaybePromise`<[`PolkadotSignerAccount`](/react/api/core/wallets/type-aliases/PolkadotSignerAccount.md)\[]> #### Inherited from[​](#inherited-from-8 "Direct link to Inherited from") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`getAccounts`](/react/api/core/wallets/classes/Wallet.md#getaccounts) *** ### initialize()[​](#initialize "Direct link to initialize()") ``` initialize(): void; ``` Defined in: [packages/core/src/wallets/local-wallet.ts:52](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L52) **`Experimental`** #### Returns[​](#returns-8 "Direct link to Returns") `void` #### Overrides[​](#overrides-1 "Direct link to Overrides") [`Wallet`](/react/api/core/wallets/classes/Wallet.md).[`initialize`](/react/api/core/wallets/classes/Wallet.md#initialize) --- # Wallet\ Defined in: [packages/core/src/wallets/wallet.ts:10](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L10) ## Extended by[​](#extended-by "Direct link to Extended by") * [`DeepLinkWallet`](/react/api/core/wallets/classes/DeepLinkWallet.md) * [`InjectedWallet`](/react/api/core/wallets/classes/InjectedWallet.md) * [`LocalWallet`](/react/api/core/wallets/classes/LocalWallet.md) ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | | `TOptions` *extends* [`WalletOptions`](/react/api/core/wallets/type-aliases/WalletOptions.md) | [`WalletOptions`](/react/api/core/wallets/type-aliases/WalletOptions.md) | | `TStorageKey` *extends* `string` | `string` | ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new Wallet(options?): Wallet; ``` Defined in: [packages/core/src/wallets/wallet.ts:24](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L24) #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | ---------- | | `options?` | `TOptions` | #### Returns[​](#returns "Direct link to Returns") `Wallet`<`TOptions`, `TStorageKey`> ## Properties[​](#properties "Direct link to Properties") ### accounts$[​](#accounts "Direct link to accounts$") ``` abstract readonly accounts$: Observable; ``` Defined in: [packages/core/src/wallets/wallet.ts:36](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L36) *** ### connected$[​](#connected "Direct link to connected$") ``` abstract readonly connected$: Observable; ``` Defined in: [packages/core/src/wallets/wallet.ts:30](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L30) *** ### id[​](#id "Direct link to id") ``` abstract readonly id: string; ``` Defined in: [packages/core/src/wallets/wallet.ts:14](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L14) *** ### name[​](#name "Direct link to name") ``` abstract readonly name: string; ``` Defined in: [packages/core/src/wallets/wallet.ts:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L16) *** ### options?[​](#options "Direct link to options?") ``` protected readonly optional options?: TOptions; ``` Defined in: [packages/core/src/wallets/wallet.ts:24](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L24) ## Accessors[​](#accessors "Direct link to Accessors") ### storage[​](#storage "Direct link to storage") #### Get Signature[​](#get-signature "Direct link to Get Signature") ``` get protected storage(): Storage; ``` Defined in: [packages/core/src/wallets/wallet.ts:20](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L20) ##### Returns[​](#returns-1 "Direct link to Returns") [`Storage`](/react/api/core/index/classes/Storage.md)<`TStorageKey` *extends* `void` ? `string` : `TStorageKey`> ## Methods[​](#methods "Direct link to Methods") ### connect()[​](#connect "Direct link to connect()") ``` abstract connect(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:32](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L32) #### Returns[​](#returns-2 "Direct link to Returns") `MaybePromise`<`void`> *** ### disconnect()[​](#disconnect "Direct link to disconnect()") ``` abstract disconnect(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:34](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L34) #### Returns[​](#returns-3 "Direct link to Returns") `MaybePromise`<`void`> *** ### getAccounts()[​](#getaccounts "Direct link to getAccounts()") ``` getAccounts(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:38](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L38) #### Returns[​](#returns-4 "Direct link to Returns") `MaybePromise`<[`PolkadotSignerAccount`](/react/api/core/wallets/type-aliases/PolkadotSignerAccount.md)\[]> *** ### initialize()[​](#initialize "Direct link to initialize()") ``` abstract initialize(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:28](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L28) #### Returns[​](#returns-5 "Direct link to Returns") `MaybePromise`<`void`> --- # WalletProvider Defined in: [packages/core/src/wallets/provider.ts:4](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/provider.ts#L4) ## Extended by[​](#extended-by "Direct link to Extended by") * [`InjectedWalletProvider`](/react/api/core/wallets/classes/InjectedWalletProvider.md) ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new WalletProvider(): WalletProvider; ``` #### Returns[​](#returns "Direct link to Returns") `WalletProvider` ## Methods[​](#methods "Direct link to Methods") ### getWallets()[​](#getwallets "Direct link to getWallets()") ``` abstract getWallets(): MaybePromise[]>; ``` Defined in: [packages/core/src/wallets/provider.ts:5](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/provider.ts#L5) #### Returns[​](#returns-1 "Direct link to Returns") `MaybePromise`<[`Wallet`](/react/api/core/wallets/classes/Wallet.md)<[`WalletOptions`](/react/api/core/wallets/type-aliases/WalletOptions.md), `string`>\[]> --- # initializeWallets() ``` function initializeWallets(wallets): Promise; ``` Defined in: [packages/core/src/actions/initialize-wallets.ts:5](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/actions/initialize-wallets.ts#L5) ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | --------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `wallets` | [`Wallet`](/react/api/core/wallets/classes/Wallet.md)<[`WalletOptions`](/react/api/core/wallets/type-aliases/WalletOptions.md), `string`>\[] | ## Returns[​](#returns "Direct link to Returns") `Promise`<`void`\[]> --- # PolkadotAccount ``` type PolkadotAccount = Omit & object; ``` Defined in: [packages/core/src/wallets/account.ts:25](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/account.ts#L25) ## Type Declaration[​](#type-declaration "Direct link to Type Declaration") ### address[​](#address "Direct link to address") ``` address: Address; ``` ### polkadotSigner[​](#polkadotsigner "Direct link to polkadotSigner") ``` polkadotSigner: InjectedPolkadotAccount["polkadotSigner"] | undefined; ``` --- # PolkadotSignerAccount ``` type PolkadotSignerAccount = PolkadotSignerAccountBase & object; ``` Defined in: [packages/core/src/wallets/account.ts:19](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/account.ts#L19) ## Type Declaration[​](#type-declaration "Direct link to Type Declaration") ### genesisHash?[​](#genesishash "Direct link to genesisHash?") ``` optional genesisHash?: InjectedPolkadotAccount["genesisHash"]; ``` ### id[​](#id "Direct link to id") ``` id: string; ``` ### name?[​](#name "Direct link to name?") ``` optional name?: string; ``` --- # WalletAccount ``` type WalletAccount = PolkadotAccount & object; ``` Defined in: [packages/core/src/wallets/account.ts:30](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/account.ts#L30) ## Type Declaration[​](#type-declaration "Direct link to Type Declaration") ### wallet[​](#wallet "Direct link to wallet") ``` wallet: Wallet; ``` --- # WalletOptions ``` type WalletOptions = object; ``` Defined in: [packages/core/src/wallets/wallet.ts:6](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L6) ## Properties[​](#properties "Direct link to Properties") ### storage?[​](#storage "Direct link to storage?") ``` optional storage?: Storage; ``` Defined in: [packages/core/src/wallets/wallet.ts:7](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L7) --- # @reactive-dot/react ## Functions[​](#functions "Direct link to Functions") | Function | Description | | -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | [~~useLazyLoadQueryWithRefresh~~](/react/api/react/functions/useLazyLoadQueryWithRefresh.md) | Hook for querying data from chain, returning the response & a refresher function. | ## Components[​](#components "Direct link to Components") | Function | Description | | ---------------------------------------------------------------- | ---------------------------------------------------------- | | [Await](/react/api/react/functions/Await.md) | Component for awaiting a promise and rendering its result. | | [~~QueryRenderer~~](/react/api/react/functions/QueryRenderer.md) | Component for rendering the result of a query. | ## Contexts[​](#contexts "Direct link to Contexts") | Function | Description | | -------------------------------------------------------------------------- | ------------------------------------------------------- | | [ChainProvider](/react/api/react/functions/ChainProvider.md) | React context provider for scoping to a specific chain. | | [QueryOptionsProvider](/react/api/react/functions/QueryOptionsProvider.md) | React context to control subscription options. | | [ReactiveDotProvider](/react/api/react/functions/ReactiveDotProvider.md) | React context provider for ReactiveDOT. | | [SignerProvider](/react/api/react/functions/SignerProvider.md) | React context provider to assign a default signer. | ## Hooks[​](#hooks "Direct link to Hooks") | Name | Description | | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | [~~useMutationEffect~~](/react/api/react/variables/useMutationEffect.md) | - | | [~~usePromiseState~~](/react/api/react/variables/usePromiseState.md) | - | | [useAccounts](/react/api/react/functions/useAccounts.md) | Hook for getting currently connected accounts. | | [useBlock](/react/api/react/functions/useBlock.md) | Hook for fetching information about the latest block. | | [useChainId](/react/api/react/functions/useChainId.md) | Hook for getting the current chain ID. | | [useChainIds](/react/api/react/functions/useChainIds.md) | Hook for getting all configured chain IDs. | | [useChainSpecData](/react/api/react/functions/useChainSpecData.md) | Hook for fetching the [JSON-RPC spec](https://paritytech.github.io/json-rpc-interface-spec/api/chainSpec.html). | | [useClient](/react/api/react/functions/useClient.md) | Hook for getting Polkadot-API client instance. | | [useConfig](/react/api/react/functions/useConfig.md) | Hook for getting the current config. | | [useConnectedWallets](/react/api/react/functions/useConnectedWallets.md) | Hook for getting all connected wallets. | | [useContractEventListener](/react/api/react/functions/useContractEventListener.md) | Hook for listening to contract events. | | [useContractMutation](/react/api/react/functions/useContractMutation.md) | Hook for mutating (writing to) a contract. | | [useLazyLoadQuery](/react/api/react/functions/useLazyLoadQuery.md) | Hook for querying data from chain, and returning the response. | | [useMutation](/react/api/react/functions/useMutation.md) | Hook for sending transactions to chains. | | [useMutationListener](/react/api/react/functions/useMutationListener.md) | Hook that watches for mutation events. | | [useNativeTokenAmountFromNumber](/react/api/react/functions/useNativeTokenAmountFromNumber.md) | Hook for returning the native token amount from a number value | | [useNativeTokenAmountFromPlanck](/react/api/react/functions/useNativeTokenAmountFromPlanck.md) | Hook for returning the native token amount from a planck value. | | [usePromises](/react/api/react/functions/usePromises.md) | Hook for using multiple promises in a component. Internally this uses React's [\`use\`](https://react.dev/reference/react/use) API. | | [usePromiseValue](/react/api/react/functions/usePromiseValue.md) | Hook for tracking promise state with a fallback value. | | [useQueryErrorResetter](/react/api/react/functions/useQueryErrorResetter.md) | Hook for getting function to reset query error caught by error boundary | | [useQueryLoader](/react/api/react/functions/useQueryLoader.md) | Hook for loading queries without suspending. | | [~~useQueryRefresher~~](/react/api/react/functions/useQueryRefresher.md) | Hook for refreshing cached query. | | [useSigner](/react/api/react/functions/useSigner.md) | Hook for getting the current signer. | | [useSpendableBalance](/react/api/react/functions/useSpendableBalance.md) | Hook for getting an account's spendable balance. | | [useSpendableBalances](/react/api/react/functions/useSpendableBalances.md) | Hook for getting accounts’ spendable balances. | | [useStore](/react/api/react/functions/useStore.md) | Hook for getting the data store. | | [useTypedApi](/react/api/react/functions/useTypedApi.md) | Hook for getting Polkadot-API typed API. | | [useWalletConnector](/react/api/react/functions/useWalletConnector.md) | Hook for connecting wallets | | [useWalletDisconnector](/react/api/react/functions/useWalletDisconnector.md) | Hook for disconnecting wallets | | [useWallets](/react/api/react/functions/useWallets.md) | Hook for getting all available wallets. | --- # Await() ``` function Await(__namedParameters): Element; ``` Defined in: [components/await.tsx:22](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/components/await.tsx#L22) Component for awaiting a promise and rendering its result. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------- | | `T` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ------------------- | ----------------- | | `__namedParameters` | `AwaitProps`<`T`> | ## Returns[​](#returns "Direct link to Returns") `Element` --- # ChainProvider() ``` function ChainProvider(props): Element; ``` Defined in: [contexts/chain.tsx:17](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/contexts/chain.tsx#L17) React context provider for scoping to a specific chain. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | --------- | -------------------- | --------------- | | `props` | `ChainProviderProps` | Component props | ## Returns[​](#returns "Direct link to Returns") `Element` React element --- # QueryOptionsProvider() ``` function QueryOptionsProvider(props): Element; ``` Defined in: [contexts/query-options.tsx:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/contexts/query-options.tsx#L16) React context to control subscription options. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | --------- | ------------------- | --------------- | | `props` | `SubscriptionProps` | Component props | ## Returns[​](#returns "Direct link to Returns") `Element` React element --- # ~~QueryRenderer()~~ ``` function QueryRenderer(__namedParameters): ReactNode; ``` Defined in: [components/query-renderer.tsx:22](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/components/query-renderer.tsx#L22) **`Experimental`** Component for rendering the result of a query. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------------------------------------------------- | | `TChainId` *extends* `string` \| `number` \| `undefined` | | `TQuery` *extends* `QueryArgument`<`TChainId`> | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ------------------- | ------------------------------------------ | | `__namedParameters` | `QueryRendererProps`<`TChainId`, `TQuery`> | ## Returns[​](#returns "Direct link to Returns") `ReactNode` ## Deprecated[​](#deprecated "Direct link to Deprecated") Use Await component with promise instead --- # ReactiveDotProvider() ``` function ReactiveDotProvider(props): Element; ``` Defined in: [contexts/provider.tsx:24](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/contexts/provider.tsx#L24) React context provider for ReactiveDOT. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | --------- | -------------------------- | --------------- | | `props` | `ReactiveDotProviderProps` | Component props | ## Returns[​](#returns "Direct link to Returns") `Element` React element --- # SignerProvider() ``` function SignerProvider(props): Element; ``` Defined in: [contexts/signer.tsx:21](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/contexts/signer.tsx#L21) React context provider to assign a default signer. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | --------- | --------------------- | --------------- | | `props` | `SignerProviderProps` | Component props | ## Returns[​](#returns "Direct link to Returns") `Element` React element --- # useAccounts() ``` function useAccounts(options?): When>; ``` Defined in: [hooks/use-accounts.ts:31](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-accounts.ts#L31) Hook for getting currently connected accounts. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------- | ------------ | | `TUse` *extends* `boolean` | `true` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ---------------------------- | ------------------ | | `options?` | `UseAccountsOptions`<`TUse`> | Additional options | ## Returns[​](#returns "Direct link to Returns") `When`<`TUse`, `WalletAccount`\[], `Promise`<`WalletAccount`\[]>> The currently connected accounts --- # useBlock() ``` function useBlock(tag?, options?): When>; ``` Defined in: [hooks/use-block.ts:22](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-block.ts#L22) Hook for fetching information about the latest block. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------- | ------------ | | `TUse` *extends* `boolean` | `true` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Default value | Description | | ---------- | ------------------------------------------------------------------------------------------ | ------------- | --------------------- | | `tag` | `"best"` \| `"finalized"` | `"finalized"` | Which block to target | | `options?` | `Partial`<`ChainOptions`<`string` \| `number` \| `undefined`>> & `SuspenseOptions`<`TUse`> | `undefined` | Additional options | ## Returns[​](#returns "Direct link to Returns") `When`<`TUse`, `BlockInfo`, `Promise`<`BlockInfo`>> The latest finalized or best block --- # useChainId() ``` function useChainId(): string | number; ``` Defined in: [hooks/use-chain-id.ts:23](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-chain-id.ts#L23) Hook for getting the current chain ID. ## Returns[​](#returns "Direct link to Returns") `string` | `number` The current chain ID --- # useChainIds() ``` function useChainIds(): (string | number)[]; ``` Defined in: [hooks/use-chain-id.ts:13](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-chain-id.ts#L13) Hook for getting all configured chain IDs. ## Returns[​](#returns "Direct link to Returns") (`string` | `number`)\[] All configured chain IDs --- # useChainSpecData() ``` function useChainSpecData(options?): When>; ``` Defined in: [hooks/use-chain-spec-data.ts:19](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-chain-spec-data.ts#L19) Hook for fetching the [JSON-RPC spec](https://paritytech.github.io/json-rpc-interface-spec/api/chainSpec.html). ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------- | ------------ | | `TUse` *extends* `boolean` | `true` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------------------------------------------------------------------------ | ------------------ | | `options?` | `Partial`<`ChainOptions`<`string` \| `number` \| `undefined`>> & `SuspenseOptions`<`TUse`> | Additional options | ## Returns[​](#returns "Direct link to Returns") `When`<`TUse`, `ChainSpecData`, `Promise`<`ChainSpecData`>> The [JSON-RPC spec](https://paritytech.github.io/json-rpc-interface-spec/api/chainSpec.html) --- # useClient() ``` function useClient(options?): PolkadotClient; ``` Defined in: [hooks/use-client.ts:20](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-client.ts#L20) Hook for getting Polkadot-API client instance. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | -------------------------------------------------------------- | ------------------ | | `options?` | `Partial`<`ChainOptions`<`string` \| `number` \| `undefined`>> | Additional options | ## Returns[​](#returns "Direct link to Returns") `PolkadotClient` Polkadot-API client --- # useConfig() ``` function useConfig(): Config; ``` Defined in: [hooks/use-config.ts:11](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-config.ts#L11) Hook for getting the current config. ## Returns[​](#returns "Direct link to Returns") `Config` The current config --- # useConnectedWallets() ``` function useConnectedWallets(options?): When[], Promise[]>>; ``` Defined in: [hooks/use-wallets.ts:38](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-wallets.ts#L38) Hook for getting all connected wallets. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------- | ------------ | | `TUse` *extends* `boolean` | `true` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | ------------------------- | | `options?` | `SuspenseOptions`<`TUse`> | ## Returns[​](#returns "Direct link to Returns") `When`<`TUse`, `Wallet`<`WalletOptions`, `string`>\[], `Promise`<`Wallet`<`WalletOptions`, `string`>\[]>> Connected wallets --- # useContractEventListener() ``` function useContractEventListener( contract, address, eventName, listener, options?): void; ``` Defined in: [hooks/use-contract-event-listener.ts:22](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-contract-event-listener.ts#L22) Hook for listening to contract events. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------------------------- | | `TContract` *extends* `Contract` | | `TEventName` *extends* `string` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ----------- | -------------------------------------------------------------- | --------------------------------------------------- | | `contract` | `TContract` | The contract instance to listen to events from | | `address` | `Address` \| `undefined` | The contract address | | `eventName` | `TEventName` | The name of the event to listen for | | `listener` | (`event`) => `void` | Callback function invoked when the event is emitted | | `options?` | `Partial`<`ChainOptions`<`string` \| `number` \| `undefined`>> | Additional options | ## Returns[​](#returns "Direct link to Returns") `void` --- # useContractMutation() ``` function useContractMutation(action, options?): [AsyncValue, (...args) => Observable]; ``` Defined in: [hooks/use-contract-mutation.ts:34](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-contract-mutation.ts#L34) Hook for mutating (writing to) a contract. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | ------------------------------------------------------------------------- | | `TAction` *extends* (`builder`, `input`) => `MaybePromise`<`Transaction`> | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------------------------------------------------------- | -------------------------------------- | | `action` | `TAction` | The function to create the transaction | | `options?` | `Partial`<`ChainOptions`<`string` \| `number` \| `undefined`>> & `object` | Additional options | ## Returns[​](#returns "Direct link to Returns") \[`AsyncValue`<`TxEvent`, `MutationError`>, (...`args`) => `Observable`] The current transaction state & submit function --- # useLazyLoadQuery() ``` function useLazyLoadQuery(query, options?): When, Promise>>; ``` Defined in: [hooks/use-query.ts:67](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-query.ts#L67) Hook for querying data from chain, and returning the response. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------------------------------------- | ------------ | | `TChainId` *extends* `string` \| `number` \| `undefined` | - | | `TQuery` *extends* `QueryArgument`<`TChainId`> | - | | `TUse` *extends* `boolean` | `true` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ---------------------------------------------------------------------------------- | -------------------------------- | | `query` | `TQuery` | The function to create the query | | `options?` | `Partial`<`ChainOptions`<`TChainId`>> & `SuspenseOptions`<`TUse`> & `FetchOptions` | Additional options | ## Returns[​](#returns "Direct link to Returns") `When`<`TUse`, `InferQueryArgumentResult`<`TChainId`, `TQuery`>, `Promise`<`InferQueryArgumentResult`<`TChainId`, `TQuery`>>> The data response --- # ~~useLazyLoadQueryWithRefresh()~~ ``` function useLazyLoadQueryWithRefresh(query, options?): [InferQueryArgumentResult, () => void]; ``` Defined in: [hooks/use-query.ts:112](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-query.ts#L112) Hook for querying data from chain, returning the response & a refresher function. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------------------------------------------------- | | `TChainId` *extends* `string` \| `number` \| `undefined` | | `TQuery` *extends* `QueryArgument`<`TChainId`> | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------------------- | -------------------------------- | | `query` | `TQuery` | The function to create the query | | `options?` | `Partial`<`ChainOptions`<`TChainId`>> | Additional options | ## Returns[​](#returns "Direct link to Returns") \[`InferQueryArgumentResult`<`TChainId`, `TQuery`>, () => `void`] The data response & a function to refresh it ## Deprecated[​](#deprecated "Direct link to Deprecated") Use [useLazyLoadQuery](/react/api/react/functions/useLazyLoadQuery.md) with FetchOptions.fetchKey | options.fetchKey instead --- # useMutation() ``` function useMutation(action, options?): [AsyncValue, (...args) => Observable]; ``` Defined in: [hooks/use-mutation.ts:30](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-mutation.ts#L30) Hook for sending transactions to chains. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------------------------------------------------- | | `TAction` *extends* (`tx`, `input`) => `Transaction` | | `TChainId` *extends* `string` \| `number` \| `undefined` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------------------------------ | -------------------------------------- | | `action` | `TAction` | The function to create the transaction | | `options?` | `Partial`<`ChainOptions`<`TChainId`>> & `object` | Additional options | ## Returns[​](#returns "Direct link to Returns") \[`AsyncValue`<`TxEvent`, `MutationError`>, (...`args`) => `Observable`] The current transaction state & submit function --- # useMutationListener() ``` function useMutationListener(listener): void; ``` Defined in: [hooks/use-mutation-listener.ts:10](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-mutation-listener.ts#L10) Hook that watches for mutation events. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------- | ------------------------------------------- | | `listener` | (`event`) => `void` | Callback when new mutation event is emitted | ## Returns[​](#returns "Direct link to Returns") `void` --- # useNativeTokenAmountFromNumber() ## Call Signature[​](#call-signature "Direct link to Call Signature") ``` function useNativeTokenAmountFromNumber(number, options?): When>; ``` Defined in: [hooks/use-native-token-amount.ts:94](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-native-token-amount.ts#L94) Hook for returning the native token amount from a number value ### Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------- | ------------ | | `TUse` *extends* `boolean` | `true` | ### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------------------------------------------------------------------------ | ------------------ | | `number` | `string` \| `number` | The number value | | `options?` | `Partial`<`ChainOptions`<`string` \| `number` \| `undefined`>> & `SuspenseOptions`<`TUse`> | Additional options | ### Returns[​](#returns "Direct link to Returns") `When`<`TUse`, `DenominatedNumber`, `Promise`<`DenominatedNumber`>> The native token amount ## Call Signature[​](#call-signature-1 "Direct link to Call Signature") ``` function useNativeTokenAmountFromNumber(options?): When DenominatedNumber, Promise<(number) => DenominatedNumber>>; ``` Defined in: [hooks/use-native-token-amount.ts:105](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-native-token-amount.ts#L105) Hook for returning a function that converts number value to native token amount ### Type Parameters[​](#type-parameters-1 "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------- | ------------ | | `TUse` *extends* `boolean` | `true` | ### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------------------------------------------------------------------------ | ------------------ | | `options?` | `Partial`<`ChainOptions`<`string` \| `number` \| `undefined`>> & `SuspenseOptions`<`TUse`> | Additional options | ### Returns[​](#returns-1 "Direct link to Returns") `When`<`TUse`, (`number`) => `DenominatedNumber`, `Promise`<(`number`) => `DenominatedNumber`>> Function for getting the native token amount from a number value --- # useNativeTokenAmountFromPlanck() ## Call Signature[​](#call-signature "Direct link to Call Signature") ``` function useNativeTokenAmountFromPlanck(planck, options?): When>; ``` Defined in: [hooks/use-native-token-amount.ts:20](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-native-token-amount.ts#L20) Hook for returning the native token amount from a planck value. ### Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------- | ------------ | | `TUse` *extends* `boolean` | `true` | ### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------------------------------------------------------------------------ | ------------------ | | `planck` | `string` \| `number` \| `bigint` | The planck value | | `options?` | `Partial`<`ChainOptions`<`string` \| `number` \| `undefined`>> & `SuspenseOptions`<`TUse`> | Additional options | ### Returns[​](#returns "Direct link to Returns") `When`<`TUse`, `DenominatedNumber`, `Promise`<`DenominatedNumber`>> The native token amount ## Call Signature[​](#call-signature-1 "Direct link to Call Signature") ``` function useNativeTokenAmountFromPlanck(options?): When DenominatedNumber, Promise<(planck) => DenominatedNumber>>; ``` Defined in: [hooks/use-native-token-amount.ts:31](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-native-token-amount.ts#L31) Hook for returning a function that converts planck value to native token amount. ### Type Parameters[​](#type-parameters-1 "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------- | ------------ | | `TUse` *extends* `boolean` | `true` | ### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------------------------------------------------------------------------ | ------------------ | | `options?` | `Partial`<`ChainOptions`<`string` \| `number` \| `undefined`>> & `SuspenseOptions`<`TUse`> | Additional options | ### Returns[​](#returns-1 "Direct link to Returns") `When`<`TUse`, (`planck`) => `DenominatedNumber`, `Promise`<(`planck`) => `DenominatedNumber`>> Function for getting the native token amount from a planck value --- # usePromises() ``` function usePromises(promises): { [P in string | number | symbol]: Awaited }; ``` Defined in: [hooks/use-promises.ts:12](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-promises.ts#L12) Hook for using multiple promises in a component. Internally this uses React's [\`use\`](https://react.dev/reference/react/use) API. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | ------------------------------------------------- | | `T` *extends* \[] \| readonly `Promise`<`any`>\[] | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ---- | ------------------------------- | | `promises` | `T` | An array of promises to resolve | ## Returns[​](#returns "Direct link to Returns") { \[P in string | number | symbol]: Awaited\ } An array of resolved promise values ## See[​](#see "Direct link to See") --- # usePromiseValue() ``` function usePromiseValue(promise, fallback?): TValue | TFallback; ``` Defined in: [hooks/use-promise-value.ts:13](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-promise-value.ts#L13) Hook for tracking promise state with a fallback value. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------- | ------------------ | | `TValue` | - | | `TFallback` | *typeof* `pending` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------------------ | ------------------------------------------------ | | `promise` | `Promise`<`TValue`> | The promise to track | | `fallback` | (`prev?`) => `TValue` \| `TFallback` | The fallback function to provide a default value | ## Returns[​](#returns "Direct link to Returns") `TValue` | `TFallback` The state of the promise or fallback --- # useQueryErrorResetter() ``` function useQueryErrorResetter(): (...args) => void; ``` Defined in: [hooks/use-query-error-resetter.ts:11](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-query-error-resetter.ts#L11) Hook for getting function to reset query error caught by error boundary ## Returns[​](#returns "Direct link to Returns") Function to reset caught query error (...`args`) => `void` --- # useQueryLoader() ``` function useQueryLoader(): (builder, options?) => void; ``` Defined in: [hooks/use-query-loader.ts:17](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-query-loader.ts#L17) Hook for loading queries without suspending. ## Returns[​](#returns "Direct link to Returns") The function to load queries <`TChainId`, `TQuery`>(`builder`, `options?`) => `void` --- # ~~useQueryRefresher()~~ ``` function useQueryRefresher(query, options?): () => void; ``` Defined in: [hooks/use-query-refresher.ts:15](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-query-refresher.ts#L15) Hook for refreshing cached query. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------------------------------------------------- | | `TChainId` *extends* `string` \| `number` \| `undefined` | | `TQuery` *extends* `QueryArgument`<`TChainId`> | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------------------- | -------------------------------- | | `query` | `TQuery` | The function to create the query | | `options?` | `Partial`<`ChainOptions`<`TChainId`>> | Additional options | ## Returns[​](#returns "Direct link to Returns") The function to refresh the query () => `void` ## Deprecated[​](#deprecated "Direct link to Deprecated") Use the `useStore` hook and call `invalidateQuery` instead. --- # useSigner() ``` function useSigner(): PolkadotSigner | undefined; ``` Defined in: [hooks/use-signer.ts:10](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-signer.ts#L10) Hook for getting the current signer. ## Returns[​](#returns "Direct link to Returns") `PolkadotSigner` | `undefined` The current signer --- # useSpendableBalance() ``` function useSpendableBalance(address, options?): When>; ``` Defined in: [hooks/use-balance.ts:45](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-balance.ts#L45) Hook for getting an account's spendable balance. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------- | ------------ | | `TUse` *extends* `boolean` | `true` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ----------------- | --------------------- | | `address` | `Address` | The account's address | | `options?` | `Options`<`TUse`> | Additional options | ## Returns[​](#returns "Direct link to Returns") `When`<`TUse`, `DenominatedNumber`, `Promise`<`DenominatedNumber`>> The account's spendable balance --- # useSpendableBalances() ``` function useSpendableBalances(addresses, options?): When>; ``` Defined in: [hooks/use-balance.ts:72](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-balance.ts#L72) Hook for getting accounts’ spendable balances. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------- | ------------ | | `TUse` *extends* `boolean` | `true` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ----------- | ----------------- | --------------------- | | `addresses` | `Address`\[] | The account-addresses | | `options?` | `Options`<`TUse`> | Additional options | ## Returns[​](#returns "Direct link to Returns") `When`<`TUse`, `DenominatedNumber`\[], `Promise`<`DenominatedNumber`\[]>> The accounts’ spendable balances --- # useStore() ``` function useStore(): DataStore; ``` Defined in: [hooks/use-store.ts:18](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-store.ts#L18) Hook for getting the data store. ## Returns[​](#returns "Direct link to Returns") `DataStore` --- # useTypedApi() ``` function useTypedApi(options?): TypedApi>; ``` Defined in: [hooks/use-typed-api.ts:22](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-typed-api.ts#L22) Hook for getting Polkadot-API typed API. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------------------------------------------------- | | `TChainId` *extends* `string` \| `number` \| `undefined` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------------------- | ------------------ | | `options?` | `Partial`<`ChainOptions`<`TChainId`>> | Additional options | ## Returns[​](#returns "Direct link to Returns") `TypedApi`<`ChainDescriptorOf`<`TChainId`>> Polkadot-API typed API --- # useWalletConnector() ``` function useWalletConnector(wallets?): [AsyncValue, (...args) => Promise]; ``` Defined in: [hooks/use-wallet-connector.ts:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-wallet-connector.ts#L16) Hook for connecting wallets ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | `wallets?` | \| `Wallet`<`WalletOptions`, `string`> \| `Wallet`<`WalletOptions`, `string`>\[] | Wallets to connect to, will connect to all available wallets if none is specified | ## Returns[​](#returns "Direct link to Returns") \[`AsyncValue`<`true`, `MutationError`>, (...`args`) => `Promise`] The wallet connection state & connect function --- # useWalletDisconnector() ``` function useWalletDisconnector(wallets?): [AsyncValue, (...args) => Promise]; ``` Defined in: [hooks/use-wallet-disconnector.ts:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-wallet-disconnector.ts#L16) Hook for disconnecting wallets ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | | `wallets?` | \| `Wallet`<`WalletOptions`, `string`> \| `Wallet`<`WalletOptions`, `string`>\[] | Wallets to disconnect from, will disconnect from all connected wallets if none is specified | ## Returns[​](#returns "Direct link to Returns") \[`AsyncValue`<`true`, `MutationError`>, (...`args`) => `Promise`] The wallet disconnection state & disconnect function --- # useWallets() ``` function useWallets(options?): When[], Promise[]>>; ``` Defined in: [hooks/use-wallets.ts:21](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-wallets.ts#L21) Hook for getting all available wallets. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------- | ------------ | | `TUse` *extends* `boolean` | `true` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | ------------------------- | | `options?` | `SuspenseOptions`<`TUse`> | ## Returns[​](#returns "Direct link to Returns") `When`<`TUse`, `Wallet`<`WalletOptions`, `string`>\[], `Promise`<`Wallet`<`WalletOptions`, `string`>\[]>> Available wallets --- # ~~useMutationEffect~~ ``` const useMutationEffect: (listener) => void = useMutationListener; ``` Defined in: [hooks/use-mutation-listener.ts:25](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-mutation-listener.ts#L25) Hook that watches for mutation events. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------- | ------------------------------------------- | | `listener` | (`event`) => `void` | Callback when new mutation event is emitted | ## Returns[​](#returns "Direct link to Returns") `void` ## Deprecated[​](#deprecated "Direct link to Deprecated") Use [useMutationListener](/react/api/react/functions/useMutationListener.md) instead --- # ~~usePromiseState~~ ``` const usePromiseState: (promise, fallback) => TValue | TFallback = usePromiseValue; ``` Defined in: [hooks/use-promise-value.ts:70](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/react/src/hooks/use-promise-value.ts#L70) Hook for tracking promise state with a fallback value. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------- | ------------------ | | `TValue` | - | | `TFallback` | *typeof* `pending` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------------------ | ------------------------------------------------ | | `promise` | `Promise`<`TValue`> | The promise to track | | `fallback` | (`prev?`) => `TValue` \| `TFallback` | The fallback function to provide a default value | ## Returns[​](#returns "Direct link to Returns") `TValue` | `TFallback` The state of the promise or fallback ## Deprecated[​](#deprecated "Direct link to Deprecated") Use [usePromiseValue](/react/api/react/functions/usePromiseValue.md) instead. --- # @reactive-dot/utils ## Classes[​](#classes "Direct link to Classes") | Class | Description | | ------------------------------------------------------------------ | ----------- | | [DenominatedNumber](/react/api/utils/classes/DenominatedNumber.md) | - | ## Variables[​](#variables "Direct link to Variables") | Variable | Description | | ------------------------------------------------------ | ----------- | | [BigIntMath](/react/api/utils/variables/BigIntMath.md) | - | --- # DenominatedNumber Defined in: [packages/utils/src/denominated-number.ts:1](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L1) ## Extends[​](#extends "Direct link to Extends") * `Number` ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new DenominatedNumber( planck, decimals, denomination?): DenominatedNumber; ``` Defined in: [packages/utils/src/denominated-number.ts:7](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L7) #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | --------------- | --------------------------------------------- | | `planck` | `string` \| `number` \| `bigint` \| `boolean` | | `decimals` | `number` | | `denomination?` | `string` | #### Returns[​](#returns "Direct link to Returns") `DenominatedNumber` #### Overrides[​](#overrides "Direct link to Overrides") ``` Number.constructor ``` ## Properties[​](#properties "Direct link to Properties") ### decimals[​](#decimals "Direct link to decimals") ``` readonly decimals: number; ``` Defined in: [packages/utils/src/denominated-number.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L9) *** ### denomination?[​](#denomination "Direct link to denomination?") ``` readonly optional denomination?: string; ``` Defined in: [packages/utils/src/denominated-number.ts:10](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L10) *** ### ~~mapFromNumber~~[​](#mapfromnumber "Direct link to mapfromnumber") ``` mapFromNumber: (mapper) => DenominatedNumber; ``` Defined in: [packages/utils/src/denominated-number.ts:117](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L117) #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | --------- | ---------------------- | | `mapper` | (`number`) => `number` | #### Returns[​](#returns-1 "Direct link to Returns") `DenominatedNumber` #### Deprecated[​](#deprecated "Direct link to Deprecated") Use [DenominatedNumber.mapNumber](#mapnumber) instead. *** ### ~~mapFromPlanck~~[​](#mapfromplanck "Direct link to mapfromplanck") ``` mapFromPlanck: (mapper) => DenominatedNumber; ``` Defined in: [packages/utils/src/denominated-number.ts:108](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L108) #### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | --------- | ---------------------- | | `mapper` | (`planck`) => `bigint` | #### Returns[​](#returns-2 "Direct link to Returns") `DenominatedNumber` #### Deprecated[​](#deprecated-1 "Direct link to Deprecated") Use [DenominatedNumber.mapPlanck](#mapplanck) instead. *** ### planck[​](#planck "Direct link to planck") ``` readonly planck: bigint; ``` Defined in: [packages/utils/src/denominated-number.ts:5](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L5) *** ### EPSILON[​](#epsilon "Direct link to EPSILON") ``` readonly static EPSILON: number; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:217 The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately: 2.2204460492503130808472633361816 x 10β€βˆ’β€16. #### Inherited from[​](#inherited-from "Direct link to Inherited from") ``` Number.EPSILON ``` *** ### MAX\_SAFE\_INTEGER[​](#max_safe_integer "Direct link to MAX_SAFE_INTEGER") ``` readonly static MAX_SAFE_INTEGER: number; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:252 The value of the largest integer n such that n and n + 1 are both exactly representable as a Number value. The value of Number.MAX\_SAFE\_INTEGER is 9007199254740991 2^53 βˆ’ 1. #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") ``` Number.MAX_SAFE_INTEGER ``` *** ### MAX\_VALUE[​](#max_value "Direct link to MAX_VALUE") ``` readonly static MAX_VALUE: number; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:592 The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") ``` Number.MAX_VALUE ``` *** ### MIN\_SAFE\_INTEGER[​](#min_safe_integer "Direct link to MIN_SAFE_INTEGER") ``` readonly static MIN_SAFE_INTEGER: number; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:259 The value of the smallest integer n such that n and n βˆ’ 1 are both exactly representable as a Number value. The value of Number.MIN\_SAFE\_INTEGER is βˆ’9007199254740991 (βˆ’(2^53 βˆ’ 1)). #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") ``` Number.MIN_SAFE_INTEGER ``` *** ### MIN\_VALUE[​](#min_value "Direct link to MIN_VALUE") ``` readonly static MIN_VALUE: number; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:595 The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") ``` Number.MIN_VALUE ``` *** ### NaN[​](#nan "Direct link to NaN") ``` readonly static NaN: number; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:601 A value that is not a number. In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. #### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") ``` Number.NaN ``` *** ### NEGATIVE\_INFINITY[​](#negative_infinity "Direct link to NEGATIVE_INFINITY") ``` readonly static NEGATIVE_INFINITY: number; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:607 A value that is less than the largest negative number that can be represented in JavaScript. JavaScript displays NEGATIVE\_INFINITY values as -infinity. #### Inherited from[​](#inherited-from-6 "Direct link to Inherited from") ``` Number.NEGATIVE_INFINITY ``` *** ### POSITIVE\_INFINITY[​](#positive_infinity "Direct link to POSITIVE_INFINITY") ``` readonly static POSITIVE_INFINITY: number; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:613 A value greater than the largest number that can be represented in JavaScript. JavaScript displays POSITIVE\_INFINITY values as infinity. #### Inherited from[​](#inherited-from-7 "Direct link to Inherited from") ``` Number.POSITIVE_INFINITY ``` ## Methods[​](#methods "Direct link to Methods") ### mapNumber()[​](#mapnumber "Direct link to mapNumber()") ``` mapNumber(mapper): DenominatedNumber; ``` Defined in: [packages/utils/src/denominated-number.ts:110](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L110) #### Parameters[​](#parameters-3 "Direct link to Parameters") | Parameter | Type | | --------- | ---------------------- | | `mapper` | (`number`) => `number` | #### Returns[​](#returns-3 "Direct link to Returns") `DenominatedNumber` *** ### mapPlanck()[​](#mapplanck "Direct link to mapPlanck()") ``` mapPlanck(mapper): DenominatedNumber; ``` Defined in: [packages/utils/src/denominated-number.ts:101](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L101) #### Parameters[​](#parameters-4 "Direct link to Parameters") | Parameter | Type | | --------- | ---------------------- | | `mapper` | (`planck`) => `bigint` | #### Returns[​](#returns-4 "Direct link to Returns") `DenominatedNumber` *** ### toExponential()[​](#toexponential "Direct link to toExponential()") ``` toExponential(fractionDigits?): string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:574 Returns a string containing a number represented in exponential notation. #### Parameters[​](#parameters-5 "Direct link to Parameters") | Parameter | Type | Description | | ----------------- | -------- | --------------------------------------------------------------------------------- | | `fractionDigits?` | `number` | Number of digits after the decimal point. Must be in the range 0 - 20, inclusive. | #### Returns[​](#returns-5 "Direct link to Returns") `string` #### Inherited from[​](#inherited-from-8 "Direct link to Inherited from") ``` Number.toExponential ``` *** ### toFixed()[​](#tofixed "Direct link to toFixed()") ``` toFixed(fractionDigits?): string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:568 Returns a string representing a number in fixed-point notation. #### Parameters[​](#parameters-6 "Direct link to Parameters") | Parameter | Type | Description | | ----------------- | -------- | --------------------------------------------------------------------------------- | | `fractionDigits?` | `number` | Number of digits after the decimal point. Must be in the range 0 - 20, inclusive. | #### Returns[​](#returns-6 "Direct link to Returns") `string` #### Inherited from[​](#inherited-from-9 "Direct link to Inherited from") ``` Number.toFixed ``` *** ### toLocaleString()[​](#tolocalestring "Direct link to toLocaleString()") #### Call Signature[​](#call-signature "Direct link to Call Signature") ``` toLocaleString(locales?, options?): string; ``` Defined in: [packages/utils/src/denominated-number.ts:75](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L75) Converts a number to a string by using the current or specified locale. ##### Parameters[​](#parameters-7 "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `locales?` | `string` \| `string`\[] | A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. | | `options?` | `NumberFormatOptions` | An object that contains one or more properties that specify comparison options. | ##### Returns[​](#returns-7 "Direct link to Returns") `string` ##### Overrides[​](#overrides-1 "Direct link to Overrides") ``` Number.toLocaleString ``` #### Call Signature[​](#call-signature-1 "Direct link to Call Signature") ``` toLocaleString(locales?, options?): string; ``` Defined in: [packages/utils/src/denominated-number.ts:79](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L79) Converts a number to a string by using the current or specified locale. ##### Parameters[​](#parameters-8 "Direct link to Parameters") | Parameter | Type | Description | | ---------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `locales?` | `LocalesArgument` | A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. | | `options?` | `NumberFormatOptions` | An object that contains one or more properties that specify comparison options. | ##### Returns[​](#returns-8 "Direct link to Returns") `string` ##### Overrides[​](#overrides-2 "Direct link to Overrides") ``` Number.toLocaleString ``` *** ### toPrecision()[​](#toprecision "Direct link to toPrecision()") ``` toPrecision(precision?): string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:580 Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. #### Parameters[​](#parameters-9 "Direct link to Parameters") | Parameter | Type | Description | | ------------ | -------- | --------------------------------------------------------------------- | | `precision?` | `number` | Number of significant digits. Must be in the range 1 - 21, inclusive. | #### Returns[​](#returns-9 "Direct link to Returns") `string` #### Inherited from[​](#inherited-from-10 "Direct link to Inherited from") ``` Number.toPrecision ``` *** ### toString()[​](#tostring "Direct link to toString()") ``` toString(): string; ``` Defined in: [packages/utils/src/denominated-number.ts:63](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L63) Returns a string representation of an object. #### Returns[​](#returns-10 "Direct link to Returns") `string` #### Overrides[​](#overrides-3 "Direct link to Overrides") ``` Number.toString ``` *** ### valueOf()[​](#valueof "Direct link to valueOf()") ``` valueOf(): number; ``` Defined in: [packages/utils/src/denominated-number.ts:59](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L59) Returns the primitive value of the specified object. #### Returns[​](#returns-11 "Direct link to Returns") `number` #### Overrides[​](#overrides-4 "Direct link to Overrides") ``` Number.valueOf ``` *** ### fromNumber()[​](#fromnumber "Direct link to fromNumber()") ``` static fromNumber( number, decimals, denomination?): DenominatedNumber; ``` Defined in: [packages/utils/src/denominated-number.ts:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L16) #### Parameters[​](#parameters-10 "Direct link to Parameters") | Parameter | Type | | --------------- | -------------------- | | `number` | `string` \| `number` | | `decimals` | `number` | | `denomination?` | `string` | #### Returns[​](#returns-12 "Direct link to Returns") `DenominatedNumber` *** ### isFinite()[​](#isfinite "Direct link to isFinite()") ``` static isFinite(number): boolean; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:225 Returns true if passed value is finite. Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a number. Only finite values of the type number, result in true. #### Parameters[​](#parameters-11 "Direct link to Parameters") | Parameter | Type | Description | | --------- | --------- | ---------------- | | `number` | `unknown` | A numeric value. | #### Returns[​](#returns-13 "Direct link to Returns") `boolean` #### Inherited from[​](#inherited-from-11 "Direct link to Inherited from") ``` Number.isFinite ``` *** ### isInteger()[​](#isinteger "Direct link to isInteger()") ``` static isInteger(number): boolean; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:231 Returns true if the value passed is an integer, false otherwise. #### Parameters[​](#parameters-12 "Direct link to Parameters") | Parameter | Type | Description | | --------- | --------- | ---------------- | | `number` | `unknown` | A numeric value. | #### Returns[​](#returns-14 "Direct link to Returns") `boolean` #### Inherited from[​](#inherited-from-12 "Direct link to Inherited from") ``` Number.isInteger ``` *** ### isNaN()[​](#isnan "Direct link to isNaN()") ``` static isNaN(number): boolean; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:239 Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter to a number. Only values of the type number, that are also NaN, result in true. #### Parameters[​](#parameters-13 "Direct link to Parameters") | Parameter | Type | Description | | --------- | --------- | ---------------- | | `number` | `unknown` | A numeric value. | #### Returns[​](#returns-15 "Direct link to Returns") `boolean` #### Inherited from[​](#inherited-from-13 "Direct link to Inherited from") ``` Number.isNaN ``` *** ### isSafeInteger()[​](#issafeinteger "Direct link to isSafeInteger()") ``` static isSafeInteger(number): boolean; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:245 Returns true if the value passed is a safe integer. #### Parameters[​](#parameters-14 "Direct link to Parameters") | Parameter | Type | Description | | --------- | --------- | ---------------- | | `number` | `unknown` | A numeric value. | #### Returns[​](#returns-16 "Direct link to Returns") `boolean` #### Inherited from[​](#inherited-from-14 "Direct link to Inherited from") ``` Number.isSafeInteger ``` *** ### parseFloat()[​](#parsefloat "Direct link to parseFloat()") ``` static parseFloat(string): number; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:265 Converts a string to a floating-point number. #### Parameters[​](#parameters-15 "Direct link to Parameters") | Parameter | Type | Description | | --------- | -------- | ----------------------------------------------- | | `string` | `string` | A string that contains a floating-point number. | #### Returns[​](#returns-17 "Direct link to Returns") `number` #### Inherited from[​](#inherited-from-15 "Direct link to Inherited from") ``` Number.parseFloat ``` *** ### parseInt()[​](#parseint "Direct link to parseInt()") ``` static parseInt(string, radix?): number; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:274 Converts A string to an integer. #### Parameters[​](#parameters-16 "Direct link to Parameters") | Parameter | Type | Description | | --------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `string` | `string` | A string to convert into a number. | | `radix?` | `number` | A value between 2 and 36 that specifies the base of the number in `string`. If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. All other strings are considered decimal. | #### Returns[​](#returns-18 "Direct link to Returns") `number` #### Inherited from[​](#inherited-from-16 "Direct link to Inherited from") ``` Number.parseInt ``` --- # BigIntMath ``` const BigIntMath: Readonly<{ get toStringTag: string; max: bigint; min: bigint; }>; ``` Defined in: [packages/utils/src/big-int.ts:1](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/big-int.ts#L1) --- ## [πŸ—ƒ@reactive-dot/core](/react/api/core/.md) [3 items](/react/api/core/.md) --- ## [πŸ“„οΈSetup](/react/getting-started/setup.md) [This walks you through the process of creating a simple ReactiveDOT application.](/react/getting-started/setup.md) --- ## [πŸ“„οΈMultichain](/react/guides/multichain.md) [Setup](/react/guides/multichain.md) --- ## [πŸ“„οΈSolidity](/react/smart-contract/solidity.md) [ReactiveDOT works with Solidity contracts on chains with PolkaVM support, such as Polkadot Asset Hub.](/react/smart-contract/solidity.md) --- # Connect wallets Wallets & accounts connection can by managed via [`useWallets`](/react/api/react/functions/useWallets.md), [`useConnectedWallets`](/react/api/react/functions/useConnectedWallets.md) & [`useAccounts`](/react/api/react/functions/useAccounts.md) hooks. tip If you prefer not having to build a wallet connection UI from scratch, checkout [DOTConnect](https://dotconnect.dev/) for a quick and easy way to add a great wallet experience to your DApps. ## Install optional dependencies[​](#install-optional-dependencies "Direct link to Install optional dependencies") Additional dependencies are required if you use any of be bellow wallet type. ### Plug-and-play wallets[​](#plug-and-play-wallets "Direct link to Plug-and-play wallets") #### [WalletConnect](https://walletconnect.com/)[​](#walletconnect "Direct link to walletconnect") * npm * Yarn * pnpm * Bun ``` npm install @reactive-dot/wallet-walletconnect ``` ``` yarn add @reactive-dot/wallet-walletconnect ``` ``` pnpm add @reactive-dot/wallet-walletconnect ``` ``` bun add @reactive-dot/wallet-walletconnect ``` #### [Mimir](https://mimir.global/)[​](#mimir "Direct link to mimir") * npm * Yarn * pnpm * Bun ``` npm install @reactive-dot/wallet-mimir ``` ``` yarn add @reactive-dot/wallet-mimir ``` ``` pnpm add @reactive-dot/wallet-mimir ``` ``` bun add @reactive-dot/wallet-mimir ``` ### Wallets requiring additional UI setup[​](#wallets-requiring-additional-ui-setup "Direct link to Wallets requiring additional UI setup") The wallets listed below require extra UI integration and platform-specific setup. To avoid implementing these flows yourself, we recommend using [DOTConnect](https://dotconnect.dev/) for a quick and reliable wallet integration. #### [Polkadot Vault](https://vault.novasama.io/)[​](#polkadot-vault "Direct link to polkadot-vault") * npm * Yarn * pnpm * Bun ``` npm install @reactive-dot/wallet-polkadot-vault ``` ``` yarn add @reactive-dot/wallet-polkadot-vault ``` ``` pnpm add @reactive-dot/wallet-polkadot-vault ``` ``` bun add @reactive-dot/wallet-polkadot-vault ``` #### [Ledger](https://www.ledger.com/)[​](#ledger "Direct link to ledger") * npm * Yarn * pnpm * Bun ``` npm install @reactive-dot/wallet-ledger ``` ``` yarn add @reactive-dot/wallet-ledger ``` ``` pnpm add @reactive-dot/wallet-ledger ``` ``` bun add @reactive-dot/wallet-ledger ``` #### Readonly[​](#readonly "Direct link to Readonly") * npm * Yarn * pnpm * Bun ``` npm install @reactive-dot/wallet-readonly ``` ``` yarn add @reactive-dot/wallet-readonly ``` ``` pnpm add @reactive-dot/wallet-readonly ``` ``` bun add @reactive-dot/wallet-readonly ``` ## Add wallets to the config[​](#add-wallets-to-the-config "Direct link to Add wallets to the config") config.ts ``` import { defineConfig } from "@reactive-dot/core"; import { InjectedWalletProvider } from "@reactive-dot/core/wallets.js"; import { LedgerWallet } from "@reactive-dot/wallet-ledger"; import { MimirWalletProvider } from "@reactive-dot/wallet-mimir"; import { PolkadotVaultWallet } from "@reactive-dot/wallet-polkadot-vault"; import { WalletConnect } from "@reactive-dot/wallet-walletconnect"; export const config = defineConfig({ // ... wallets: [ new InjectedWalletProvider(), new LedgerWallet(), new MimirWalletProvider(), new PolkadotVaultWallet(), new WalletConnect({ projectId: "WALLET_CONNECT_PROJECT_ID", providerOptions: { metadata: { name: "APP_NAME", description: "APP_DESCRIPTION", url: "APP_URL", icons: ["APP_ICON"], }, }, chainIds: [ // https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-13.md "polkadot:91b171bb158e2d3848fa23a9f1c25182", // Polkadot // ... ], }), ], }); ``` ## Connect to wallets[​](#connect-to-wallets "Direct link to Connect to wallets") wallets.tsx ``` import { useConnectedWallets, useWallets, useWalletConnector, useWalletDisconnector, } from "@reactive-dot/react"; export function Wallets() { const wallets = useWallets(); const connectedWallets = useConnectedWallets(); const [_, connectWallet] = useWalletConnector(); const [__, disconnectWallet] = useWalletDisconnector(); return (

Wallet connection

Wallets

    {wallets.map((wallet) => (
  • {wallet.name}
    {connectedWallets.includes(wallet) ? ( ) : ( )}
  • ))}
); } ``` ## Display available accounts[​](#display-available-accounts "Direct link to Display available accounts") accounts.tsx ``` import { useAccounts } from "@reactive-dot/react"; export function Accounts() { const accounts = useAccounts(); return (

Accounts

    {accounts.map((account, index) => (
  • {account.address}
    {account.name}
  • ))}
); } ``` info By default the `useAccounts` hook will only return accounts that are compatible with the current chain (i.e. as set by `ChainProvider`). If you want to get all accounts regardless of the current chain, you can pass `null` as the `chainId` option to the `useAccounts` hook: ``` useAccounts({ chainId: null }); ``` --- # Mutation The `useMutation` hook allow you to sign & submit transaction to a chain. ## Connect wallet & accounts[​](#connect-wallet--accounts "Direct link to Connect wallet & accounts") Follow the [Connect wallets](/react/getting-started/connect-wallets.md) guide to get this set up. ## Choose the signer[​](#choose-the-signer "Direct link to Choose the signer") There are multiple way to select the account used for signing. ### 1. Via context[​](#1-via-context "Direct link to 1. Via context") ``` import { SignerProvider } from "@reactive-dot/react"; function App() { return {/* ... */}; } ``` ### 2. Passing signer to the hook[​](#2-passing-signer-to-the-hook "Direct link to 2. Passing signer to the hook") ``` import { useAccounts, useMutation } from "@reactive-dot/react"; const accounts = useAccounts(); const [claimState, claim] = useMutation((tx) => tx.NominationPools.claim_payout(), { signer: accounts.at(0), }); ``` ### 2. Passing signer to the final submission[​](#2-passing-signer-to-the-final-submission "Direct link to 2. Passing signer to the final submission") ``` import { useAccounts, useMutation } from "@reactive-dot/react"; const accounts = useAccounts(); const [clearIdentityState, clearIdentity] = useMutation((tx) => tx.Identity.clear_identity()); clearIdentity({ signer: accounts.at(0) }); ``` ## Submitting transaction[​](#submitting-transaction "Direct link to Submitting transaction") ``` import { idle, MutationError, pending } from "@reactive-dot/core"; import { useMutation } from "@reactive-dot/react"; import { Binary } from "polkadot-api"; function Component() { const [remarkState, submit] = useMutation((tx) => tx.System.remark({ remark: Binary.fromText("Hello from reactive-dot!") }), ); switch (remarkState) { case idle: return
No transaction submitted yet
; case pending: return
Submitting transaction...
; default: if (remarkState instanceof MutationError) { return
Error submitting transaction!
; } return (
Submitted tx with hash: {remarkState.txHash}, with the current state of:{" "} {remarkState.type}
); } } ``` You can also pass input to the mutation builder callback using a second argument. ``` const [remarkState, submit] = useMutation((tx, message: string) => tx.System.remark({ remark: Binary.fromText(message) }), ); submit({ input: "Hello, world!" }); ``` ## Watching transactions[​](#watching-transactions "Direct link to Watching transactions") It’s common to watch for all transactions throughout the application to display an appropriate loading state or toast. This can be easily achieved with the [`useMutationListener`](/react/api/react/functions/useMutationListener.md) hook. ``` import { idle, MutationError, pending } from "@reactive-dot/core"; import { useMutationListener } from "@reactive-dot/react"; import toast from "react-hot-toast"; function Watcher() { useMutationListener((event) => { if (event.value === pending) { toast.loading("Submitting transaction", { id: event.id }); return; } if (event.value instanceof MutationError) { toast.error("Failed to submit transaction", { id: event.id }); return; } switch (event.value.type) { case "finalized": if (event.value.ok) { toast.success("Transaction succeeded", { id: event.id }); } else { toast.error("Transaction failed", { id: event.id }); } break; default: toast.loading("Transaction pending", { id: event.id }); } }); } ``` --- # Query The [`useLazyLoadQuery`](/react/api/react/functions/useLazyLoadQuery.md) hook allow you to read any data from chain, while maintaining updates, concurrency, caching & deduplication behind the scene for you. ## Async handling[​](#async-handling "Direct link to Async handling") [`useLazyLoadQuery`](/react/api/react/functions/useLazyLoadQuery.md) utilize React's Suspense API for data fetching & error handling. ``` function ActiveEra() { const activeEra = useLazyLoadQuery((builder) => builder.storage("Staking", "ActiveEra")); return
Active era: {activeEra}
; } function App() { return ( ); } ``` tip For advanced async handling, see this [guide](/react/guides/async.md). ## Fetching multiple data[​](#fetching-multiple-data "Direct link to Fetching multiple data") Fetching multiple data can be done by chaining queries together, [`useLazyLoadQuery`](/react/api/react/functions/useLazyLoadQuery.md) (with TypeScript) will automatically infer that you want to fetch multiple data concurrently & will return an array of data instead. ``` function MultiQuery() { const [expectedBlockTime, epochDuration, proposalCount] = useLazyLoadQuery((builder) => builder .constant("Babe", "ExpectedBlockTime") .constant("Babe", "EpochDuration") .storage("Treasury", "ProposalCount"), ); return (
Expected block time
{expectedBlockTime}
Epoch duration
{epochDuration}
Proposal count
{proposalCount}
); } ``` Multiple queries of the same type can also be fetched using [`runtimeApis`](/react/api/core/index/classes/Query.md#runtimeapis) & [`storages`](/react/api/core/index/classes/Query.md#storages). ``` const [rewards, metadatum] = useLazyLoadQuery((builder) => builder .runtimeApis("NominationPoolsApi", "pending_rewards", [[ADDRESS_1], [ADDRESS_2], [ADDRESS_3]]) .storages("NominationPools", "Metadata", [[POOL_ID_1], [POOL_ID_2], [POOL_ID_3]]), ); ``` ## Dependent queries[​](#dependent-queries "Direct link to Dependent queries") Result of a query can be used as variables in subsequent queries. ``` import { Binary } from "polkadot-api"; function Query() { const pools = useLazyLoadQuery((builder) => builder.storageEntries("NominationPools", "BondedPools"), ); const poolMetadatum = useLazyLoadQuery((builder) => builder.storages( "NominationPools", "Metadata", pools.map(([[poolId], _]) => [poolId] as const), ), ); return (

Pool names

    {poolMetadatum.map((metadata, index) => (
  • {Binary.toText(metadata)}
  • ))}
); } ``` ## Conditional query[​](#conditional-query "Direct link to Conditional query") Use a falsy value (`undefined`, `null` or `false`) to conditionally fetch data. If the query builder returns or itself is a falsy value, ReactiveDOT will not execute the query. ``` import { idle } from "@reactive-dot/core"; const conditionalReturn = useLazyLoadQuery((builder) => account === undefined ? undefined : builder.runtimeApi("NominationPoolsApi", "pending_rewards", [account.address]), ); // Or const conditionalFunction = useLazyLoadQuery( account === undefined ? undefined : (builder) => builder.runtimeApi("NominationPoolsApi", "pending_rewards", [account.address]), ); // Result will be `idle` if the query hasn't been executed if (conditionalReturn === idle || conditionalFunction === idle) { console.log("Queries are in idle state"); } ``` ## Refreshing queries[​](#refreshing-queries "Direct link to Refreshing queries") Data from `constant` queries never changes, while `storage` and `storage-entries` queries automatically subscribe to updates. For all other query types, you must manually refresh them to get the latest data by updating the `fetchKey` option. ``` import { useLazyLoadQuery } from "@reactive-dot/react"; import { useState, useTransition } from "react"; function QueryWithRefresh() { const [fetchCount, setFetchCount] = useState(0); const [isPending, startTransition] = useTransition(); const pendingRewards = useLazyLoadQuery( (builder) => builder.runtimeApi("NominationPoolsApi", "pending_rewards", [ACCOUNT_ADDRESS]), { fetchKey: fetchCount }, ); return (

{pendingRewards.toLocaleString()}

); } ``` The above will refresh all refreshable data in the query. If you want to target specific data to refresh, the [`useStore`](/react/api/react/functions/useStore.md) hook can be used instead. ``` import { useLazyLoadQuery, useStore } from "@reactive-dot/react"; import { useTransition } from "react"; function QueryWithRefresh() { const store = useStore(); const [isPending, startTransition] = useTransition(); const [account1Rewards, account2Rewards] = useLazyLoadQuery((builder) => builder .runtimeApi("NominationPoolsApi", "pending_rewards", [ACCOUNT_ADDRESS_1]) .runtimeApi("NominationPoolsApi", "pending_rewards", [ACCOUNT_ADDRESS_2]), ); return (
{/* ... */}
); } ``` ## Retry failed query[​](#retry-failed-query "Direct link to Retry failed query") Error from queries can be reset using `ErrorBoundary` & [`useQueryErrorResetter`](/react/api/react/functions/useQueryErrorResetter.md) hook. ``` import { useQueryErrorResetter } from "@reactive-dot/react"; import { ErrorBoundary, type FallbackProps } from "react-error-boundary"; function ErrorFallback(props: FallbackProps) { return (
Oops, something went wrong!
); } function AppErrorBoundary() { const resetQueryError = useQueryErrorResetter(); return ( resetQueryError()}> {/* ... */} ); } ``` --- # Setup This walks you through the process of creating a simple ReactiveDOT application. Automatic installation For new projects, you can quickly set up your ReactiveDOT app using the [`create-polkadot-dapp`](https://github.com/paritytech/create-polkadot-dapp) command line interface (CLI). This will create a new ReactiveDOT project using TypeScript and install the required dependencies. * npm * Yarn * pnpm * Bun ``` npm create polkadot-dapp@latest ``` ``` yarn create polkadot-dapp ``` ``` pnpm create polkadot-dapp ``` ``` bunx create-polkadot-dapp ``` ## Installation[​](#installation "Direct link to Installation") First add ReactiveDOT, along with required packages as dependencies to your React project. * npm * Yarn * pnpm * Bun ``` npm install @reactive-dot/core @reactive-dot/react polkadot-api ``` ``` yarn add @reactive-dot/core @reactive-dot/react polkadot-api ``` ``` pnpm add @reactive-dot/core @reactive-dot/react polkadot-api ``` ``` bun add @reactive-dot/core @reactive-dot/react polkadot-api ``` ### Download & sync metadata[​](#download--sync-metadata "Direct link to Download & sync metadata") Next, download the latest metadata from the chain you want to connect to and generate the types. ``` # `papi add` is the command # `polkadot_asset_hub` is the name we're giving to this chain (can be any JS variable name) # `-n polkadot_asset_hub` specifies to download the metadata from the well-known chain polkadot_asset_hub npx papi add polkadot_asset_hub -n polkadot_asset_hub # Wait for the latest metadata to download, then generate the types: npx papi ``` tip It's a really good idea to add `papi` to the "postinstall" script in package.json to automate generating the types after installation. info For more information on metadata syncing and type generation, please refer to this [documentation](https://papi.how/codegen) provided by [Polkadot-API](https://papi.how/). ### Create config[​](#create-config "Direct link to Create config") * Light client * WebSocket config.ts ``` // `polkadot_asset_hub` is the name we gave to `npx papi add` import { polkadot_asset_hub } from "@polkadot-api/descriptors"; import { defineConfig } from "@reactive-dot/core"; import { createLightClientProvider } from "@reactive-dot/core/providers/light-client.js"; import { InjectedWalletProvider } from "@reactive-dot/core/wallets.js"; const lightClientProvider = createLightClientProvider(); export const config = defineConfig({ chains: { // Use "asset_hub" as the `ChainId`, this can be any unique string value asset_hub: { descriptor: polkadot_asset_hub, provider: lightClientProvider .addRelayChain({ id: "polkadot" }) .addParachain({ id: "polkadot_asset_hub" }), }, }, wallets: [new InjectedWalletProvider()], }); // Register the config for type safety declare module "@reactive-dot/core" { export interface Register { config: typeof config; } } ``` Parachains setup config.ts ``` // ... import { polkadot, polkadot_asset_hub, polkadot_people } from "@polkadot-api/descriptors"; const lightClientProvider = createLightClientProvider(); const polkadotProvider = lightClientProvider.addRelayChain({ id: "polkadot" }); export const config = defineConfig({ chains: { relay: { descriptor: polkadot, provider: polkadotProvider, }, asset_hub: { descriptor: polkadot_asset_hub, provider: polkadotProvider.addParachain({ id: "polkadot_asset_hub" }), }, people: { descriptor: polkadot_people, provider: polkadotProvider.addParachain({ id: "polkadot_people" }), }, }, wallets: [new InjectedWalletProvider()], }); ``` config.ts ``` // `polkadot_asset_hub` is the name we gave to `npx papi add` import { polkadot_asset_hub } from "@polkadot-api/descriptors"; import { defineConfig } from "@reactive-dot/core"; import { InjectedWalletProvider } from "@reactive-dot/core/wallets.js"; import { getWsProvider } from "polkadot-api/ws"; export const config = defineConfig({ chains: { // Use "asset_hub" as the `ChainId`, this can be any unique string value asset_hub: { descriptor: polkadot_asset_hub, provider: getWsProvider("wss://polkadot-asset-hub-rpc.polkadot.io"), }, }, wallets: [new InjectedWalletProvider()], }); // Register the config for type safety declare module "@reactive-dot/core" { export interface Register { config: typeof config; } } ``` ### Wrap app in context providers[​](#wrap-app-in-context-providers "Direct link to Wrap app in context providers") app.tsx ``` import { config } from "./config"; import { ChainProvider, ReactiveDotProvider } from "@reactive-dot/react"; import { Suspense } from "react"; export function App() { return ( {/* ... */} ); } ``` ## Use ReactiveDOT[​](#use-reactivedot "Direct link to Use ReactiveDOT") my-component.tsx ``` import { config } from "./config"; import { useAccounts, useLazyLoadQuery } from "@reactive-dot/react"; export function MyComponent() { const accounts = useAccounts(); const [timestamp, totalIssuance] = useLazyLoadQuery((builder) => builder.storage("Timestamp", "Now").storage("Balances", "TotalIssuance"), ); return (
    {accounts.map((account, index) => (
  • Address: {account.address}
    {account.name &&
    Name: {account.name}
    }
  • ))}
Latest block timestamp: {new Date(Number(timestamp)).toLocaleString()}
Total issuance: {totalIssuance.toString()}
); } ``` --- # Advanced async handling ReactiveDOT provides flexible async handling patterns that work seamlessly with React 19's concurrent features. By default, all hooks suspend, but you can opt-out to gain fine-grained control over loading states and error handling. ## Suspense mode (default)[​](#suspense-mode-default "Direct link to Suspense mode (default)") By default, ReactiveDOT hooks suspend while data is loading, integrating naturally with React's Suspense boundaries. ``` import { useSpendableBalance } from "@reactive-dot/react"; import { Suspense } from "react"; function UserBalance({ address }: { address: string }) { // Suspends until balance is loaded const balance = useSpendableBalance(address); return
Balance: {balance.toLocaleString()}
; } function App() { return ( Loading balance...}> ); } ``` ## Promise mode[​](#promise-mode "Direct link to Promise mode") Opt-out of suspense by passing `{ use: false }` to get a **stable, stateful Promise** instead. This gives you full control over async state management. Promise stability & reactivity The promise maintains a stable reference across re-renders, making it safe to use with React 19's `use` function. However, it's also reactive: when the underlying data changes (from chain subscriptions, query invalidations, or parameter updates), the promise automatically resolves to the new value, triggering a re-render. ### Using React's `use` function[​](#using-reacts-use-function "Direct link to using-reacts-use-function") The simplest way to consume a promise is with React 19's built-in `use` function, which suspends at the call site. ``` import { useSpendableBalance } from "@reactive-dot/react"; import { use, Suspense } from "react"; function UserBalance({ address }: { address: string }) { const balancePromise = useSpendableBalance(address, { use: false }); // Suspends here until promise resolves const balance = use(balancePromise); return
Balance: {balance.toLocaleString()}
; } function App() { return ( Loading...}> ); } ``` ### Using [`usePromiseValue`](/react/api/react/functions/usePromiseValue.md) for non-suspending UIs[​](#using-usepromisevalue-for-non-suspending-uis "Direct link to using-usepromisevalue-for-non-suspending-uis") When you want to handle loading states without suspense, use [`usePromiseValue`](/react/api/react/functions/usePromiseValue.md) to track promise state. This is particularly useful when creating reusable hooks where you don't want to surprise consumers with unexpected suspense behavior. ``` import { pending } from "@reactive-dot/core"; import { useSpendableBalance, usePromiseValue } from "@reactive-dot/react"; function UserBalance({ address }: { address: string }) { const balancePromise = useSpendableBalance(address, { use: false }); const balance = usePromiseValue(balancePromise); if (balance === pending) { return
Loading balance...
; } return
Balance: {balance.toLocaleString()}
; } ``` #### Providing fallback values[​](#providing-fallback-values "Direct link to Providing fallback values") You can provide a fallback function to avoid the `pending` symbol entirely: ``` import { useSpendableBalance, usePromiseValue } from "@reactive-dot/react"; function UserBalance({ address }: { address: string }) { const balancePromise = useSpendableBalance(address, { use: false }); // Falls back to previous value or undefined while loading const balance = usePromiseValue(balancePromise, (previousValue) => previousValue ?? undefined); if (balance === undefined) { return
Loading balance...
; } return
Balance: {balance.toLocaleString()}
; } ``` This is useful for: * Creating reusable hooks with predictable behavior (no surprise suspense) * Showing stale data while refreshing * Providing default values during initial load * Having explicit control over loading states Reusable hooks When building reusable hooks, consider using [`usePromiseValue`](/react/api/react/functions/usePromiseValue.md) over the default suspense mode. This gives consumers explicit control over how they handle loading states, avoiding unexpected suspense behavior. ### Using [`usePromises`](/react/api/react/functions/usePromises.md) for parallel requests[​](#using-usepromises-for-parallel-requests "Direct link to using-usepromises-for-parallel-requests") Load multiple promises in parallel and suspend until all resolve: ``` import { useSpendableBalance, useBlock, useLazyLoadQuery, usePromises } from "@reactive-dot/react"; import { Binary } from "polkadot-api"; import { Suspense } from "react"; function UserProfile({ address }: { address: string }) { const [balance, block, identity] = usePromises([ useSpendableBalance(address, { use: false }), useBlock({ use: false }), useLazyLoadQuery((query) => query.storage("Identity", "IdentityOf", [address]), { use: false }), ]); return (

Balance: {balance.toLocaleString()}

Block: {block.number.toLocaleString()}

Identity: {identity ? Binary.toText(identity.info.display) : "None"}

); } function App() { return ( Loading profile...}> ); } ``` ### Using the [`Await`](/react/api/react/functions/Await.md) component[​](#using-the-await-component "Direct link to using-the-await-component") The [`Await`](/react/api/react/functions/Await.md) component provides a declarative way to handle promises with render props: ``` import { useSpendableBalance, Await } from "@reactive-dot/react"; import { Suspense } from "react"; function UserBalance({ address }: { address: string }) { const balancePromise = useSpendableBalance(address, { use: false }); return ( Loading...}> {(balance) =>
Balance: {balance.toLocaleString()}
}
); } function App() { return ; } ``` ## Choosing the right pattern[​](#choosing-the-right-pattern "Direct link to Choosing the right pattern") | Pattern | Use case | | ---------------------------------------------------------------------- | ----------------------------------------------------- | | **Default (Suspense)** | Simplest approach, great for most cases | | **`use`** | When you need promise control but still want suspense | | **[`usePromiseValue`](/react/api/react/functions/usePromiseValue.md)** | Custom loading states without suspense | | **[`usePromises`](/react/api/react/functions/usePromises.md)** | Parallel data fetching with suspense | | **[`Await`](/react/api/react/functions/Await.md)** | Declarative promise handling, good for composition | ## Error handling[​](#error-handling "Direct link to Error handling") All patterns work with React's Error Boundaries. Strategically place Error Boundaries at different levels of your component tree based on how granular you want your error UI to be: ``` import { ErrorBoundary } from "react-error-boundary"; function App() { return ( // Top-level boundary for critical errors Something went wrong}> Loading...}> ); } // Or use multiple boundaries for isolated error handling function Dashboard() { return (
{/* Balance section can fail independently */} Failed to load balance
}> Loading balance...}> {/* Identity section can fail independently */} Failed to load identity}> Loading identity...}> ); } ``` Error Boundaries required Components using async hooks will throw errors that propagate up the component tree. Without an Error Boundary, these errors can crash your entire app. Place boundaries strategically based on your desired error handling granularity. ## Best practices[​](#best-practices "Direct link to Best practices") 1. **Start with suspense mode** - It's the simplest and most React-idiomatic approach 2. **Use `{ use: false }` when you need control** - For custom loading states or parallel requests 3. **Consider [`usePromiseValue`](/react/api/react/functions/usePromiseValue.md) for reusable hooks** - Avoids surprising consumers with suspense 4. **Combine patterns** - Different parts of your app can use different patterns 5. **Place Error Boundaries strategically** - Wrap sections of your app where you want errors to be caught and displayed, based on how granular you want your error UI to be ## Complete example[​](#complete-example "Direct link to Complete example") Here's a full example combining multiple patterns: ``` import { pending } from "@reactive-dot/core"; import { useSpendableBalance, useBlock, useLazyLoadQuery, usePromises, usePromiseValue, Await, } from "@reactive-dot/react"; import { Binary } from "polkadot-api"; import { Suspense, use } from "react"; import { ErrorBoundary } from "react-error-boundary"; // Simple suspense function QuickBalance({ address }: { address: string }) { const balance = useSpendableBalance(address); return
{balance.toLocaleString()}
; } // Non-suspending with explicit state control function SmoothBalance({ address }: { address: string }) { const balance = usePromiseValue(useSpendableBalance(address, { use: false })); return (
{balance?.toLocaleString() ?? "Loading..."}
); } // Parallel requests with different data sources function UserDashboard({ address }: { address: string }) { const [balance, block, identity] = usePromises([ useSpendableBalance(address, { use: false }), useBlock({ use: false }), useLazyLoadQuery((query) => query.storage("Identity", "IdentityOf", [address]), { use: false }), ]); return (

Balance: {balance.toLocaleString()}

Block: #{block.number.toLocaleString()}

Identity: {identity ? Binary.toText(identity.info.display) : "None"}

); } function App() { return ( Error loading data}> Loading...}> ); } ``` --- # Bulk refresh Sometimes you need to refresh multiple queries at once based on certain criteria. The store provides methods to invalidate queries in bulk using a filter function. ``` import { useStore } from "@reactive-dot/react"; const store = useStore(); // Refresh all runtime-api queries store.invalidateChainQueries((instruction) => instruction.type === "runtime-api"); // Refresh all "NominationPoolsApi" runtime-api queries store.invalidateChainQueries( (instruction) => instruction.type === "runtime-api" && instruction.api === "NominationPoolsApi", ); // Refresh all queries to a specific contract store.invalidateContractQueries((instruction) => instruction.address === "CONTRACT_ADDRESS"); // Refresh all balanceOf queries to a contract store.invalidateContractQueries( (instruction) => instruction.kind === "ink" && instruction.type === "message" && instruction.name === "balanceOf", ); ``` --- # FAQ Collection of frequently asked questions with ideas on how to troubleshoot and resolve them. ## Unexpected behavior after installing or bumping dependencies[​](#unexpected-behavior-after-installing-or-bumping-dependencies "Direct link to Unexpected behavior after installing or bumping dependencies") Common errors: * `Uncaught TypeError: [X] is not a function` * `Type [X] is not assignable to type [Y]` * etc These errors often occurs when multiple conflicting versions of ReactiveDOT are installed. To resolve this, try the following steps: 1. **Ensure all ReactiveDOT dependencies are up to date** 2. **Clean and reinstall dependencies:**
Delete your `node_modules` folder and reinstall dependencies. You can do this manually or use [npkill](https://npkill.js.org/): ``` npx npkill ``` 3. **Deduplicate dependencies:**
Some package manager does not deduplicate dependencies by default and may create duplicates when updating packages. To fix this, run dedupe: ``` # NPM npm dedupe # Yarn yarn dedupe # PNPM pnpm dedupe ``` --- # Incremental loading ## `defer`[​](#defer "Direct link to defer") The `defer` directive may be specified on a query to imply de-prioritization, that causes the data to be in [`pending`](/react/api/core/index/variables/pending.md) state in the initial response, and delivered as a subsequent response afterward. For React, this can also be used to opt-out of suspending. info When you pass `{ defer: true }` to the query, the result will now be either: * A resolved value (the response you expect), or * A special [`pending`](/react/api/core/index/variables/pending.md) symbol from `@reactive-dot/core`, indicating that the data hasn’t arrived yet. ``` import { pending } from "@reactive-dot/core"; import { useLazyLoadQuery } from "@reactive-dot/react"; export function Tvl() { const tvl = useLazyLoadQuery((query) => query.storage("NominationPools", "TotalValueLocked", [], { defer: true }), ); if (tvl === pending) { return ; } return

Total value locked: {tvl}

; } ``` ## `stream`[​](#stream "Direct link to stream") For multi-entry queries like `storages`, `runtimeApis`, etc., the `stream` directive allows the client to receive partial results as they become available, before the entire response is ready. Take this basic example, where a component displays the total balance across multiple staking positions: ``` import { useLazyLoadQuery } from "@reactive-dot/react"; export function TotalStaked({ addresses }: { addresses: string[] }) { const ledgers = useLazyLoadQuery((query) => query.storages( "Staking", "Ledger", addresses.map((address) => [address] as const), ), ); return

Total staked: {ledgers.reduce((prev, curr) => prev + curr.total, 0n)}

; } ``` This works well for a small number of accounts, where results load quickly. But with many accounts, waiting for the full response may be too slow and undesirable. To show users a partial result as soon as possible, you can enable streaming. info When you pass `{ stream: true }` to the query, each item in the result array will now be either: * A resolved value (the response you expect), or * A special [`pending`](/react/api/core/index/variables/pending.md) symbol from `@reactive-dot/core`, indicating that the data for that item hasn’t arrived yet. This allows your UI to update incrementally as each item resolves: ``` import { pending } from "@reactive-dot/core"; import { useLazyLoadQuery } from "@reactive-dot/react"; export function TotalStaked({ addresses }: { addresses: string[] }) { const ledgers = useLazyLoadQuery((query) => query.storages( "Staking", "Ledger", addresses.map((address) => [address] as const), { stream: true }, ), ); const loadedLedgers = ledgers.filter((ledger) => ledger !== pending); const hasMore = ledgers.includes(pending); return (

Total staked: {loadedLedgers.reduce((prev, curr) => prev + curr.total, 0n)} {hasMore ? "..." : ""}

); } ``` With `stream: true`, the component can render incrementally, updating the total as each balance loads. tip You can use the presence of `pending` to show loading indicators, spinners, or skeletons while waiting for the rest of the data. --- # Multichain ## Setup[​](#setup "Direct link to Setup") Multichain setup can be done by adding extra chain configurations, after having followed this guide [here](/react/getting-started/setup.md). ### Download & sync metadata[​](#download--sync-metadata "Direct link to Download & sync metadata") Download the latest metadata from all chains you want to connect to and generate the types. ``` npx papi add dot -n polkadot npx papi add ksm -n kusama npx papi add wnd -n westend npx papi ``` ### Configure chains[​](#configure-chains "Direct link to Configure chains") config.ts ``` import type { dot, ksm, wnd } from "@polkadot-api/descriptors"; import { defineConfig } from "@reactive-dot/core"; export const config = defineConfig({ chains: { polkadot: { descriptor: dot, // ... }, kusama: { descriptor: ksm, // ... }, westend: { descriptor: wnd, // ... }, }, //... }); declare module "@reactive-dot/core" { export interface Register { config: typeof config; } } ``` ## Chain selection[​](#chain-selection "Direct link to Chain selection") Chain selection can be done either at the Context or Hook level. ### Context[​](#context "Direct link to Context") One active chain at a time. ``` // ... import type { ChainId } from "@reactive-dot/core"; import type { ChainProvider } from "@reactive-dot/react"; function App() { const [currentChainId, setCurrentChainId] = useState("polkadot"); return ( ); } ``` Multiple active chains at the same time. ``` // ... import type { ChainProvider } from "@reactive-dot/react"; function App() { return ( <> ); } ``` ### Hook[​](#hook "Direct link to Hook") All hooks provide an option to specify which chain to target. ``` import { useBlock } from "@reactive-dot/react"; function Component() { const polkadotBlock = useBlock({ chainId: "polkadot" }); const kusamaBlock = useBlock({ chainId: "kusama" }); const westendBlock = useBlock({ chainId: "westend" }); } ``` ## Chain narrowing[​](#chain-narrowing "Direct link to Chain narrowing") By default, ReactiveDOT merges type definitions from all the chains in the config. For instance, if your DApp is set up to work with Polkadot, Kusama, and Westend, the following code will fail because the Bounties pallet is available only on Polkadot and Kusama, not on Westend: ``` function Component() { // Since the `Bounties` pallet doesn't exist on Westend, this will: // 1. Trigger a TypeScript error // 2. Cause a runtime error if Westend is selected const bountyCount = useLazyLoadQuery((builder) => builder.storage("Bounties", "BountyCount")); // ... } ``` To resolve this, you can explicitly specify the chain to query, which will override the chain ID provided by context: ``` function Component() { const bountyCount = useLazyLoadQuery((builder) => builder.storage("Bounties", "BountyCount"), { chainId: "polkadot", }); // ... } ``` Alternatively, if you want to keep using the chain ID provided by context, you can use the following pattern: ``` function useBountiesChainId() { const chainId = useChainId(); switch (chainId) { case "polkadot": case "kusama": return chainId; default: throw new Error("This chain does not support bounties", { cause: chainId, }); } } function BountiesPalletRequiredComponent() { const bountyCount = useLazyLoadQuery((builder) => builder.storage("Bounties", "BountyCount"), { // This will: // 1. Throw an error if the chain ID does not support bounties // 2. Restrict the possible chain types for better intellisense chainId: useBountiesChainId(), }); // ... } function App() { // ... // Use only compatible chain IDs, otherwise an error will be thrown const bountiesEnabledChainIds = ["polkadot", "kusama"] satisfies ChainId[]; return (
{bountiesEnabledChainIds.map((chainId) => ( ))} {/* ... */}
); } ``` Finally, if your application primarily uses a few chains but interacts with many other supporting chains, you can use the `targetChains` option: ``` import { defineConfig } from "@reactive-dot/core"; const config = defineConfig({ chains: { polkadot: { // ... }, polkadot_asset_hub: { // ... }, polkadot_people: { // ... }, polkadot_collectives: { // ... }, polkadot_bridge_hub: { // ... }, }, // This will restrict the default chain types used by hooks // to just Polkadot when no explicit `chainId` is provided targetChains: ["polkadot"], // ... }); ``` --- # Number utility ## Denominated number[​](#denominated-number "Direct link to Denominated number") To handle complexity around [planck unit](https://wiki.polkadot.network/docs/learn-DOT#the-planck-unit) used in Polkadot, a utility class [`DenominatedNumber`](/react/api/utils/classes/DenominatedNumber.md) is provided by [`@reactive-dot/utils`](https://reactivedot.dev/api/utils). ``` import { DenominatedNumber } from "@reactive-dot/utils"; // Denominated numbers are created with a planck value and a decimal places number const numberFromPlanck = new DenominatedNumber(10_000_000_000n, 10); console.log(numberFromPlanck.valueOf()); // 10 // Denominated number can also be created from number instead of planck const numberFromNumber = DenominatedNumber.fromNumber(10, 10); console.log(numberFromNumber.planck); // 10000000000n // A string denomination can optionally be added for locale string conversion capability const numberWithDenomination = DenominatedNumber.fromNumber(10, 10, "DOT"); console.log(numberWithDenomination.toLocaleString("en-NZ")); // DOT 10.00 console.log(numberWithDenomination.toLocaleString("de-DE")); // 10,00 DOT // Arithmetics let dotAmount = DenominatedNumber.fromNumber(10, 10, "DOT"); // Arithmetic operations can be performed using the number's planck value dotAmount = dotAmount.mapPlanck((planck) => planck + 5_000_000_000n); console.log(dotAmount.toLocaleString()); // DOT 10.50 // Arithmetic operations can also be carried out with the number value // instead of planck if possible lost of precision is acceptable dotAmount = dotAmount.mapNumber((number) => (number * 2) / 4); console.log(dotAmount.toLocaleString()); // DOT 5.25 ``` ## Native token[​](#native-token "Direct link to Native token") Two hooks [`useNativeTokenAmountFromPlanck`](/react/api/react/functions/useNativeTokenAmountFromPlanck.md) & [`useNativeTokenAmountFromNumber`](/react/api/react/functions/useNativeTokenAmountFromNumber.md) are also provided for easy conversion from planck and/or number value to native token amount. ``` import { useNativeTokenAmountFromNumber, useNativeTokenAmountFromPlanck, } from "@reactive-dot/react"; let amount = useNativeTokenAmountFromPlanck(10_000_000_000n); // Or amount = useNativeTokenAmountFromNumber(1); console.log(amount.toLocaleString("en-NZ")); // DOT 1.00 // Partial application is also supported by omitting the planck/number value. // Here, a conversion function will be returned instead. const amountFromPlanck = useNativeTokenAmountFromPlanck(); [10_000_000_000n, 20_000_000_000n, 30_000_000_000n] .map(amountFromPlanck) .map((amount) => amount.toLocaleString("en-NZ")) .forEach(console.log); // DOT 1.00 // DOT 2.00 // DOT 3.00 ``` ## Spendable balance[​](#spendable-balance "Direct link to Spendable balance") The [`useSpendableBalance`](/react/api/react/functions/useSpendableBalance.md) & [`useSpendableBalances`](/react/api/react/functions/useSpendableBalances.md) hooks can be used to get the [spendable balance](https://wiki.polkadot.network/docs/learn-account-balances) of an account(s). ``` import { useSpendableBalance, useSpendableBalances } from "@reactive-dot/react"; const spendableBalance = useSpendableBalance(ACCOUNT_ADDRESS); console.log(spendableBalance.toLocaleString("en-NZ")); // DOT 10.00 const spendableBalances = useSpendableBalances([ ACCOUNT_ADDRESS_1, ACCOUNT_ADDRESS_2, ACCOUNT_ADDRESS_3, ]); console.log(spendableBalances.map((balance) => balance.toLocaleString("en-NZ"))); // ["DOT 10.00", "DOT 20.00", "DOT 30.00"] ``` --- # Query performance All query hooks in ReactiveDOT create subscriptions to the underlying data sources. These subscriptions ensure that your components always reflect the latest data changes. However, it's important to manage these subscriptions effectively to avoid performance issues. ## Subscription lifecycle[​](#subscription-lifecycle "Direct link to Subscription lifecycle") A new subscription is created the first time a query hook is mounted. When the last component that uses the query unmounts, the subscription is automatically cleaned up. Therefore, it's crucial to ensure components unmount when they are no longer needed. ## Unmounting components[​](#unmounting-components "Direct link to Unmounting components") Always remember to unmount components when they are no longer visible or required. This is the most straightforward way to manage subscriptions and prevent unnecessary data fetching and updates. ## Controlling subscriptions[​](#controlling-subscriptions "Direct link to Controlling subscriptions") In some scenarios, you might not want to unmount components (e.g., in an infinite scroll implementation where you only want active subscriptions on visible elements). In such cases, you can use the [`QueryOptionsProvider`](/react/api/react/functions/QueryOptionsProvider.md) component to control subscription behavior. The `QueryOptionsProvider` allows you to disable subscriptions for specific parts of your application. This can be useful for optimizing performance when dealing with a large number of components. ``` import { QueryOptionsProvider } from "@reactive-dot/react"; export default function ParentComponent() { // Hook implementation not included for brevity const isVisible = useIsVisible(); return ( ); } ``` --- # Using Polkadot-API (PAPI) ReactiveDOT is designed as a convenient layer over [PAPI](https://papi.how/) for enhanced developer quality of life. For more advanced use cases and data manipulation, it's recommended to use [PAPI](https://papi.how/) directly. You can access PAPI APIs through two hooks: [`useClient`](/react/api/react/functions/useClient.md) and [`useTypedApi`](/react/api/react/functions/useTypedApi.md). ## Polkadot client[​](#polkadot-client "Direct link to Polkadot client") `PolkadotClient` interface shapes the top-level API for `polkadot-api`. You can find the full documentation [here](https://papi.how/client). ``` import { useClient } from "@reactive-dot/react"; function Component() { const client = useClient(); useEffect(() => { client._request("system_version", []).then(console.log); }, [client]); } ``` ## Typed API[​](#typed-api "Direct link to Typed API") The `TypedApi` allows easy interaction with the runtime metadata, with a great developer experience. You can find the full documentation [here](https://papi.how/typed). ``` import { useTypedApi } from "@reactive-dot/react"; import { filter, mergeMap, take } from "rxjs"; function Component() { const typedApi = useTypedApi(); useEffect(() => { typedApi.event.Balances.Burned.watch() .pipe( mergeMap(({ events }) => events), filter((evt) => evt.payload.amount > 10n ** 10n), ) .pipe(take(5)) .forEach(console.log); }, [typedApi]); } ``` --- # Ink! ReactiveDOT works with [Ink! contracts](https://use.ink) on chains with PolkaVM support, such as [Polkadot Asset Hub](https://polkadot.com/platform/hub). warning Ink! contract support is deprecated. See [this post](https://forum.polkadot.network/t/discontinuation-of-ink-rust-smart-contract-language/16849) for more information. tip If you're new to ReactiveDOT, we strongly recommend starting with the [β€œGetting started guide”](/react/category/getting-started.md). This guide covers essential topics such as connecting to a blockchain, setting up wallets, querying data, and handling errors effectively. ## Defining contract[​](#defining-contract "Direct link to Defining contract") ReactiveDOT utilizes Ink! [metadata](https://use.ink/docs/v6/basics/metadata/ink) to interact with and provide types for contracts. Metadata files typically end with `.json` or `.contract` and can be obtained by [compiling](https://use.ink/docs/v6/getting-started/building-your-contract) the contract yourself or from the contract developers. Once you've obtained the metadata file(s), run the following command to convert it to TypeScript-friendly metadata: ``` npx papi ink add "/path/to/metadata.(json|contract)" --key "myContract" ``` info For more information on contract metadata type generation, refer to this [documentation](https://papi.how/ink#codegen) provided by [Polkadot-API](https://papi.how). The contract metadata can now be imported and configured as follows: contracts.ts ``` import { contracts } from "@polkadot-api/descriptor"; import { defineContract } from "@reactive-dot/core"; export const myContract = defineContract({ type: "ink", descriptor: contracts.myContract, }); ``` ## Reading contract data[​](#reading-contract-data "Direct link to Reading contract data") The [`useLazyLoadQuery`](/react/api/react/functions/useLazyLoadQuery.md) hook with [`Query.contract`](/react/api/core/index/classes/Query.md#contract) instruction allows you to read data on a smart contract, from [storage](https://use.ink/docs/v6/basics/storing-values) or a [view (read-only) message](https://use.ink/docs/v6/basics/reading-values#contract-functions). They can only read the state of the contract, and cannot make any changes to it. Component.tsx ``` import { myContract } from "./contracts.ts"; import { useLazyLoadQuery } from "@reactive-dot/react"; function Component() { const [metadata, balance, freeBalance] = useLazyLoadQuery((builder) => builder.contract(myContract, CONTRACT_ADDRESS, (builder) => builder // Root storage .rootStorage() // Nested storage .storage("balance", ACCOUNT_ADDRESS) // Readonly message .message("free_balance", ACCOUNT_ADDRESS), ), ); return (

Metadata: {JSON.stringify(metadata)}

Balance: {balance}

Free Balance: {freeBalance}

); } ``` ### Multi query[​](#multi-query "Direct link to Multi query") Similar to chain [multi-query](/react/getting-started/query.md#fetching-multiple-data), the `contracts`, `storages`, and `messages` instructions enable reading multiple pieces of data in parallel. MultiQueryComponent.tsx ``` import { myContract } from "./contracts.ts"; import { useLazyLoadQuery } from "@reactive-dot/react"; function Component() { const results = useLazyLoadQuery((builder) => builder.contracts(myContract, [CONTRACT_ADDRESS_1, CONTRACT_ADDRESS_2], (builder) => builder .storage("symbol") .storages("balance", [ACCOUNT_1_ADDRESS, ACCOUNT_2_ADDRESS]) .messages("free_balance", [ACCOUNT_1_ADDRESS, ACCOUNT_2_ADDRESS]), ), ); return (
{results.map(([symbol, balances, freeBalances], index) => (

Symbol: {symbol}

Balances: {balances.join(", ")}

Free Balances: {freeBalances.join(", ")}

))}
); } ``` ## Writing to contract[​](#writing-to-contract "Direct link to Writing to contract") The [`useContractMutation`](/react/api/react/functions/useContractMutation.md) hook allows you to mutate data on a smart contract, from a payable or nonpayable (write) message. WriteComponent.tsx ``` import { myContract } from "./contracts.ts"; import { idle, MutationError, pending } from "@reactive-dot/core"; import { useContractMutation } from "@reactive-dot/react"; function Component() { const [status, mint] = useContractMutation((mutate) => mutate(myContract, CONTRACT_ADDRESS, "mint", { data: { id: 1 }, value: 10_000n, }), ); return (
{(() => { switch (status) { case idle: return

No transaction submitted yet.

; case pending: return

Submitting transaction...

; default: if (status instanceof MutationError) { return

Error submitting transaction!

; } return (

Submitted tx with hash: {status.txHash}, current state: {status.type}

); } })()}
); } ``` ## Listening to contract events[​](#listening-to-contract-events "Direct link to Listening to contract events") The [`useContractEventListener`](/react/api/react/functions/useContractEventListener.md) hook allows you to subscribe to and handle events emitted by a smart contract in real time. This is especially useful for monitoring state changes or user interactions on the blockchain. By listening to specific events, you can trigger actions or update your application's state dynamically based on the event data. EventListenerComponent.tsx ``` import { myContract } from "./contracts.ts"; import { useContractEventListener } from "@reactive-dot/react"; function Component() { useContractEventListener(myContract, CONTRACT_ADDRESS, "Transfer", (event) => { console.log("block", event.block.number); console.log("from", event.data.from); console.log("to", event.data.to); console.log("value", event.data.value); }); return null; } ``` --- # Solidity ReactiveDOT works with [Solidity contracts](https://soliditylang.org/) on chains with PolkaVM support, such as [Polkadot Asset Hub](https://polkadot.com/platform/hub). tip If you're new to ReactiveDOT, we strongly recommend starting with the [β€œGetting started guide”](/react/category/getting-started.md). This guide covers essential topics such as connecting to a blockchain, setting up wallets, querying data, and handling errors effectively. ## Defining contract[​](#defining-contract "Direct link to Defining contract") ReactiveDOT can infer types based on [ABI](https://docs.soliditylang.org/en/v0.8.24/abi-spec.html#json) and [EIP-712](https://eips.ethereum.org/EIPS/eip-712) Typed Data definitions (powered by [ABIType](https://abitype.dev/)), giving you full end-to-end type-safety from your contracts to your frontend and incredible developer experience (e.g. autocomplete ABI function names and catch misspellings, strongly-typed ABI function arguments, etc.). For this to work, define your contract using its ABI, as shown below: contracts.ts ``` import { contracts } from "@polkadot-api/descriptor"; import { defineContract } from "@reactive-dot/core"; export const myContract = defineContract({ type: "solidity", abi: [ { type: "function", name: "balanceOf", stateMutability: "view", inputs: [{ name: "account", type: "address" }], outputs: [{ type: "uint256" }], }, { type: "function", name: "totalSupply", stateMutability: "view", inputs: [], outputs: [{ name: "supply", type: "uint256" }], }, ], }); ``` ## Reading contract data[​](#reading-contract-data "Direct link to Reading contract data") The [`useLazyLoadQuery`](/react/api/react/functions/useLazyLoadQuery.md) hook with [`Query.contract`](/react/api/core/index/classes/Query.md#contract) instruction allows you to read data on a smart contract, from a `view` or `pure` (read-only) function. They can only read the state of the contract, and cannot make any changes to it. Component.tsx ``` import { myContract } from "./contracts.ts"; import { useLazyLoadQuery } from "@reactive-dot/react"; function Component() { const [totalSupply, balance] = useLazyLoadQuery((builder) => builder.contract(myContract, CONTRACT_ADDRESS, (builder) => builder.func("totalSupply").func("balanceOf", [SOME_ADDRESS]), ), ); return (

Total supply: {totalSupply.toLocaleString()}

Balance: {balance.toLocaleString()}

); } ``` ### Multi query[​](#multi-query "Direct link to Multi query") Similar to chain [multi-query](/react/getting-started/query.md#fetching-multiple-data), the `contracts` & `funcs` instructions enable reading multiple pieces of data in parallel. MultiQueryComponent.tsx ``` import { myContract } from "./contracts.ts"; import { useLazyLoadQuery } from "@reactive-dot/react"; function Component() { const contracts = [CONTRACT_ADDRESS_1, CONTRACT_ADDRESS_2] as const; const results = useLazyLoadQuery((builder) => builder.contracts(myContract, contracts, (builder) => builder.func("totalSupply").funcs("balanceOf", [[ACCOUNT_1_ADDRESS], [ACCOUNT_2_ADDRESS]]), ), ); return (
{results.map(([totalSupply, balances], index) => (

Contract address: {contracts[index]}

Total supply: {totalSupply}

Balances: {balances.join(", ")}

))}
); } ``` ## Writing to contract[​](#writing-to-contract "Direct link to Writing to contract") The [`useContractMutation`](/react/api/react/functions/useContractMutation.md) hook allows you to mutate data on a smart contract, from a payable or nonpayable (write) message. WriteComponent.tsx ``` import { idle, MutationError, pending, defineContract } from "@reactive-dot/core"; import { useContractMutation } from "@reactive-dot/react"; const myContract = defineContract({ type: "solidity", abi: [ { name: "mint", type: "function", stateMutability: "nonpayable", inputs: [{ internalType: "uint32", name: "tokenId", type: "uint32" }], outputs: [], }, ], }); function Component() { const [status, mint] = useContractMutation((mutate) => mutate(myContract, CONTRACT_ADDRESS, "mint", { args: [1n], }), ); return (
{(() => { switch (status) { case idle: return

No transaction submitted yet.

; case pending: return

Submitting transaction...

; default: if (status instanceof MutationError) { return

Error submitting transaction!

; } return (

Submitted tx with hash: {status.txHash}, current state: {status.type}

); } })()}
); } ``` ## Listening to contract events[​](#listening-to-contract-events "Direct link to Listening to contract events") The [`useContractEventListener`](/react/api/react/functions/useContractEventListener.md) hook allows you to subscribe to and handle events emitted by a smart contract in real time. This is especially useful for monitoring state changes or user interactions on the blockchain. By listening to specific events, you can trigger actions or update your application's state dynamically based on the event data. EventListenerComponent.tsx ``` import { defineContract } from "@reactive-dot/core"; import { useContractEventListener } from "@reactive-dot/react"; const myContract = defineContract({ type: "solidity", abi: [ // ... { name: "Transfer", type: "event", inputs: [ { name: "from", type: "address", indexed: true }, { name: "to", type: "address", indexed: true }, { name: "value", type: "uint256" }, ], }, ], }); function Component() { useContractEventListener(myContract, CONTRACT_ADDRESS, "Transfer", (event) => { console.log("block", event.block.number); console.log("from", event.data.from); console.log("to", event.data.to); console.log("value", event.data.value); }); return null; } ``` --- # @reactive-dot/core ## Modules[​](#modules "Direct link to Modules") | Module | Description | | ------------------------------------------------------------------ | ----------- | | [index](/vue/api/core/index/.md) | - | | [providers/light-client](/vue/api/core/providers/light-client/.md) | - | | [wallets](/vue/api/core/wallets/.md) | - | --- # index ## Classes[​](#classes "Direct link to Classes") | Class | Description | | ------------------------------------------------------------- | ----------- | | [BaseError](/vue/api/core/index/classes/BaseError.md) | - | | [MutationError](/vue/api/core/index/classes/MutationError.md) | - | | [Query](/vue/api/core/index/classes/Query.md) | - | | [QueryError](/vue/api/core/index/classes/QueryError.md) | - | | [Storage](/vue/api/core/index/classes/Storage.md) | - | ## Interfaces[​](#interfaces "Direct link to Interfaces") | Interface | Description | | ------------------------------------------------------ | ----------- | | [Register](/vue/api/core/index/interfaces/Register.md) | - | ## Type Aliases[​](#type-aliases "Direct link to Type Aliases") | Type Alias | Description | | -------------------------------------------------------------- | ----------- | | [Address](/vue/api/core/index/type-aliases/Address.md) | - | | [AsyncValue](/vue/api/core/index/type-aliases/AsyncValue.md) | - | | [ChainConfig](/vue/api/core/index/type-aliases/ChainConfig.md) | - | | [ChainId](/vue/api/core/index/type-aliases/ChainId.md) | - | | [Config](/vue/api/core/index/type-aliases/Config.md) | - | ## Variables[​](#variables "Direct link to Variables") | Variable | Description | | ------------------------------------------------------------------------- | ----------- | | [idle](/vue/api/core/index/variables/idle.md) | - | | [pending](/vue/api/core/index/variables/pending.md) | - | | [~~ReactiveDotError~~](/vue/api/core/index/variables/ReactiveDotError.md) | - | ## Functions[​](#functions "Direct link to Functions") | Function | Description | | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [defineConfig](/vue/api/core/index/functions/defineConfig.md) | - | | [~~defineContract~~](/vue/api/core/index/functions/defineContract.md) | - | | [unsafeDescriptor](/vue/api/core/index/functions/unsafeDescriptor.md) | Create an unsafe chain descriptor for use in [ChainConfig](/vue/api/core/index/type-aliases/ChainConfig.md). This descriptor will only be used for type checking and will not be used at runtime to create a Polkadot-API client. | | [whenAccountsChanged](/vue/api/core/index/functions/whenAccountsChanged.md) | Subscribe to accounts changes. | | [whenClientChanged](/vue/api/core/index/functions/whenClientChanged.md) | Subscribe to client changes. | | [whenConnectedWalletsChanged](/vue/api/core/index/functions/whenConnectedWalletsChanged.md) | Subscribe to connected wallets changes. | | [whenWalletsChanged](/vue/api/core/index/functions/whenWalletsChanged.md) | Subscribe to available wallets changes. | --- # BaseError Defined in: [packages/core/src/errors.ts:1](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/errors.ts#L1) ## Extends[​](#extends "Direct link to Extends") * `Error` ## Extended by[​](#extended-by "Direct link to Extended by") * [`MutationError`](/vue/api/core/index/classes/MutationError.md) * [`QueryError`](/vue/api/core/index/classes/QueryError.md) ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new BaseError(message?): BaseError; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1080 #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | -------- | | `message?` | `string` | #### Returns[​](#returns "Direct link to Returns") `BaseError` #### Inherited from[​](#inherited-from "Direct link to Inherited from") ``` Error.constructor ``` ### Constructor[​](#constructor-1 "Direct link to Constructor") ``` new BaseError(message?, options?): BaseError; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1080 #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | ---------- | -------------- | | `message?` | `string` | | `options?` | `ErrorOptions` | #### Returns[​](#returns-1 "Direct link to Returns") `BaseError` #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") ``` Error.constructor ``` ## Properties[​](#properties "Direct link to Properties") ### cause?[​](#cause "Direct link to cause?") ``` optional cause?: unknown; ``` Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24 #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") ``` Error.cause ``` *** ### message[​](#message "Direct link to message") ``` message: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1075 #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") ``` Error.message ``` *** ### name[​](#name "Direct link to name") ``` name: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1074 #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") ``` Error.name ``` *** ### stack?[​](#stack "Direct link to stack?") ``` optional stack?: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") ``` Error.stack ``` ## Methods[​](#methods "Direct link to Methods") ### from()[​](#from "Direct link to from()") ``` static from(error, message?): BaseError; ``` Defined in: [packages/core/src/errors.ts:2](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/errors.ts#L2) #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------- | | `T` | #### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | ---------- | -------- | | `error` | `T` | | `message?` | `string` | #### Returns[​](#returns-2 "Direct link to Returns") `BaseError` *** ### isError()[​](#iserror "Direct link to isError()") ``` static isError(error): error is Error; ``` Defined in: node\_modules/typescript/lib/lib.esnext.error.d.ts:21 Indicates whether the argument provided is a built-in Error instance or not. #### Parameters[​](#parameters-3 "Direct link to Parameters") | Parameter | Type | | --------- | --------- | | `error` | `unknown` | #### Returns[​](#returns-3 "Direct link to Returns") `error is Error` #### Inherited from[​](#inherited-from-6 "Direct link to Inherited from") ``` Error.isError ``` --- # MutationError Defined in: [packages/core/src/errors.ts:11](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/errors.ts#L11) ## Extends[​](#extends "Direct link to Extends") * [`BaseError`](/vue/api/core/index/classes/BaseError.md) ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new MutationError(message?): MutationError; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1080 #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | -------- | | `message?` | `string` | #### Returns[​](#returns "Direct link to Returns") `MutationError` #### Inherited from[​](#inherited-from "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`constructor`](/vue/api/core/index/classes/BaseError.md#constructor) ### Constructor[​](#constructor-1 "Direct link to Constructor") ``` new MutationError(message?, options?): MutationError; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1080 #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | ---------- | -------------- | | `message?` | `string` | | `options?` | `ErrorOptions` | #### Returns[​](#returns-1 "Direct link to Returns") `MutationError` #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`constructor`](/vue/api/core/index/classes/BaseError.md#constructor) ## Properties[​](#properties "Direct link to Properties") ### cause?[​](#cause "Direct link to cause?") ``` optional cause?: unknown; ``` Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24 #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`cause`](/vue/api/core/index/classes/BaseError.md#cause) *** ### message[​](#message "Direct link to message") ``` message: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1075 #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`message`](/vue/api/core/index/classes/BaseError.md#message) *** ### name[​](#name "Direct link to name") ``` name: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1074 #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`name`](/vue/api/core/index/classes/BaseError.md#name) *** ### stack?[​](#stack "Direct link to stack?") ``` optional stack?: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`stack`](/vue/api/core/index/classes/BaseError.md#stack) ## Methods[​](#methods "Direct link to Methods") ### from()[​](#from "Direct link to from()") ``` static from(error, message?): BaseError; ``` Defined in: [packages/core/src/errors.ts:2](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/errors.ts#L2) #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------- | | `T` | #### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | ---------- | -------- | | `error` | `T` | | `message?` | `string` | #### Returns[​](#returns-2 "Direct link to Returns") [`BaseError`](/vue/api/core/index/classes/BaseError.md) #### Inherited from[​](#inherited-from-6 "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`from`](/vue/api/core/index/classes/BaseError.md#from) *** ### isError()[​](#iserror "Direct link to isError()") ``` static isError(error): error is Error; ``` Defined in: node\_modules/typescript/lib/lib.esnext.error.d.ts:21 Indicates whether the argument provided is a built-in Error instance or not. #### Parameters[​](#parameters-3 "Direct link to Parameters") | Parameter | Type | | --------- | --------- | | `error` | `unknown` | #### Returns[​](#returns-3 "Direct link to Returns") `error is Error` #### Inherited from[​](#inherited-from-7 "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`isError`](/vue/api/core/index/classes/BaseError.md#iserror) --- # Query\ Defined in: [packages/core/src/query-builder.ts:269](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L269) ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------------------------- | --------------------- | | `TInstructions` *extends* `QueryInstruction`\[] | `QueryInstruction`\[] | | `TDescriptor` *extends* `ChainDefinition` | `CommonDescriptor` | ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new Query(instructions?): Query; ``` Defined in: [packages/core/src/query-builder.ts:275](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L275) #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | -------------- | --------------- | | `instructions` | `TInstructions` | #### Returns[​](#returns "Direct link to Returns") `Query`<`TInstructions`, `TDescriptor`> ## Properties[​](#properties "Direct link to Properties") ### ~~callApi~~[​](#callapi "Direct link to callapi") ``` callApi: (api, method, ...__namedParameters) => Query<[...TInstructions[], { api: TApi; args: [unknown] | never[]; at: Finality | undefined; directives: { defer: NoInfer; }; method: TMethod; type: "runtime-api"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:431](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L431) #### Type Parameters[​](#type-parameters-1 "Direct link to Type Parameters") | Type Parameter | Default type | | ---------------------------- | ------------ | | `TApi` *extends* `string` | - | | `TMethod` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `api` | `TApi` | | `method` | `TMethod` | | ...`__namedParameters` | `InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<`TDescriptor`\[`"descriptors"`]\[`"apis"`]>>\[`TApi`]\[`TMethod`]>\[`"args"`] *extends* \[] ? \[`any`\[`any`], `object`] : \[`InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<...\[...]\[`"apis"`]>>\[`TApi`]\[`TMethod`]>\[`"args"`], `object`] | #### Returns[​](#returns-1 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `api`: `TApi`; `args`: \[`unknown`] | `never`\[]; `at`: `Finality` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `method`: `TMethod`; `type`: `"runtime-api"`; }], `TDescriptor`> #### Deprecated[​](#deprecated "Direct link to Deprecated") Use [Query.runtimeApi](#runtimeapi) instead. *** ### ~~callApis~~[​](#callapis "Direct link to callapis") ``` callApis: (api, method, args, options?) => Query<[...TInstructions[], { api: TApi; args: InferPapiRuntimeCall>[TApi][TMethod]>["args"][]; at: Finality | undefined; directives: { defer: NoInfer; stream: NoInfer; }; method: TMethod; multi: true; type: "runtime-api"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:461](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L461) #### Type Parameters[​](#type-parameters-2 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TApi` *extends* `string` | - | | `TMethod` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | | `TStream` *extends* `boolean` | `false` | #### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `api` | `TApi` | | `method` | `TMethod` | | `args` | `InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<`TDescriptor`\[`"descriptors"`]\[`"apis"`]>>\[`TApi`]\[`TMethod`]>\[`"args"`]\[] | | `options?` | { `at?`: `Finality`; `defer?`: `TDefer`; `stream?`: `TStream`; } | | `options.at?` | `Finality` | | `options.defer?` | `TDefer` | | `options.stream?` | `TStream` | #### Returns[​](#returns-2 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `api`: `TApi`; `args`: `InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<...>>\[`TApi`]\[`TMethod`]>\[`"args"`]\[]; `at`: `Finality` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; `stream`: `NoInfer`<`TStream`>; }; `method`: `TMethod`; `multi`: `true`; `type`: `"runtime-api"`; }], `TDescriptor`> #### Deprecated[​](#deprecated-1 "Direct link to Deprecated") Use [Query.runtimeApis](#runtimeapis) instead. *** ### ~~getConstant~~[​](#getconstant "Direct link to getconstant") ``` getConstant: (pallet, constant, options?) => Query<[...TInstructions[], { constant: TConstant; directives: { defer: NoInfer; }; pallet: TPallet; type: "constant"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:301](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L301) #### Type Parameters[​](#type-parameters-3 "Direct link to Type Parameters") | Type Parameter | Default type | | ------------------------------ | ------------ | | `TPallet` *extends* `string` | - | | `TConstant` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-3 "Direct link to Parameters") | Parameter | Type | | ---------------- | ----------------------- | | `pallet` | `TPallet` | | `constant` | `TConstant` | | `options?` | { `defer?`: `TDefer`; } | | `options.defer?` | `TDefer` | #### Returns[​](#returns-3 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `constant`: `TConstant`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `pallet`: `TPallet`; `type`: `"constant"`; }], `TDescriptor`> #### Deprecated[​](#deprecated-2 "Direct link to Deprecated") Use [Query.constant](#constant) instead. *** ### ~~readStorage~~[​](#readstorage "Direct link to readstorage") ``` readStorage: (pallet, storage, ...__namedParameters) => Query<[...TInstructions[], { at: At | undefined; directives: { defer: NoInfer; }; keys: any[]; pallet: TPallet; storage: TStorage; type: "storage"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:337](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L337) #### Type Parameters[​](#type-parameters-4 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TPallet` *extends* `string` | - | | `TStorage` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-4 "Direct link to Parameters") | Parameter | Type | | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `pallet` | `TPallet` | | `storage` | `TStorage` | | ...`__namedParameters` | `InferPapiStorageEntry`<`StorageApi`<`ExtractStorage`<...\[...]\[`"pallets"`]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`] *extends* \[] ? \[`any`\[`any`], `object`] : \[`InferPapiStorageEntry`<`StorageApi`<`ExtractStorage`<...\[...]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`], `object`] | #### Returns[​](#returns-4 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `at`: `At` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `keys`: `any`\[]; `pallet`: `TPallet`; `storage`: `TStorage`; `type`: `"storage"`; }], `TDescriptor`> #### Deprecated[​](#deprecated-3 "Direct link to Deprecated") Use [Query.storage](#storage) instead. *** ### ~~readStorageEntries~~[​](#readstorageentries "Direct link to readstorageentries") ``` readStorageEntries: (pallet, storage, args?, options?) => Query<[...TInstructions[], { args: unknown[]; at: At | undefined; directives: { defer: NoInfer; }; pallet: TPallet; storage: TStorage; type: "storage-entries"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:397](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L397) #### Type Parameters[​](#type-parameters-5 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TPallet` *extends* `string` | - | | `TStorage` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-5 "Direct link to Parameters") | Parameter | Type | | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `pallet` | `TPallet` | | `storage` | `TStorage` | | `args?` | `InferPapiStorageEntries`<`StorageApi`<`ExtractStorage`<...\[...]\[`"pallets"`]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`] | | `options?` | { `at?`: `At`; `defer?`: `TDefer`; } | | `options.at?` | `At` | | `options.defer?` | `TDefer` | #### Returns[​](#returns-5 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `args`: `unknown`\[]; `at`: `At` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `pallet`: `TPallet`; `storage`: `TStorage`; `type`: `"storage-entries"`; }], `TDescriptor`> #### Deprecated[​](#deprecated-4 "Direct link to Deprecated") Use [Query.storageEntries](#storageentries) instead. *** ### ~~readStorages~~[​](#readstorages "Direct link to readstorages") ``` readStorages: (pallet, storage, keys, options?) => Query<[...TInstructions[], { at: At | undefined; directives: { defer: NoInfer; stream: NoInfer; }; keys: NoInfer[TPallet][TStorage]>["args"][]>; multi: true; pallet: TPallet; storage: TStorage; type: "storage"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:370](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L370) #### Type Parameters[​](#type-parameters-6 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TPallet` *extends* `string` | - | | `TStorage` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | | `TStream` *extends* `boolean` | `false` | #### Parameters[​](#parameters-6 "Direct link to Parameters") | Parameter | Type | | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | `pallet` | `TPallet` | | `storage` | `TStorage` | | `keys` | `InferPapiStorageEntry`<`StorageApi`<`ExtractStorage`<...\[...]\[`"pallets"`]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`]\[] | | `options?` | { `at?`: `At`; `defer?`: `TDefer`; `stream?`: `TStream`; } | | `options.at?` | `At` | | `options.defer?` | `TDefer` | | `options.stream?` | `TStream` | #### Returns[​](#returns-6 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `at`: `At` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; `stream`: `NoInfer`<`TStream`>; }; `keys`: `NoInfer`<`InferPapiStorageEntry`<`StorageApi`<...>\[`TPallet`]\[`TStorage`]>\[`"args"`]\[]>; `multi`: `true`; `pallet`: `TPallet`; `storage`: `TStorage`; `type`: `"storage"`; }], `TDescriptor`> #### Deprecated[​](#deprecated-5 "Direct link to Deprecated") Use [Query.storages](#storages) instead. ## Accessors[​](#accessors "Direct link to Accessors") ### instructions[​](#instructions "Direct link to instructions") #### Get Signature[​](#get-signature "Direct link to Get Signature") ``` get instructions(): TInstructions; ``` Defined in: [packages/core/src/query-builder.ts:279](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L279) ##### Returns[​](#returns-7 "Direct link to Returns") `TInstructions` ## Methods[​](#methods "Direct link to Methods") ### concat()[​](#concat "Direct link to concat()") ``` concat(...queries): Query<[...TInstructions[], ...Flatten<{ [P in string | number | symbol]: TQueries[P] extends Query ? Instructions : never }>[]], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:635](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L635) #### Type Parameters[​](#type-parameters-7 "Direct link to Type Parameters") | Type Parameter | | ------------------------------------------------------------------------- | | `TQueries` *extends* `Query`<`QueryInstruction`\[], `ChainDefinition`>\[] | #### Parameters[​](#parameters-7 "Direct link to Parameters") | Parameter | Type | | ------------ | ---------- | | ...`queries` | `TQueries` | #### Returns[​](#returns-8 "Direct link to Returns") `Query`<\[`...TInstructions[]`, ...Flatten<{ \[P in string | number | symbol]: TQueries\[P] extends Query\ ? Instructions : never }>\[]], `TDescriptor`> *** ### constant()[​](#constant "Direct link to constant()") ``` constant( pallet, constant, options?): Query<[...TInstructions[], { constant: TConstant; directives: { defer: NoInfer; }; pallet: TPallet; type: "constant"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:283](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L283) #### Type Parameters[​](#type-parameters-8 "Direct link to Type Parameters") | Type Parameter | Default type | | ------------------------------ | ------------ | | `TPallet` *extends* `string` | - | | `TConstant` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-8 "Direct link to Parameters") | Parameter | Type | | ---------------- | ----------------------- | | `pallet` | `TPallet` | | `constant` | `TConstant` | | `options?` | { `defer?`: `TDefer`; } | | `options.defer?` | `TDefer` | #### Returns[​](#returns-9 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `constant`: `TConstant`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `pallet`: `TPallet`; `type`: `"constant"`; }], `TDescriptor`> *** ### contract()[​](#contract "Direct link to contract()") #### Call Signature[​](#call-signature "Direct link to Call Signature") ``` contract( contract, address, builder, options?): Query<[...TInstructions[], { address: Address; contract: InkContract; directives: { defer: NoInfer; }; instructions: TContractInstructions; type: "contract"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:463](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L463) ##### Type Parameters[​](#type-parameters-9 "Direct link to Type Parameters") | Type Parameter | Default type | | ---------------------------------------------------------- | ------------ | | `TContractDescriptor` *extends* `GenericInkDescriptors` | - | | `TContractInstructions` *extends* `InkQueryInstruction`\[] | - | | `TDefer` *extends* `boolean` | `false` | ##### Parameters[​](#parameters-9 "Direct link to Parameters") | Parameter | Type | | ---------------- | ----------------------------------------------------------------------- | | `contract` | `InkContract`<`TContractDescriptor`> | | `address` | [`Address`](/vue/api/core/index/type-aliases/Address.md) | | `builder` | (`query`) => `InkQuery`<`TContractDescriptor`, `TContractInstructions`> | | `options?` | { `defer?`: `TDefer`; } | | `options.defer?` | `TDefer` | ##### Returns[​](#returns-10 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `address`: [`Address`](/vue/api/core/index/type-aliases/Address.md); `contract`: `InkContract`<`TContractDescriptor`>; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `instructions`: `TContractInstructions`; `type`: `"contract"`; }], `TDescriptor`> #### Call Signature[​](#call-signature-1 "Direct link to Call Signature") ``` contract( contract, address, builder, options?): Query<[...TInstructions[], { address: Address; contract: SolidityContract; directives: { defer: NoInfer; }; instructions: TContractInstructions; type: "contract"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:489](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L489) ##### Type Parameters[​](#type-parameters-10 "Direct link to Type Parameters") | Type Parameter | Default type | | --------------------------------------------------------------- | ------------ | | `TAbi` *extends* `Abi` | - | | `TContractInstructions` *extends* `SolidityQueryInstruction`\[] | - | | `TDefer` *extends* `boolean` | `false` | ##### Parameters[​](#parameters-10 "Direct link to Parameters") | Parameter | Type | | ---------------- | ------------------------------------------------------------- | | `contract` | `SolidityContract`<`TAbi`> | | `address` | [`Address`](/vue/api/core/index/type-aliases/Address.md) | | `builder` | (`query`) => `SolidityQuery`<`TAbi`, `TContractInstructions`> | | `options?` | { `defer?`: `TDefer`; } | | `options.defer?` | `TDefer` | ##### Returns[​](#returns-11 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `address`: [`Address`](/vue/api/core/index/type-aliases/Address.md); `contract`: `SolidityContract`<`TAbi`>; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `instructions`: `TContractInstructions`; `type`: `"contract"`; }], `TDescriptor`> *** ### contracts()[​](#contracts "Direct link to contracts()") #### Call Signature[​](#call-signature-2 "Direct link to Call Signature") ``` contracts( contract, addresses, builder, options?): Query<[...TInstructions[], { addresses: Address[]; contract: InkContract; directives: { defer: NoInfer; stream: NoInfer; }; instructions: TContractInstructions; multi: true; type: "contract"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:539](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L539) ##### Type Parameters[​](#type-parameters-11 "Direct link to Type Parameters") | Type Parameter | Default type | | ---------------------------------------------------------- | ------------ | | `TContractDescriptor` *extends* `GenericInkDescriptors` | - | | `TContractInstructions` *extends* `InkQueryInstruction`\[] | - | | `TDefer` *extends* `boolean` | `false` | | `TStream` *extends* `boolean` | `false` | ##### Parameters[​](#parameters-11 "Direct link to Parameters") | Parameter | Type | | ----------------- | ----------------------------------------------------------------------- | | `contract` | `InkContract`<`TContractDescriptor`> | | `addresses` | [`Address`](/vue/api/core/index/type-aliases/Address.md)\[] | | `builder` | (`query`) => `InkQuery`<`TContractDescriptor`, `TContractInstructions`> | | `options?` | { `defer?`: `TDefer`; `stream?`: `TStream`; } | | `options.defer?` | `TDefer` | | `options.stream?` | `TStream` | ##### Returns[​](#returns-12 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `addresses`: [`Address`](/vue/api/core/index/type-aliases/Address.md)\[]; `contract`: `InkContract`<`TContractDescriptor`>; `directives`: { `defer`: `NoInfer`<`TDefer`>; `stream`: `NoInfer`<`TStream`>; }; `instructions`: `TContractInstructions`; `multi`: `true`; `type`: `"contract"`; }], `TDescriptor`> #### Call Signature[​](#call-signature-3 "Direct link to Call Signature") ``` contracts( contract, addresses, builder, options?): Query<[...TInstructions[], { addresses: Address[]; contract: SolidityContract; directives: { defer: NoInfer; stream: NoInfer; }; instructions: TContractInstructions; multi: true; type: "contract"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:571](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L571) ##### Type Parameters[​](#type-parameters-12 "Direct link to Type Parameters") | Type Parameter | Default type | | --------------------------------------------------------------- | ------------ | | `TAbi` *extends* `Abi` | - | | `TContractInstructions` *extends* `SolidityQueryInstruction`\[] | - | | `TDefer` *extends* `boolean` | `false` | | `TStream` *extends* `boolean` | `false` | ##### Parameters[​](#parameters-12 "Direct link to Parameters") | Parameter | Type | | ----------------- | ------------------------------------------------------------- | | `contract` | `SolidityContract`<`TAbi`> | | `addresses` | [`Address`](/vue/api/core/index/type-aliases/Address.md)\[] | | `builder` | (`query`) => `SolidityQuery`<`TAbi`, `TContractInstructions`> | | `options?` | { `defer?`: `TDefer`; `stream?`: `TStream`; } | | `options.defer?` | `TDefer` | | `options.stream?` | `TStream` | ##### Returns[​](#returns-13 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `addresses`: [`Address`](/vue/api/core/index/type-aliases/Address.md)\[]; `contract`: `SolidityContract`<`TAbi`>; `directives`: { `defer`: `NoInfer`<`TDefer`>; `stream`: `NoInfer`<`TStream`>; }; `instructions`: `TContractInstructions`; `multi`: `true`; `type`: `"contract"`; }], `TDescriptor`> *** ### runtimeApi()[​](#runtimeapi "Direct link to runtimeApi()") ``` runtimeApi( api, method, ... __namedParameters): Query<[...TInstructions[], { api: TApi; args: [unknown] | never[]; at: Finality | undefined; directives: { defer: NoInfer; }; method: TMethod; type: "runtime-api"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:399](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L399) #### Type Parameters[​](#type-parameters-13 "Direct link to Type Parameters") | Type Parameter | Default type | | ---------------------------- | ------------ | | `TApi` *extends* `string` | - | | `TMethod` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-13 "Direct link to Parameters") | Parameter | Type | | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `api` | `TApi` | | `method` | `TMethod` | | ...`__namedParameters` | `InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<`TDescriptor`\[`"descriptors"`]\[`"apis"`]>>\[`TApi`]\[`TMethod`]>\[`"args"`] *extends* \[] ? \[`any`\[`any`], `object`] : \[`InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<`TDescriptor`\[`"descriptors"`]\[`"apis"`]>>\[`TApi`]\[`TMethod`]>\[`"args"`], `object`] | #### Returns[​](#returns-14 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `api`: `TApi`; `args`: \[`unknown`] | `never`\[]; `at`: `Finality` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `method`: `TMethod`; `type`: `"runtime-api"`; }], `TDescriptor`> *** ### runtimeApis()[​](#runtimeapis "Direct link to runtimeApis()") ``` runtimeApis( api, method, args, options?): Query<[...TInstructions[], { api: TApi; args: InferPapiRuntimeCall>[TApi][TMethod]>["args"][]; at: Finality | undefined; directives: { defer: NoInfer; stream: NoInfer; }; method: TMethod; multi: true; type: "runtime-api"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:433](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L433) #### Type Parameters[​](#type-parameters-14 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TApi` *extends* `string` | - | | `TMethod` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | | `TStream` *extends* `boolean` | `false` | #### Parameters[​](#parameters-14 "Direct link to Parameters") | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `api` | `TApi` | | `method` | `TMethod` | | `args` | `InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<`TDescriptor`\[`"descriptors"`]\[`"apis"`]>>\[`TApi`]\[`TMethod`]>\[`"args"`]\[] | | `options?` | { `at?`: `Finality`; `defer?`: `TDefer`; `stream?`: `TStream`; } | | `options.at?` | `Finality` | | `options.defer?` | `TDefer` | | `options.stream?` | `TStream` | #### Returns[​](#returns-15 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `api`: `TApi`; `args`: `InferPapiRuntimeCall`<`RuntimeCallsApi`<`ExtractRuntime`<...\[...]>>\[`TApi`]\[`TMethod`]>\[`"args"`]\[]; `at`: `Finality` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; `stream`: `NoInfer`<`TStream`>; }; `method`: `TMethod`; `multi`: `true`; `type`: `"runtime-api"`; }], `TDescriptor`> *** ### storage()[​](#storage "Direct link to storage()") ``` storage( pallet, storage, ... __namedParameters): Query<[...TInstructions[], { at: At | undefined; directives: { defer: NoInfer; }; keys: any[]; pallet: TPallet; storage: TStorage; type: "storage"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:303](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L303) #### Type Parameters[​](#type-parameters-15 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TPallet` *extends* `string` | - | | `TStorage` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-15 "Direct link to Parameters") | Parameter | Type | | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `pallet` | `TPallet` | | `storage` | `TStorage` | | ...`__namedParameters` | `InferPapiStorageEntry`<`StorageApi`<`ExtractStorage`<`TDescriptor`\[`"descriptors"`]\[`"pallets"`]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`] *extends* \[] ? \[`any`\[`any`], `object`] : \[`InferPapiStorageEntry`<`StorageApi`<`ExtractStorage`<...\[...]\[`"pallets"`]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`], `object`] | #### Returns[​](#returns-16 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `at`: `At` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `keys`: `any`\[]; `pallet`: `TPallet`; `storage`: `TStorage`; `type`: `"storage"`; }], `TDescriptor`> *** ### storageEntries()[​](#storageentries "Direct link to storageEntries()") ``` storageEntries( pallet, storage, args?, options?): Query<[...TInstructions[], { args: unknown[]; at: At | undefined; directives: { defer: NoInfer; }; pallet: TPallet; storage: TStorage; type: "storage-entries"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:372](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L372) #### Type Parameters[​](#type-parameters-16 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TPallet` *extends* `string` | - | | `TStorage` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | #### Parameters[​](#parameters-16 "Direct link to Parameters") | Parameter | Type | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `pallet` | `TPallet` | | `storage` | `TStorage` | | `args?` | `InferPapiStorageEntries`<`StorageApi`<`ExtractStorage`<`TDescriptor`\[`"descriptors"`]\[`"pallets"`]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`] | | `options?` | { `at?`: `At`; `defer?`: `TDefer`; } | | `options.at?` | `At` | | `options.defer?` | `TDefer` | #### Returns[​](#returns-17 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `args`: `unknown`\[]; `at`: `At` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; }; `pallet`: `TPallet`; `storage`: `TStorage`; `type`: `"storage-entries"`; }], `TDescriptor`> *** ### storages()[​](#storages "Direct link to storages()") ``` storages( pallet, storage, keys, options?): Query<[...TInstructions[], { at: At | undefined; directives: { defer: NoInfer; stream: NoInfer; }; keys: NoInfer>[TPallet][TStorage]>["args"][]>; multi: true; pallet: TPallet; storage: TStorage; type: "storage"; }], TDescriptor>; ``` Defined in: [packages/core/src/query-builder.ts:339](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/query-builder.ts#L339) #### Type Parameters[​](#type-parameters-17 "Direct link to Type Parameters") | Type Parameter | Default type | | ----------------------------- | ------------ | | `TPallet` *extends* `string` | - | | `TStorage` *extends* `string` | - | | `TDefer` *extends* `boolean` | `false` | | `TStream` *extends* `boolean` | `false` | #### Parameters[​](#parameters-17 "Direct link to Parameters") | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `pallet` | `TPallet` | | `storage` | `TStorage` | | `keys` | `InferPapiStorageEntry`<`StorageApi`<`ExtractStorage`<`TDescriptor`\[`"descriptors"`]\[`"pallets"`]\[`"__storage"`]>>\[`TPallet`]\[`TStorage`]>\[`"args"`]\[] | | `options?` | { `at?`: `At`; `defer?`: `TDefer`; `stream?`: `TStream`; } | | `options.at?` | `At` | | `options.defer?` | `TDefer` | | `options.stream?` | `TStream` | #### Returns[​](#returns-18 "Direct link to Returns") `Query`<\[`...TInstructions[]`, { `at`: `At` | `undefined`; `directives`: { `defer`: `NoInfer`<`TDefer`>; `stream`: `NoInfer`<`TStream`>; }; `keys`: `NoInfer`<`InferPapiStorageEntry`<`StorageApi`<`ExtractStorage`<...>>\[`TPallet`]\[`TStorage`]>\[`"args"`]\[]>; `multi`: `true`; `pallet`: `TPallet`; `storage`: `TStorage`; `type`: `"storage"`; }], `TDescriptor`> --- # QueryError Defined in: [packages/core/src/errors.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/errors.ts#L9) ## Extends[​](#extends "Direct link to Extends") * [`BaseError`](/vue/api/core/index/classes/BaseError.md) ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new QueryError(message?): QueryError; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1080 #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | -------- | | `message?` | `string` | #### Returns[​](#returns "Direct link to Returns") `QueryError` #### Inherited from[​](#inherited-from "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`constructor`](/vue/api/core/index/classes/BaseError.md#constructor) ### Constructor[​](#constructor-1 "Direct link to Constructor") ``` new QueryError(message?, options?): QueryError; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1080 #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | ---------- | -------------- | | `message?` | `string` | | `options?` | `ErrorOptions` | #### Returns[​](#returns-1 "Direct link to Returns") `QueryError` #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`constructor`](/vue/api/core/index/classes/BaseError.md#constructor) ## Properties[​](#properties "Direct link to Properties") ### cause?[​](#cause "Direct link to cause?") ``` optional cause?: unknown; ``` Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24 #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`cause`](/vue/api/core/index/classes/BaseError.md#cause) *** ### message[​](#message "Direct link to message") ``` message: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1075 #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`message`](/vue/api/core/index/classes/BaseError.md#message) *** ### name[​](#name "Direct link to name") ``` name: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1074 #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`name`](/vue/api/core/index/classes/BaseError.md#name) *** ### stack?[​](#stack "Direct link to stack?") ``` optional stack?: string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`stack`](/vue/api/core/index/classes/BaseError.md#stack) ## Methods[​](#methods "Direct link to Methods") ### from()[​](#from "Direct link to from()") ``` static from(error, message?): BaseError; ``` Defined in: [packages/core/src/errors.ts:2](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/errors.ts#L2) #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------- | | `T` | #### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | ---------- | -------- | | `error` | `T` | | `message?` | `string` | #### Returns[​](#returns-2 "Direct link to Returns") [`BaseError`](/vue/api/core/index/classes/BaseError.md) #### Inherited from[​](#inherited-from-6 "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`from`](/vue/api/core/index/classes/BaseError.md#from) *** ### isError()[​](#iserror "Direct link to isError()") ``` static isError(error): error is Error; ``` Defined in: node\_modules/typescript/lib/lib.esnext.error.d.ts:21 Indicates whether the argument provided is a built-in Error instance or not. #### Parameters[​](#parameters-3 "Direct link to Parameters") | Parameter | Type | | --------- | --------- | | `error` | `unknown` | #### Returns[​](#returns-3 "Direct link to Returns") `error is Error` #### Inherited from[​](#inherited-from-7 "Direct link to Inherited from") [`BaseError`](/vue/api/core/index/classes/BaseError.md).[`isError`](/vue/api/core/index/classes/BaseError.md#iserror) --- # Storage\ Defined in: [packages/core/src/storage.ts:8](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/storage.ts#L8) ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | ------------------------- | ------------ | | `TKey` *extends* `string` | `string` | ## Implements[​](#implements "Direct link to Implements") * `SimpleStorage` ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new Storage(options): Storage; ``` Defined in: [packages/core/src/storage.ts:13](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/storage.ts#L13) #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | --------- | ---------------- | | `options` | `StorageOptions` | #### Returns[​](#returns "Direct link to Returns") `Storage`<`TKey`> ## Properties[​](#properties "Direct link to Properties") ### prefix[​](#prefix "Direct link to prefix") ``` readonly prefix: string; ``` Defined in: [packages/core/src/storage.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/storage.ts#L9) ## Methods[​](#methods "Direct link to Methods") ### getItem()[​](#getitem "Direct link to getItem()") ``` getItem(key): string | null; ``` Defined in: [packages/core/src/storage.ts:18](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/storage.ts#L18) The **`getItem()`** method of the Storage interface, when passed a key name, will return that key's value, or null if the key does not exist, in the given Storage object. [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/getItem) #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | --------- | ------ | | `key` | `TKey` | #### Returns[​](#returns-1 "Direct link to Returns") `string` | `null` #### Implementation of[​](#implementation-of "Direct link to Implementation of") ``` SimpleStorage.getItem ``` *** ### join()[​](#join "Direct link to join()") ``` join(path): Storage; ``` Defined in: [packages/core/src/storage.ts:30](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/storage.ts#L30) #### Type Parameters[​](#type-parameters-1 "Direct link to Type Parameters") | Type Parameter | Default type | | ------------------------------------------- | ------------ | | `TKeyOverride` *extends* `string` \| `void` | `void` | #### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | --------- | -------- | | `path` | `string` | #### Returns[​](#returns-2 "Direct link to Returns") `Storage`<`TKeyOverride` *extends* `void` ? `TKey` : `TKeyOverride`> *** ### removeItem()[​](#removeitem "Direct link to removeItem()") ``` removeItem(key): void; ``` Defined in: [packages/core/src/storage.ts:22](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/storage.ts#L22) The **`removeItem()`** method of the Storage interface, when passed a key name, will remove that key from the given Storage object if it exists. The Storage interface of the Web Storage API provides access to a particular domain's session or local storage. [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/removeItem) #### Parameters[​](#parameters-3 "Direct link to Parameters") | Parameter | Type | | --------- | ------ | | `key` | `TKey` | #### Returns[​](#returns-3 "Direct link to Returns") `void` #### Implementation of[​](#implementation-of-1 "Direct link to Implementation of") ``` SimpleStorage.removeItem ``` *** ### setItem()[​](#setitem "Direct link to setItem()") ``` setItem(key, value): void; ``` Defined in: [packages/core/src/storage.ts:26](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/storage.ts#L26) The **`setItem()`** method of the Storage interface, when passed a key name and value, will add that key to the given Storage object, or update that key's value if it already exists. [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/setItem) #### Parameters[​](#parameters-4 "Direct link to Parameters") | Parameter | Type | | --------- | -------- | | `key` | `TKey` | | `value` | `string` | #### Returns[​](#returns-4 "Direct link to Returns") `void` #### Implementation of[​](#implementation-of-2 "Direct link to Implementation of") ``` SimpleStorage.setItem ``` --- # defineConfig() ``` function defineConfig(config): Config; ``` Defined in: [packages/core/src/config.ts:36](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L36) ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------------------------------------------------------------------------------------------------------------- | | `TChains` *extends* `Readonly`<`Record`<`string`, [`ChainConfig`](/vue/api/core/index/type-aliases/ChainConfig.md)>> | | `TTargetChainIds` *extends* `Extract`\\[] | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | --------- | ------------------------------------------------------------------------------------ | | `config` | [`Config`](/vue/api/core/index/type-aliases/Config.md)<`TChains`, `TTargetChainIds`> | ## Returns[​](#returns "Direct link to Returns") [`Config`](/vue/api/core/index/type-aliases/Config.md)<`TChains`, `TTargetChainIds`> --- # ~~defineContract()~~ ## Call Signature[​](#call-signature "Direct link to Call Signature") ``` function defineContract(config): InkContract; ``` Defined in: [packages/core/src/contract/contract.ts:25](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/contract/contract.ts#L25) ### Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | ------------------------------------- | | `T` *extends* `GenericInkDescriptors` | ### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ------------------- | --------------------------------------- | | `config` | { `descriptor`: `T`; `id?`: `string`; } | | `config.descriptor` | `T` | | `config.id?` | `string` | ### Returns[​](#returns "Direct link to Returns") `InkContract`<`T`> ### Deprecated[​](#deprecated "Direct link to Deprecated") Specify the contract type explicitly ## Call Signature[​](#call-signature-1 "Direct link to Call Signature") ``` function defineContract(config): InkContract; ``` Defined in: [packages/core/src/contract/contract.ts:29](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/contract/contract.ts#L29) ### Type Parameters[​](#type-parameters-1 "Direct link to Type Parameters") | Type Parameter | | ------------------------------------- | | `T` *extends* `GenericInkDescriptors` | ### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | ------------------- | -------------------------------------------------------- | | `config` | { `descriptor`: `T`; `id?`: `string`; `type`: `"ink"`; } | | `config.descriptor` | `T` | | `config.id?` | `string` | | `config.type` | `"ink"` | ### Returns[​](#returns-1 "Direct link to Returns") `InkContract`<`T`> ### Deprecated[​](#deprecated-1 "Direct link to Deprecated") Specify the contract type explicitly ## Call Signature[​](#call-signature-2 "Direct link to Call Signature") ``` function defineContract(config): SolidityContract; ``` Defined in: [packages/core/src/contract/contract.ts:34](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/contract/contract.ts#L34) ### Type Parameters[​](#type-parameters-2 "Direct link to Type Parameters") | Type Parameter | | ------------------- | | `T` *extends* `Abi` | ### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | ------------- | ------------------------------------------------------ | | `config` | { `abi`: `T`; `id?`: `string`; `type`: `"solidity"`; } | | `config.abi` | `T` | | `config.id?` | `string` | | `config.type` | `"solidity"` | ### Returns[​](#returns-2 "Direct link to Returns") `SolidityContract`<`T`> ### Deprecated[​](#deprecated-2 "Direct link to Deprecated") Specify the contract type explicitly --- # unsafeDescriptor() ``` function unsafeDescriptor(): UnsafeDescriptor; ``` Defined in: [packages/core/src/unsafe-descriptor.ts:23](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/unsafe-descriptor.ts#L23) **`Experimental`** Create an unsafe chain descriptor for use in [ChainConfig](/vue/api/core/index/type-aliases/ChainConfig.md). This descriptor will only be used for type checking and will not be used at runtime to create a Polkadot-API client. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Description | | ------------------------------- | ------------------------- | | `T` *extends* `ChainDefinition` | The chain definition type | ## Returns[​](#returns "Direct link to Returns") `UnsafeDescriptor`<`T`> A descriptor that will only be used for type checking --- # whenAccountsChanged() ``` function whenAccountsChanged(config, options?): Observable; ``` Defined in: [packages/core/src/apis/when-accounts-changed.ts:17](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/apis/when-accounts-changed.ts#L17) Subscribe to accounts changes. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------------------------------------------------------------------- | | `TConfig` *extends* [`Config`](/vue/api/core/index/type-aliases/Config.md) | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | -------------------- | ------------------------------------------------------------------------------------------ | ------------------ | | `config` | `TConfig` | The configuration | | `options?` | { `chainId?`: keyof `TConfig`\[`"chains"`]; `chainSpec?`: `MaybeAsync`<`ChainSpecData`>; } | Additional options | | `options.chainId?` | keyof `TConfig`\[`"chains"`] | - | | `options.chainSpec?` | `MaybeAsync`<`ChainSpecData`> | - | ## Returns[​](#returns "Direct link to Returns") `Observable`<[`WalletAccount`](/vue/api/core/wallets/type-aliases/WalletAccount.md)\[]> The currently connected accounts observable --- # whenClientChanged() ``` function whenClientChanged(config, options): Observable; ``` Defined in: [packages/core/src/apis/when-client-changed.ts:13](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/apis/when-client-changed.ts#L13) Subscribe to client changes. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------------------------------------------------------------------- | | `TConfig` *extends* [`Config`](/vue/api/core/index/type-aliases/Config.md) | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ----------------- | -------------------------------------------- | ------------------ | | `config` | `TConfig` | The configuration | | `options` | { `chainId`: keyof `TConfig`\[`"chains"`]; } | Additional options | | `options.chainId` | keyof `TConfig`\[`"chains"`] | - | ## Returns[​](#returns "Direct link to Returns") `Observable`<`PolkadotClient`> The currently configured client observable --- # whenConnectedWalletsChanged() ``` function whenConnectedWalletsChanged(config): Observable[]>; ``` Defined in: [packages/core/src/apis/when-connected-wallets-changed.ts:12](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/apis/when-connected-wallets-changed.ts#L12) Subscribe to connected wallets changes. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | --------- | ------------------------------------------------------ | ----------------- | | `config` | [`Config`](/vue/api/core/index/type-aliases/Config.md) | The configuration | ## Returns[​](#returns "Direct link to Returns") `Observable`<[`Wallet`](/vue/api/core/wallets/classes/Wallet.md)<[`WalletOptions`](/vue/api/core/wallets/type-aliases/WalletOptions.md), `string`>\[]> The currently connected wallets observable --- # whenWalletsChanged() ``` function whenWalletsChanged(config): Observable[]>; ``` Defined in: [packages/core/src/apis/when-wallets-changed.ts:11](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/apis/when-wallets-changed.ts#L11) Subscribe to available wallets changes. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | --------- | ------------------------------------------------------ | ----------------- | | `config` | [`Config`](/vue/api/core/index/type-aliases/Config.md) | The configuration | ## Returns[​](#returns "Direct link to Returns") `Observable`<[`Wallet`](/vue/api/core/wallets/classes/Wallet.md)<[`WalletOptions`](/vue/api/core/wallets/type-aliases/WalletOptions.md), `string`>\[]> The currently available wallets observable --- # Register Defined in: [packages/core/src/register.ts:4](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/register.ts#L4) --- # Address ``` type Address = SS58String | `0x${string}`; ``` Defined in: [packages/core/src/address.ts:4](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/address.ts#L4) --- # AsyncValue\ ``` type AsyncValue = | typeof idle | typeof pending | TError | TResult; ``` Defined in: [packages/core/src/async-state.ts:3](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/async-state.ts#L3) ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------- | ------------ | | `TResult` | - | | `TError` *extends* `Error` | `Error` | --- # ChainConfig ``` type ChainConfig = object; ``` Defined in: [packages/core/src/config.ts:8](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L8) ## Properties[​](#properties "Direct link to Properties") ### descriptor[​](#descriptor "Direct link to descriptor") ``` readonly descriptor: ChainDefinition | UnsafeDescriptor; ``` Defined in: [packages/core/src/config.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L9) *** ### provider[​](#provider "Direct link to provider") ``` readonly provider: Gettable; ``` Defined in: [packages/core/src/config.ts:10](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L10) --- # ChainId ``` type ChainId = keyof Chains; ``` Defined in: [packages/core/src/chains.ts:15](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/chains.ts#L15) --- # Config\ ``` type Config = object; ``` Defined in: [packages/core/src/config.ts:13](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L13) ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | | `TChains` *extends* `Readonly`<`Record`<`string`, [`ChainConfig`](/vue/api/core/index/type-aliases/ChainConfig.md)>> | `Readonly`<`Record`<`string`, [`ChainConfig`](/vue/api/core/index/type-aliases/ChainConfig.md)>> | | `TTargetChainIds` *extends* `Extract`\\[] | `Extract`\\[] | ## Properties[​](#properties "Direct link to Properties") ### chains[​](#chains "Direct link to chains") ``` readonly chains: TChains; ``` Defined in: [packages/core/src/config.ts:17](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L17) *** ### includeEvmAccounts?[​](#includeevmaccounts "Direct link to includeEvmAccounts?") ``` readonly optional includeEvmAccounts?: boolean; ``` Defined in: [packages/core/src/config.ts:26](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L26) Include EVM accounts from wallets. When `false`, EVM accounts will be filtered out #### Default Value[​](#default-value "Direct link to Default Value") ``` false ``` *** ### ssr?[​](#ssr "Direct link to ssr?") ``` readonly optional ssr?: boolean; ``` Defined in: [packages/core/src/config.ts:33](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L33) **`Experimental`** Enable SSR support & optimizations #### Default Value[​](#default-value-1 "Direct link to Default Value") ``` false ``` *** ### targetChains?[​](#targetchains "Direct link to targetChains?") ``` readonly optional targetChains?: TTargetChainIds; ``` Defined in: [packages/core/src/config.ts:18](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L18) *** ### wallets?[​](#wallets "Direct link to wallets?") ``` readonly optional wallets?: ( | WalletProvider | Wallet)[]; ``` Defined in: [packages/core/src/config.ts:19](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/config.ts#L19) --- # idle ``` const idle: typeof idle; ``` Defined in: [packages/core/src/symbols.ts:1](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/symbols.ts#L1) --- # pending ``` const pending: typeof pending; ``` Defined in: [packages/core/src/symbols.ts:3](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/symbols.ts#L3) --- # ~~ReactiveDotError~~ ``` const ReactiveDotError: typeof BaseError = BaseError; ``` Defined in: [packages/core/src/errors.ts:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/errors.ts#L16) ## Deprecated[​](#deprecated "Direct link to Deprecated") Renamed to [BaseError](/vue/api/core/index/classes/BaseError.md). --- # providers/light-client ## Functions[​](#functions "Direct link to Functions") | Function | Description | | -------------------------------------------------------------------------------------------------------- | ----------- | | [createLightClientProvider](/vue/api/core/providers/light-client/functions/createLightClientProvider.md) | - | --- # createLightClientProvider() ``` function createLightClientProvider(__namedParameters?): RootLightClientProvider; ``` Defined in: [packages/core/src/providers/light-client/provider.ts:43](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/providers/light-client/provider.ts#L43) ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ------------------- | -------------------- | | `__namedParameters` | `LightClientOptions` | ## Returns[​](#returns "Direct link to Returns") `RootLightClientProvider` --- # wallets ## Classes[​](#classes "Direct link to Classes") | Class | Description | | --------------------------------------------------------------------------------- | ----------- | | [DeepLinkWallet](/vue/api/core/wallets/classes/DeepLinkWallet.md) | - | | [InjectedWallet](/vue/api/core/wallets/classes/InjectedWallet.md) | - | | [InjectedWalletProvider](/vue/api/core/wallets/classes/InjectedWalletProvider.md) | - | | [LocalWallet](/vue/api/core/wallets/classes/LocalWallet.md) | - | | [Wallet](/vue/api/core/wallets/classes/Wallet.md) | - | | [WalletProvider](/vue/api/core/wallets/classes/WalletProvider.md) | - | ## Type Aliases[​](#type-aliases "Direct link to Type Aliases") | Type Alias | Description | | ------------------------------------------------------------------------------------ | ----------- | | [PolkadotAccount](/vue/api/core/wallets/type-aliases/PolkadotAccount.md) | - | | [PolkadotSignerAccount](/vue/api/core/wallets/type-aliases/PolkadotSignerAccount.md) | - | | [WalletAccount](/vue/api/core/wallets/type-aliases/WalletAccount.md) | - | | [WalletOptions](/vue/api/core/wallets/type-aliases/WalletOptions.md) | - | ## Functions[​](#functions "Direct link to Functions") | Function | Description | | ------------------------------------------------------------------------- | ----------- | | [initializeWallets](/vue/api/core/wallets/functions/initializeWallets.md) | - | --- # DeepLinkWallet\ Defined in: [packages/core/src/wallets/deep-link-wallet.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/deep-link-wallet.ts#L9) ## Extends[​](#extends "Direct link to Extends") * [`Wallet`](/vue/api/core/wallets/classes/Wallet.md)<`TOptions`, `TStorageKey`> ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | | `TOptions` *extends* [`WalletOptions`](/vue/api/core/wallets/type-aliases/WalletOptions.md) | [`WalletOptions`](/vue/api/core/wallets/type-aliases/WalletOptions.md) | | `TStorageKey` *extends* `string` | `string` | ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new DeepLinkWallet(options?): DeepLinkWallet; ``` Defined in: [packages/core/src/wallets/wallet.ts:24](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L24) #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | ---------- | | `options?` | `TOptions` | #### Returns[​](#returns "Direct link to Returns") `DeepLinkWallet`<`TOptions`, `TStorageKey`> #### Inherited from[​](#inherited-from "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`constructor`](/vue/api/core/wallets/classes/Wallet.md#constructor) ## Properties[​](#properties "Direct link to Properties") ### accounts$[​](#accounts "Direct link to accounts$") ``` abstract readonly accounts$: Observable; ``` Defined in: [packages/core/src/wallets/wallet.ts:36](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L36) #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`accounts$`](/vue/api/core/wallets/classes/Wallet.md#accounts) *** ### connected$[​](#connected "Direct link to connected$") ``` abstract readonly connected$: Observable; ``` Defined in: [packages/core/src/wallets/wallet.ts:30](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L30) #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`connected$`](/vue/api/core/wallets/classes/Wallet.md#connected) *** ### id[​](#id "Direct link to id") ``` abstract readonly id: string; ``` Defined in: [packages/core/src/wallets/wallet.ts:14](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L14) #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`id`](/vue/api/core/wallets/classes/Wallet.md#id) *** ### name[​](#name "Direct link to name") ``` abstract readonly name: string; ``` Defined in: [packages/core/src/wallets/wallet.ts:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L16) #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`name`](/vue/api/core/wallets/classes/Wallet.md#name) *** ### options?[​](#options "Direct link to options?") ``` protected readonly optional options?: TOptions; ``` Defined in: [packages/core/src/wallets/wallet.ts:24](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L24) #### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`options`](/vue/api/core/wallets/classes/Wallet.md#options) ## Accessors[​](#accessors "Direct link to Accessors") ### storage[​](#storage "Direct link to storage") #### Get Signature[​](#get-signature "Direct link to Get Signature") ``` get protected storage(): Storage; ``` Defined in: [packages/core/src/wallets/wallet.ts:20](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L20) ##### Returns[​](#returns-1 "Direct link to Returns") [`Storage`](/vue/api/core/index/classes/Storage.md)<`TStorageKey` *extends* `void` ? `string` : `TStorageKey`> #### Inherited from[​](#inherited-from-6 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`storage`](/vue/api/core/wallets/classes/Wallet.md#storage) ## Methods[​](#methods "Direct link to Methods") ### connect()[​](#connect "Direct link to connect()") ``` abstract connect(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:32](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L32) #### Returns[​](#returns-2 "Direct link to Returns") `MaybePromise`<`void`> #### Inherited from[​](#inherited-from-7 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`connect`](/vue/api/core/wallets/classes/Wallet.md#connect) *** ### disconnect()[​](#disconnect "Direct link to disconnect()") ``` abstract disconnect(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:34](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L34) #### Returns[​](#returns-3 "Direct link to Returns") `MaybePromise`<`void`> #### Inherited from[​](#inherited-from-8 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`disconnect`](/vue/api/core/wallets/classes/Wallet.md#disconnect) *** ### getAccounts()[​](#getaccounts "Direct link to getAccounts()") ``` getAccounts(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:38](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L38) #### Returns[​](#returns-4 "Direct link to Returns") `MaybePromise`<[`PolkadotSignerAccount`](/vue/api/core/wallets/type-aliases/PolkadotSignerAccount.md)\[]> #### Inherited from[​](#inherited-from-9 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`getAccounts`](/vue/api/core/wallets/classes/Wallet.md#getaccounts) *** ### initialize()[​](#initialize "Direct link to initialize()") ``` abstract initialize(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:28](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L28) #### Returns[​](#returns-5 "Direct link to Returns") `MaybePromise`<`void`> #### Inherited from[​](#inherited-from-10 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`initialize`](/vue/api/core/wallets/classes/Wallet.md#initialize) *** ### initiateConnectionHandshake()[​](#initiateconnectionhandshake "Direct link to initiateConnectionHandshake()") ``` abstract initiateConnectionHandshake(): MaybePromise; ``` Defined in: [packages/core/src/wallets/deep-link-wallet.ts:13](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/deep-link-wallet.ts#L13) #### Returns[​](#returns-6 "Direct link to Returns") `MaybePromise`<`ConnectionHandshake`> --- # InjectedWallet Defined in: [packages/core/src/wallets/injected/wallet.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L9) ## Extends[​](#extends "Direct link to Extends") * [`Wallet`](/vue/api/core/wallets/classes/Wallet.md)<`InjectedWalletOptions`, `"connected"`> ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new InjectedWallet(name, options?): InjectedWallet; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L16) #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | ----------------------- | | `name` | `string` | | `options?` | `InjectedWalletOptions` | #### Returns[​](#returns "Direct link to Returns") `InjectedWallet` #### Overrides[​](#overrides "Direct link to Overrides") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`constructor`](/vue/api/core/wallets/classes/Wallet.md#constructor) ## Properties[​](#properties "Direct link to Properties") ### accounts$[​](#accounts "Direct link to accounts$") ``` readonly accounts$: Observable; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:51](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L51) #### Overrides[​](#overrides-1 "Direct link to Overrides") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`accounts$`](/vue/api/core/wallets/classes/Wallet.md#accounts) *** ### connected$[​](#connected "Direct link to connected$") ``` readonly connected$: Observable; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:34](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L34) #### Overrides[​](#overrides-2 "Direct link to Overrides") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`connected$`](/vue/api/core/wallets/classes/Wallet.md#connected) *** ### name[​](#name "Direct link to name") ``` readonly name: string; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:17](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L17) #### Inherited from[​](#inherited-from "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`name`](/vue/api/core/wallets/classes/Wallet.md#name) *** ### options?[​](#options "Direct link to options?") ``` protected readonly optional options?: InjectedWalletOptions; ``` Defined in: [packages/core/src/wallets/wallet.ts:24](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L24) #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`options`](/vue/api/core/wallets/classes/Wallet.md#options) ## Accessors[​](#accessors "Direct link to Accessors") ### id[​](#id "Direct link to id") #### Get Signature[​](#get-signature "Direct link to Get Signature") ``` get id(): string; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:12](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L12) ##### Returns[​](#returns-1 "Direct link to Returns") `string` #### Overrides[​](#overrides-3 "Direct link to Overrides") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`id`](/vue/api/core/wallets/classes/Wallet.md#id) *** ### storage[​](#storage "Direct link to storage") #### Get Signature[​](#get-signature-1 "Direct link to Get Signature") ``` get protected storage(): Storage; ``` Defined in: [packages/core/src/wallets/wallet.ts:20](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L20) ##### Returns[​](#returns-2 "Direct link to Returns") [`Storage`](/vue/api/core/index/classes/Storage.md)<`TStorageKey` *extends* `void` ? `string` : `TStorageKey`> #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`storage`](/vue/api/core/wallets/classes/Wallet.md#storage) ## Methods[​](#methods "Direct link to Methods") ### connect()[​](#connect "Direct link to connect()") ``` connect(): Promise; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:36](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L36) #### Returns[​](#returns-3 "Direct link to Returns") `Promise`<`void`> #### Overrides[​](#overrides-4 "Direct link to Overrides") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`connect`](/vue/api/core/wallets/classes/Wallet.md#connect) *** ### disconnect()[​](#disconnect "Direct link to disconnect()") ``` disconnect(): void; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:45](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L45) #### Returns[​](#returns-4 "Direct link to Returns") `void` #### Overrides[​](#overrides-5 "Direct link to Overrides") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`disconnect`](/vue/api/core/wallets/classes/Wallet.md#disconnect) *** ### getAccounts()[​](#getaccounts "Direct link to getAccounts()") ``` getAccounts(): object[]; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:64](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L64) #### Returns[​](#returns-5 "Direct link to Returns") `object`\[] #### Overrides[​](#overrides-6 "Direct link to Overrides") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`getAccounts`](/vue/api/core/wallets/classes/Wallet.md#getaccounts) *** ### initialize()[​](#initialize "Direct link to initialize()") ``` initialize(): Promise; ``` Defined in: [packages/core/src/wallets/injected/wallet.ts:23](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/wallet.ts#L23) #### Returns[​](#returns-6 "Direct link to Returns") `Promise`<`void`> #### Overrides[​](#overrides-7 "Direct link to Overrides") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`initialize`](/vue/api/core/wallets/classes/Wallet.md#initialize) --- # InjectedWalletProvider Defined in: [packages/core/src/wallets/injected/provider.ts:4](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/provider.ts#L4) ## Extends[​](#extends "Direct link to Extends") * [`WalletProvider`](/vue/api/core/wallets/classes/WalletProvider.md) ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new InjectedWalletProvider(options?): InjectedWalletProvider; ``` Defined in: [packages/core/src/wallets/injected/provider.ts:5](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/provider.ts#L5) #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | ----------------------- | | `options?` | `InjectedWalletOptions` | #### Returns[​](#returns "Direct link to Returns") `InjectedWalletProvider` #### Overrides[​](#overrides "Direct link to Overrides") [`WalletProvider`](/vue/api/core/wallets/classes/WalletProvider.md).[`constructor`](/vue/api/core/wallets/classes/WalletProvider.md#constructor) ## Methods[​](#methods "Direct link to Methods") ### getWallets()[​](#getwallets "Direct link to getWallets()") ``` getWallets(): Promise; ``` Defined in: [packages/core/src/wallets/injected/provider.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/injected/provider.ts#L9) #### Returns[​](#returns-1 "Direct link to Returns") `Promise`<[`InjectedWallet`](/vue/api/core/wallets/classes/InjectedWallet.md)\[]> #### Overrides[​](#overrides-1 "Direct link to Overrides") [`WalletProvider`](/vue/api/core/wallets/classes/WalletProvider.md).[`getWallets`](/vue/api/core/wallets/classes/WalletProvider.md#getwallets) --- # LocalWallet\ Defined in: [packages/core/src/wallets/local-wallet.ts:22](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L22) **`Experimental`** ## Extends[​](#extends "Direct link to Extends") * [`Wallet`](/vue/api/core/wallets/classes/Wallet.md)<`TOptions`, `"accounts"` | `TStorageKey`> ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | | `TAccount` *extends* `Pick`<[`PolkadotSignerAccount`](/vue/api/core/wallets/type-aliases/PolkadotSignerAccount.md), `"id"`> | `Pick`<[`PolkadotSignerAccount`](/vue/api/core/wallets/type-aliases/PolkadotSignerAccount.md), `"id"`> | | `TJsonAccount` | `TAccount` | | `TOptions` *extends* [`WalletOptions`](/vue/api/core/wallets/type-aliases/WalletOptions.md) | [`WalletOptions`](/vue/api/core/wallets/type-aliases/WalletOptions.md) | | `TStorageKey` *extends* `string` | `string` | ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new LocalWallet(options?): LocalWallet; ``` Defined in: [packages/core/src/wallets/local-wallet.ts:36](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L36) **`Experimental`** #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | ---------- | | `options?` | `TOptions` | #### Returns[​](#returns "Direct link to Returns") `LocalWallet`<`TAccount`, `TJsonAccount`, `TOptions`, `TStorageKey`> #### Overrides[​](#overrides "Direct link to Overrides") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`constructor`](/vue/api/core/wallets/classes/Wallet.md#constructor) ## Properties[​](#properties "Direct link to Properties") ### accounts$[​](#accounts "Direct link to accounts$") ``` abstract readonly accounts$: Observable; ``` Defined in: [packages/core/src/wallets/wallet.ts:36](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L36) **`Experimental`** #### Inherited from[​](#inherited-from "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`accounts$`](/vue/api/core/wallets/classes/Wallet.md#accounts) *** ### accountStore[​](#accountstore "Direct link to accountStore") ``` accountStore: AccountStore; ``` Defined in: [packages/core/src/wallets/local-wallet.ts:66](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L66) **`Experimental`** *** ### connected$[​](#connected "Direct link to connected$") ``` abstract readonly connected$: Observable; ``` Defined in: [packages/core/src/wallets/wallet.ts:30](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L30) **`Experimental`** #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`connected$`](/vue/api/core/wallets/classes/Wallet.md#connected) *** ### id[​](#id "Direct link to id") ``` abstract readonly id: string; ``` Defined in: [packages/core/src/wallets/wallet.ts:14](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L14) **`Experimental`** #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`id`](/vue/api/core/wallets/classes/Wallet.md#id) *** ### localAccounts$[​](#localaccounts "Direct link to localAccounts$") ``` protected localAccounts$: BehaviorSubject; ``` Defined in: [packages/core/src/wallets/local-wallet.ts:34](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L34) **`Experimental`** *** ### name[​](#name "Direct link to name") ``` abstract readonly name: string; ``` Defined in: [packages/core/src/wallets/wallet.ts:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L16) **`Experimental`** #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`name`](/vue/api/core/wallets/classes/Wallet.md#name) *** ### options?[​](#options "Direct link to options?") ``` protected readonly optional options?: TOptions; ``` Defined in: [packages/core/src/wallets/wallet.ts:24](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L24) **`Experimental`** #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`options`](/vue/api/core/wallets/classes/Wallet.md#options) ## Accessors[​](#accessors "Direct link to Accessors") ### storage[​](#storage "Direct link to storage") #### Get Signature[​](#get-signature "Direct link to Get Signature") ``` get protected storage(): Storage; ``` Defined in: [packages/core/src/wallets/wallet.ts:20](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L20) **`Experimental`** ##### Returns[​](#returns-1 "Direct link to Returns") [`Storage`](/vue/api/core/index/classes/Storage.md)<`TStorageKey` *extends* `void` ? `string` : `TStorageKey`> #### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`storage`](/vue/api/core/wallets/classes/Wallet.md#storage) ## Methods[​](#methods "Direct link to Methods") ### accountFromJson()[​](#accountfromjson "Direct link to accountFromJson()") ``` abstract protected accountFromJson(jsonAccount): Omit; ``` Defined in: [packages/core/src/wallets/local-wallet.ts:32](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L32) **`Experimental`** #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | ------------- | -------------- | | `jsonAccount` | `TJsonAccount` | #### Returns[​](#returns-2 "Direct link to Returns") `Omit`<`TAccount`, `"id"`> *** ### accountId()[​](#accountid "Direct link to accountId()") ``` abstract protected accountId(account): string; ``` Defined in: [packages/core/src/wallets/local-wallet.ts:28](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L28) **`Experimental`** #### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | --------- | -------------------------- | | `account` | `Omit`<`TAccount`, `"id"`> | #### Returns[​](#returns-3 "Direct link to Returns") `string` *** ### accountToJson()[​](#accounttojson "Direct link to accountToJson()") ``` abstract protected accountToJson(account): TJsonAccount; ``` Defined in: [packages/core/src/wallets/local-wallet.ts:30](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L30) **`Experimental`** #### Parameters[​](#parameters-3 "Direct link to Parameters") | Parameter | Type | | --------- | -------------------------- | | `account` | `Omit`<`TAccount`, `"id"`> | #### Returns[​](#returns-4 "Direct link to Returns") `TJsonAccount` *** ### connect()[​](#connect "Direct link to connect()") ``` abstract connect(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:32](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L32) **`Experimental`** #### Returns[​](#returns-5 "Direct link to Returns") `MaybePromise`<`void`> #### Inherited from[​](#inherited-from-6 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`connect`](/vue/api/core/wallets/classes/Wallet.md#connect) *** ### disconnect()[​](#disconnect "Direct link to disconnect()") ``` abstract disconnect(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:34](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L34) **`Experimental`** #### Returns[​](#returns-6 "Direct link to Returns") `MaybePromise`<`void`> #### Inherited from[​](#inherited-from-7 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`disconnect`](/vue/api/core/wallets/classes/Wallet.md#disconnect) *** ### getAccounts()[​](#getaccounts "Direct link to getAccounts()") ``` getAccounts(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:38](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L38) **`Experimental`** #### Returns[​](#returns-7 "Direct link to Returns") `MaybePromise`<[`PolkadotSignerAccount`](/vue/api/core/wallets/type-aliases/PolkadotSignerAccount.md)\[]> #### Inherited from[​](#inherited-from-8 "Direct link to Inherited from") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`getAccounts`](/vue/api/core/wallets/classes/Wallet.md#getaccounts) *** ### initialize()[​](#initialize "Direct link to initialize()") ``` initialize(): void; ``` Defined in: [packages/core/src/wallets/local-wallet.ts:52](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/local-wallet.ts#L52) **`Experimental`** #### Returns[​](#returns-8 "Direct link to Returns") `void` #### Overrides[​](#overrides-1 "Direct link to Overrides") [`Wallet`](/vue/api/core/wallets/classes/Wallet.md).[`initialize`](/vue/api/core/wallets/classes/Wallet.md#initialize) --- # Wallet\ Defined in: [packages/core/src/wallets/wallet.ts:10](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L10) ## Extended by[​](#extended-by "Direct link to Extended by") * [`DeepLinkWallet`](/vue/api/core/wallets/classes/DeepLinkWallet.md) * [`InjectedWallet`](/vue/api/core/wallets/classes/InjectedWallet.md) * [`LocalWallet`](/vue/api/core/wallets/classes/LocalWallet.md) ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | Default type | | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | | `TOptions` *extends* [`WalletOptions`](/vue/api/core/wallets/type-aliases/WalletOptions.md) | [`WalletOptions`](/vue/api/core/wallets/type-aliases/WalletOptions.md) | | `TStorageKey` *extends* `string` | `string` | ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new Wallet(options?): Wallet; ``` Defined in: [packages/core/src/wallets/wallet.ts:24](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L24) #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | ---------- | ---------- | | `options?` | `TOptions` | #### Returns[​](#returns "Direct link to Returns") `Wallet`<`TOptions`, `TStorageKey`> ## Properties[​](#properties "Direct link to Properties") ### accounts$[​](#accounts "Direct link to accounts$") ``` abstract readonly accounts$: Observable; ``` Defined in: [packages/core/src/wallets/wallet.ts:36](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L36) *** ### connected$[​](#connected "Direct link to connected$") ``` abstract readonly connected$: Observable; ``` Defined in: [packages/core/src/wallets/wallet.ts:30](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L30) *** ### id[​](#id "Direct link to id") ``` abstract readonly id: string; ``` Defined in: [packages/core/src/wallets/wallet.ts:14](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L14) *** ### name[​](#name "Direct link to name") ``` abstract readonly name: string; ``` Defined in: [packages/core/src/wallets/wallet.ts:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L16) *** ### options?[​](#options "Direct link to options?") ``` protected readonly optional options?: TOptions; ``` Defined in: [packages/core/src/wallets/wallet.ts:24](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L24) ## Accessors[​](#accessors "Direct link to Accessors") ### storage[​](#storage "Direct link to storage") #### Get Signature[​](#get-signature "Direct link to Get Signature") ``` get protected storage(): Storage; ``` Defined in: [packages/core/src/wallets/wallet.ts:20](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L20) ##### Returns[​](#returns-1 "Direct link to Returns") [`Storage`](/vue/api/core/index/classes/Storage.md)<`TStorageKey` *extends* `void` ? `string` : `TStorageKey`> ## Methods[​](#methods "Direct link to Methods") ### connect()[​](#connect "Direct link to connect()") ``` abstract connect(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:32](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L32) #### Returns[​](#returns-2 "Direct link to Returns") `MaybePromise`<`void`> *** ### disconnect()[​](#disconnect "Direct link to disconnect()") ``` abstract disconnect(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:34](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L34) #### Returns[​](#returns-3 "Direct link to Returns") `MaybePromise`<`void`> *** ### getAccounts()[​](#getaccounts "Direct link to getAccounts()") ``` getAccounts(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:38](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L38) #### Returns[​](#returns-4 "Direct link to Returns") `MaybePromise`<[`PolkadotSignerAccount`](/vue/api/core/wallets/type-aliases/PolkadotSignerAccount.md)\[]> *** ### initialize()[​](#initialize "Direct link to initialize()") ``` abstract initialize(): MaybePromise; ``` Defined in: [packages/core/src/wallets/wallet.ts:28](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L28) #### Returns[​](#returns-5 "Direct link to Returns") `MaybePromise`<`void`> --- # WalletProvider Defined in: [packages/core/src/wallets/provider.ts:4](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/provider.ts#L4) ## Extended by[​](#extended-by "Direct link to Extended by") * [`InjectedWalletProvider`](/vue/api/core/wallets/classes/InjectedWalletProvider.md) ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new WalletProvider(): WalletProvider; ``` #### Returns[​](#returns "Direct link to Returns") `WalletProvider` ## Methods[​](#methods "Direct link to Methods") ### getWallets()[​](#getwallets "Direct link to getWallets()") ``` abstract getWallets(): MaybePromise[]>; ``` Defined in: [packages/core/src/wallets/provider.ts:5](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/provider.ts#L5) #### Returns[​](#returns-1 "Direct link to Returns") `MaybePromise`<[`Wallet`](/vue/api/core/wallets/classes/Wallet.md)<[`WalletOptions`](/vue/api/core/wallets/type-aliases/WalletOptions.md), `string`>\[]> --- # initializeWallets() ``` function initializeWallets(wallets): Promise; ``` Defined in: [packages/core/src/actions/initialize-wallets.ts:5](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/actions/initialize-wallets.ts#L5) ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | `wallets` | [`Wallet`](/vue/api/core/wallets/classes/Wallet.md)<[`WalletOptions`](/vue/api/core/wallets/type-aliases/WalletOptions.md), `string`>\[] | ## Returns[​](#returns "Direct link to Returns") `Promise`<`void`\[]> --- # PolkadotAccount ``` type PolkadotAccount = Omit & object; ``` Defined in: [packages/core/src/wallets/account.ts:25](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/account.ts#L25) ## Type Declaration[​](#type-declaration "Direct link to Type Declaration") ### address[​](#address "Direct link to address") ``` address: Address; ``` ### polkadotSigner[​](#polkadotsigner "Direct link to polkadotSigner") ``` polkadotSigner: InjectedPolkadotAccount["polkadotSigner"] | undefined; ``` --- # PolkadotSignerAccount ``` type PolkadotSignerAccount = PolkadotSignerAccountBase & object; ``` Defined in: [packages/core/src/wallets/account.ts:19](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/account.ts#L19) ## Type Declaration[​](#type-declaration "Direct link to Type Declaration") ### genesisHash?[​](#genesishash "Direct link to genesisHash?") ``` optional genesisHash?: InjectedPolkadotAccount["genesisHash"]; ``` ### id[​](#id "Direct link to id") ``` id: string; ``` ### name?[​](#name "Direct link to name?") ``` optional name?: string; ``` --- # WalletAccount ``` type WalletAccount = PolkadotAccount & object; ``` Defined in: [packages/core/src/wallets/account.ts:30](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/account.ts#L30) ## Type Declaration[​](#type-declaration "Direct link to Type Declaration") ### wallet[​](#wallet "Direct link to wallet") ``` wallet: Wallet; ``` --- # WalletOptions ``` type WalletOptions = object; ``` Defined in: [packages/core/src/wallets/wallet.ts:6](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L6) ## Properties[​](#properties "Direct link to Properties") ### storage?[​](#storage "Direct link to storage?") ``` optional storage?: Storage; ``` Defined in: [packages/core/src/wallets/wallet.ts:7](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/core/src/wallets/wallet.ts#L7) --- # @reactive-dot/utils ## Classes[​](#classes "Direct link to Classes") | Class | Description | | ---------------------------------------------------------------- | ----------- | | [DenominatedNumber](/vue/api/utils/classes/DenominatedNumber.md) | - | ## Variables[​](#variables "Direct link to Variables") | Variable | Description | | ---------------------------------------------------- | ----------- | | [BigIntMath](/vue/api/utils/variables/BigIntMath.md) | - | --- # DenominatedNumber Defined in: [packages/utils/src/denominated-number.ts:1](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L1) ## Extends[​](#extends "Direct link to Extends") * `Number` ## Constructors[​](#constructors "Direct link to Constructors") ### Constructor[​](#constructor "Direct link to Constructor") ``` new DenominatedNumber( planck, decimals, denomination?): DenominatedNumber; ``` Defined in: [packages/utils/src/denominated-number.ts:7](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L7) #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | --------------- | --------------------------------------------- | | `planck` | `string` \| `number` \| `bigint` \| `boolean` | | `decimals` | `number` | | `denomination?` | `string` | #### Returns[​](#returns "Direct link to Returns") `DenominatedNumber` #### Overrides[​](#overrides "Direct link to Overrides") ``` Number.constructor ``` ## Properties[​](#properties "Direct link to Properties") ### decimals[​](#decimals "Direct link to decimals") ``` readonly decimals: number; ``` Defined in: [packages/utils/src/denominated-number.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L9) *** ### denomination?[​](#denomination "Direct link to denomination?") ``` readonly optional denomination?: string; ``` Defined in: [packages/utils/src/denominated-number.ts:10](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L10) *** ### ~~mapFromNumber~~[​](#mapfromnumber "Direct link to mapfromnumber") ``` mapFromNumber: (mapper) => DenominatedNumber; ``` Defined in: [packages/utils/src/denominated-number.ts:117](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L117) #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | --------- | ---------------------- | | `mapper` | (`number`) => `number` | #### Returns[​](#returns-1 "Direct link to Returns") `DenominatedNumber` #### Deprecated[​](#deprecated "Direct link to Deprecated") Use [DenominatedNumber.mapNumber](#mapnumber) instead. *** ### ~~mapFromPlanck~~[​](#mapfromplanck "Direct link to mapfromplanck") ``` mapFromPlanck: (mapper) => DenominatedNumber; ``` Defined in: [packages/utils/src/denominated-number.ts:108](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L108) #### Parameters[​](#parameters-2 "Direct link to Parameters") | Parameter | Type | | --------- | ---------------------- | | `mapper` | (`planck`) => `bigint` | #### Returns[​](#returns-2 "Direct link to Returns") `DenominatedNumber` #### Deprecated[​](#deprecated-1 "Direct link to Deprecated") Use [DenominatedNumber.mapPlanck](#mapplanck) instead. *** ### planck[​](#planck "Direct link to planck") ``` readonly planck: bigint; ``` Defined in: [packages/utils/src/denominated-number.ts:5](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L5) *** ### EPSILON[​](#epsilon "Direct link to EPSILON") ``` readonly static EPSILON: number; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:217 The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately: 2.2204460492503130808472633361816 x 10β€βˆ’β€16. #### Inherited from[​](#inherited-from "Direct link to Inherited from") ``` Number.EPSILON ``` *** ### MAX\_SAFE\_INTEGER[​](#max_safe_integer "Direct link to MAX_SAFE_INTEGER") ``` readonly static MAX_SAFE_INTEGER: number; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:252 The value of the largest integer n such that n and n + 1 are both exactly representable as a Number value. The value of Number.MAX\_SAFE\_INTEGER is 9007199254740991 2^53 βˆ’ 1. #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") ``` Number.MAX_SAFE_INTEGER ``` *** ### MAX\_VALUE[​](#max_value "Direct link to MAX_VALUE") ``` readonly static MAX_VALUE: number; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:592 The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") ``` Number.MAX_VALUE ``` *** ### MIN\_SAFE\_INTEGER[​](#min_safe_integer "Direct link to MIN_SAFE_INTEGER") ``` readonly static MIN_SAFE_INTEGER: number; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:259 The value of the smallest integer n such that n and n βˆ’ 1 are both exactly representable as a Number value. The value of Number.MIN\_SAFE\_INTEGER is βˆ’9007199254740991 (βˆ’(2^53 βˆ’ 1)). #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") ``` Number.MIN_SAFE_INTEGER ``` *** ### MIN\_VALUE[​](#min_value "Direct link to MIN_VALUE") ``` readonly static MIN_VALUE: number; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:595 The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") ``` Number.MIN_VALUE ``` *** ### NaN[​](#nan "Direct link to NaN") ``` readonly static NaN: number; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:601 A value that is not a number. In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. #### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") ``` Number.NaN ``` *** ### NEGATIVE\_INFINITY[​](#negative_infinity "Direct link to NEGATIVE_INFINITY") ``` readonly static NEGATIVE_INFINITY: number; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:607 A value that is less than the largest negative number that can be represented in JavaScript. JavaScript displays NEGATIVE\_INFINITY values as -infinity. #### Inherited from[​](#inherited-from-6 "Direct link to Inherited from") ``` Number.NEGATIVE_INFINITY ``` *** ### POSITIVE\_INFINITY[​](#positive_infinity "Direct link to POSITIVE_INFINITY") ``` readonly static POSITIVE_INFINITY: number; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:613 A value greater than the largest number that can be represented in JavaScript. JavaScript displays POSITIVE\_INFINITY values as infinity. #### Inherited from[​](#inherited-from-7 "Direct link to Inherited from") ``` Number.POSITIVE_INFINITY ``` ## Methods[​](#methods "Direct link to Methods") ### mapNumber()[​](#mapnumber "Direct link to mapNumber()") ``` mapNumber(mapper): DenominatedNumber; ``` Defined in: [packages/utils/src/denominated-number.ts:110](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L110) #### Parameters[​](#parameters-3 "Direct link to Parameters") | Parameter | Type | | --------- | ---------------------- | | `mapper` | (`number`) => `number` | #### Returns[​](#returns-3 "Direct link to Returns") `DenominatedNumber` *** ### mapPlanck()[​](#mapplanck "Direct link to mapPlanck()") ``` mapPlanck(mapper): DenominatedNumber; ``` Defined in: [packages/utils/src/denominated-number.ts:101](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L101) #### Parameters[​](#parameters-4 "Direct link to Parameters") | Parameter | Type | | --------- | ---------------------- | | `mapper` | (`planck`) => `bigint` | #### Returns[​](#returns-4 "Direct link to Returns") `DenominatedNumber` *** ### toExponential()[​](#toexponential "Direct link to toExponential()") ``` toExponential(fractionDigits?): string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:574 Returns a string containing a number represented in exponential notation. #### Parameters[​](#parameters-5 "Direct link to Parameters") | Parameter | Type | Description | | ----------------- | -------- | --------------------------------------------------------------------------------- | | `fractionDigits?` | `number` | Number of digits after the decimal point. Must be in the range 0 - 20, inclusive. | #### Returns[​](#returns-5 "Direct link to Returns") `string` #### Inherited from[​](#inherited-from-8 "Direct link to Inherited from") ``` Number.toExponential ``` *** ### toFixed()[​](#tofixed "Direct link to toFixed()") ``` toFixed(fractionDigits?): string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:568 Returns a string representing a number in fixed-point notation. #### Parameters[​](#parameters-6 "Direct link to Parameters") | Parameter | Type | Description | | ----------------- | -------- | --------------------------------------------------------------------------------- | | `fractionDigits?` | `number` | Number of digits after the decimal point. Must be in the range 0 - 20, inclusive. | #### Returns[​](#returns-6 "Direct link to Returns") `string` #### Inherited from[​](#inherited-from-9 "Direct link to Inherited from") ``` Number.toFixed ``` *** ### toLocaleString()[​](#tolocalestring "Direct link to toLocaleString()") #### Call Signature[​](#call-signature "Direct link to Call Signature") ``` toLocaleString(locales?, options?): string; ``` Defined in: [packages/utils/src/denominated-number.ts:75](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L75) Converts a number to a string by using the current or specified locale. ##### Parameters[​](#parameters-7 "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `locales?` | `string` \| `string`\[] | A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. | | `options?` | `NumberFormatOptions` | An object that contains one or more properties that specify comparison options. | ##### Returns[​](#returns-7 "Direct link to Returns") `string` ##### Overrides[​](#overrides-1 "Direct link to Overrides") ``` Number.toLocaleString ``` #### Call Signature[​](#call-signature-1 "Direct link to Call Signature") ``` toLocaleString(locales?, options?): string; ``` Defined in: [packages/utils/src/denominated-number.ts:79](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L79) Converts a number to a string by using the current or specified locale. ##### Parameters[​](#parameters-8 "Direct link to Parameters") | Parameter | Type | Description | | ---------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `locales?` | `LocalesArgument` | A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. | | `options?` | `NumberFormatOptions` | An object that contains one or more properties that specify comparison options. | ##### Returns[​](#returns-8 "Direct link to Returns") `string` ##### Overrides[​](#overrides-2 "Direct link to Overrides") ``` Number.toLocaleString ``` *** ### toPrecision()[​](#toprecision "Direct link to toPrecision()") ``` toPrecision(precision?): string; ``` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:580 Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. #### Parameters[​](#parameters-9 "Direct link to Parameters") | Parameter | Type | Description | | ------------ | -------- | --------------------------------------------------------------------- | | `precision?` | `number` | Number of significant digits. Must be in the range 1 - 21, inclusive. | #### Returns[​](#returns-9 "Direct link to Returns") `string` #### Inherited from[​](#inherited-from-10 "Direct link to Inherited from") ``` Number.toPrecision ``` *** ### toString()[​](#tostring "Direct link to toString()") ``` toString(): string; ``` Defined in: [packages/utils/src/denominated-number.ts:63](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L63) Returns a string representation of an object. #### Returns[​](#returns-10 "Direct link to Returns") `string` #### Overrides[​](#overrides-3 "Direct link to Overrides") ``` Number.toString ``` *** ### valueOf()[​](#valueof "Direct link to valueOf()") ``` valueOf(): number; ``` Defined in: [packages/utils/src/denominated-number.ts:59](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L59) Returns the primitive value of the specified object. #### Returns[​](#returns-11 "Direct link to Returns") `number` #### Overrides[​](#overrides-4 "Direct link to Overrides") ``` Number.valueOf ``` *** ### fromNumber()[​](#fromnumber "Direct link to fromNumber()") ``` static fromNumber( number, decimals, denomination?): DenominatedNumber; ``` Defined in: [packages/utils/src/denominated-number.ts:16](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/denominated-number.ts#L16) #### Parameters[​](#parameters-10 "Direct link to Parameters") | Parameter | Type | | --------------- | -------------------- | | `number` | `string` \| `number` | | `decimals` | `number` | | `denomination?` | `string` | #### Returns[​](#returns-12 "Direct link to Returns") `DenominatedNumber` *** ### isFinite()[​](#isfinite "Direct link to isFinite()") ``` static isFinite(number): boolean; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:225 Returns true if passed value is finite. Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a number. Only finite values of the type number, result in true. #### Parameters[​](#parameters-11 "Direct link to Parameters") | Parameter | Type | Description | | --------- | --------- | ---------------- | | `number` | `unknown` | A numeric value. | #### Returns[​](#returns-13 "Direct link to Returns") `boolean` #### Inherited from[​](#inherited-from-11 "Direct link to Inherited from") ``` Number.isFinite ``` *** ### isInteger()[​](#isinteger "Direct link to isInteger()") ``` static isInteger(number): boolean; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:231 Returns true if the value passed is an integer, false otherwise. #### Parameters[​](#parameters-12 "Direct link to Parameters") | Parameter | Type | Description | | --------- | --------- | ---------------- | | `number` | `unknown` | A numeric value. | #### Returns[​](#returns-14 "Direct link to Returns") `boolean` #### Inherited from[​](#inherited-from-12 "Direct link to Inherited from") ``` Number.isInteger ``` *** ### isNaN()[​](#isnan "Direct link to isNaN()") ``` static isNaN(number): boolean; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:239 Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter to a number. Only values of the type number, that are also NaN, result in true. #### Parameters[​](#parameters-13 "Direct link to Parameters") | Parameter | Type | Description | | --------- | --------- | ---------------- | | `number` | `unknown` | A numeric value. | #### Returns[​](#returns-15 "Direct link to Returns") `boolean` #### Inherited from[​](#inherited-from-13 "Direct link to Inherited from") ``` Number.isNaN ``` *** ### isSafeInteger()[​](#issafeinteger "Direct link to isSafeInteger()") ``` static isSafeInteger(number): boolean; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:245 Returns true if the value passed is a safe integer. #### Parameters[​](#parameters-14 "Direct link to Parameters") | Parameter | Type | Description | | --------- | --------- | ---------------- | | `number` | `unknown` | A numeric value. | #### Returns[​](#returns-16 "Direct link to Returns") `boolean` #### Inherited from[​](#inherited-from-14 "Direct link to Inherited from") ``` Number.isSafeInteger ``` *** ### parseFloat()[​](#parsefloat "Direct link to parseFloat()") ``` static parseFloat(string): number; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:265 Converts a string to a floating-point number. #### Parameters[​](#parameters-15 "Direct link to Parameters") | Parameter | Type | Description | | --------- | -------- | ----------------------------------------------- | | `string` | `string` | A string that contains a floating-point number. | #### Returns[​](#returns-17 "Direct link to Returns") `number` #### Inherited from[​](#inherited-from-15 "Direct link to Inherited from") ``` Number.parseFloat ``` *** ### parseInt()[​](#parseint "Direct link to parseInt()") ``` static parseInt(string, radix?): number; ``` Defined in: node\_modules/typescript/lib/lib.es2015.core.d.ts:274 Converts A string to an integer. #### Parameters[​](#parameters-16 "Direct link to Parameters") | Parameter | Type | Description | | --------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `string` | `string` | A string to convert into a number. | | `radix?` | `number` | A value between 2 and 36 that specifies the base of the number in `string`. If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. All other strings are considered decimal. | #### Returns[​](#returns-18 "Direct link to Returns") `number` #### Inherited from[​](#inherited-from-16 "Direct link to Inherited from") ``` Number.parseInt ``` --- # BigIntMath ``` const BigIntMath: Readonly<{ get toStringTag: string; max: bigint; min: bigint; }>; ``` Defined in: [packages/utils/src/big-int.ts:1](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/utils/src/big-int.ts#L1) --- # @reactive-dot/vue ## Variables[​](#variables "Direct link to Variables") | Variable | Description | | ------------------------------------------------------------------------ | ----------- | | [ReactiveDotPlugin](/vue/api/vue/variables/ReactiveDotPlugin.md) | - | | [~~watchMutationEffect~~](/vue/api/vue/variables/watchMutationEffect.md) | - | ## Functions[​](#functions "Direct link to Functions") | Function | Description | | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | | [provideChain](/vue/api/vue/functions/provideChain.md) | - | | [provideSigner](/vue/api/vue/functions/provideSigner.md) | - | | [useAccounts](/vue/api/vue/functions/useAccounts.md) | Composable for getting currently connected accounts. | | [useBlock](/vue/api/vue/functions/useBlock.md) | Composable for fetching information about the latest block. | | [useChainId](/vue/api/vue/functions/useChainId.md) | Composable for getting the current chain ID. | | [useChainIds](/vue/api/vue/functions/useChainIds.md) | Composable for getting all configured chain IDs. | | [useChainSpecData](/vue/api/vue/functions/useChainSpecData.md) | Composable for fetching the [JSON-RPC spec](https://paritytech.github.io/json-rpc-interface-spec/api/chainSpec.html). | | [useClient](/vue/api/vue/functions/useClient.md) | Composable for getting Polkadot-API client instance. | | [useConfig](/vue/api/vue/functions/useConfig.md) | Composable for getting the current config. | | [useConnectedWallets](/vue/api/vue/functions/useConnectedWallets.md) | Composable for getting all connected wallets. | | [useContractMutation](/vue/api/vue/functions/useContractMutation.md) | Composable for mutating (writing to) a contract. | | [useMutation](/vue/api/vue/functions/useMutation.md) | Composable for sending transactions to chains. | | [useNativeToken](/vue/api/vue/functions/useNativeToken.md) | Composable for getting the chain's native token | | [useQuery](/vue/api/vue/functions/useQuery.md) | Composable for querying data from chain, and returning the response. | | [useQueryErrorResetter](/vue/api/vue/functions/useQueryErrorResetter.md) | Composable for getting the function to reset all query errors. | | [useSigner](/vue/api/vue/functions/useSigner.md) | Composable for getting the current signer. | | [useSpendableBalance](/vue/api/vue/functions/useSpendableBalance.md) | Composable for getting an account's spendable balance. | | [useSpendableBalances](/vue/api/vue/functions/useSpendableBalances.md) | Composable for getting accounts’ spendable balances. | | [useStore](/vue/api/vue/functions/useStore.md) | - | | [useTypedApi](/vue/api/vue/functions/useTypedApi.md) | Composable for getting Polkadot-API typed API. | | [useWalletConnector](/vue/api/vue/functions/useWalletConnector.md) | Composable for connecting wallets | | [useWalletDisconnector](/vue/api/vue/functions/useWalletDisconnector.md) | Composable for disconnecting wallets | | [useWallets](/vue/api/vue/functions/useWallets.md) | Composable for getting all available wallets. | | [watchContractEvent](/vue/api/vue/functions/watchContractEvent.md) | Composable for listening to contract events. | | [watchMutation](/vue/api/vue/functions/watchMutation.md) | Watch for mutation events. | --- # provideChain() ``` function provideChain(chainId): void; ``` Defined in: [providers/chain.ts:5](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/providers/chain.ts#L5) ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | --------- | ---------------------------------------- | | `chainId` | `MaybeRefOrGetter`<`string` \| `number`> | ## Returns[​](#returns "Direct link to Returns") `void` --- # provideSigner() ``` function provideSigner(signer): void; ``` Defined in: [providers/signer.ts:5](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/providers/signer.ts#L5) ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | --------- | ------------------------------------------- | | `signer` | `MaybeRefOrGetter`<`Signer` \| `undefined`> | ## Returns[​](#returns "Direct link to Returns") `void` --- # useAccounts() ``` function useAccounts(options?): PromiseLikeAsyncState; ``` Defined in: [composables/use-accounts.ts:23](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-accounts.ts#L23) Composable for getting currently connected accounts. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | -------------------- | ------------------ | | `options?` | `UseAccountsOptions` | Additional options | ## Returns[​](#returns "Direct link to Returns") `PromiseLikeAsyncState`<`WalletAccount`\[]> The currently connected accounts --- # useBlock() ``` function useBlock(tag?, options?): PromiseLikeAsyncState; ``` Defined in: [composables/use-block.ts:17](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-block.ts#L17) Composable for fetching information about the latest block. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Default value | Description | | ---------- | --------------------------------------------- | ------------- | --------------------- | | `tag` | `MaybeRefOrGetter`<`"best"` \| `"finalized"`> | `"finalized"` | Which block to target | | `options?` | `ChainComposableOptions` | `undefined` | Additional options | ## Returns[​](#returns "Direct link to Returns") `PromiseLikeAsyncState`<`BlockInfo`> The latest finalized or best block --- # useChainId() ``` function useChainId(): ComputedRef; ``` Defined in: [composables/use-chain-id.ts:21](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-chain-id.ts#L21) Composable for getting the current chain ID. ## Returns[​](#returns "Direct link to Returns") `ComputedRef`<`string` | `number`> The current chain ID --- # useChainIds() ``` function useChainIds(): ComputedRef<(string | number)[]>; ``` Defined in: [composables/use-chain-id.ts:12](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-chain-id.ts#L12) Composable for getting all configured chain IDs. ## Returns[​](#returns "Direct link to Returns") `ComputedRef`<(`string` | `number`)\[]> All configured chain IDs --- # useChainSpecData() ``` function useChainSpecData(options?): PromiseLikeAsyncState; ``` Defined in: [composables/use-chain-spec-data.ts:14](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-chain-spec-data.ts#L14) Composable for fetching the [JSON-RPC spec](https://paritytech.github.io/json-rpc-interface-spec/api/chainSpec.html). ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------ | ------------------ | | `options?` | `ChainComposableOptions` | Additional options | ## Returns[​](#returns "Direct link to Returns") `PromiseLikeAsyncState`<`ChainSpecData`> The [JSON-RPC spec](https://paritytech.github.io/json-rpc-interface-spec/api/chainSpec.html) --- # useClient() ``` function useClient(options?): PromiseLikeAsyncState; ``` Defined in: [composables/use-client.ts:15](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-client.ts#L15) Composable for getting Polkadot-API client instance. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------ | ------------------ | | `options?` | `ChainComposableOptions` | Additional options | ## Returns[​](#returns "Direct link to Returns") `PromiseLikeAsyncState`<`PolkadotClient`> Polkadot-API client --- # useConfig() ``` function useConfig(): ComputedRef; ``` Defined in: [composables/use-config.ts:12](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-config.ts#L12) Composable for getting the current config. ## Returns[​](#returns "Direct link to Returns") `ComputedRef`<`Config`> The current config --- # useConnectedWallets() ``` function useConnectedWallets(): PromiseLikeAsyncState[]>; ``` Defined in: [composables/use-wallets.ts:29](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-wallets.ts#L29) Composable for getting all connected wallets. ## Returns[​](#returns "Direct link to Returns") `PromiseLikeAsyncState`<`Wallet`<`WalletOptions`, `string`>\[]> Connected wallets --- # useContractMutation() ``` function useContractMutation(action, options?): object; ``` Defined in: [composables/use-contract-mutation.ts:31](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-contract-mutation.ts#L31) Composable for mutating (writing to) a contract. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | ------------------------------------------------------------------------- | | `TAction` *extends* (`builder`, `input`) => `MaybePromise`<`Transaction`> | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ----------------------------------- | -------------------------------------- | | `action` | `TAction` | The function to create the transaction | | `options?` | `ChainComposableOptions` & `object` | Additional options | ## Returns[​](#returns "Direct link to Returns") `object` The current transaction state & submit function ### data[​](#data "Direct link to data") ``` data: Ref; ``` ### error[​](#error "Direct link to error") ``` error: Ref; ``` ### execute[​](#execute "Direct link to execute") ``` execute: (...args) => Observable; ``` #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | --------- | -------------------------------------------------------------------------------------------- | | ...`args` | `Parameters`<`TAction`>\[`"length"`] *extends* `2` ? \[`SubmitOptions`] : \[`SubmitOptions`] | #### Returns[​](#returns-1 "Direct link to Returns") `Observable` ### status[​](#status "Direct link to status") ``` status: Ref<"idle" | "pending" | "success" | "error">; ``` --- # useMutation() ``` function useMutation(action, options?): object; ``` Defined in: [composables/use-mutation.ts:27](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-mutation.ts#L27) Composable for sending transactions to chains. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------------------------------------------------- | | `TAction` *extends* (`tx`, `input`) => `Transaction` | | `TChainId` *extends* `string` \| `number` \| `undefined` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ----------------------------------------------- | -------------------------------------- | | `action` | `TAction` | The function to create the transaction | | `options?` | `ChainComposableOptions`<`TChainId`> & `object` | Additional options | ## Returns[​](#returns "Direct link to Returns") `object` The current transaction state & submit function ### data[​](#data "Direct link to data") ``` data: Ref; ``` ### error[​](#error "Direct link to error") ``` error: Ref; ``` ### execute[​](#execute "Direct link to execute") ``` execute: (...args) => Observable; ``` #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | --------- | -------------------------------------------------------------------------------------------- | | ...`args` | `Parameters`<`TAction`>\[`"length"`] *extends* `2` ? \[`SubmitOptions`] : \[`SubmitOptions`] | #### Returns[​](#returns-1 "Direct link to Returns") `Observable` ### status[​](#status "Direct link to status") ``` status: Ref<"idle" | "pending" | "success" | "error">; ``` --- # useNativeToken() ``` function useNativeToken(options?): PromiseLikeAsyncState<{ amountFromNumber: (number) => DenominatedNumber; amountFromPlanck: (planck) => DenominatedNumber; code: string | undefined; decimals: number | undefined; }>; ``` Defined in: [composables/use-native-token.ts:15](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-native-token.ts#L15) Composable for getting the chain's native token ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------ | ------------------ | | `options?` | `ChainComposableOptions` | Additional options | ## Returns[​](#returns "Direct link to Returns") `PromiseLikeAsyncState`<{ `amountFromNumber`: (`number`) => `DenominatedNumber`; `amountFromPlanck`: (`planck`) => `DenominatedNumber`; `code`: `string` | `undefined`; `decimals`: `number` | `undefined`; }> The chain's native token --- # useQuery() ``` function useQuery(query, options?): PromiseLikeAsyncState>; ``` Defined in: [composables/use-query.ts:55](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-query.ts#L55) Composable for querying data from chain, and returning the response. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------------------------------------------------- | | `TChainId` *extends* `string` \| `number` \| `undefined` | | `TQuery` *extends* `QueryArgument`<`TChainId`> | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------------------ | -------------------------------- | | `query` | `TQuery` | The function to create the query | | `options?` | `ChainComposableOptions`<`TChainId`> | Additional options | ## Returns[​](#returns "Direct link to Returns") `PromiseLikeAsyncState`<`InferQueryArgumentResult`<`string` | `number` | `undefined`, `TQuery`>> The data response --- # useQueryErrorResetter() ``` function useQueryErrorResetter(): object; ``` Defined in: [composables/use-query-error-resetter.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-query-error-resetter.ts#L9) Composable for getting the function to reset all query errors. ## Returns[​](#returns "Direct link to Returns") `object` Function to reset caught query error ### execute[​](#execute "Direct link to execute") ``` execute: () => void; ``` #### Returns[​](#returns-1 "Direct link to Returns") `void` --- # useSigner() ``` function useSigner(): PolkadotSigner | undefined; ``` Defined in: [composables/use-signer.ts:9](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-signer.ts#L9) Composable for getting the current signer. ## Returns[​](#returns "Direct link to Returns") `PolkadotSigner` | `undefined` The current signer --- # useSpendableBalance() ## Call Signature[​](#call-signature "Direct link to Call Signature") ``` function useSpendableBalance(address, options?): PromiseLikeAsyncState; ``` Defined in: [composables/use-balance.ts:38](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-balance.ts#L38) Composable for getting an account's spendable balance. ### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ----------------------------- | --------------------- | | `address` | `MaybeRefOrGetter`<`Address`> | The account's address | | `options?` | `Options` | Additional options | ### Returns[​](#returns "Direct link to Returns") `PromiseLikeAsyncState`<`DenominatedNumber`> The account's spendable balance ## Call Signature[​](#call-signature-1 "Direct link to Call Signature") ``` function useSpendableBalance(addresses, options?): PromiseLikeAsyncState; ``` Defined in: [composables/use-balance.ts:50](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-balance.ts#L50) Composable for getting accounts’ spendable balances. ### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | Description | | ----------- | -------------------------------- | --------------------- | | `addresses` | `MaybeRefOrGetter`<`Address`\[]> | The account-addresses | | `options?` | `Options` | Additional options | ### Returns[​](#returns-1 "Direct link to Returns") `PromiseLikeAsyncState`<`DenominatedNumber`\[]> The accounts’ spendable balances ### Deprecated[​](#deprecated "Direct link to Deprecated") Use [useSpendableBalances](/vue/api/vue/functions/useSpendableBalances.md) instead. --- # useSpendableBalances() ``` function useSpendableBalances(addresses, options?): PromiseLikeAsyncState; ``` Defined in: [composables/use-balance.ts:119](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-balance.ts#L119) Composable for getting accounts’ spendable balances. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ----------- | -------------------------------- | --------------------- | | `addresses` | `MaybeRefOrGetter`<`Address`\[]> | The account-addresses | | `options?` | `Options` | Additional options | ## Returns[​](#returns "Direct link to Returns") `PromiseLikeAsyncState`<`DenominatedNumber`\[]> The accounts’ spendable balances --- # useStore() ``` function useStore(): DataStore; ``` Defined in: [composables/use-store.ts:17](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-store.ts#L17) ## Returns[​](#returns "Direct link to Returns") `DataStore` --- # useTypedApi() ``` function useTypedApi(options?): PromiseLikeAsyncState>>; ``` Defined in: [composables/use-typed-api.ts:18](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-typed-api.ts#L18) Composable for getting Polkadot-API typed API. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------------------------------------------------- | | `TChainId` *extends* `string` \| `number` \| `undefined` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------------------------ | ------------------ | | `options?` | `ChainComposableOptions`<`TChainId`> | Additional options | ## Returns[​](#returns "Direct link to Returns") `PromiseLikeAsyncState`<`TypedApi`<`ChainDescriptorOf`<`TChainId`>>> Polkadot-API typed API --- # useWalletConnector() ``` function useWalletConnector(wallets?): object; ``` Defined in: [composables/use-wallet-connector.ts:12](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-wallet-connector.ts#L12) Composable for connecting wallets ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | `wallets?` | \| `Wallet`<`WalletOptions`, `string`> \| `Wallet`<`WalletOptions`, `string`>\[] | Wallets to connect to, will connect to all available wallets if none is specified | ## Returns[​](#returns "Direct link to Returns") `object` The wallet connection state & connect function ### data[​](#data "Direct link to data") ``` data: Ref; ``` ### error[​](#error "Direct link to error") ``` error: Ref; ``` ### execute[​](#execute "Direct link to execute") ``` execute: (...args) => Promise; ``` #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | --------- | ------------------------------------------------------------------------------------ | | ...`args` | \[ \| `Wallet`<`WalletOptions`, `string`> \| `Wallet`<`WalletOptions`, `string`>\[]] | #### Returns[​](#returns-1 "Direct link to Returns") `Promise` ### status[​](#status "Direct link to status") ``` status: Ref<"idle" | "pending" | "success" | "error">; ``` --- # useWalletDisconnector() ``` function useWalletDisconnector(wallets?): object; ``` Defined in: [composables/use-wallet-disconnector.ts:13](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-wallet-disconnector.ts#L13) Composable for disconnecting wallets ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | | `wallets?` | \| `Wallet`<`WalletOptions`, `string`> \| `Wallet`<`WalletOptions`, `string`>\[] | Wallets to disconnect from, will disconnect from all connected wallets if none is specified | ## Returns[​](#returns "Direct link to Returns") `object` The wallet disconnection state & disconnect function ### data[​](#data "Direct link to data") ``` data: Ref; ``` ### error[​](#error "Direct link to error") ``` error: Ref; ``` ### execute[​](#execute "Direct link to execute") ``` execute: (...args) => Promise; ``` #### Parameters[​](#parameters-1 "Direct link to Parameters") | Parameter | Type | | --------- | ------------------------------------------------------------------------------------ | | ...`args` | \[ \| `Wallet`<`WalletOptions`, `string`> \| `Wallet`<`WalletOptions`, `string`>\[]] | #### Returns[​](#returns-1 "Direct link to Returns") `Promise` ### status[​](#status "Direct link to status") ``` status: Ref<"idle" | "pending" | "success" | "error">; ``` --- # useWallets() ``` function useWallets(): PromiseLikeAsyncState[]>; ``` Defined in: [composables/use-wallets.ts:11](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/use-wallets.ts#L11) Composable for getting all available wallets. ## Returns[​](#returns "Direct link to Returns") `PromiseLikeAsyncState`<`Wallet`<`WalletOptions`, `string`>\[]> Available wallets --- # watchContractEvent() ``` function watchContractEvent( contract, address, eventName, listener, options?): void; ``` Defined in: [composables/watch-contract-event.ts:21](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/watch-contract-event.ts#L21) Composable for listening to contract events. ## Type Parameters[​](#type-parameters "Direct link to Type Parameters") | Type Parameter | | -------------------------------- | | `TContract` *extends* `Contract` | | `TEventName` *extends* `string` | ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ----------- | ------------------------ | --------------------------------------------------- | | `contract` | `TContract` | The contract instance to listen to events from | | `address` | `Address` \| `undefined` | The contract address | | `eventName` | `TEventName` | The name of the event to listen for | | `listener` | (`event`) => `void` | Callback function invoked when the event is emitted | | `options?` | `ChainComposableOptions` | Additional options | ## Returns[​](#returns "Direct link to Returns") `void` --- # watchMutation() ``` function watchMutation(listener): void; ``` Defined in: [composables/watch-mutation.ts:10](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/watch-mutation.ts#L10) Watch for mutation events. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------- | ------------------------------------------- | | `listener` | (`event`) => `void` | Callback when new mutation event is emitted | ## Returns[​](#returns "Direct link to Returns") `void` --- # ReactiveDotPlugin ``` const ReactiveDotPlugin: object; ``` Defined in: [plugin.ts:6](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/plugin.ts#L6) ## Type Declaration[​](#type-declaration "Direct link to Type Declaration") ### install()[​](#install "Direct link to install()") ``` install(app, config): void; ``` #### Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | | --------- | ------------ | | `app` | `App`<`any`> | | `config` | `Config` | #### Returns[​](#returns "Direct link to Returns") `void` --- # ~~watchMutationEffect~~ ``` const watchMutationEffect: (listener) => void = watchMutation; ``` Defined in: [composables/watch-mutation.ts:21](https://github.com/buffed-labs/reactive-dot/blob/29250031730b53db65d25af9ec86f69ebb60371f/packages/vue/src/composables/watch-mutation.ts#L21) Watch for mutation events. ## Parameters[​](#parameters "Direct link to Parameters") | Parameter | Type | Description | | ---------- | ------------------- | ------------------------------------------- | | `listener` | (`event`) => `void` | Callback when new mutation event is emitted | ## Returns[​](#returns "Direct link to Returns") `void` ## Deprecated[​](#deprecated "Direct link to Deprecated") Use [watchMutation](/vue/api/vue/functions/watchMutation.md) instead --- ## [πŸ—ƒ@reactive-dot/core](/vue/api/core/.md) [3 items](/vue/api/core/.md) --- ## [πŸ“„οΈSetup](/vue/getting-started/setup.md) [This walks you through the process of creating a simple ReactiveDOT application.](/vue/getting-started/setup.md) --- ## [πŸ“„οΈMultichain](/vue/guides/multichain.md) [Setup](/vue/guides/multichain.md) --- ## [πŸ“„οΈSolidity](/vue/smart-contract/solidity.md) [ReactiveDOT works with Solidity contracts on chains with PolkaVM support, such as Polkadot Asset Hub.](/vue/smart-contract/solidity.md) --- # Connect wallets Wallets & accounts connection can by managed via [`useWallets`](/vue/api/vue/functions/useWallets.md), [`useConnectedWallets`](/vue/api/vue/functions/useConnectedWallets.md) & [`useAccounts`](/vue/api/vue/functions/useAccounts.md) composables. tip If you prefer not having to build a wallet connection UI from scratch, checkout [DOTConnect](https://dotconnect.dev/) for a quick and easy way to add a great wallet experience to your DApps. ## Install optional dependencies[​](#install-optional-dependencies "Direct link to Install optional dependencies") Additional dependencies are required if you use any of be bellow wallet type. ### Plug-and-play wallets[​](#plug-and-play-wallets "Direct link to Plug-and-play wallets") #### [WalletConnect](https://walletconnect.com/)[​](#walletconnect "Direct link to walletconnect") * npm * Yarn * pnpm * Bun ``` npm install @reactive-dot/wallet-walletconnect ``` ``` yarn add @reactive-dot/wallet-walletconnect ``` ``` pnpm add @reactive-dot/wallet-walletconnect ``` ``` bun add @reactive-dot/wallet-walletconnect ``` #### [Mimir](https://mimir.global/)[​](#mimir "Direct link to mimir") * npm * Yarn * pnpm * Bun ``` npm install @reactive-dot/wallet-mimir ``` ``` yarn add @reactive-dot/wallet-mimir ``` ``` pnpm add @reactive-dot/wallet-mimir ``` ``` bun add @reactive-dot/wallet-mimir ``` ### Wallets requiring additional UI setup[​](#wallets-requiring-additional-ui-setup "Direct link to Wallets requiring additional UI setup") The wallets listed below require extra UI integration and platform-specific setup. To avoid implementing these flows yourself, we recommend using [DOTConnect](https://dotconnect.dev/) for a quick and reliable wallet integration. #### [Polkadot Vault](https://vault.novasama.io/)[​](#polkadot-vault "Direct link to polkadot-vault") * npm * Yarn * pnpm * Bun ``` npm install @reactive-dot/wallet-polkadot-vault ``` ``` yarn add @reactive-dot/wallet-polkadot-vault ``` ``` pnpm add @reactive-dot/wallet-polkadot-vault ``` ``` bun add @reactive-dot/wallet-polkadot-vault ``` #### [Ledger](https://www.ledger.com/)[​](#ledger "Direct link to ledger") * npm * Yarn * pnpm * Bun ``` npm install @reactive-dot/wallet-ledger ``` ``` yarn add @reactive-dot/wallet-ledger ``` ``` pnpm add @reactive-dot/wallet-ledger ``` ``` bun add @reactive-dot/wallet-ledger ``` #### Readonly[​](#readonly "Direct link to Readonly") * npm * Yarn * pnpm * Bun ``` npm install @reactive-dot/wallet-readonly ``` ``` yarn add @reactive-dot/wallet-readonly ``` ``` pnpm add @reactive-dot/wallet-readonly ``` ``` bun add @reactive-dot/wallet-readonly ``` ## Add wallets to the config[​](#add-wallets-to-the-config "Direct link to Add wallets to the config") config.ts ``` import { defineConfig } from "@reactive-dot/core"; import { InjectedWalletProvider } from "@reactive-dot/core/wallets.js"; import { LedgerWallet } from "@reactive-dot/wallet-ledger"; import { MimirWalletProvider } from "@reactive-dot/wallet-mimir"; import { WalletConnect } from "@reactive-dot/wallet-walletconnect"; export const config = defineConfig({ // ... wallets: [ new InjectedWalletProvider(), new LedgerWallet(), new MimirWalletProvider(), new WalletConnect({ projectId: "WALLET_CONNECT_PROJECT_ID", providerOptions: { metadata: { name: "APP_NAME", description: "APP_DESCRIPTION", url: "APP_URL", icons: ["APP_ICON"], }, }, chainIds: [ // https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-13.md "polkadot:91b171bb158e2d3848fa23a9f1c25182", // Polkadot // ... ], }), ], }); ``` ## Connect to wallets[​](#connect-to-wallets "Direct link to Connect to wallets") wallets.tsx ``` ``` ## Display available accounts[​](#display-available-accounts "Direct link to Display available accounts") accounts.tsx ``` ``` info By default the `useAccounts` composable will only return accounts that are compatible with the current chain (i.e. as set by `provideChain`). If you want to get all accounts regardless of the current chain, you can pass `null` as the `chainId` option to the `useAccounts` hook: ``` useAccounts({ chainId: null }); ``` --- # Mutation The `useMutation` composable allow you to sign & submit transaction to a chain. ## Connect wallet & accounts[​](#connect-wallet--accounts "Direct link to Connect wallet & accounts") Follow the [Connect wallets](/vue/getting-started/connect-wallets.md) guide to get this set up. ## Choose the signer[​](#choose-the-signer "Direct link to Choose the signer") There are multiple way to select the account used for signing. ### 1. Via dependency injection[​](#1-via-dependency-injection "Direct link to 1. Via dependency injection") ``` ``` ### 2. Passing signer to the composable[​](#2-passing-signer-to-the-composable "Direct link to 2. Passing signer to the composable") ``` ``` ### 2. Passing signer to the final submission[​](#2-passing-signer-to-the-final-submission "Direct link to 2. Passing signer to the final submission") ``` ``` ## Submitting transaction[​](#submitting-transaction "Direct link to Submitting transaction") ``` ``` You can also pass input to the mutation builder callback using a second argument. ``` const { execute, status } = useMutation((tx, message: string) => tx.System.remark({ remark: Binary.fromText(message) }), ); execute({ input: "Hello, world!" }); ``` ## Watching transactions[​](#watching-transactions "Direct link to Watching transactions") It’s common to watch for all transactions throughout the application to display an appropriate loading state or toast. This can be easily achieved with the [`watchMutation`](/vue/api/vue/functions/watchMutation.md) composable. ``` ``` --- # Query The [`useQuery`](/vue/api/vue/functions/useQuery.md) composable allow you to read any data from chain, while maintaining updates, concurrency, caching & deduplication behind the scene for you. ## Async handling[​](#async-handling "Direct link to Async handling") [`useQuery`](/vue/api/vue/functions/useQuery.md) utilize Vue's Suspense API for data fetching & error handling. async-component.vue ``` ``` app.vue ``` ``` ## Fetching multiple data[​](#fetching-multiple-data "Direct link to Fetching multiple data") Fetching multiple data can be done by chaining queries together, [`useQuery`](/vue/api/vue/functions/useQuery.md) (with TypeScript) will automatically infer that you want to fetch multiple data concurrently & will return an array of data instead. ``` ``` Multiple queries of the same type can also be fetched using [`runtimeApis`](/vue/api/core/index/classes/Query.md#runtimeapis) & [`storages`](/vue/api/core/index/classes/Query.md#storages). ``` ``` ## Conditional query[​](#conditional-query "Direct link to Conditional query") Use a falsy value (`undefined`, `null` or `false`) to conditionally fetch data. If the query builder returns a falsy value, ReactiveDOT will not execute the query. ``` ``` ## Refreshing queries[​](#refreshing-queries "Direct link to Refreshing queries") Data from `constant` queries never changes, while `storage` and `storage-entries` queries automatically subscribe to updates. For all other query types, you must manually refresh them to get the latest data. ``` ``` The above will refresh all refreshable data in the query. If you want to target specific data to refresh, the [`useStore`](/vue/api/vue/functions/useStore.md) composable can be used instead. ``` ``` ## Retry failed query[​](#retry-failed-query "Direct link to Retry failed query") Error from queries can be reset using `ErrorBoundary` & [`useQueryErrorResetter`](/vue/api/vue/functions/useQueryErrorResetter.md) composable. ``` ``` --- # Setup This walks you through the process of creating a simple ReactiveDOT application. ## Installation[​](#installation "Direct link to Installation") First add ReactiveDOT, along with required packages as dependencies to your Vue project. * npm * Yarn * pnpm * Bun ``` npm install @reactive-dot/core @reactive-dot/vue polkadot-api ``` ``` yarn add @reactive-dot/core @reactive-dot/vue polkadot-api ``` ``` pnpm add @reactive-dot/core @reactive-dot/vue polkadot-api ``` ``` bun add @reactive-dot/core @reactive-dot/vue polkadot-api ``` ### Download & sync metadata[​](#download--sync-metadata "Direct link to Download & sync metadata") Next, download the latest metadata from the chain you want to connect to and generate the types. ``` # `papi add` is the command # `polkadot_asset_hub` is the name we're giving to this chain (can be any JS variable name) # `-n polkadot_asset_hub` specifies to download the metadata from the well-known chain polkadot_asset_hub npx papi add polkadot_asset_hub -n polkadot_asset_hub # Wait for the latest metadata to download, then generate the types: npx papi ``` tip It's a really good idea to add `papi` to the "postinstall" script in package.json to automate generating the types after installation. info For more information on metadata syncing and type generation, please refer to this [documentation](https://papi.how/codegen) provided by [Polkadot-API](https://papi.how/). ### Create config[​](#create-config "Direct link to Create config") * Light client * WebSocket config.ts ``` // `polkadot_asset_hub` is the name we gave to `npx papi add` import { polkadot_asset_hub } from "@polkadot-api/descriptors"; import { defineConfig } from "@reactive-dot/core"; import { createLightClientProvider } from "@reactive-dot/core/providers/light-client.js"; import { InjectedWalletProvider } from "@reactive-dot/core/wallets.js"; const lightClientProvider = createLightClientProvider(); export const config = defineConfig({ chains: { // Use "asset_hub" as the `ChainId`, this can be any unique string value asset_hub: { descriptor: polkadot_asset_hub, provider: lightClientProvider .addRelayChain({ id: "polkadot" }) .addParachain({ id: "polkadot_asset_hub" }), }, }, wallets: [new InjectedWalletProvider()], }); // Register the config for type safety declare module "@reactive-dot/core" { export interface Register { config: typeof config; } } ``` Parachains setup config.ts ``` // ... import { polkadot, polkadot_asset_hub, polkadot_people } from "@polkadot-api/descriptors"; const lightClientProvider = createLightClientProvider(); const polkadotProvider = lightClientProvider.addRelayChain({ id: "polkadot" }); export const config = defineConfig({ chains: { relay: { descriptor: polkadot, provider: polkadotProvider, }, asset_hub: { descriptor: polkadot_asset_hub, provider: polkadotProvider.addParachain({ id: "polkadot_asset_hub" }), }, people: { descriptor: polkadot_people, provider: polkadotProvider.addParachain({ id: "polkadot_people" }), }, }, wallets: [new InjectedWalletProvider()], }); ``` config.ts ``` // `polkadot_asset_hub` is the name we gave to `npx papi add` import { polkadot_asset_hub } from "@polkadot-api/descriptors"; import { defineConfig } from "@reactive-dot/core"; import { InjectedWalletProvider } from "@reactive-dot/core/wallets.js"; import { getWsProvider } from "polkadot-api/ws"; export const config = defineConfig({ chains: { // Use "asset_hub" as the `ChainId`, this can be any unique string value asset_hub: { descriptor: polkadot_asset_hub, provider: getWsProvider("wss://polkadot-asset-hub-rpc.polkadot.io"), }, }, wallets: [new InjectedWalletProvider()], }); // Register the config for type safety declare module "@reactive-dot/core" { export interface Register { config: typeof config; } } ``` ### Install the plugin[​](#install-the-plugin "Direct link to Install the plugin") index.ts ``` import App from "./app.vue"; import { config } from "./config.js"; import { ReactiveDotPlugin } from "@reactive-dot/vue"; import { createApp } from "vue"; createApp(App).use(ReactiveDotPlugin, config).mount("#root"); ``` ### Provide the target chain ID[​](#provide-the-target-chain-id "Direct link to Provide the target chain ID") app.vue ``` ``` ## Use ReactiveDOT[​](#use-reactivedot "Direct link to Use ReactiveDOT") my-component.vue ``` ``` --- # Bulk refresh Sometimes you need to refresh multiple queries at once based on certain criteria. The store provides methods to invalidate queries in bulk using a filter function. ``` import { useStore } from "@reactive-dot/vue"; const store = useStore(); // Refresh all runtime-api queries store.invalidateChainQueries((instruction) => instruction.type === "runtime-api"); // Refresh all "NominationPoolsApi" runtime-api queries store.invalidateChainQueries( (instruction) => instruction.type === "runtime-api" && instruction.api === "NominationPoolsApi", ); // Refresh all queries to a specific contract store.invalidateContractQueries((instruction) => instruction.address === "CONTRACT_ADDRESS"); // Refresh all balanceOf queries to a contract store.invalidateContractQueries( (instruction) => instruction.kind === "ink" && instruction.type === "message" && instruction.name === "balanceOf", ); ``` --- # FAQ Collection of frequently asked questions with ideas on how to troubleshoot and resolve them. ## Unexpected behavior after installing or bumping dependencies[​](#unexpected-behavior-after-installing-or-bumping-dependencies "Direct link to Unexpected behavior after installing or bumping dependencies") Common errors: * `Uncaught TypeError: [X] is not a function` * `Type [X] is not assignable to type [Y]` * etc These errors often occurs when multiple conflicting versions of ReactiveDOT are installed. To resolve this, try the following steps: 1. **Ensure all ReactiveDOT dependencies are up to date** 2. **Clean and reinstall dependencies:**
Delete your `node_modules` folder and reinstall dependencies. You can do this manually or use [npkill](https://npkill.js.org/): ``` npx npkill ``` 3. **Deduplicate dependencies:**
Some package manager does not deduplicate dependencies by default and may create duplicates when updating packages. To fix this, run dedupe: ``` # NPM npm dedupe # Yarn yarn dedupe # PNPM pnpm dedupe ``` --- # Incremental loading ## `defer`[​](#defer "Direct link to defer") The `defer` directive may be specified on a query to imply de-prioritization, that causes the data to be in [`pending`](/vue/api/core/index/variables/pending.md) state in the initial response, and delivered as a subsequent response afterward. info When you pass `{ defer: true }` to the query, the result will now be either: * A resolved value (the response you expect), or * A special [`pending`](/vue/api/core/index/variables/pending.md) symbol from `@reactive-dot/core`, indicating that the data hasn’t arrived yet. ``` ``` ## `stream`[​](#stream "Direct link to stream") For multi-entry queries like `storages`, `runtimeApis`, etc., the `stream` directive allows the client to receive partial results as they become available, before the entire response is ready. Take this basic example, where a component displays the total balance across multiple staking positions: ``` ``` This works well for a small number of accounts, where results load quickly. But with many accounts, waiting for the full response may be too slow and undesirable. To show users a partial result as soon as possible, you can enable streaming. info When you pass `{ stream: true }` to the query, each item in the result array will now be either: * A resolved value (the response you expect), or * A special `pending` symbol from `@reactive-dot/core`, indicating that the data for that item hasn’t arrived yet. This allows your UI to update incrementally as each item resolves: ``` ``` With `stream: true`, the component can render incrementally, updating the total as each balance loads. tip You can use the presence of `pending` to show loading indicators, spinners, or skeletons while waiting for the rest of the data. --- # Multichain ## Setup[​](#setup "Direct link to Setup") Multichain setup can be done by adding extra chain configurations, after having followed this guide [here](/vue/getting-started/setup.md). ### Download & sync metadata[​](#download--sync-metadata "Direct link to Download & sync metadata") Download the latest metadata from all chains you want to connect to and generate the types. ``` npx papi add dot -n polkadot npx papi add ksm -n kusama npx papi add wnd -n westend npx papi ``` ### Configure chains[​](#configure-chains "Direct link to Configure chains") config.ts ``` import type { dot, ksm, wnd } from "@polkadot-api/descriptors"; import { defineConfig } from "@reactive-dot/core"; export const config = defineConfig({ chains: { polkadot: { descriptor: dot, // ... }, kusama: { descriptor: ksm, // ... }, westend: { descriptor: wnd, // ... }, }, //... }); ``` ## Chain selection[​](#chain-selection "Direct link to Chain selection") Chain selection can be done either at the Context or Composable level. ### Dependency injection[​](#dependency-injection "Direct link to Dependency injection") ``` ``` ### Composable[​](#composable "Direct link to Composable") All composables provide an option to specify which chain to target. ``` ``` ## Chain narrowing[​](#chain-narrowing "Direct link to Chain narrowing") By default, ReactiveDOT merges type definitions from all the chains in the config. For instance, if your DApp is set up to work with Polkadot, Kusama, and Westend, the following code will fail because the Bounties pallet is available only on Polkadot and Kusama, not on Westend: ``` ``` To resolve this, you can explicitly specify the chain to query, which will override the chain ID provided by context: ``` ``` Alternatively, if you want to keep using the chain ID provided by context, you can use the following pattern: ``` ``` Finally, if your application primarily uses a few chains but interacts with many other supporting chains, you can use the `targetChains` option: ``` import { defineConfig } from "@reactive-dot/core"; const config = defineConfig({ chains: { polkadot: { // ... }, polkadot_asset_hub: { // ... }, polkadot_people: { // ... }, polkadot_collectives: { // ... }, polkadot_bridge_hub: { // ... }, }, // This will restrict the default chain types used by composables // to just Polkadot when no explicit `chainId` is provided targetChains: ["polkadot"], // ... }); ``` --- # Number utility ## Denominated number[​](#denominated-number "Direct link to Denominated number") To handle complexity around [planck unit](https://wiki.polkadot.network/docs/learn-DOT#the-planck-unit) used in Polkadot, a utility class [`DenominatedNumber`](/vue/api/utils/classes/DenominatedNumber.md) is provided by [`@reactive-dot/utils`](https://reactivedot.dev/api/utils). ``` import { DenominatedNumber } from "@reactive-dot/utils"; // Denominated numbers are created with a planck value and a decimal places number const numberFromPlanck = new DenominatedNumber(10_000_000_000n, 10); console.log(numberFromPlanck.valueOf()); // 10 // Denominated number can also be created from number instead of planck const numberFromNumber = DenominatedNumber.fromNumber(10, 10); console.log(numberFromNumber.planck); // 10000000000n // A string denomination can optionally be added for locale string conversion capability const numberWithDenomination = DenominatedNumber.fromNumber(10, 10, "DOT"); console.log(numberWithDenomination.toLocaleString("en-NZ")); // DOT 10.00 console.log(numberWithDenomination.toLocaleString("de-DE")); // 10,00 DOT // Arithmetics let dotAmount = DenominatedNumber.fromNumber(10, 10, "DOT"); // Arithmetic operations can be performed using the number's planck value dotAmount = dotAmount.mapPlanck((planck) => planck + 5_000_000_000n); console.log(dotAmount.toLocaleString()); // DOT 10.50 // Arithmetic operations can also be carried out with the number value // instead of planck if possible lost of precision is acceptable dotAmount = dotAmount.mapNumber((number) => (number * 2) / 4); console.log(dotAmount.toLocaleString()); // DOT 5.25 ``` ## Native token[​](#native-token "Direct link to Native token") The [`useNativeToken`](/vue/api/vue/functions/useNativeToken.md) composable is also provided for easy conversion from planck and/or number value to native token amount. ``` ``` ## Spendable balance[​](#spendable-balance "Direct link to Spendable balance") The [`useSpendableBalance`](/vue/api/vue/functions/useSpendableBalance.md) & [`useSpendableBalances`](/vue/api/vue/functions/useSpendableBalances.md) composable can be used to get the [spendable balance](https://wiki.polkadot.network/docs/learn-account-balances) of an account(s). ``` ``` --- # Using Polkadot-API (PAPI) ReactiveDOT is designed as a convenient layer over [PAPI](https://papi.how/) for enhanced developer quality of life. For more advanced use cases and data manipulation, it's recommended to use [PAPI](https://papi.how/) directly. You can access PAPI APIs through two composables: [`useClient`](/vue/api/vue/functions/useClient.md) and [`useTypedApi`](/vue/api/vue/functions/useTypedApi.md). ## Polkadot client[​](#polkadot-client "Direct link to Polkadot client") `PolkadotClient` interface shapes the top-level API for `polkadot-api`. You can find the full documentation [here](https://papi.how/client). ``` ``` ## Typed API[​](#typed-api "Direct link to Typed API") The `TypedApi` allows easy interaction with the runtime metadata, with a great developer experience. You can find the full documentation [here](https://papi.how/typed). ``` ``` --- # Ink! ReactiveDOT works with [Ink! contracts](https://use.ink) on chains with PolkaVM support, such as [Polkadot Asset Hub](https://polkadot.com/platform/hub). warning Ink! contract support is deprecated. See [this post](https://forum.polkadot.network/t/discontinuation-of-ink-rust-smart-contract-language/16849) for more information. tip If you're new to ReactiveDOT, we strongly recommend starting with the [β€œGetting started guide”](/vue/category/getting-started.md). This guide covers essential topics such as connecting to a blockchain, setting up wallets, querying data, and handling errors effectively. ## Defining contract[​](#defining-contract "Direct link to Defining contract") ReactiveDOT utilizes Ink! [metadata](https://use.ink/docs/v6/basics/metadata/ink) to interact with and provide types for contracts. Metadata files typically end with `.json` or `.contract` and can be obtained by [compiling](https://use.ink/docs/v6/getting-started/building-your-contract) the contract yourself or from the contract developers. Once you've obtained the metadata file(s), run the following command to convert it to TypeScript-friendly metadata: ``` npx papi ink add "/path/to/metadata.(json|contract)" --key "myContract" ``` info For more information on contract metadata type generation, refer to this [documentation](https://papi.how/ink#codegen) provided by [Polkadot-API](https://papi.how). The contract metadata can now be imported and configured as follows: contracts.ts ``` import { contracts } from "@polkadot-api/descriptor"; import { defineContract } from "@reactive-dot/core"; export const myContract = defineContract({ type: "ink", descriptor: contracts.myContract, }); ``` ## Reading contract data[​](#reading-contract-data "Direct link to Reading contract data") The [`useQuery`](/vue/api/vue/functions/useQuery.md) composable with [`Query.contract`](/vue/api/core/index/classes/Query.md#contract) instruction allows you to read data on a smart contract, from [storage](https://use.ink/docs/v6/basics/storing-values) or a [view (read-only) message](https://use.ink/docs/v6/basics/reading-values#contract-functions). They can only read the state of the contract, and cannot make any changes to it. Component.vue ``` ``` ### Multi query[​](#multi-query "Direct link to Multi query") Similar to chain [multi-query](/vue/getting-started/query.md#fetching-multiple-data), the `contracts`, `storages`, and `messages` instructions enable reading multiple pieces of data in parallel. MultiQueryComponent.vue ``` ``` ## Writing to contract[​](#writing-to-contract "Direct link to Writing to contract") The [`useContractMutation`](/vue/api/vue/functions/useContractMutation.md) composable allows you to mutate data on a smart contract, from a payable or nonpayable (write) message. WriteComponent.vue ``` ``` ## Listening to contract events[​](#listening-to-contract-events "Direct link to Listening to contract events") The [`watchContractEvent`](/vue/api/vue/functions/watchContractEvent.md) composable allows you to subscribe to and handle events emitted by a smart contract in real time. This is especially useful for monitoring state changes or user interactions on the blockchain. By listening to specific events, you can trigger actions or update your application's state dynamically based on the event data. EventListenerComponent.vue ``` ``` --- # Solidity ReactiveDOT works with [Solidity contracts](https://soliditylang.org/) on chains with PolkaVM support, such as [Polkadot Asset Hub](https://polkadot.com/platform/hub). tip If you're new to ReactiveDOT, we strongly recommend starting with the [β€œGetting started guide”](/vue/category/getting-started.md). This guide covers essential topics such as connecting to a blockchain, setting up wallets, querying data, and handling errors effectively. ## Defining contract[​](#defining-contract "Direct link to Defining contract") ReactiveDOT can infer types based on [ABI](https://docs.soliditylang.org/en/v0.8.24/abi-spec.html#json) and [EIP-712](https://eips.ethereum.org/EIPS/eip-712) Typed Data definitions (powered by [ABIType](https://abitype.dev/)), giving you full end-to-end type-safety from your contracts to your frontend and incredible developer experience (e.g. autocomplete ABI function names and catch misspellings, strongly-typed ABI function arguments, etc.). For this to work, define your contract using its ABI, as shown below: contracts.ts ``` import { contracts } from "@polkadot-api/descriptor"; import { defineContract } from "@reactive-dot/core"; export const myContract = defineContract({ type: "solidity", abi: [ { type: "function", name: "balanceOf", stateMutability: "view", inputs: [{ name: "account", type: "address" }], outputs: [{ type: "uint256" }], }, { type: "function", name: "totalSupply", stateMutability: "view", inputs: [], outputs: [{ name: "supply", type: "uint256" }], }, ], }); ``` ## Reading contract data[​](#reading-contract-data "Direct link to Reading contract data") The [`useQuery`](/vue/api/vue/functions/useQuery.md) composable with [`Query.contract`](/vue/api/core/index/classes/Query.md#contract) instruction allows you to read data on a smart contract, from a `view` or `pure` (read-only) function. They can only read the state of the contract, and cannot make any changes to it. Component.vue ``` ``` ### Multi query[​](#multi-query "Direct link to Multi query") Similar to chain [multi-query](/vue/getting-started/query.md#fetching-multiple-data), the `contracts` & `funcs` instructions enable reading multiple pieces of data in parallel. MultiQueryComponent.vue ``` ``` ## Writing to contract[​](#writing-to-contract "Direct link to Writing to contract") The [`useContractMutation`](/vue/api/vue/functions/useContractMutation.md) composable allows you to mutate data on a smart contract, from a payable or nonpayable (write) message. WriteComponent.vue ``` ``` ## Listening to contract events[​](#listening-to-contract-events "Direct link to Listening to contract events") The [`watchContractEvent`](/vue/api/vue/functions/watchContractEvent.md) composable allows you to subscribe to and handle events emitted by a smart contract in real time. This is especially useful for monitoring state changes or user interactions on the blockchain. By listening to specific events, you can trigger actions or update your application's state dynamically based on the event data. EventListenerComponent.vue ``` ``` ---