├── .npmignore ├── packages ├── wallets │ └── leo │ │ ├── index.ts │ │ ├── docs │ │ ├── variables │ │ │ └── LeoWalletName.md │ │ ├── README.md │ │ └── interfaces │ │ │ ├── LeoWalletAdapterConfig.md │ │ │ └── LeoWalletEvents.md │ │ ├── tsconfig.json │ │ ├── webpack.config.js │ │ ├── package.json │ │ └── LICENSE ├── core │ ├── react │ │ ├── index.ts │ │ ├── tsconfig.json │ │ ├── docs │ │ │ ├── variables │ │ │ │ ├── WalletContext.md │ │ │ │ └── WalletProvider.md │ │ │ ├── functions │ │ │ │ ├── useWallet.md │ │ │ │ └── useLocalStorage.md │ │ │ ├── README.md │ │ │ └── interfaces │ │ │ │ ├── Wallet.md │ │ │ │ └── WalletProviderProps.md │ │ ├── package.json │ │ ├── LICENSE │ │ ├── useLocalStorage.ts │ │ └── useWallet.ts │ └── base │ │ ├── index.ts │ │ ├── tsconfig.json │ │ ├── docs │ │ ├── @demox-labs │ │ │ └── namespaces │ │ │ │ └── EventEmitter │ │ │ │ ├── variables │ │ │ │ └── EventEmitter.md │ │ │ │ ├── type-aliases │ │ │ │ ├── EventNames.md │ │ │ │ ├── ArgumentMap.md │ │ │ │ ├── EventArgs.md │ │ │ │ ├── ValidEventTypes.md │ │ │ │ └── EventListener.md │ │ │ │ ├── README.md │ │ │ │ └── interfaces │ │ │ │ ├── ListenerFn.md │ │ │ │ └── EventEmitterStatic.md │ │ ├── type-aliases │ │ │ ├── SupportedTransactionVersions.md │ │ │ ├── Adapter.md │ │ │ ├── WalletName.md │ │ │ ├── SignerWalletAdapter.md │ │ │ ├── TransactionOrVersionedTransaction.md │ │ │ ├── WalletAdapter.md │ │ │ └── MessageSignerWalletAdapter.md │ │ ├── functions │ │ │ └── scopePollingDetectionStrategy.md │ │ ├── interfaces │ │ │ ├── AleoTransition.md │ │ │ ├── AleoDeployment.md │ │ │ ├── AleoTransaction.md │ │ │ ├── WalletAdapterEvents.md │ │ │ ├── WalletAdapterProps.md │ │ │ └── SignerWalletAdapterProps.md │ │ ├── enumerations │ │ │ ├── WalletAdapterNetwork.md │ │ │ ├── DecryptPermission.md │ │ │ └── WalletReadyState.md │ │ ├── classes │ │ │ ├── Transition.md │ │ │ ├── Deployment.md │ │ │ ├── WalletLoadError.md │ │ │ ├── WalletConfigError.md │ │ │ ├── WalletAccountError.md │ │ │ ├── WalletKeypairError.md │ │ │ ├── WalletRecordsError.md │ │ │ ├── WalletTimeoutError.md │ │ │ ├── WalletNotReadyError.md │ │ │ ├── WalletPublicKeyError.md │ │ │ ├── Transaction.md │ │ │ ├── WalletConnectionError.md │ │ │ ├── WalletDecryptionError.md │ │ │ ├── WalletNotSelectedError.md │ │ │ ├── WalletSignMessageError.md │ │ │ ├── WalletTransactionError.md │ │ │ ├── WalletDisconnectedError.md │ │ │ ├── WalletNotConnectedError.md │ │ │ ├── WalletWindowClosedError.md │ │ │ ├── WalletDisconnectionError.md │ │ │ ├── WalletWindowBlockedError.md │ │ │ ├── WalletSendTransactionError.md │ │ │ ├── WalletSignTransactionError.md │ │ │ ├── WalletDecryptionNotAllowedError.md │ │ │ └── WalletError.md │ │ └── README.md │ │ ├── deployment.ts │ │ ├── types.ts │ │ ├── LICENSE │ │ ├── package.json │ │ ├── transaction.ts │ │ ├── errors.ts │ │ ├── signer.ts │ │ └── adapter.ts └── ui │ ├── src │ ├── index.ts │ ├── WalletIcon.tsx │ ├── WalletModalProvider.tsx │ ├── WalletModalButton.tsx │ ├── WalletListItem.tsx │ ├── useWalletModal.tsx │ ├── Button.tsx │ ├── WalletDisconnectButton.tsx │ ├── AleoSVG.tsx │ ├── WalletConnectButton.tsx │ ├── Collapse.tsx │ └── WalletMultiButton.tsx │ ├── docs │ ├── variables │ │ ├── WalletModalContext.md │ │ ├── WalletIcon.md │ │ ├── WalletModalButton.md │ │ ├── WalletMultiButton.md │ │ ├── WalletModal.md │ │ ├── WalletConnectButton.md │ │ ├── WalletDisconnectButton.md │ │ └── WalletModalProvider.md │ ├── functions │ │ └── useWalletModal.md │ ├── interfaces │ │ ├── WalletIconProps.md │ │ ├── WalletModalProps.md │ │ ├── WalletModalContextState.md │ │ └── WalletModalProviderProps.md │ └── README.md │ ├── tsconfig.json │ ├── LICENSE │ └── package.json ├── .gitignore └── util └── publish.js /.npmignore: -------------------------------------------------------------------------------- 1 | .gitignore 2 | node_modules -------------------------------------------------------------------------------- /packages/wallets/leo/index.ts: -------------------------------------------------------------------------------- 1 | export * from './adapter'; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | tsconfig.tsbuildinfo 4 | /.idea 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /packages/core/react/index.ts: -------------------------------------------------------------------------------- 1 | export * from './WalletProvider'; 2 | export * from './useLocalStorage'; 3 | export * from './useWallet'; -------------------------------------------------------------------------------- /packages/core/base/index.ts: -------------------------------------------------------------------------------- 1 | export * from './adapter'; 2 | export * from './errors'; 3 | export * from './signer'; 4 | export * from './types'; 5 | export * from './transaction'; 6 | export * from './deployment'; 7 | -------------------------------------------------------------------------------- /packages/ui/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useWalletModal'; 2 | export * from './WalletConnectButton'; 3 | export * from './WalletModal'; 4 | export * from './WalletModalButton'; 5 | export * from './WalletModalProvider'; 6 | export * from './WalletDisconnectButton'; 7 | export * from './WalletIcon'; 8 | export * from './WalletMultiButton'; 9 | -------------------------------------------------------------------------------- /packages/core/base/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "NodeNext", 5 | "declaration": true, 6 | "outDir": "dist", 7 | "sourceMap": true, 8 | "moduleResolution": "nodenext", 9 | "esModuleInterop": true, 10 | "forceConsistentCasingInFileNames": true, 11 | }, 12 | "exclude": ["node_modules", "dist"], 13 | } -------------------------------------------------------------------------------- /packages/core/react/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "jsx": "react", 4 | "target": "ESNext", 5 | "module": "NodeNext", 6 | "declaration": true, 7 | "outDir": "dist", 8 | "sourceMap": true, 9 | "moduleResolution": "nodenext", 10 | "esModuleInterop": true, 11 | "forceConsistentCasingInFileNames": true, 12 | }, 13 | "exclude": ["node_modules", "dist"], 14 | } -------------------------------------------------------------------------------- /packages/core/react/docs/variables/WalletContext.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-react**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-react](../README.md) / WalletContext 6 | 7 | # Variable: WalletContext 8 | 9 | > `const` **WalletContext**: `any` 10 | 11 | Defined in: [useWallet.ts:128](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/useWallet.ts#L128) 12 | -------------------------------------------------------------------------------- /packages/wallets/leo/docs/variables/LeoWalletName.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-leo**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-leo](../README.md) / LeoWalletName 6 | 7 | # Variable: LeoWalletName 8 | 9 | > `const` **LeoWalletName**: `WalletName`\<`"Leo Wallet"`\> 10 | 11 | Defined in: [adapter.ts:60](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/wallets/leo/adapter.ts#L60) 12 | -------------------------------------------------------------------------------- /packages/ui/docs/variables/WalletModalContext.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-reactui**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-reactui](../README.md) / WalletModalContext 6 | 7 | # Variable: WalletModalContext 8 | 9 | > `const` **WalletModalContext**: `any` 10 | 11 | Defined in: [useWalletModal.tsx:32](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/useWalletModal.tsx#L32) 12 | -------------------------------------------------------------------------------- /packages/ui/docs/variables/WalletIcon.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-reactui**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-reactui](../README.md) / WalletIcon 6 | 7 | # Variable: WalletIcon 8 | 9 | > `const` **WalletIcon**: `FC`\<[`WalletIconProps`](../interfaces/WalletIconProps.md)\> 10 | 11 | Defined in: [WalletIcon.tsx:9](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletIcon.tsx#L9) 12 | -------------------------------------------------------------------------------- /packages/ui/docs/variables/WalletModalButton.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-reactui**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-reactui](../README.md) / WalletModalButton 6 | 7 | # Variable: WalletModalButton 8 | 9 | > `const` **WalletModalButton**: `FC`\<`ButtonProps`\> 10 | 11 | Defined in: [WalletModalButton.tsx:7](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletModalButton.tsx#L7) 12 | -------------------------------------------------------------------------------- /packages/ui/docs/variables/WalletMultiButton.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-reactui**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-reactui](../README.md) / WalletMultiButton 6 | 7 | # Variable: WalletMultiButton 8 | 9 | > `const` **WalletMultiButton**: `FC`\<`ButtonProps`\> 10 | 11 | Defined in: [WalletMultiButton.tsx:11](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletMultiButton.tsx#L11) 12 | -------------------------------------------------------------------------------- /packages/ui/docs/variables/WalletModal.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-reactui**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-reactui](../README.md) / WalletModal 6 | 7 | # Variable: WalletModal 8 | 9 | > `const` **WalletModal**: `FC`\<[`WalletModalProps`](../interfaces/WalletModalProps.md)\> 10 | 11 | Defined in: [WalletModal.tsx:16](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletModal.tsx#L16) 12 | -------------------------------------------------------------------------------- /packages/ui/docs/variables/WalletConnectButton.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-reactui**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-reactui](../README.md) / WalletConnectButton 6 | 7 | # Variable: WalletConnectButton 8 | 9 | > `const` **WalletConnectButton**: `FC`\<`ButtonProps`\> 10 | 11 | Defined in: [WalletConnectButton.tsx:9](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletConnectButton.tsx#L9) 12 | -------------------------------------------------------------------------------- /packages/core/base/docs/@demox-labs/namespaces/EventEmitter/variables/EventEmitter.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / EventEmitter 6 | 7 | # Variable: EventEmitter 8 | 9 | > `const` **EventEmitter**: [`EventEmitterStatic`](../interfaces/EventEmitterStatic.md) 10 | 11 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/eventemitter3/index.d.ts:131 12 | -------------------------------------------------------------------------------- /packages/ui/docs/variables/WalletDisconnectButton.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-reactui**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-reactui](../README.md) / WalletDisconnectButton 6 | 7 | # Variable: WalletDisconnectButton 8 | 9 | > `const` **WalletDisconnectButton**: `FC`\<`ButtonProps`\> 10 | 11 | Defined in: [WalletDisconnectButton.tsx:8](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletDisconnectButton.tsx#L8) 12 | -------------------------------------------------------------------------------- /packages/core/react/docs/variables/WalletProvider.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-react**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-react](../README.md) / WalletProvider 6 | 7 | # Variable: WalletProvider 8 | 9 | > `const` **WalletProvider**: `FC`\<[`WalletProviderProps`](../interfaces/WalletProviderProps.md)\> 10 | 11 | Defined in: [WalletProvider.tsx:44](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/WalletProvider.tsx#L44) 12 | -------------------------------------------------------------------------------- /packages/wallets/leo/docs/README.md: -------------------------------------------------------------------------------- 1 | **@demox-labs/aleo-wallet-adapter-leo** 2 | 3 | *** 4 | 5 | # @demox-labs/aleo-wallet-adapter-leo 6 | 7 | ## Classes 8 | 9 | - [LeoWalletAdapter](classes/LeoWalletAdapter.md) 10 | 11 | ## Interfaces 12 | 13 | - [LeoWallet](interfaces/LeoWallet.md) 14 | - [LeoWalletAdapterConfig](interfaces/LeoWalletAdapterConfig.md) 15 | - [LeoWalletEvents](interfaces/LeoWalletEvents.md) 16 | - [LeoWindow](interfaces/LeoWindow.md) 17 | 18 | ## Variables 19 | 20 | - [LeoWalletName](variables/LeoWalletName.md) 21 | -------------------------------------------------------------------------------- /packages/wallets/leo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "allowJs": true, 7 | "outDir": "dist", 8 | "sourceMap": true, 9 | "moduleResolution": "node", 10 | "resolveJsonModule": true, 11 | "isolatedModules": true, 12 | "esModuleInterop": true, 13 | "forceConsistentCasingInFileNames": true, 14 | "noImplicitReturns": false, 15 | "noImplicitAny": false, 16 | }, 17 | "exclude": ["node_modules", "dist"], 18 | } -------------------------------------------------------------------------------- /packages/ui/src/WalletIcon.tsx: -------------------------------------------------------------------------------- 1 | import type { DetailedHTMLProps, FC, ImgHTMLAttributes } from 'react'; 2 | import React from 'react'; 3 | import { Wallet } from '@demox-labs/aleo-wallet-adapter-react'; 4 | 5 | export interface WalletIconProps extends DetailedHTMLProps, HTMLImageElement> { 6 | wallet: Wallet | null; 7 | } 8 | 9 | export const WalletIcon: FC = ({ wallet, ...props }) => { 10 | return wallet && {`${wallet.adapter.name}; 11 | }; 12 | -------------------------------------------------------------------------------- /packages/core/base/docs/type-aliases/SupportedTransactionVersions.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / SupportedTransactionVersions 6 | 7 | # Type Alias: SupportedTransactionVersions 8 | 9 | > **SupportedTransactionVersions** = `ReadonlySet`\<`any`\> \| `null` 10 | 11 | Defined in: [aleo-wallet-adapter/packages/core/base/types.ts:7](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/types.ts#L7) 12 | -------------------------------------------------------------------------------- /packages/ui/docs/variables/WalletModalProvider.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-reactui**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-reactui](../README.md) / WalletModalProvider 6 | 7 | # Variable: WalletModalProvider 8 | 9 | > `const` **WalletModalProvider**: `FC`\<[`WalletModalProviderProps`](../interfaces/WalletModalProviderProps.md)\> 10 | 11 | Defined in: [WalletModalProvider.tsx:11](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletModalProvider.tsx#L11) 12 | -------------------------------------------------------------------------------- /packages/core/react/docs/functions/useWallet.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-react**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-react](../README.md) / useWallet 6 | 7 | # Function: useWallet() 8 | 9 | > **useWallet**(): [`WalletContextState`](../interfaces/WalletContextState.md) 10 | 11 | Defined in: [useWallet.ts:130](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/useWallet.ts#L130) 12 | 13 | ## Returns 14 | 15 | [`WalletContextState`](../interfaces/WalletContextState.md) 16 | -------------------------------------------------------------------------------- /packages/core/react/docs/README.md: -------------------------------------------------------------------------------- 1 | **@demox-labs/aleo-wallet-adapter-react** 2 | 3 | *** 4 | 5 | # @demox-labs/aleo-wallet-adapter-react 6 | 7 | ## Interfaces 8 | 9 | - [Wallet](interfaces/Wallet.md) 10 | - [WalletContextState](interfaces/WalletContextState.md) 11 | - [WalletProviderProps](interfaces/WalletProviderProps.md) 12 | 13 | ## Variables 14 | 15 | - [WalletContext](variables/WalletContext.md) 16 | - [WalletProvider](variables/WalletProvider.md) 17 | 18 | ## Functions 19 | 20 | - [useLocalStorage](functions/useLocalStorage.md) 21 | - [useWallet](functions/useWallet.md) 22 | -------------------------------------------------------------------------------- /packages/core/base/docs/type-aliases/Adapter.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / Adapter 6 | 7 | # Type Alias: Adapter 8 | 9 | > **Adapter** = [`WalletAdapter`](WalletAdapter.md) \| [`SignerWalletAdapter`](SignerWalletAdapter.md) \| [`MessageSignerWalletAdapter`](MessageSignerWalletAdapter.md) 10 | 11 | Defined in: [aleo-wallet-adapter/packages/core/base/signer.ts:6](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/signer.ts#L6) 12 | -------------------------------------------------------------------------------- /packages/core/base/docs/@demox-labs/namespaces/EventEmitter/type-aliases/EventNames.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / EventNames 6 | 7 | # Type Alias: EventNames\ 8 | 9 | > **EventNames**\<`T`\> = `T` *extends* `string` \| `symbol` ? `T` : keyof `T` 10 | 11 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/eventemitter3/index.d.ts:105 12 | 13 | ## Type Parameters 14 | 15 | ### T 16 | 17 | `T` *extends* [`ValidEventTypes`](ValidEventTypes.md) 18 | -------------------------------------------------------------------------------- /packages/ui/docs/functions/useWalletModal.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-reactui**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-reactui](../README.md) / useWalletModal 6 | 7 | # Function: useWalletModal() 8 | 9 | > **useWalletModal**(): [`WalletModalContextState`](../interfaces/WalletModalContextState.md) 10 | 11 | Defined in: [useWalletModal.tsx:34](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/useWalletModal.tsx#L34) 12 | 13 | ## Returns 14 | 15 | [`WalletModalContextState`](../interfaces/WalletModalContextState.md) 16 | -------------------------------------------------------------------------------- /packages/core/base/docs/@demox-labs/namespaces/EventEmitter/type-aliases/ArgumentMap.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / ArgumentMap 6 | 7 | # Type Alias: ArgumentMap\ 8 | 9 | > **ArgumentMap**\<`T`\> = `{ [K in keyof T]: T[K] extends (args: any[]) => void ? Parameters : T[K] extends any[] ? T[K] : any[] }` 10 | 11 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/eventemitter3/index.d.ts:109 12 | 13 | ## Type Parameters 14 | 15 | ### T 16 | 17 | `T` *extends* `object` 18 | -------------------------------------------------------------------------------- /packages/core/base/docs/functions/scopePollingDetectionStrategy.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / scopePollingDetectionStrategy 6 | 7 | # Function: scopePollingDetectionStrategy() 8 | 9 | > **scopePollingDetectionStrategy**(`detect`): `void` 10 | 11 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:83](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L83) 12 | 13 | ## Parameters 14 | 15 | ### detect 16 | 17 | () => `boolean` 18 | 19 | ## Returns 20 | 21 | `void` 22 | -------------------------------------------------------------------------------- /packages/core/base/deployment.ts: -------------------------------------------------------------------------------- 1 | export interface AleoDeployment { 2 | address: string; 3 | chainId: string; 4 | program: string; 5 | fee: number; 6 | feePrivate: boolean; 7 | } 8 | 9 | export class Deployment implements AleoDeployment { 10 | address: string; 11 | chainId: string; 12 | program: string; 13 | fee: number; 14 | feePrivate: boolean; 15 | 16 | constructor(address: string, chainId: string, program: string, fee: number, feePrivate: boolean = true) { 17 | this.address = address; 18 | this.chainId = chainId; 19 | this.program = program; 20 | this.fee = fee; 21 | this.feePrivate = feePrivate; 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /packages/core/base/docs/type-aliases/WalletName.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletName 6 | 7 | # Type Alias: WalletName\ 8 | 9 | > **WalletName**\<`T`\> = `T` & `object` 10 | 11 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:16](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L16) 12 | 13 | ## Type declaration 14 | 15 | ### \_\_brand\_\_ 16 | 17 | > **\_\_brand\_\_**: `"WalletName"` 18 | 19 | ## Type Parameters 20 | 21 | ### T 22 | 23 | `T` *extends* `string` = `string` 24 | -------------------------------------------------------------------------------- /packages/core/base/docs/@demox-labs/namespaces/EventEmitter/type-aliases/EventArgs.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / EventArgs 6 | 7 | # Type Alias: EventArgs\ 8 | 9 | > **EventArgs**\<`T`, `K`\> = `Parameters`\<[`EventListener`](EventListener.md)\<`T`, `K`\>\> 10 | 11 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/eventemitter3/index.d.ts:126 12 | 13 | ## Type Parameters 14 | 15 | ### T 16 | 17 | `T` *extends* [`ValidEventTypes`](ValidEventTypes.md) 18 | 19 | ### K 20 | 21 | `K` *extends* [`EventNames`](EventNames.md)\<`T`\> 22 | -------------------------------------------------------------------------------- /packages/core/base/docs/@demox-labs/namespaces/EventEmitter/type-aliases/ValidEventTypes.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / ValidEventTypes 6 | 7 | # Type Alias: ValidEventTypes 8 | 9 | > **ValidEventTypes** = `string` \| `symbol` \| `object` 10 | 11 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/eventemitter3/index.d.ts:103 12 | 13 | `object` should be in either of the following forms: 14 | ``` 15 | interface EventTypes { 16 | 'event-with-parameters': any[] 17 | 'event-with-example-handler': (...args: any[]) => void 18 | } 19 | ``` 20 | -------------------------------------------------------------------------------- /packages/core/base/docs/type-aliases/SignerWalletAdapter.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / SignerWalletAdapter 6 | 7 | # Type Alias: SignerWalletAdapter\ 8 | 9 | > **SignerWalletAdapter**\<`Name`\> = [`WalletAdapter`](WalletAdapter.md)\<`Name`\> & [`SignerWalletAdapterProps`](../interfaces/SignerWalletAdapterProps.md)\<`Name`\> 10 | 11 | Defined in: [aleo-wallet-adapter/packages/core/base/signer.ts:10](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/signer.ts#L10) 12 | 13 | ## Type Parameters 14 | 15 | ### Name 16 | 17 | `Name` *extends* `string` = `string` 18 | -------------------------------------------------------------------------------- /packages/core/base/docs/type-aliases/TransactionOrVersionedTransaction.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / TransactionOrVersionedTransaction 6 | 7 | # Type Alias: TransactionOrVersionedTransaction\ 8 | 9 | > **TransactionOrVersionedTransaction**\<`S`\> = `S` *extends* `null` ? `any` : `any` \| `any` 10 | 11 | Defined in: [aleo-wallet-adapter/packages/core/base/types.ts:9](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/types.ts#L9) 12 | 13 | ## Type Parameters 14 | 15 | ### S 16 | 17 | `S` *extends* [`SupportedTransactionVersions`](SupportedTransactionVersions.md) 18 | -------------------------------------------------------------------------------- /packages/core/base/docs/@demox-labs/namespaces/EventEmitter/type-aliases/EventListener.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / EventListener 6 | 7 | # Type Alias: EventListener\ 8 | 9 | > **EventListener**\<`T`, `K`\> = `T` *extends* `string` \| `symbol` ? (...`args`) => `void` : (...`args`) => `void` 10 | 11 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/eventemitter3/index.d.ts:117 12 | 13 | ## Type Parameters 14 | 15 | ### T 16 | 17 | `T` *extends* [`ValidEventTypes`](ValidEventTypes.md) 18 | 19 | ### K 20 | 21 | `K` *extends* [`EventNames`](EventNames.md)\<`T`\> 22 | -------------------------------------------------------------------------------- /packages/core/base/docs/@demox-labs/namespaces/EventEmitter/README.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../../../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../../../README.md) / EventEmitter 6 | 7 | # EventEmitter 8 | 9 | ## Interfaces 10 | 11 | - [EventEmitterStatic](interfaces/EventEmitterStatic.md) 12 | - [ListenerFn](interfaces/ListenerFn.md) 13 | 14 | ## Type Aliases 15 | 16 | - [ArgumentMap](type-aliases/ArgumentMap.md) 17 | - [EventArgs](type-aliases/EventArgs.md) 18 | - [EventListener](type-aliases/EventListener.md) 19 | - [EventNames](type-aliases/EventNames.md) 20 | - [ValidEventTypes](type-aliases/ValidEventTypes.md) 21 | 22 | ## Variables 23 | 24 | - [EventEmitter](variables/EventEmitter.md) 25 | -------------------------------------------------------------------------------- /packages/core/base/types.ts: -------------------------------------------------------------------------------- 1 | export enum WalletAdapterNetwork { 2 | Testnet = 'testnet3', 3 | TestnetBeta = 'testnetbeta', 4 | MainnetBeta = 'mainnetbeta', 5 | }; 6 | 7 | export type SupportedTransactionVersions = ReadonlySet | null; 8 | 9 | export type TransactionOrVersionedTransaction = S extends null 10 | ? any 11 | : any | any; 12 | 13 | export enum DecryptPermission { 14 | NoDecrypt = 'NO_DECRYPT', // The App cannot decrypt any records 15 | UponRequest = 'DECRYPT_UPON_REQUEST', 16 | AutoDecrypt = 'AUTO_DECRYPT', // The App can decrypt any requested records 17 | OnChainHistory = 'ON_CHAIN_HISTORY' // The App can request on-chain record plaintexts and transaction ids 18 | } -------------------------------------------------------------------------------- /packages/core/base/docs/@demox-labs/namespaces/EventEmitter/interfaces/ListenerFn.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / ListenerFn 6 | 7 | # Interface: ListenerFn()\ 8 | 9 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/eventemitter3/index.d.ts:83 10 | 11 | ## Type Parameters 12 | 13 | ### Args 14 | 15 | `Args` *extends* `any`[] = `any`[] 16 | 17 | > **ListenerFn**(...`args`): `void` 18 | 19 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/eventemitter3/index.d.ts:84 20 | 21 | ## Parameters 22 | 23 | ### args 24 | 25 | ...`Args` 26 | 27 | ## Returns 28 | 29 | `void` 30 | -------------------------------------------------------------------------------- /packages/core/base/docs/type-aliases/WalletAdapter.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletAdapter 6 | 7 | # Type Alias: WalletAdapter\ 8 | 9 | > **WalletAdapter**\<`Name`\> = [`WalletAdapterProps`](../interfaces/WalletAdapterProps.md)\<`Name`\> & [`EventEmitter`](../classes/EventEmitter.md)\<[`WalletAdapterEvents`](../interfaces/WalletAdapterEvents.md)\> 10 | 11 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:32](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L32) 12 | 13 | ## Type Parameters 14 | 15 | ### Name 16 | 17 | `Name` *extends* `string` = `string` 18 | -------------------------------------------------------------------------------- /packages/core/base/docs/type-aliases/MessageSignerWalletAdapter.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / MessageSignerWalletAdapter 6 | 7 | # Type Alias: MessageSignerWalletAdapter\ 8 | 9 | > **MessageSignerWalletAdapter**\<`Name`\> = [`WalletAdapter`](WalletAdapter.md)\<`Name`\> & [`MessageSignerWalletAdapterProps`](../interfaces/MessageSignerWalletAdapterProps.md)\<`Name`\> 10 | 11 | Defined in: [aleo-wallet-adapter/packages/core/base/signer.ts:43](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/signer.ts#L43) 12 | 13 | ## Type Parameters 14 | 15 | ### Name 16 | 17 | `Name` *extends* `string` = `string` 18 | -------------------------------------------------------------------------------- /packages/core/react/docs/functions/useLocalStorage.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-react**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-react](../README.md) / useLocalStorage 6 | 7 | # Function: useLocalStorage() 8 | 9 | > **useLocalStorage**\<`T`\>(`key`, `defaultState`): \[`T`, `Dispatch`\<`SetStateAction`\<`T`\>\>\] 10 | 11 | Defined in: [useLocalStorage.ts:4](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/useLocalStorage.ts#L4) 12 | 13 | ## Type Parameters 14 | 15 | ### T 16 | 17 | `T` 18 | 19 | ## Parameters 20 | 21 | ### key 22 | 23 | `string` 24 | 25 | ### defaultState 26 | 27 | `T` 28 | 29 | ## Returns 30 | 31 | \[`T`, `Dispatch`\<`SetStateAction`\<`T`\>\>\] 32 | -------------------------------------------------------------------------------- /packages/ui/docs/interfaces/WalletIconProps.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-reactui**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-reactui](../README.md) / WalletIconProps 6 | 7 | # Interface: WalletIconProps 8 | 9 | Defined in: [WalletIcon.tsx:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletIcon.tsx#L5) 10 | 11 | ## Extends 12 | 13 | - `unknown`\<`ImgHTMLAttributes`\<`HTMLImageElement`\>, `HTMLImageElement`\> 14 | 15 | ## Properties 16 | 17 | ### wallet 18 | 19 | > **wallet**: `null` \| `Wallet` 20 | 21 | Defined in: [WalletIcon.tsx:6](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletIcon.tsx#L6) 22 | -------------------------------------------------------------------------------- /packages/wallets/leo/webpack.config.js: -------------------------------------------------------------------------------- 1 | //webpack.config.js 2 | const path = require('path'); 3 | 4 | module.exports = { 5 | mode: "development", 6 | devtool: "inline-source-map", 7 | entry: { 8 | main: "./index.ts", 9 | }, 10 | output: { 11 | path: path.resolve(__dirname, '.'), 12 | filename: "leo-wallet-bundle.js", // <--- Will be compiled to this single file 13 | library: { 14 | type: "module" 15 | } 16 | }, 17 | experiments: { 18 | outputModule: true, 19 | }, 20 | resolve: { 21 | modules: [ 22 | path.join(__dirname, './node_modules') 23 | ], 24 | extensions: [".ts", ".js",], 25 | }, 26 | module: { 27 | rules: [ 28 | { 29 | test: /\.tsx?$/, 30 | loader: "ts-loader" 31 | } 32 | ] 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /packages/core/base/docs/@demox-labs/namespaces/EventEmitter/interfaces/EventEmitterStatic.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / EventEmitterStatic 6 | 7 | # Interface: EventEmitterStatic 8 | 9 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/eventemitter3/index.d.ts:87 10 | 11 | ## Constructors 12 | 13 | ### Constructor 14 | 15 | > **new EventEmitterStatic**\<`EventTypes`, `Context`\>(): [`EventEmitter`](../../../../classes/EventEmitter.md)\<`EventTypes`, `Context`\> 16 | 17 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/eventemitter3/index.d.ts:88 18 | 19 | #### Returns 20 | 21 | [`EventEmitter`](../../../../classes/EventEmitter.md)\<`EventTypes`, `Context`\> 22 | -------------------------------------------------------------------------------- /packages/core/react/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@demox-labs/aleo-wallet-adapter-react", 3 | "version": "0.0.22", 4 | "description": "Core react infrastructure for connecting aleo-compatible wallets to your dApp.", 5 | "module": "dist/index.js", 6 | "types": "dist/index.d.ts", 7 | "repository": "https://github.com/demox-labs/aleo-wallet-adapter", 8 | "author": "Demox Labs", 9 | "license": "MIT", 10 | "scripts": { 11 | "build": "tsc", 12 | "doc": "typedoc --plugin typedoc-plugin-markdown --entryPoints index.ts" 13 | }, 14 | "dependencies": { 15 | "@demox-labs/aleo-wallet-adapter-base": "^0.0.23" 16 | }, 17 | "devDependencies": { 18 | "react": "^18.2.0", 19 | "typedoc": "^0.28.4", 20 | "typedoc-plugin-markdown": "^4.6.3", 21 | "typescript": "^4.8.4" 22 | }, 23 | "peerDependencies": { 24 | "react": "^18.2.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/ui/src/WalletModalProvider.tsx: -------------------------------------------------------------------------------- 1 | import type { FC, ReactNode } from 'react'; 2 | import React, { useState } from 'react'; 3 | import { WalletModalContext } from './useWalletModal'; 4 | import type { WalletModalProps } from './WalletModal'; 5 | import { WalletModal } from './WalletModal'; 6 | 7 | export interface WalletModalProviderProps extends WalletModalProps { 8 | children: ReactNode; 9 | } 10 | 11 | export const WalletModalProvider: FC = ({ children, ...props }) => { 12 | const [visible, setVisible] = useState(false); 13 | 14 | return ( 15 | 21 | {children} 22 | {visible && } 23 | 24 | ); 25 | }; 26 | -------------------------------------------------------------------------------- /packages/core/react/docs/interfaces/Wallet.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-react**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-react](../README.md) / Wallet 6 | 7 | # Interface: Wallet 8 | 9 | Defined in: [useWallet.ts:13](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/useWallet.ts#L13) 10 | 11 | ## Properties 12 | 13 | ### adapter 14 | 15 | > **adapter**: `Adapter` 16 | 17 | Defined in: [useWallet.ts:14](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/useWallet.ts#L14) 18 | 19 | *** 20 | 21 | ### readyState 22 | 23 | > **readyState**: `WalletReadyState` 24 | 25 | Defined in: [useWallet.ts:15](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/useWallet.ts#L15) 26 | -------------------------------------------------------------------------------- /packages/wallets/leo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@demox-labs/aleo-wallet-adapter-leo", 3 | "version": "0.0.25", 4 | "description": "Aleo wallet adapter for the Leo Wallet.", 5 | "module": "dist/index.js", 6 | "types": "dist/index.d.ts", 7 | "repository": "https://github.com/demox-labs/aleo-wallet-adapter", 8 | "author": "Demox Labs", 9 | "license": "MIT", 10 | "private": false, 11 | "dependencies": { 12 | "@demox-labs/aleo-wallet-adapter-base": "^0.0.23", 13 | "nanoid": "^4.0.0" 14 | }, 15 | "scripts": { 16 | "build": "tsc", 17 | "doc": "typedoc --plugin typedoc-plugin-markdown index.ts", 18 | "bundle": "webpack" 19 | }, 20 | "devDependencies": { 21 | "ts-loader": "^9.4.1", 22 | "typedoc": "^0.28.4", 23 | "typedoc-plugin-markdown": "^4.6.3", 24 | "typescript": "^4.9.3", 25 | "webpack": "^5.75.0", 26 | "webpack-cli": "^5.0.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/ui/src/WalletModalButton.tsx: -------------------------------------------------------------------------------- 1 | import type { FC, MouseEvent } from 'react'; 2 | import React, { useCallback } from 'react'; 3 | import type { ButtonProps } from './Button'; 4 | import { Button } from './Button'; 5 | import { useWalletModal } from './useWalletModal'; 6 | 7 | export const WalletModalButton: FC = ({ children = 'Select Wallet', onClick, ...props }) => { 8 | const { visible, setVisible } = useWalletModal(); 9 | 10 | const handleClick = useCallback( 11 | (event: MouseEvent) => { 12 | if (onClick) onClick(event); 13 | if (!event.defaultPrevented) setVisible(!visible); 14 | }, 15 | [onClick, setVisible, visible] 16 | ); 17 | 18 | return ( 19 | 22 | ); 23 | }; 24 | -------------------------------------------------------------------------------- /packages/ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "src", 4 | "target": "esnext", 5 | "lib": ["dom", "dom.iterable", "esnext"], 6 | "allowJs": true, 7 | "skipLibCheck": true, 8 | "esModuleInterop": true, 9 | "allowSyntheticDefaultImports": true, 10 | "strict": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "module": "esnext", 13 | "moduleResolution": "node", 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "jsx": "react", 17 | "noImplicitReturns": false, 18 | "noImplicitAny": false, 19 | "downlevelIteration": true, 20 | "outDir": "dist", 21 | "declaration": true, 22 | "sourceMap": true, 23 | }, 24 | "include": ["src"], 25 | "typedocOptions": { 26 | "entryPoints": ["src/index.ts"], 27 | "out": "docs", 28 | "compilerOptions": { 29 | "ignoreCompilerErrors": true 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /packages/ui/src/WalletListItem.tsx: -------------------------------------------------------------------------------- 1 | import type { FC, MouseEventHandler } from 'react'; 2 | import React from 'react'; 3 | import { WalletReadyState } from '@demox-labs/aleo-wallet-adapter-base'; 4 | import { Wallet } from '@demox-labs/aleo-wallet-adapter-react'; 5 | import { Button } from './Button'; 6 | import { WalletIcon } from './WalletIcon'; 7 | 8 | export interface WalletListItemProps { 9 | handleClick: MouseEventHandler; 10 | tabIndex?: number; 11 | wallet: Wallet; 12 | } 13 | 14 | export const WalletListItem: FC = ({ handleClick, tabIndex, wallet }) => { 15 | return ( 16 |
  • 17 | 21 |
  • 22 | ); 23 | }; 24 | -------------------------------------------------------------------------------- /packages/ui/docs/README.md: -------------------------------------------------------------------------------- 1 | **@demox-labs/aleo-wallet-adapter-reactui** 2 | 3 | *** 4 | 5 | # @demox-labs/aleo-wallet-adapter-reactui 6 | 7 | ## Interfaces 8 | 9 | - [WalletIconProps](interfaces/WalletIconProps.md) 10 | - [WalletModalContextState](interfaces/WalletModalContextState.md) 11 | - [WalletModalProps](interfaces/WalletModalProps.md) 12 | - [WalletModalProviderProps](interfaces/WalletModalProviderProps.md) 13 | 14 | ## Variables 15 | 16 | - [WalletConnectButton](variables/WalletConnectButton.md) 17 | - [WalletDisconnectButton](variables/WalletDisconnectButton.md) 18 | - [WalletIcon](variables/WalletIcon.md) 19 | - [WalletModal](variables/WalletModal.md) 20 | - [WalletModalButton](variables/WalletModalButton.md) 21 | - [WalletModalContext](variables/WalletModalContext.md) 22 | - [WalletModalProvider](variables/WalletModalProvider.md) 23 | - [WalletMultiButton](variables/WalletMultiButton.md) 24 | 25 | ## Functions 26 | 27 | - [useWalletModal](functions/useWalletModal.md) 28 | -------------------------------------------------------------------------------- /packages/ui/docs/interfaces/WalletModalProps.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-reactui**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-reactui](../README.md) / WalletModalProps 6 | 7 | # Interface: WalletModalProps 8 | 9 | Defined in: [WalletModal.tsx:11](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletModal.tsx#L11) 10 | 11 | ## Extended by 12 | 13 | - [`WalletModalProviderProps`](WalletModalProviderProps.md) 14 | 15 | ## Properties 16 | 17 | ### className? 18 | 19 | > `optional` **className**: `string` 20 | 21 | Defined in: [WalletModal.tsx:12](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletModal.tsx#L12) 22 | 23 | *** 24 | 25 | ### container? 26 | 27 | > `optional` **container**: `string` 28 | 29 | Defined in: [WalletModal.tsx:13](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletModal.tsx#L13) 30 | -------------------------------------------------------------------------------- /packages/ui/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2025 DEMOX LABS 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /packages/core/base/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2025 DEMOX LABS 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /packages/core/react/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2025 DEMOX LABS 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /packages/wallets/leo/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2025 DEMOX LABS 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /packages/ui/docs/interfaces/WalletModalContextState.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-reactui**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-reactui](../README.md) / WalletModalContextState 6 | 7 | # Interface: WalletModalContextState 8 | 9 | Defined in: [useWalletModal.tsx:3](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/useWalletModal.tsx#L3) 10 | 11 | ## Properties 12 | 13 | ### setVisible() 14 | 15 | > **setVisible**: (`open`) => `void` 16 | 17 | Defined in: [useWalletModal.tsx:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/useWalletModal.tsx#L5) 18 | 19 | #### Parameters 20 | 21 | ##### open 22 | 23 | `boolean` 24 | 25 | #### Returns 26 | 27 | `void` 28 | 29 | *** 30 | 31 | ### visible 32 | 33 | > **visible**: `boolean` 34 | 35 | Defined in: [useWalletModal.tsx:4](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/useWalletModal.tsx#L4) 36 | -------------------------------------------------------------------------------- /packages/core/base/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@demox-labs/aleo-wallet-adapter-base", 3 | "version": "0.0.23", 4 | "description": "Core infrastructure for connecting aleo-compatible wallets to your dApp.", 5 | "module": "dist/index.js", 6 | "types": "dist/index.d.ts", 7 | "scripts": { 8 | "build": "tsc", 9 | "doc": "typedoc --tsconfig ./tsconfig.json --plugin typedoc-plugin-markdown --entryPoints index.ts", 10 | "reinstall-all": "rm -rf node_modules yarn.lock && yarn && yarn build && cd ../react && rm -rf node_modules yarn.lock && yarn && yarn build && cd ../../ui && rm -rf node_modules yarn.lock && yarn && yarn build && cd ../wallets/leo && rm -rf node_modules yarn.lock && yarn && yarn build" 11 | }, 12 | "repository": "https://github.com/demox-labs/aleo-wallet-adapter", 13 | "author": "Demox Labs", 14 | "license": "MIT", 15 | "dependencies": { 16 | "eventemitter3": "^4.0.7" 17 | }, 18 | "devDependencies": { 19 | "typedoc": "^0.28.4", 20 | "typedoc-plugin-markdown": "^4.6.3", 21 | "typescript": "^4.8.4" 22 | }, 23 | "private": false 24 | } 25 | -------------------------------------------------------------------------------- /packages/ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@demox-labs/aleo-wallet-adapter-reactui", 3 | "version": "0.0.36", 4 | "description": "React UI Components for connecting Aleo-compatible wallets to your dApp.", 5 | "module": "dist/index.js", 6 | "types": "dist/index.d.ts", 7 | "repository": "https://github.com/demox-labs/aleo-wallet-adapter", 8 | "author": "Demox Labs", 9 | "license": "MIT", 10 | "scripts": { 11 | "build": "yarn clean && tsc && yarn copy-files", 12 | "clean": "rimraf dist/", 13 | "copy-files": "copyfiles styles.css dist/", 14 | "doc": "typedoc --plugin typedoc-plugin-markdown" 15 | }, 16 | "dependencies": { 17 | "@demox-labs/aleo-wallet-adapter-base": "^0.0.23", 18 | "@demox-labs/aleo-wallet-adapter-react": "^0.0.22" 19 | }, 20 | "devDependencies": { 21 | "copyfiles": "^2.4.1", 22 | "react": "^18.2.0", 23 | "react-dom": "^18.2.0", 24 | "rimraf": "^3.0.2", 25 | "typedoc": "^0.28.4", 26 | "typedoc-plugin-markdown": "^4.6.3", 27 | "typescript": "^4.8.4" 28 | }, 29 | "peerDependencies": { 30 | "react": "^18.2.0", 31 | "react-dom": "^18.2.0" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages/wallets/leo/docs/interfaces/LeoWalletAdapterConfig.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-leo**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-leo](../README.md) / LeoWalletAdapterConfig 6 | 7 | # Interface: LeoWalletAdapterConfig 8 | 9 | Defined in: [adapter.ts:54](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/wallets/leo/adapter.ts#L54) 10 | 11 | ## Properties 12 | 13 | ### appName? 14 | 15 | > `optional` **appName**: `string` 16 | 17 | Defined in: [adapter.ts:55](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/wallets/leo/adapter.ts#L55) 18 | 19 | *** 20 | 21 | ### isMobile? 22 | 23 | > `optional` **isMobile**: `boolean` 24 | 25 | Defined in: [adapter.ts:56](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/wallets/leo/adapter.ts#L56) 26 | 27 | *** 28 | 29 | ### mobileWebviewUrl? 30 | 31 | > `optional` **mobileWebviewUrl**: `string` 32 | 33 | Defined in: [adapter.ts:57](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/wallets/leo/adapter.ts#L57) 34 | -------------------------------------------------------------------------------- /packages/ui/src/useWalletModal.tsx: -------------------------------------------------------------------------------- 1 | import { createContext, useContext } from 'react'; 2 | 3 | export interface WalletModalContextState { 4 | visible: boolean; 5 | setVisible: (open: boolean) => void; 6 | } 7 | 8 | const DEFAULT_CONTEXT = { 9 | setVisible(_open: boolean) { 10 | console.error(constructMissingProviderErrorMessage('call', 'setVisible')); 11 | }, 12 | visible: false, 13 | }; 14 | Object.defineProperty(DEFAULT_CONTEXT, 'visible', { 15 | get() { 16 | console.error(constructMissingProviderErrorMessage('read', 'visible')); 17 | return false; 18 | }, 19 | }); 20 | 21 | function constructMissingProviderErrorMessage(action: string, valueName: string) { 22 | return ( 23 | 'You have tried to ' + 24 | `${action} "${valueName}"` + 25 | ' on a WalletModalContext without providing one.' + 26 | ' Make sure to render a WalletModalProvider' + 27 | ' as an ancestor of the component that uses ' + 28 | 'WalletModalContext' 29 | ); 30 | } 31 | 32 | export const WalletModalContext = createContext(DEFAULT_CONTEXT as WalletModalContextState); 33 | 34 | export function useWalletModal(): WalletModalContextState { 35 | return useContext(WalletModalContext); 36 | } 37 | -------------------------------------------------------------------------------- /packages/core/base/docs/interfaces/AleoTransition.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / AleoTransition 6 | 7 | # Interface: AleoTransition 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L2) 10 | 11 | ## Properties 12 | 13 | ### functionName 14 | 15 | > **functionName**: `string` 16 | 17 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:4](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L4) 18 | 19 | *** 20 | 21 | ### inputs 22 | 23 | > **inputs**: `any`[] 24 | 25 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L5) 26 | 27 | *** 28 | 29 | ### program 30 | 31 | > **program**: `string` 32 | 33 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:3](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L3) 34 | -------------------------------------------------------------------------------- /packages/ui/src/Button.tsx: -------------------------------------------------------------------------------- 1 | import { DecryptPermission, WalletAdapterNetwork } from '@demox-labs/aleo-wallet-adapter-base'; 2 | import type { CSSProperties, FC, MouseEvent, PropsWithChildren, ReactElement } from 'react'; 3 | import React from 'react'; 4 | 5 | export type ButtonProps = PropsWithChildren<{ 6 | className?: string; 7 | disabled?: boolean; 8 | decryptPermission?: DecryptPermission; 9 | network?: WalletAdapterNetwork; 10 | endIcon?: ReactElement; 11 | onClick?: (e: MouseEvent) => void; 12 | startIcon?: ReactElement; 13 | style?: CSSProperties; 14 | tabIndex?: number; 15 | }>; 16 | 17 | export const Button: FC = (props) => { 18 | return ( 19 | 31 | ); 32 | }; 33 | -------------------------------------------------------------------------------- /packages/core/base/docs/enumerations/WalletAdapterNetwork.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletAdapterNetwork 6 | 7 | # Enumeration: WalletAdapterNetwork 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/types.ts:1](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/types.ts#L1) 10 | 11 | ## Enumeration Members 12 | 13 | ### MainnetBeta 14 | 15 | > **MainnetBeta**: `"mainnetbeta"` 16 | 17 | Defined in: [aleo-wallet-adapter/packages/core/base/types.ts:4](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/types.ts#L4) 18 | 19 | *** 20 | 21 | ### Testnet 22 | 23 | > **Testnet**: `"testnet3"` 24 | 25 | Defined in: [aleo-wallet-adapter/packages/core/base/types.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/types.ts#L2) 26 | 27 | *** 28 | 29 | ### TestnetBeta 30 | 31 | > **TestnetBeta**: `"testnetbeta"` 32 | 33 | Defined in: [aleo-wallet-adapter/packages/core/base/types.ts:3](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/types.ts#L3) 34 | -------------------------------------------------------------------------------- /packages/core/react/useLocalStorage.ts: -------------------------------------------------------------------------------- 1 | import type { Dispatch, SetStateAction } from 'react'; 2 | import { useEffect, useRef, useState } from 'react'; 3 | 4 | export function useLocalStorage(key: string, defaultState: T): [T, Dispatch>] { 5 | const state = useState(() => { 6 | try { 7 | const value = localStorage.getItem(key); 8 | if (value) return JSON.parse(value) as T; 9 | } catch (error: any) { 10 | if (typeof window !== 'undefined') { 11 | console.error(error); 12 | } 13 | } 14 | 15 | return defaultState; 16 | }); 17 | const value = state[0]; 18 | 19 | const isFirstRender = useRef(true); 20 | useEffect(() => { 21 | if (isFirstRender.current) { 22 | isFirstRender.current = false; 23 | return; 24 | } 25 | try { 26 | if (value === null) { 27 | localStorage.removeItem(key); 28 | } else { 29 | localStorage.setItem(key, JSON.stringify(value)); 30 | } 31 | } catch (error: any) { 32 | if (typeof window !== 'undefined') { 33 | console.error(error); 34 | } 35 | } 36 | }, [value, key]); 37 | 38 | return state; 39 | } 40 | -------------------------------------------------------------------------------- /packages/core/base/transaction.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface AleoTransition { 3 | program: string; 4 | functionName: string; 5 | inputs: any[]; 6 | } 7 | 8 | export class Transition implements AleoTransition { 9 | program: string; 10 | functionName: string; 11 | inputs: any[]; 12 | 13 | constructor(program: string, functionName: string, inputs: any[]) { 14 | this.program = program; 15 | this.functionName = functionName; 16 | this.inputs = inputs; 17 | } 18 | } 19 | 20 | export interface AleoTransaction { 21 | address: string; 22 | chainId: string; 23 | transitions: AleoTransition[]; 24 | fee: number; 25 | feePrivate: boolean; 26 | } 27 | 28 | export class Transaction implements AleoTransaction { 29 | address: string; 30 | chainId: string; 31 | transitions: AleoTransition[]; 32 | fee: number; 33 | feePrivate: boolean; 34 | 35 | constructor(address: string, chainId: string, transitions: AleoTransition[], fee: number, feePrivate = true) { 36 | this.address = address; 37 | this.chainId = chainId; 38 | this.transitions = transitions; 39 | this.fee = fee; 40 | this.feePrivate = feePrivate; 41 | } 42 | 43 | static createTransaction(address: string, chainId: string, program: string, functionName: string, inputs: any[], fee: number, feePrivate = true) { 44 | const transition = new Transition(program, functionName, inputs); 45 | return new Transaction(address, chainId, [transition], fee, feePrivate); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /packages/wallets/leo/docs/interfaces/LeoWalletEvents.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-leo**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-leo](../README.md) / LeoWalletEvents 6 | 7 | # Interface: LeoWalletEvents 8 | 9 | Defined in: [adapter.ts:22](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/wallets/leo/adapter.ts#L22) 10 | 11 | ## Methods 12 | 13 | ### accountChange() 14 | 15 | > **accountChange**(...`args`): `unknown` 16 | 17 | Defined in: [adapter.ts:25](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/wallets/leo/adapter.ts#L25) 18 | 19 | #### Parameters 20 | 21 | ##### args 22 | 23 | ...`unknown`[] 24 | 25 | #### Returns 26 | 27 | `unknown` 28 | 29 | *** 30 | 31 | ### connect() 32 | 33 | > **connect**(...`args`): `unknown` 34 | 35 | Defined in: [adapter.ts:23](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/wallets/leo/adapter.ts#L23) 36 | 37 | #### Parameters 38 | 39 | ##### args 40 | 41 | ...`unknown`[] 42 | 43 | #### Returns 44 | 45 | `unknown` 46 | 47 | *** 48 | 49 | ### disconnect() 50 | 51 | > **disconnect**(...`args`): `unknown` 52 | 53 | Defined in: [adapter.ts:24](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/wallets/leo/adapter.ts#L24) 54 | 55 | #### Parameters 56 | 57 | ##### args 58 | 59 | ...`unknown`[] 60 | 61 | #### Returns 62 | 63 | `unknown` 64 | -------------------------------------------------------------------------------- /packages/ui/src/WalletDisconnectButton.tsx: -------------------------------------------------------------------------------- 1 | import type { FC, MouseEventHandler } from 'react'; 2 | import React, { useCallback, useMemo } from 'react'; 3 | import { useWallet } from '@demox-labs/aleo-wallet-adapter-react'; 4 | import type { ButtonProps } from './Button'; 5 | import { Button } from './Button'; 6 | import { WalletIcon } from './WalletIcon'; 7 | 8 | export const WalletDisconnectButton: FC = ({ children, disabled, onClick, ...props }) => { 9 | const { wallet, disconnect, disconnecting } = useWallet(); 10 | 11 | const handleClick: MouseEventHandler = useCallback( 12 | (event) => { 13 | if (onClick) onClick(event); 14 | // eslint-disable-next-line @typescript-eslint/no-empty-function 15 | if (!event.defaultPrevented) disconnect().catch(() => {}); 16 | }, 17 | [onClick, disconnect] 18 | ); 19 | 20 | const content = useMemo(() => { 21 | if (children) return children; 22 | if (disconnecting) return 'Disconnecting ...'; 23 | if (wallet) return 'Disconnect'; 24 | return 'Disconnect Wallet'; 25 | }, [children, disconnecting, wallet]); 26 | 27 | return ( 28 | 37 | ); 38 | }; 39 | -------------------------------------------------------------------------------- /packages/ui/docs/interfaces/WalletModalProviderProps.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-reactui**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-reactui](../README.md) / WalletModalProviderProps 6 | 7 | # Interface: WalletModalProviderProps 8 | 9 | Defined in: [WalletModalProvider.tsx:7](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletModalProvider.tsx#L7) 10 | 11 | ## Extends 12 | 13 | - [`WalletModalProps`](WalletModalProps.md) 14 | 15 | ## Properties 16 | 17 | ### children 18 | 19 | > **children**: `ReactNode` 20 | 21 | Defined in: [WalletModalProvider.tsx:8](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletModalProvider.tsx#L8) 22 | 23 | *** 24 | 25 | ### className? 26 | 27 | > `optional` **className**: `string` 28 | 29 | Defined in: [WalletModal.tsx:12](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletModal.tsx#L12) 30 | 31 | #### Inherited from 32 | 33 | [`WalletModalProps`](WalletModalProps.md).[`className`](WalletModalProps.md#classname) 34 | 35 | *** 36 | 37 | ### container? 38 | 39 | > `optional` **container**: `string` 40 | 41 | Defined in: [WalletModal.tsx:13](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/ui/src/WalletModal.tsx#L13) 42 | 43 | #### Inherited from 44 | 45 | [`WalletModalProps`](WalletModalProps.md).[`container`](WalletModalProps.md#container) 46 | -------------------------------------------------------------------------------- /packages/core/base/docs/enumerations/DecryptPermission.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / DecryptPermission 6 | 7 | # Enumeration: DecryptPermission 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/types.ts:13](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/types.ts#L13) 10 | 11 | ## Enumeration Members 12 | 13 | ### AutoDecrypt 14 | 15 | > **AutoDecrypt**: `"AUTO_DECRYPT"` 16 | 17 | Defined in: [aleo-wallet-adapter/packages/core/base/types.ts:16](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/types.ts#L16) 18 | 19 | *** 20 | 21 | ### NoDecrypt 22 | 23 | > **NoDecrypt**: `"NO_DECRYPT"` 24 | 25 | Defined in: [aleo-wallet-adapter/packages/core/base/types.ts:14](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/types.ts#L14) 26 | 27 | *** 28 | 29 | ### OnChainHistory 30 | 31 | > **OnChainHistory**: `"ON_CHAIN_HISTORY"` 32 | 33 | Defined in: [aleo-wallet-adapter/packages/core/base/types.ts:17](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/types.ts#L17) 34 | 35 | *** 36 | 37 | ### UponRequest 38 | 39 | > **UponRequest**: `"DECRYPT_UPON_REQUEST"` 40 | 41 | Defined in: [aleo-wallet-adapter/packages/core/base/types.ts:15](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/types.ts#L15) 42 | -------------------------------------------------------------------------------- /packages/ui/src/AleoSVG.tsx: -------------------------------------------------------------------------------- 1 | import type { FC } from 'react'; 2 | import React from 'react'; 3 | 4 | export const AleoSVG: FC = () => { 5 | return ( 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | ); 15 | }; 16 | -------------------------------------------------------------------------------- /packages/ui/src/WalletConnectButton.tsx: -------------------------------------------------------------------------------- 1 | import type { FC, MouseEventHandler } from 'react'; 2 | import React, { useCallback, useMemo } from 'react'; 3 | import { useWallet } from '@demox-labs/aleo-wallet-adapter-react'; 4 | import type { ButtonProps } from './Button'; 5 | import { Button } from './Button'; 6 | import { WalletIcon } from './WalletIcon'; 7 | import { WalletAdapterNetwork } from '@demox-labs/aleo-wallet-adapter-base'; 8 | 9 | export const WalletConnectButton: FC = ({ children, disabled, onClick, decryptPermission, network, programs, ...props }) => { 10 | const { wallet, connect, connecting, connected } = useWallet(); 11 | 12 | const handleClick: MouseEventHandler = useCallback( 13 | (event) => { 14 | if (onClick) onClick(event); 15 | // eslint-disable-next-line @typescript-eslint/no-empty-function 16 | if (!event.defaultPrevented) connect(decryptPermission || "NO_DECRYPT", network || WalletAdapterNetwork.TestnetBeta, programs ?? []).catch(() => {}); 17 | }, 18 | [onClick, connect] 19 | ); 20 | 21 | const content = useMemo(() => { 22 | if (children) return children; 23 | if (connecting) return 'Connecting ...'; 24 | if (connected) return 'Connected'; 25 | if (wallet) return 'Connect'; 26 | return 'Connect Wallet'; 27 | }, [children, connecting, connected, wallet]); 28 | 29 | return ( 30 | 39 | ); 40 | }; 41 | -------------------------------------------------------------------------------- /packages/core/base/docs/interfaces/AleoDeployment.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / AleoDeployment 6 | 7 | # Interface: AleoDeployment 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/deployment.ts:1](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/deployment.ts#L1) 10 | 11 | ## Properties 12 | 13 | ### address 14 | 15 | > **address**: `string` 16 | 17 | Defined in: [aleo-wallet-adapter/packages/core/base/deployment.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/deployment.ts#L2) 18 | 19 | *** 20 | 21 | ### chainId 22 | 23 | > **chainId**: `string` 24 | 25 | Defined in: [aleo-wallet-adapter/packages/core/base/deployment.ts:3](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/deployment.ts#L3) 26 | 27 | *** 28 | 29 | ### fee 30 | 31 | > **fee**: `number` 32 | 33 | Defined in: [aleo-wallet-adapter/packages/core/base/deployment.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/deployment.ts#L5) 34 | 35 | *** 36 | 37 | ### feePrivate 38 | 39 | > **feePrivate**: `boolean` 40 | 41 | Defined in: [aleo-wallet-adapter/packages/core/base/deployment.ts:6](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/deployment.ts#L6) 42 | 43 | *** 44 | 45 | ### program 46 | 47 | > **program**: `string` 48 | 49 | Defined in: [aleo-wallet-adapter/packages/core/base/deployment.ts:4](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/deployment.ts#L4) 50 | -------------------------------------------------------------------------------- /packages/core/base/docs/interfaces/AleoTransaction.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / AleoTransaction 6 | 7 | # Interface: AleoTransaction 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:20](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L20) 10 | 11 | ## Properties 12 | 13 | ### address 14 | 15 | > **address**: `string` 16 | 17 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:21](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L21) 18 | 19 | *** 20 | 21 | ### chainId 22 | 23 | > **chainId**: `string` 24 | 25 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:22](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L22) 26 | 27 | *** 28 | 29 | ### fee 30 | 31 | > **fee**: `number` 32 | 33 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:24](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L24) 34 | 35 | *** 36 | 37 | ### feePrivate 38 | 39 | > **feePrivate**: `boolean` 40 | 41 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:25](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L25) 42 | 43 | *** 44 | 45 | ### transitions 46 | 47 | > **transitions**: [`AleoTransition`](AleoTransition.md)[] 48 | 49 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:23](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L23) 50 | -------------------------------------------------------------------------------- /util/publish.js: -------------------------------------------------------------------------------- 1 | const { exec } = require('child_process'); 2 | const path = require('path'); 3 | const readline = require('readline'); 4 | 5 | const directories = [ 6 | './packages/core/base', 7 | './packages/core/react', 8 | './packages/ui', 9 | './packages/wallets/leo' 10 | ]; 11 | 12 | const commands = [ 13 | 'yarn', 14 | 'yarn build', 15 | 'yarn doc' 16 | ]; 17 | 18 | function runCommand(directory, command) { 19 | return new Promise((resolve, reject) => { 20 | exec(command, { cwd: path.resolve(directory) }, (error, stdout, stderr) => { 21 | if (error) { 22 | console.error(`Error executing ${command} in ${directory}:`, error); 23 | return reject(error); 24 | } 25 | 26 | if (stderr) { 27 | console.error(`Error output from ${command} in ${directory}:`, stderr); 28 | } 29 | 30 | console.log(`Output from ${command} in ${directory}:`, stdout); 31 | resolve(); 32 | }); 33 | }); 34 | } 35 | 36 | async function getOtp() { 37 | return new Promise((resolve) => { 38 | const rl = readline.createInterface({ 39 | input: process.stdin, 40 | output: process.stdout 41 | }); 42 | 43 | rl.question('Please enter your OTP from your authenticator app: ', (otp) => { 44 | rl.close(); 45 | resolve(otp.trim()); 46 | }); 47 | }); 48 | } 49 | 50 | async function publishPackages() { 51 | const otp = await getOtp(); 52 | 53 | for (let dir of directories) { 54 | for (let cmd of commands) { 55 | await runCommand(dir, cmd); 56 | } 57 | // Handle npm publish separately to include OTP 58 | await runCommand(dir, `npm publish --otp=${otp}`); 59 | } 60 | 61 | console.log("All packages published successfully!"); 62 | } 63 | 64 | publishPackages().catch(error => { 65 | console.error("Error publishing packages:", error); 66 | }); -------------------------------------------------------------------------------- /packages/core/base/docs/interfaces/WalletAdapterEvents.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletAdapterEvents 6 | 7 | # Interface: WalletAdapterEvents 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:7](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L7) 10 | 11 | ## Methods 12 | 13 | ### connect() 14 | 15 | > **connect**(`publicKey`, `programs?`): `void` 16 | 17 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:8](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L8) 18 | 19 | #### Parameters 20 | 21 | ##### publicKey 22 | 23 | `string` 24 | 25 | ##### programs? 26 | 27 | `string`[] 28 | 29 | #### Returns 30 | 31 | `void` 32 | 33 | *** 34 | 35 | ### disconnect() 36 | 37 | > **disconnect**(): `void` 38 | 39 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:9](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L9) 40 | 41 | #### Returns 42 | 43 | `void` 44 | 45 | *** 46 | 47 | ### error() 48 | 49 | > **error**(`error`): `void` 50 | 51 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:10](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L10) 52 | 53 | #### Parameters 54 | 55 | ##### error 56 | 57 | [`WalletError`](../classes/WalletError.md) 58 | 59 | #### Returns 60 | 61 | `void` 62 | 63 | *** 64 | 65 | ### readyStateChange() 66 | 67 | > **readyStateChange**(`readyState`): `void` 68 | 69 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:11](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L11) 70 | 71 | #### Parameters 72 | 73 | ##### readyState 74 | 75 | [`WalletReadyState`](../enumerations/WalletReadyState.md) 76 | 77 | #### Returns 78 | 79 | `void` 80 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/Transition.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / Transition 6 | 7 | # Class: Transition 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:8](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L8) 10 | 11 | ## Implements 12 | 13 | - [`AleoTransition`](../interfaces/AleoTransition.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new Transition**(`program`, `functionName`, `inputs`): `Transition` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:13](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L13) 22 | 23 | #### Parameters 24 | 25 | ##### program 26 | 27 | `string` 28 | 29 | ##### functionName 30 | 31 | `string` 32 | 33 | ##### inputs 34 | 35 | `any`[] 36 | 37 | #### Returns 38 | 39 | `Transition` 40 | 41 | ## Properties 42 | 43 | ### functionName 44 | 45 | > **functionName**: `string` 46 | 47 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:10](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L10) 48 | 49 | #### Implementation of 50 | 51 | [`AleoTransition`](../interfaces/AleoTransition.md).[`functionName`](../interfaces/AleoTransition.md#functionname) 52 | 53 | *** 54 | 55 | ### inputs 56 | 57 | > **inputs**: `any`[] 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:11](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L11) 60 | 61 | #### Implementation of 62 | 63 | [`AleoTransition`](../interfaces/AleoTransition.md).[`inputs`](../interfaces/AleoTransition.md#inputs) 64 | 65 | *** 66 | 67 | ### program 68 | 69 | > **program**: `string` 70 | 71 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:9](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L9) 72 | 73 | #### Implementation of 74 | 75 | [`AleoTransition`](../interfaces/AleoTransition.md).[`program`](../interfaces/AleoTransition.md#program) 76 | -------------------------------------------------------------------------------- /packages/ui/src/Collapse.tsx: -------------------------------------------------------------------------------- 1 | import type { FC, PropsWithChildren } from 'react'; 2 | import React, { useLayoutEffect, useRef } from 'react'; 3 | 4 | export type CollapseProps = PropsWithChildren<{ 5 | expanded: boolean; 6 | id: string; 7 | }>; 8 | 9 | export const Collapse: FC = ({ id, children, expanded = false }) => { 10 | const ref = useRef(null); 11 | const instant = useRef(true); 12 | const transition = 'height 250ms ease-out'; 13 | 14 | const openCollapse = () => { 15 | const node = ref.current; 16 | if (!node) return; 17 | 18 | requestAnimationFrame(() => { 19 | node.style.height = node.scrollHeight + 'px'; 20 | }); 21 | }; 22 | 23 | const closeCollapse = () => { 24 | const node = ref.current; 25 | if (!node) return; 26 | 27 | requestAnimationFrame(() => { 28 | node.style.height = node.offsetHeight + 'px'; 29 | node.style.overflow = 'hidden'; 30 | requestAnimationFrame(() => { 31 | node.style.height = '0'; 32 | }); 33 | }); 34 | }; 35 | 36 | useLayoutEffect(() => { 37 | if (expanded) { 38 | openCollapse(); 39 | } else { 40 | closeCollapse(); 41 | } 42 | }, [expanded]); 43 | 44 | useLayoutEffect(() => { 45 | const node = ref.current; 46 | if (!node) return; 47 | 48 | function handleComplete() { 49 | if (!node) return; 50 | 51 | node.style.overflow = expanded ? 'initial' : 'hidden'; 52 | if (expanded) { 53 | node.style.height = 'auto'; 54 | } 55 | } 56 | 57 | function handleTransitionEnd(event: TransitionEvent) { 58 | if (node && event.target === node && event.propertyName === 'height') { 59 | handleComplete(); 60 | } 61 | } 62 | 63 | if (instant.current) { 64 | handleComplete(); 65 | instant.current = false; 66 | } 67 | 68 | node.addEventListener('transitionend', handleTransitionEnd); 69 | return () => node.removeEventListener('transitionend', handleTransitionEnd); 70 | }, [expanded]); 71 | 72 | return ( 73 |
    80 | {children} 81 |
    82 | ); 83 | }; 84 | -------------------------------------------------------------------------------- /packages/core/base/docs/enumerations/WalletReadyState.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletReadyState 6 | 7 | # Enumeration: WalletReadyState 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:43](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L43) 10 | 11 | A wallet's readiness describes a series of states that the wallet can be in, 12 | depending on what kind of wallet it is. An installable wallet (eg. a browser 13 | extension like Phantom) might be `Installed` if we've found the Phantom API 14 | in the global scope, or `NotDetected` otherwise. A loadable, zero-install 15 | runtime (eg. Torus Wallet) might simply signal that it's `Loadable`. Use this 16 | metadata to personalize the wallet list for each user (eg. to show their 17 | installed wallets first). 18 | 19 | ## Enumeration Members 20 | 21 | ### Installed 22 | 23 | > **Installed**: `"Installed"` 24 | 25 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:49](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L49) 26 | 27 | User-installable wallets can typically be detected by scanning for an API 28 | that they've injected into the global context. If such an API is present, 29 | we consider the wallet to have been installed. 30 | 31 | *** 32 | 33 | ### Loadable 34 | 35 | > **Loadable**: `"Loadable"` 36 | 37 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:55](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L55) 38 | 39 | Loadable wallets are always available to you. Since you can load them at 40 | any time, it's meaningless to say that they have been detected. 41 | 42 | *** 43 | 44 | ### NotDetected 45 | 46 | > **NotDetected**: `"NotDetected"` 47 | 48 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:50](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L50) 49 | 50 | *** 51 | 52 | ### Unsupported 53 | 54 | > **Unsupported**: `"Unsupported"` 55 | 56 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:60](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L60) 57 | 58 | If a wallet is not supported on a given platform (eg. server-rendering, or 59 | mobile) then it will stay in the `Unsupported` state. 60 | -------------------------------------------------------------------------------- /packages/core/base/errors.ts: -------------------------------------------------------------------------------- 1 | export class WalletError extends Error { 2 | error: any; 3 | 4 | // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types 5 | constructor(message?: string, error?: any) { 6 | super(message); 7 | this.error = error; 8 | } 9 | } 10 | 11 | export class WalletNotReadyError extends WalletError { 12 | name = 'WalletNotReadyError'; 13 | } 14 | 15 | export class WalletLoadError extends WalletError { 16 | name = 'WalletLoadError'; 17 | } 18 | 19 | export class WalletConfigError extends WalletError { 20 | name = 'WalletConfigError'; 21 | } 22 | 23 | export class WalletConnectionError extends WalletError { 24 | name = 'WalletConnectionError'; 25 | } 26 | 27 | export class WalletNotSelectedError extends WalletError { 28 | name = 'WalletNotSelectedError'; 29 | } 30 | 31 | export class WalletDisconnectedError extends WalletError { 32 | name = 'WalletDisconnectedError'; 33 | } 34 | 35 | export class WalletDisconnectionError extends WalletError { 36 | name = 'WalletDisconnectionError'; 37 | } 38 | 39 | export class WalletAccountError extends WalletError { 40 | name = 'WalletAccountError'; 41 | } 42 | 43 | export class WalletPublicKeyError extends WalletError { 44 | name = 'WalletPublicKeyError'; 45 | } 46 | 47 | export class WalletKeypairError extends WalletError { 48 | name = 'WalletKeypairError'; 49 | } 50 | 51 | export class WalletNotConnectedError extends WalletError { 52 | name = 'WalletNotConnectedError'; 53 | } 54 | 55 | export class WalletSendTransactionError extends WalletError { 56 | name = 'WalletSendTransactionError'; 57 | } 58 | 59 | export class WalletSignMessageError extends WalletError { 60 | name = 'WalletSignMessageError'; 61 | } 62 | 63 | export class WalletSignTransactionError extends WalletError { 64 | name = 'WalletSignTransactionError'; 65 | } 66 | 67 | export class WalletTimeoutError extends WalletError { 68 | name = 'WalletTimeoutError'; 69 | } 70 | 71 | export class WalletWindowBlockedError extends WalletError { 72 | name = 'WalletWindowBlockedError'; 73 | } 74 | 75 | export class WalletWindowClosedError extends WalletError { 76 | name = 'WalletWindowClosedError'; 77 | } 78 | 79 | export class WalletDecryptionNotAllowedError extends WalletError { 80 | name = 'WalletDecryptionNotAllowedError'; 81 | } 82 | 83 | export class WalletDecryptionError extends WalletError { 84 | name = 'WalletDecryptionError'; 85 | } 86 | 87 | export class WalletRecordsError extends WalletError { 88 | name = 'WalletRecordsError'; 89 | } 90 | 91 | export class WalletTransactionError extends WalletError { 92 | name = 'WalletTransactionError'; 93 | } 94 | -------------------------------------------------------------------------------- /packages/core/react/docs/interfaces/WalletProviderProps.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-react**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-react](../README.md) / WalletProviderProps 6 | 7 | # Interface: WalletProviderProps 8 | 9 | Defined in: [WalletProvider.tsx:21](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/WalletProvider.tsx#L21) 10 | 11 | ## Properties 12 | 13 | ### autoConnect? 14 | 15 | > `optional` **autoConnect**: `boolean` 16 | 17 | Defined in: [WalletProvider.tsx:27](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/WalletProvider.tsx#L27) 18 | 19 | *** 20 | 21 | ### children 22 | 23 | > **children**: `ReactNode` 24 | 25 | Defined in: [WalletProvider.tsx:22](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/WalletProvider.tsx#L22) 26 | 27 | *** 28 | 29 | ### decryptPermission? 30 | 31 | > `optional` **decryptPermission**: `DecryptPermission` 32 | 33 | Defined in: [WalletProvider.tsx:24](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/WalletProvider.tsx#L24) 34 | 35 | *** 36 | 37 | ### localStorageKey? 38 | 39 | > `optional` **localStorageKey**: `string` 40 | 41 | Defined in: [WalletProvider.tsx:29](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/WalletProvider.tsx#L29) 42 | 43 | *** 44 | 45 | ### network? 46 | 47 | > `optional` **network**: `WalletAdapterNetwork` 48 | 49 | Defined in: [WalletProvider.tsx:26](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/WalletProvider.tsx#L26) 50 | 51 | *** 52 | 53 | ### onError()? 54 | 55 | > `optional` **onError**: (`error`) => `void` 56 | 57 | Defined in: [WalletProvider.tsx:28](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/WalletProvider.tsx#L28) 58 | 59 | #### Parameters 60 | 61 | ##### error 62 | 63 | `WalletError` 64 | 65 | #### Returns 66 | 67 | `void` 68 | 69 | *** 70 | 71 | ### programs? 72 | 73 | > `optional` **programs**: `string`[] 74 | 75 | Defined in: [WalletProvider.tsx:25](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/WalletProvider.tsx#L25) 76 | 77 | *** 78 | 79 | ### wallets 80 | 81 | > **wallets**: `Adapter`[] 82 | 83 | Defined in: [WalletProvider.tsx:23](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/react/WalletProvider.tsx#L23) 84 | -------------------------------------------------------------------------------- /packages/core/base/signer.ts: -------------------------------------------------------------------------------- 1 | import type { WalletAdapter, WalletAdapterProps } from './adapter'; 2 | import { BaseWalletAdapter } from './adapter'; 3 | import { AleoDeployment } from './deployment'; 4 | import { AleoTransaction } from './transaction'; 5 | 6 | export type Adapter = WalletAdapter | SignerWalletAdapter | MessageSignerWalletAdapter; 7 | 8 | export interface SignerWalletAdapterProps extends WalletAdapterProps { } 9 | 10 | export type SignerWalletAdapter = WalletAdapter & SignerWalletAdapterProps; 11 | 12 | export abstract class BaseSignerWalletAdapter 13 | extends BaseWalletAdapter 14 | implements SignerWalletAdapter 15 | { } 16 | 17 | export interface MessageSignerWalletAdapterProps extends WalletAdapterProps { 18 | signMessage(message: Uint8Array): Promise; 19 | 20 | decrypt(cipherText: string, tpk?: string, programId?: string, functionName?: string, index?: number): Promise; 21 | 22 | requestRecords(program: string): Promise; 23 | 24 | requestTransaction(transaction: AleoTransaction): Promise; 25 | 26 | requestExecution(transaction: AleoTransaction): Promise; 27 | 28 | requestBulkTransactions(transactions: AleoTransaction[]): Promise; 29 | 30 | requestDeploy(deployment: AleoDeployment): Promise; 31 | 32 | transactionStatus(transactionId: string): Promise; 33 | 34 | transitionViewKeys(transactionId: string): Promise; 35 | 36 | getExecution(transactionId: string): Promise; 37 | 38 | requestRecordPlaintexts(program: string): Promise; 39 | 40 | requestTransactionHistory(program: string): Promise; 41 | } 42 | 43 | export type MessageSignerWalletAdapter = WalletAdapter & 44 | MessageSignerWalletAdapterProps; 45 | 46 | export abstract class BaseMessageSignerWalletAdapter 47 | extends BaseSignerWalletAdapter 48 | implements MessageSignerWalletAdapter 49 | { 50 | abstract signMessage(message: Uint8Array): Promise; 51 | 52 | abstract decrypt(cipherText: string, tpk?: string, programId?: string, functionName?: string, index?: number): Promise; 53 | 54 | abstract requestRecords(program: string): Promise; 55 | 56 | abstract requestTransaction(transaction: AleoTransaction): Promise; 57 | 58 | abstract requestExecution(transaction: AleoTransaction): Promise; 59 | 60 | abstract requestBulkTransactions(transactions: AleoTransaction[]): Promise; 61 | 62 | abstract requestDeploy(deployment: AleoDeployment): Promise; 63 | 64 | abstract transactionStatus(transactionId: string): Promise; 65 | 66 | abstract transitionViewKeys(transactionId: string): Promise; 67 | 68 | abstract getExecution(transactionId: string): Promise; 69 | 70 | abstract requestRecordPlaintexts(program: string): Promise; 71 | 72 | abstract requestTransactionHistory(program: string): Promise; 73 | } 74 | -------------------------------------------------------------------------------- /packages/core/base/docs/README.md: -------------------------------------------------------------------------------- 1 | **@demox-labs/aleo-wallet-adapter-base** 2 | 3 | *** 4 | 5 | # @demox-labs/aleo-wallet-adapter-base 6 | 7 | ## Namespaces 8 | 9 | - [EventEmitter](@demox-labs/namespaces/EventEmitter/README.md) 10 | 11 | ## Enumerations 12 | 13 | - [DecryptPermission](enumerations/DecryptPermission.md) 14 | - [WalletAdapterNetwork](enumerations/WalletAdapterNetwork.md) 15 | - [WalletReadyState](enumerations/WalletReadyState.md) 16 | 17 | ## Classes 18 | 19 | - [BaseMessageSignerWalletAdapter](classes/BaseMessageSignerWalletAdapter.md) 20 | - [BaseSignerWalletAdapter](classes/BaseSignerWalletAdapter.md) 21 | - [BaseWalletAdapter](classes/BaseWalletAdapter.md) 22 | - [Deployment](classes/Deployment.md) 23 | - [EventEmitter](classes/EventEmitter.md) 24 | - [Transaction](classes/Transaction.md) 25 | - [Transition](classes/Transition.md) 26 | - [WalletAccountError](classes/WalletAccountError.md) 27 | - [WalletConfigError](classes/WalletConfigError.md) 28 | - [WalletConnectionError](classes/WalletConnectionError.md) 29 | - [WalletDecryptionError](classes/WalletDecryptionError.md) 30 | - [WalletDecryptionNotAllowedError](classes/WalletDecryptionNotAllowedError.md) 31 | - [WalletDisconnectedError](classes/WalletDisconnectedError.md) 32 | - [WalletDisconnectionError](classes/WalletDisconnectionError.md) 33 | - [WalletError](classes/WalletError.md) 34 | - [WalletKeypairError](classes/WalletKeypairError.md) 35 | - [WalletLoadError](classes/WalletLoadError.md) 36 | - [WalletNotConnectedError](classes/WalletNotConnectedError.md) 37 | - [WalletNotReadyError](classes/WalletNotReadyError.md) 38 | - [WalletNotSelectedError](classes/WalletNotSelectedError.md) 39 | - [WalletPublicKeyError](classes/WalletPublicKeyError.md) 40 | - [WalletRecordsError](classes/WalletRecordsError.md) 41 | - [WalletSendTransactionError](classes/WalletSendTransactionError.md) 42 | - [WalletSignMessageError](classes/WalletSignMessageError.md) 43 | - [WalletSignTransactionError](classes/WalletSignTransactionError.md) 44 | - [WalletTimeoutError](classes/WalletTimeoutError.md) 45 | - [WalletTransactionError](classes/WalletTransactionError.md) 46 | - [WalletWindowBlockedError](classes/WalletWindowBlockedError.md) 47 | - [WalletWindowClosedError](classes/WalletWindowClosedError.md) 48 | 49 | ## Interfaces 50 | 51 | - [AleoDeployment](interfaces/AleoDeployment.md) 52 | - [AleoTransaction](interfaces/AleoTransaction.md) 53 | - [AleoTransition](interfaces/AleoTransition.md) 54 | - [MessageSignerWalletAdapterProps](interfaces/MessageSignerWalletAdapterProps.md) 55 | - [SignerWalletAdapterProps](interfaces/SignerWalletAdapterProps.md) 56 | - [WalletAdapterEvents](interfaces/WalletAdapterEvents.md) 57 | - [WalletAdapterProps](interfaces/WalletAdapterProps.md) 58 | 59 | ## Type Aliases 60 | 61 | - [Adapter](type-aliases/Adapter.md) 62 | - [MessageSignerWalletAdapter](type-aliases/MessageSignerWalletAdapter.md) 63 | - [SignerWalletAdapter](type-aliases/SignerWalletAdapter.md) 64 | - [SupportedTransactionVersions](type-aliases/SupportedTransactionVersions.md) 65 | - [TransactionOrVersionedTransaction](type-aliases/TransactionOrVersionedTransaction.md) 66 | - [WalletAdapter](type-aliases/WalletAdapter.md) 67 | - [WalletName](type-aliases/WalletName.md) 68 | 69 | ## Functions 70 | 71 | - [scopePollingDetectionStrategy](functions/scopePollingDetectionStrategy.md) 72 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/Deployment.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / Deployment 6 | 7 | # Class: Deployment 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/deployment.ts:9](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/deployment.ts#L9) 10 | 11 | ## Implements 12 | 13 | - [`AleoDeployment`](../interfaces/AleoDeployment.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new Deployment**(`address`, `chainId`, `program`, `fee`, `feePrivate`): `Deployment` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/deployment.ts:16](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/deployment.ts#L16) 22 | 23 | #### Parameters 24 | 25 | ##### address 26 | 27 | `string` 28 | 29 | ##### chainId 30 | 31 | `string` 32 | 33 | ##### program 34 | 35 | `string` 36 | 37 | ##### fee 38 | 39 | `number` 40 | 41 | ##### feePrivate 42 | 43 | `boolean` = `true` 44 | 45 | #### Returns 46 | 47 | `Deployment` 48 | 49 | ## Properties 50 | 51 | ### address 52 | 53 | > **address**: `string` 54 | 55 | Defined in: [aleo-wallet-adapter/packages/core/base/deployment.ts:10](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/deployment.ts#L10) 56 | 57 | #### Implementation of 58 | 59 | [`AleoDeployment`](../interfaces/AleoDeployment.md).[`address`](../interfaces/AleoDeployment.md#address) 60 | 61 | *** 62 | 63 | ### chainId 64 | 65 | > **chainId**: `string` 66 | 67 | Defined in: [aleo-wallet-adapter/packages/core/base/deployment.ts:11](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/deployment.ts#L11) 68 | 69 | #### Implementation of 70 | 71 | [`AleoDeployment`](../interfaces/AleoDeployment.md).[`chainId`](../interfaces/AleoDeployment.md#chainid) 72 | 73 | *** 74 | 75 | ### fee 76 | 77 | > **fee**: `number` 78 | 79 | Defined in: [aleo-wallet-adapter/packages/core/base/deployment.ts:13](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/deployment.ts#L13) 80 | 81 | #### Implementation of 82 | 83 | [`AleoDeployment`](../interfaces/AleoDeployment.md).[`fee`](../interfaces/AleoDeployment.md#fee) 84 | 85 | *** 86 | 87 | ### feePrivate 88 | 89 | > **feePrivate**: `boolean` 90 | 91 | Defined in: [aleo-wallet-adapter/packages/core/base/deployment.ts:14](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/deployment.ts#L14) 92 | 93 | #### Implementation of 94 | 95 | [`AleoDeployment`](../interfaces/AleoDeployment.md).[`feePrivate`](../interfaces/AleoDeployment.md#feeprivate) 96 | 97 | *** 98 | 99 | ### program 100 | 101 | > **program**: `string` 102 | 103 | Defined in: [aleo-wallet-adapter/packages/core/base/deployment.ts:12](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/deployment.ts#L12) 104 | 105 | #### Implementation of 106 | 107 | [`AleoDeployment`](../interfaces/AleoDeployment.md).[`program`](../interfaces/AleoDeployment.md#program) 108 | -------------------------------------------------------------------------------- /packages/ui/src/WalletMultiButton.tsx: -------------------------------------------------------------------------------- 1 | import type { FC } from 'react'; 2 | import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; 3 | import { useWallet } from '@demox-labs/aleo-wallet-adapter-react'; 4 | import type { ButtonProps } from './Button'; 5 | import { Button } from './Button'; 6 | import { useWalletModal } from './useWalletModal'; 7 | import { WalletConnectButton } from './WalletConnectButton'; 8 | import { WalletIcon } from './WalletIcon'; 9 | import { WalletModalButton } from './WalletModalButton'; 10 | 11 | export const WalletMultiButton: FC = ({ children, ...props }) => { 12 | const { publicKey, wallet, disconnect } = useWallet(); 13 | const { setVisible } = useWalletModal(); 14 | const [copied, setCopied] = useState(false); 15 | const [active, setActive] = useState(false); 16 | const ref = useRef(null); 17 | 18 | const base58 = useMemo(() => publicKey?.toString(), [publicKey]); 19 | const content = useMemo(() => { 20 | if (children) return children; 21 | if (!wallet || !base58) return null; 22 | return base58.slice(0, 4) + '..' + base58.slice(-4); 23 | }, [children, wallet, base58]); 24 | 25 | const copyAddress = useCallback(async () => { 26 | if (base58) { 27 | await navigator.clipboard.writeText(base58); 28 | setCopied(true); 29 | setTimeout(() => setCopied(false), 400); 30 | } 31 | }, [base58]); 32 | 33 | const openDropdown = useCallback(() => { 34 | setActive(true); 35 | }, []); 36 | 37 | const closeDropdown = useCallback(() => { 38 | setActive(false); 39 | }, []); 40 | 41 | const openModal = useCallback(() => { 42 | setVisible(true); 43 | closeDropdown(); 44 | }, [setVisible, closeDropdown]); 45 | 46 | useEffect(() => { 47 | const listener = (event: MouseEvent | TouchEvent) => { 48 | const node = ref.current; 49 | 50 | // Do nothing if clicking dropdown or its descendants 51 | if (!node || node.contains(event.target as Node)) return; 52 | 53 | closeDropdown(); 54 | }; 55 | 56 | document.addEventListener('mousedown', listener); 57 | document.addEventListener('touchstart', listener); 58 | 59 | return () => { 60 | document.removeEventListener('mousedown', listener); 61 | document.removeEventListener('touchstart', listener); 62 | }; 63 | }, [ref, closeDropdown]); 64 | 65 | if (!wallet) return {children}; 66 | if (!base58) return {children}; 67 | 68 | return ( 69 |
    70 | 80 |
      86 |
    • 87 | {copied ? 'Copied' : 'Copy address'} 88 |
    • 89 |
    • 90 | Change wallet 91 |
    • 92 |
    • 93 | Disconnect 94 |
    • 95 |
    96 |
    97 | ); 98 | }; 99 | -------------------------------------------------------------------------------- /packages/core/base/docs/interfaces/WalletAdapterProps.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletAdapterProps 6 | 7 | # Interface: WalletAdapterProps\ 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:18](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L18) 10 | 11 | ## Extended by 12 | 13 | - [`SignerWalletAdapterProps`](SignerWalletAdapterProps.md) 14 | - [`MessageSignerWalletAdapterProps`](MessageSignerWalletAdapterProps.md) 15 | 16 | ## Type Parameters 17 | 18 | ### Name 19 | 20 | `Name` *extends* `string` = `string` 21 | 22 | ## Properties 23 | 24 | ### connected 25 | 26 | > **connected**: `boolean` 27 | 28 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:25](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L25) 29 | 30 | *** 31 | 32 | ### connecting 33 | 34 | > **connecting**: `boolean` 35 | 36 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:24](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L24) 37 | 38 | *** 39 | 40 | ### icon 41 | 42 | > **icon**: `string` 43 | 44 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:21](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L21) 45 | 46 | *** 47 | 48 | ### name 49 | 50 | > **name**: [`WalletName`](../type-aliases/WalletName.md)\<`Name`\> 51 | 52 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:19](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L19) 53 | 54 | *** 55 | 56 | ### publicKey 57 | 58 | > **publicKey**: `string` 59 | 60 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:23](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L23) 61 | 62 | *** 63 | 64 | ### readyState 65 | 66 | > **readyState**: [`WalletReadyState`](../enumerations/WalletReadyState.md) 67 | 68 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:22](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L22) 69 | 70 | *** 71 | 72 | ### supportedTransactionVersions 73 | 74 | > **supportedTransactionVersions**: `ReadonlySet` 75 | 76 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:26](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L26) 77 | 78 | *** 79 | 80 | ### url 81 | 82 | > **url**: `string` 83 | 84 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:20](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L20) 85 | 86 | ## Methods 87 | 88 | ### connect() 89 | 90 | > **connect**(`decryptPermission`, `network`, `programs?`): `Promise`\<`void`\> 91 | 92 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:28](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L28) 93 | 94 | #### Parameters 95 | 96 | ##### decryptPermission 97 | 98 | [`DecryptPermission`](../enumerations/DecryptPermission.md) 99 | 100 | ##### network 101 | 102 | [`WalletAdapterNetwork`](../enumerations/WalletAdapterNetwork.md) 103 | 104 | ##### programs? 105 | 106 | `string`[] 107 | 108 | #### Returns 109 | 110 | `Promise`\<`void`\> 111 | 112 | *** 113 | 114 | ### disconnect() 115 | 116 | > **disconnect**(): `Promise`\<`void`\> 117 | 118 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:29](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L29) 119 | 120 | #### Returns 121 | 122 | `Promise`\<`void`\> 123 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletLoadError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletLoadError 6 | 7 | # Class: WalletLoadError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:15](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L15) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletLoadError**(`message?`, `error?`): `WalletLoadError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletLoadError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletLoadError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:16](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L16) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletConfigError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletConfigError 6 | 7 | # Class: WalletConfigError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:19](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L19) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletConfigError**(`message?`, `error?`): `WalletConfigError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletConfigError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletConfigError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:20](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L20) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletAccountError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletAccountError 6 | 7 | # Class: WalletAccountError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:39](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L39) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletAccountError**(`message?`, `error?`): `WalletAccountError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletAccountError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletAccountError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:40](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L40) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletKeypairError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletKeypairError 6 | 7 | # Class: WalletKeypairError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:47](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L47) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletKeypairError**(`message?`, `error?`): `WalletKeypairError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletKeypairError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletKeypairError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:48](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L48) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletRecordsError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletRecordsError 6 | 7 | # Class: WalletRecordsError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:87](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L87) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletRecordsError**(`message?`, `error?`): `WalletRecordsError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletRecordsError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletRecordsError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:88](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L88) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletTimeoutError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletTimeoutError 6 | 7 | # Class: WalletTimeoutError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:67](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L67) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletTimeoutError**(`message?`, `error?`): `WalletTimeoutError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletTimeoutError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletTimeoutError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:68](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L68) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletNotReadyError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletNotReadyError 6 | 7 | # Class: WalletNotReadyError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:11](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L11) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletNotReadyError**(`message?`, `error?`): `WalletNotReadyError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletNotReadyError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletNotReadyError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:12](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L12) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletPublicKeyError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletPublicKeyError 6 | 7 | # Class: WalletPublicKeyError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:43](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L43) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletPublicKeyError**(`message?`, `error?`): `WalletPublicKeyError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletPublicKeyError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletPublicKeyError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:44](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L44) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/Transaction.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / Transaction 6 | 7 | # Class: Transaction 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:28](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L28) 10 | 11 | ## Implements 12 | 13 | - [`AleoTransaction`](../interfaces/AleoTransaction.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new Transaction**(`address`, `chainId`, `transitions`, `fee`, `feePrivate`): `Transaction` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:35](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L35) 22 | 23 | #### Parameters 24 | 25 | ##### address 26 | 27 | `string` 28 | 29 | ##### chainId 30 | 31 | `string` 32 | 33 | ##### transitions 34 | 35 | [`AleoTransition`](../interfaces/AleoTransition.md)[] 36 | 37 | ##### fee 38 | 39 | `number` 40 | 41 | ##### feePrivate 42 | 43 | `boolean` = `true` 44 | 45 | #### Returns 46 | 47 | `Transaction` 48 | 49 | ## Properties 50 | 51 | ### address 52 | 53 | > **address**: `string` 54 | 55 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:29](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L29) 56 | 57 | #### Implementation of 58 | 59 | [`AleoTransaction`](../interfaces/AleoTransaction.md).[`address`](../interfaces/AleoTransaction.md#address) 60 | 61 | *** 62 | 63 | ### chainId 64 | 65 | > **chainId**: `string` 66 | 67 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:30](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L30) 68 | 69 | #### Implementation of 70 | 71 | [`AleoTransaction`](../interfaces/AleoTransaction.md).[`chainId`](../interfaces/AleoTransaction.md#chainid) 72 | 73 | *** 74 | 75 | ### fee 76 | 77 | > **fee**: `number` 78 | 79 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:32](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L32) 80 | 81 | #### Implementation of 82 | 83 | [`AleoTransaction`](../interfaces/AleoTransaction.md).[`fee`](../interfaces/AleoTransaction.md#fee) 84 | 85 | *** 86 | 87 | ### feePrivate 88 | 89 | > **feePrivate**: `boolean` 90 | 91 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:33](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L33) 92 | 93 | #### Implementation of 94 | 95 | [`AleoTransaction`](../interfaces/AleoTransaction.md).[`feePrivate`](../interfaces/AleoTransaction.md#feeprivate) 96 | 97 | *** 98 | 99 | ### transitions 100 | 101 | > **transitions**: [`AleoTransition`](../interfaces/AleoTransition.md)[] 102 | 103 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:31](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L31) 104 | 105 | #### Implementation of 106 | 107 | [`AleoTransaction`](../interfaces/AleoTransaction.md).[`transitions`](../interfaces/AleoTransaction.md#transitions) 108 | 109 | ## Methods 110 | 111 | ### createTransaction() 112 | 113 | > `static` **createTransaction**(`address`, `chainId`, `program`, `functionName`, `inputs`, `fee`, `feePrivate`): `Transaction` 114 | 115 | Defined in: [aleo-wallet-adapter/packages/core/base/transaction.ts:43](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/transaction.ts#L43) 116 | 117 | #### Parameters 118 | 119 | ##### address 120 | 121 | `string` 122 | 123 | ##### chainId 124 | 125 | `string` 126 | 127 | ##### program 128 | 129 | `string` 130 | 131 | ##### functionName 132 | 133 | `string` 134 | 135 | ##### inputs 136 | 137 | `any`[] 138 | 139 | ##### fee 140 | 141 | `number` 142 | 143 | ##### feePrivate 144 | 145 | `boolean` = `true` 146 | 147 | #### Returns 148 | 149 | `Transaction` 150 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletConnectionError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletConnectionError 6 | 7 | # Class: WalletConnectionError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:23](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L23) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletConnectionError**(`message?`, `error?`): `WalletConnectionError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletConnectionError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletConnectionError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:24](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L24) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletDecryptionError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletDecryptionError 6 | 7 | # Class: WalletDecryptionError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:83](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L83) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletDecryptionError**(`message?`, `error?`): `WalletDecryptionError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletDecryptionError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletDecryptionError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:84](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L84) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletNotSelectedError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletNotSelectedError 6 | 7 | # Class: WalletNotSelectedError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:27](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L27) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletNotSelectedError**(`message?`, `error?`): `WalletNotSelectedError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletNotSelectedError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletNotSelectedError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:28](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L28) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletSignMessageError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletSignMessageError 6 | 7 | # Class: WalletSignMessageError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:59](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L59) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletSignMessageError**(`message?`, `error?`): `WalletSignMessageError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletSignMessageError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletSignMessageError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:60](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L60) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletTransactionError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletTransactionError 6 | 7 | # Class: WalletTransactionError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:91](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L91) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletTransactionError**(`message?`, `error?`): `WalletTransactionError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletTransactionError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletTransactionError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:92](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L92) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletDisconnectedError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletDisconnectedError 6 | 7 | # Class: WalletDisconnectedError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:31](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L31) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletDisconnectedError**(`message?`, `error?`): `WalletDisconnectedError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletDisconnectedError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletDisconnectedError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:32](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L32) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletNotConnectedError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletNotConnectedError 6 | 7 | # Class: WalletNotConnectedError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:51](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L51) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletNotConnectedError**(`message?`, `error?`): `WalletNotConnectedError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletNotConnectedError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletNotConnectedError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:52](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L52) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletWindowClosedError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletWindowClosedError 6 | 7 | # Class: WalletWindowClosedError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:75](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L75) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletWindowClosedError**(`message?`, `error?`): `WalletWindowClosedError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletWindowClosedError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletWindowClosedError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:76](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L76) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletDisconnectionError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletDisconnectionError 6 | 7 | # Class: WalletDisconnectionError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:35](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L35) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletDisconnectionError**(`message?`, `error?`): `WalletDisconnectionError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletDisconnectionError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletDisconnectionError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:36](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L36) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletWindowBlockedError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletWindowBlockedError 6 | 7 | # Class: WalletWindowBlockedError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:71](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L71) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletWindowBlockedError**(`message?`, `error?`): `WalletWindowBlockedError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletWindowBlockedError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletWindowBlockedError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:72](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L72) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletSendTransactionError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletSendTransactionError 6 | 7 | # Class: WalletSendTransactionError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:55](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L55) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletSendTransactionError**(`message?`, `error?`): `WalletSendTransactionError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletSendTransactionError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletSendTransactionError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:56](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L56) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletSignTransactionError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletSignTransactionError 6 | 7 | # Class: WalletSignTransactionError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:63](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L63) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletSignTransactionError**(`message?`, `error?`): `WalletSignTransactionError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletSignTransactionError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletSignTransactionError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:64](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L64) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletDecryptionNotAllowedError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletDecryptionNotAllowedError 6 | 7 | # Class: WalletDecryptionNotAllowedError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:79](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L79) 10 | 11 | ## Extends 12 | 13 | - [`WalletError`](WalletError.md) 14 | 15 | ## Constructors 16 | 17 | ### Constructor 18 | 19 | > **new WalletDecryptionNotAllowedError**(`message?`, `error?`): `WalletDecryptionNotAllowedError` 20 | 21 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 22 | 23 | #### Parameters 24 | 25 | ##### message? 26 | 27 | `string` 28 | 29 | ##### error? 30 | 31 | `any` 32 | 33 | #### Returns 34 | 35 | `WalletDecryptionNotAllowedError` 36 | 37 | #### Inherited from 38 | 39 | [`WalletError`](WalletError.md).[`constructor`](WalletError.md#constructor) 40 | 41 | ## Properties 42 | 43 | ### cause? 44 | 45 | > `optional` **cause**: `unknown` 46 | 47 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 48 | 49 | #### Inherited from 50 | 51 | [`WalletError`](WalletError.md).[`cause`](WalletError.md#cause) 52 | 53 | *** 54 | 55 | ### error 56 | 57 | > **error**: `any` 58 | 59 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 60 | 61 | #### Inherited from 62 | 63 | [`WalletError`](WalletError.md).[`error`](WalletError.md#error) 64 | 65 | *** 66 | 67 | ### message 68 | 69 | > **message**: `string` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 72 | 73 | #### Inherited from 74 | 75 | [`WalletError`](WalletError.md).[`message`](WalletError.md#message) 76 | 77 | *** 78 | 79 | ### name 80 | 81 | > **name**: `string` = `'WalletDecryptionNotAllowedError'` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:80](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L80) 84 | 85 | #### Overrides 86 | 87 | [`WalletError`](WalletError.md).[`name`](WalletError.md#name) 88 | 89 | *** 90 | 91 | ### stack? 92 | 93 | > `optional` **stack**: `string` 94 | 95 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 96 | 97 | #### Inherited from 98 | 99 | [`WalletError`](WalletError.md).[`stack`](WalletError.md#stack) 100 | 101 | *** 102 | 103 | ### prepareStackTrace()? 104 | 105 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 106 | 107 | Defined in: node\_modules/@types/node/globals.d.ts:98 108 | 109 | Optional override for formatting stack traces 110 | 111 | #### Parameters 112 | 113 | ##### err 114 | 115 | `Error` 116 | 117 | ##### stackTraces 118 | 119 | `CallSite`[] 120 | 121 | #### Returns 122 | 123 | `any` 124 | 125 | #### See 126 | 127 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 128 | 129 | #### Inherited from 130 | 131 | [`WalletError`](WalletError.md).[`prepareStackTrace`](WalletError.md#preparestacktrace) 132 | 133 | *** 134 | 135 | ### stackTraceLimit 136 | 137 | > `static` **stackTraceLimit**: `number` 138 | 139 | Defined in: node\_modules/@types/node/globals.d.ts:100 140 | 141 | #### Inherited from 142 | 143 | [`WalletError`](WalletError.md).[`stackTraceLimit`](WalletError.md#stacktracelimit) 144 | 145 | ## Methods 146 | 147 | ### captureStackTrace() 148 | 149 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 150 | 151 | Defined in: node\_modules/@types/node/globals.d.ts:91 152 | 153 | Create .stack property on a target object 154 | 155 | #### Parameters 156 | 157 | ##### targetObject 158 | 159 | `object` 160 | 161 | ##### constructorOpt? 162 | 163 | `Function` 164 | 165 | #### Returns 166 | 167 | `void` 168 | 169 | #### Inherited from 170 | 171 | [`WalletError`](WalletError.md).[`captureStackTrace`](WalletError.md#capturestacktrace) 172 | -------------------------------------------------------------------------------- /packages/core/base/docs/classes/WalletError.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / WalletError 6 | 7 | # Class: WalletError 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:1](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L1) 10 | 11 | ## Extends 12 | 13 | - `Error` 14 | 15 | ## Extended by 16 | 17 | - [`WalletNotReadyError`](WalletNotReadyError.md) 18 | - [`WalletLoadError`](WalletLoadError.md) 19 | - [`WalletConfigError`](WalletConfigError.md) 20 | - [`WalletConnectionError`](WalletConnectionError.md) 21 | - [`WalletNotSelectedError`](WalletNotSelectedError.md) 22 | - [`WalletDisconnectedError`](WalletDisconnectedError.md) 23 | - [`WalletDisconnectionError`](WalletDisconnectionError.md) 24 | - [`WalletAccountError`](WalletAccountError.md) 25 | - [`WalletPublicKeyError`](WalletPublicKeyError.md) 26 | - [`WalletKeypairError`](WalletKeypairError.md) 27 | - [`WalletNotConnectedError`](WalletNotConnectedError.md) 28 | - [`WalletSendTransactionError`](WalletSendTransactionError.md) 29 | - [`WalletSignMessageError`](WalletSignMessageError.md) 30 | - [`WalletSignTransactionError`](WalletSignTransactionError.md) 31 | - [`WalletTimeoutError`](WalletTimeoutError.md) 32 | - [`WalletWindowBlockedError`](WalletWindowBlockedError.md) 33 | - [`WalletWindowClosedError`](WalletWindowClosedError.md) 34 | - [`WalletDecryptionNotAllowedError`](WalletDecryptionNotAllowedError.md) 35 | - [`WalletDecryptionError`](WalletDecryptionError.md) 36 | - [`WalletRecordsError`](WalletRecordsError.md) 37 | - [`WalletTransactionError`](WalletTransactionError.md) 38 | 39 | ## Constructors 40 | 41 | ### Constructor 42 | 43 | > **new WalletError**(`message?`, `error?`): `WalletError` 44 | 45 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:5](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L5) 46 | 47 | #### Parameters 48 | 49 | ##### message? 50 | 51 | `string` 52 | 53 | ##### error? 54 | 55 | `any` 56 | 57 | #### Returns 58 | 59 | `WalletError` 60 | 61 | #### Overrides 62 | 63 | `Error.constructor` 64 | 65 | ## Properties 66 | 67 | ### cause? 68 | 69 | > `optional` **cause**: `unknown` 70 | 71 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 72 | 73 | #### Inherited from 74 | 75 | `Error.cause` 76 | 77 | *** 78 | 79 | ### error 80 | 81 | > **error**: `any` 82 | 83 | Defined in: [aleo-wallet-adapter/packages/core/base/errors.ts:2](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/errors.ts#L2) 84 | 85 | *** 86 | 87 | ### message 88 | 89 | > **message**: `string` 90 | 91 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1054 92 | 93 | #### Inherited from 94 | 95 | `Error.message` 96 | 97 | *** 98 | 99 | ### name 100 | 101 | > **name**: `string` 102 | 103 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1053 104 | 105 | #### Inherited from 106 | 107 | `Error.name` 108 | 109 | *** 110 | 111 | ### stack? 112 | 113 | > `optional` **stack**: `string` 114 | 115 | Defined in: aleo-wallet-adapter/packages/core/base/node\_modules/typescript/lib/lib.es5.d.ts:1055 116 | 117 | #### Inherited from 118 | 119 | `Error.stack` 120 | 121 | *** 122 | 123 | ### prepareStackTrace()? 124 | 125 | > `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` 126 | 127 | Defined in: node\_modules/@types/node/globals.d.ts:98 128 | 129 | Optional override for formatting stack traces 130 | 131 | #### Parameters 132 | 133 | ##### err 134 | 135 | `Error` 136 | 137 | ##### stackTraces 138 | 139 | `CallSite`[] 140 | 141 | #### Returns 142 | 143 | `any` 144 | 145 | #### See 146 | 147 | https://v8.dev/docs/stack-trace-api#customizing-stack-traces 148 | 149 | #### Inherited from 150 | 151 | `Error.prepareStackTrace` 152 | 153 | *** 154 | 155 | ### stackTraceLimit 156 | 157 | > `static` **stackTraceLimit**: `number` 158 | 159 | Defined in: node\_modules/@types/node/globals.d.ts:100 160 | 161 | #### Inherited from 162 | 163 | `Error.stackTraceLimit` 164 | 165 | ## Methods 166 | 167 | ### captureStackTrace() 168 | 169 | > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 170 | 171 | Defined in: node\_modules/@types/node/globals.d.ts:91 172 | 173 | Create .stack property on a target object 174 | 175 | #### Parameters 176 | 177 | ##### targetObject 178 | 179 | `object` 180 | 181 | ##### constructorOpt? 182 | 183 | `Function` 184 | 185 | #### Returns 186 | 187 | `void` 188 | 189 | #### Inherited from 190 | 191 | `Error.captureStackTrace` 192 | -------------------------------------------------------------------------------- /packages/core/base/adapter.ts: -------------------------------------------------------------------------------- 1 | import EventEmitter from 'eventemitter3'; 2 | import type { WalletError } from './errors'; 3 | import type { SupportedTransactionVersions, DecryptPermission, WalletAdapterNetwork } from './types'; 4 | 5 | export { EventEmitter }; 6 | 7 | export interface WalletAdapterEvents { 8 | connect(publicKey: string, programs?: string[]): void; 9 | disconnect(): void; 10 | error(error: WalletError): void; 11 | readyStateChange(readyState: WalletReadyState): void; 12 | } 13 | 14 | // WalletName is a nominal type that wallet adapters should use, e.g. `'MyCryptoWallet' as WalletName<'MyCryptoWallet'>` 15 | // https://medium.com/@KevinBGreene/surviving-the-typescript-ecosystem-branding-and-type-tagging-6cf6e516523d 16 | export type WalletName = T & { __brand__: 'WalletName' }; 17 | 18 | export interface WalletAdapterProps { 19 | name: WalletName; 20 | url: string; 21 | icon: string; 22 | readyState: WalletReadyState; 23 | publicKey: string | null; 24 | connecting: boolean; 25 | connected: boolean; 26 | supportedTransactionVersions: SupportedTransactionVersions; 27 | 28 | connect(decryptPermission: DecryptPermission, network: WalletAdapterNetwork, programs?: string[]): Promise; 29 | disconnect(): Promise; 30 | } 31 | 32 | export type WalletAdapter = WalletAdapterProps & EventEmitter; 33 | 34 | /** 35 | * A wallet's readiness describes a series of states that the wallet can be in, 36 | * depending on what kind of wallet it is. An installable wallet (eg. a browser 37 | * extension like Phantom) might be `Installed` if we've found the Phantom API 38 | * in the global scope, or `NotDetected` otherwise. A loadable, zero-install 39 | * runtime (eg. Torus Wallet) might simply signal that it's `Loadable`. Use this 40 | * metadata to personalize the wallet list for each user (eg. to show their 41 | * installed wallets first). 42 | */ 43 | export enum WalletReadyState { 44 | /** 45 | * User-installable wallets can typically be detected by scanning for an API 46 | * that they've injected into the global context. If such an API is present, 47 | * we consider the wallet to have been installed. 48 | */ 49 | Installed = 'Installed', 50 | NotDetected = 'NotDetected', 51 | /** 52 | * Loadable wallets are always available to you. Since you can load them at 53 | * any time, it's meaningless to say that they have been detected. 54 | */ 55 | Loadable = 'Loadable', 56 | /** 57 | * If a wallet is not supported on a given platform (eg. server-rendering, or 58 | * mobile) then it will stay in the `Unsupported` state. 59 | */ 60 | Unsupported = 'Unsupported', 61 | } 62 | 63 | export abstract class BaseWalletAdapter 64 | extends EventEmitter 65 | implements WalletAdapter 66 | { 67 | abstract name: WalletName; 68 | abstract url: string; 69 | abstract icon: string; 70 | abstract readyState: WalletReadyState; 71 | abstract publicKey: string | null; 72 | abstract connecting: boolean; 73 | abstract supportedTransactionVersions: SupportedTransactionVersions; 74 | 75 | get connected() { 76 | return !!this.publicKey; 77 | } 78 | 79 | abstract connect(decryptPermission: DecryptPermission, network: WalletAdapterNetwork, programs?: string[]): Promise; 80 | abstract disconnect(): Promise; 81 | } 82 | 83 | export function scopePollingDetectionStrategy(detect: () => boolean): void { 84 | // Early return when server-side rendering 85 | if (typeof window === 'undefined' || typeof document === 'undefined') return; 86 | 87 | const disposers: (() => void)[] = []; 88 | 89 | function detectAndDispose() { 90 | const detected = detect(); 91 | if (detected) { 92 | for (const dispose of disposers) { 93 | dispose(); 94 | } 95 | } 96 | } 97 | 98 | // Strategy #1: Try detecting every second. 99 | const interval = 100 | // TODO: #334 Replace with idle callback strategy. 101 | setInterval(detectAndDispose, 1000); 102 | disposers.push(() => clearInterval(interval)); 103 | 104 | // Strategy #2: Detect as soon as the DOM becomes 'ready'/'interactive'. 105 | if ( 106 | // Implies that `DOMContentLoaded` has not yet fired. 107 | document.readyState === 'loading' 108 | ) { 109 | document.addEventListener('DOMContentLoaded', detectAndDispose, { once: true }); 110 | disposers.push(() => document.removeEventListener('DOMContentLoaded', detectAndDispose)); 111 | } 112 | 113 | // Strategy #3: Detect after the `window` has fully loaded. 114 | if ( 115 | // If the `complete` state has been reached, we're too late. 116 | document.readyState !== 'complete' 117 | ) { 118 | window.addEventListener('load', detectAndDispose, { once: true }); 119 | disposers.push(() => window.removeEventListener('load', detectAndDispose)); 120 | } 121 | 122 | // Strategy #4: Detect synchronously, now. 123 | detectAndDispose(); 124 | } 125 | -------------------------------------------------------------------------------- /packages/core/base/docs/interfaces/SignerWalletAdapterProps.md: -------------------------------------------------------------------------------- 1 | [**@demox-labs/aleo-wallet-adapter-base**](../README.md) 2 | 3 | *** 4 | 5 | [@demox-labs/aleo-wallet-adapter-base](../README.md) / SignerWalletAdapterProps 6 | 7 | # Interface: SignerWalletAdapterProps\ 8 | 9 | Defined in: [aleo-wallet-adapter/packages/core/base/signer.ts:8](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/signer.ts#L8) 10 | 11 | ## Extends 12 | 13 | - [`WalletAdapterProps`](WalletAdapterProps.md)\<`Name`\> 14 | 15 | ## Type Parameters 16 | 17 | ### Name 18 | 19 | `Name` *extends* `string` = `string` 20 | 21 | ## Properties 22 | 23 | ### connected 24 | 25 | > **connected**: `boolean` 26 | 27 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:25](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L25) 28 | 29 | #### Inherited from 30 | 31 | [`WalletAdapterProps`](WalletAdapterProps.md).[`connected`](WalletAdapterProps.md#connected) 32 | 33 | *** 34 | 35 | ### connecting 36 | 37 | > **connecting**: `boolean` 38 | 39 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:24](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L24) 40 | 41 | #### Inherited from 42 | 43 | [`WalletAdapterProps`](WalletAdapterProps.md).[`connecting`](WalletAdapterProps.md#connecting) 44 | 45 | *** 46 | 47 | ### icon 48 | 49 | > **icon**: `string` 50 | 51 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:21](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L21) 52 | 53 | #### Inherited from 54 | 55 | [`WalletAdapterProps`](WalletAdapterProps.md).[`icon`](WalletAdapterProps.md#icon) 56 | 57 | *** 58 | 59 | ### name 60 | 61 | > **name**: [`WalletName`](../type-aliases/WalletName.md)\<`Name`\> 62 | 63 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:19](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L19) 64 | 65 | #### Inherited from 66 | 67 | [`WalletAdapterProps`](WalletAdapterProps.md).[`name`](WalletAdapterProps.md#name-1) 68 | 69 | *** 70 | 71 | ### publicKey 72 | 73 | > **publicKey**: `string` 74 | 75 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:23](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L23) 76 | 77 | #### Inherited from 78 | 79 | [`WalletAdapterProps`](WalletAdapterProps.md).[`publicKey`](WalletAdapterProps.md#publickey) 80 | 81 | *** 82 | 83 | ### readyState 84 | 85 | > **readyState**: [`WalletReadyState`](../enumerations/WalletReadyState.md) 86 | 87 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:22](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L22) 88 | 89 | #### Inherited from 90 | 91 | [`WalletAdapterProps`](WalletAdapterProps.md).[`readyState`](WalletAdapterProps.md#readystate) 92 | 93 | *** 94 | 95 | ### supportedTransactionVersions 96 | 97 | > **supportedTransactionVersions**: `ReadonlySet` 98 | 99 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:26](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L26) 100 | 101 | #### Inherited from 102 | 103 | [`WalletAdapterProps`](WalletAdapterProps.md).[`supportedTransactionVersions`](WalletAdapterProps.md#supportedtransactionversions) 104 | 105 | *** 106 | 107 | ### url 108 | 109 | > **url**: `string` 110 | 111 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:20](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L20) 112 | 113 | #### Inherited from 114 | 115 | [`WalletAdapterProps`](WalletAdapterProps.md).[`url`](WalletAdapterProps.md#url) 116 | 117 | ## Methods 118 | 119 | ### connect() 120 | 121 | > **connect**(`decryptPermission`, `network`, `programs?`): `Promise`\<`void`\> 122 | 123 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:28](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L28) 124 | 125 | #### Parameters 126 | 127 | ##### decryptPermission 128 | 129 | [`DecryptPermission`](../enumerations/DecryptPermission.md) 130 | 131 | ##### network 132 | 133 | [`WalletAdapterNetwork`](../enumerations/WalletAdapterNetwork.md) 134 | 135 | ##### programs? 136 | 137 | `string`[] 138 | 139 | #### Returns 140 | 141 | `Promise`\<`void`\> 142 | 143 | #### Inherited from 144 | 145 | [`WalletAdapterProps`](WalletAdapterProps.md).[`connect`](WalletAdapterProps.md#connect) 146 | 147 | *** 148 | 149 | ### disconnect() 150 | 151 | > **disconnect**(): `Promise`\<`void`\> 152 | 153 | Defined in: [aleo-wallet-adapter/packages/core/base/adapter.ts:29](https://github.com/demox-labs/aleo-wallet-adapter/blob/818636b4a87a5b81f15303d0099057a3563c844a/packages/core/base/adapter.ts#L29) 154 | 155 | #### Returns 156 | 157 | `Promise`\<`void`\> 158 | 159 | #### Inherited from 160 | 161 | [`WalletAdapterProps`](WalletAdapterProps.md).[`disconnect`](WalletAdapterProps.md#disconnect) 162 | -------------------------------------------------------------------------------- /packages/core/react/useWallet.ts: -------------------------------------------------------------------------------- 1 | import { createContext, useContext } from 'react'; 2 | import { 3 | Adapter, 4 | AleoTransaction, 5 | AleoDeployment, 6 | DecryptPermission, 7 | MessageSignerWalletAdapterProps, 8 | WalletAdapterNetwork, 9 | WalletName, 10 | WalletReadyState 11 | } from '@demox-labs/aleo-wallet-adapter-base'; 12 | 13 | export interface Wallet { 14 | adapter: Adapter; 15 | readyState: WalletReadyState; 16 | } 17 | 18 | export interface WalletContextState { 19 | autoConnect: boolean; 20 | wallets: Wallet[]; 21 | wallet: Wallet | null; 22 | publicKey: string | null; 23 | connecting: boolean; 24 | connected: boolean; 25 | disconnecting: boolean; 26 | 27 | select(walletName: WalletName): void; 28 | connect(decryptPermission: DecryptPermission, network: WalletAdapterNetwork, programs?: string[]): Promise; 29 | disconnect(): Promise; 30 | 31 | signMessage: MessageSignerWalletAdapterProps['signMessage'] | undefined; 32 | decrypt: MessageSignerWalletAdapterProps['decrypt'] | undefined; 33 | requestRecords: MessageSignerWalletAdapterProps['requestRecords'] | undefined; 34 | requestTransaction: MessageSignerWalletAdapterProps['requestTransaction'] | undefined; 35 | requestExecution: MessageSignerWalletAdapterProps['requestExecution'] | undefined; 36 | requestBulkTransactions: MessageSignerWalletAdapterProps['requestBulkTransactions'] | undefined; 37 | requestDeploy: MessageSignerWalletAdapterProps['requestDeploy'] | undefined; 38 | transactionStatus: MessageSignerWalletAdapterProps['transactionStatus'] | undefined; 39 | transitionViewKeys: MessageSignerWalletAdapterProps['transitionViewKeys'] | undefined; 40 | getExecution: MessageSignerWalletAdapterProps['getExecution'] | undefined; 41 | requestRecordPlaintexts: MessageSignerWalletAdapterProps['requestRecordPlaintexts'] | undefined; 42 | requestTransactionHistory: MessageSignerWalletAdapterProps['requestTransactionHistory'] | undefined; 43 | } 44 | 45 | const EMPTY_ARRAY: never[] = []; 46 | 47 | const DEFAULT_CONTEXT = { 48 | autoConnect: false, 49 | connecting: false, 50 | connected: false, 51 | disconnecting: false, 52 | select(_name: WalletName) { 53 | console.error(constructMissingProviderErrorMessage('get', 'select')); 54 | }, 55 | connect(_decryptPermission: DecryptPermission, _network: WalletAdapterNetwork, _programs?: string[]) { 56 | return Promise.reject(console.error(constructMissingProviderErrorMessage('get', 'connect'))); 57 | }, 58 | disconnect() { 59 | return Promise.reject(console.error(constructMissingProviderErrorMessage('get', 'disconnect'))); 60 | }, 61 | signMessage(_message: Uint8Array) { 62 | return Promise.reject(console.error(constructMissingProviderErrorMessage('get', 'signMessage'))); 63 | }, 64 | decrypt(_cipherText: string, _tpk?: string, _programId?: string, _functionName?: string, _index?: number) { 65 | return Promise.reject(console.error(constructMissingProviderErrorMessage('get', 'decrypt'))); 66 | }, 67 | requestRecords(_program: string) { 68 | return Promise.reject(console.error(constructMissingProviderErrorMessage('get', 'requestRecords'))); 69 | }, 70 | requestTransaction(_transaction: AleoTransaction) { 71 | return Promise.reject(console.error(constructMissingProviderErrorMessage('get', 'requestTransaction'))); 72 | }, 73 | requestExecution(_execution: AleoTransaction) { 74 | return Promise.reject(console.error(constructMissingProviderErrorMessage('get', 'requestExecution'))); 75 | }, 76 | requestBulkTransactions(_transactions: AleoTransaction[]) { 77 | return Promise.reject(console.error(constructMissingProviderErrorMessage('get', 'requestBulkTransactions'))); 78 | }, 79 | requestDeploy(_deployment: AleoDeployment) { 80 | return Promise.reject(console.error(constructMissingProviderErrorMessage('get', 'requestDeploy'))); 81 | }, 82 | transactionStatus(_transactionId: string) { 83 | return Promise.reject(console.error(constructMissingProviderErrorMessage('get', 'transactionStatus'))); 84 | }, 85 | transitionViewKeys(_transactionId: string) { 86 | return Promise.reject(console.error(constructMissingProviderErrorMessage('get', 'transitionViewKeys'))); 87 | }, 88 | getExecution(_transactionId: string) { 89 | return Promise.reject(console.error(constructMissingProviderErrorMessage('get', 'getExecution'))); 90 | }, 91 | requestRecordPlaintexts(_program: string) { 92 | return Promise.reject(console.error(constructMissingProviderErrorMessage('get', 'requestRecordPlaintexts'))); 93 | }, 94 | requestTransactionHistory(_program: string) { 95 | return Promise.reject(console.error(constructMissingProviderErrorMessage('get', 'requestTransactionHistory'))); 96 | } 97 | } as WalletContextState; 98 | Object.defineProperty(DEFAULT_CONTEXT, 'wallets', { 99 | get() { 100 | console.error(constructMissingProviderErrorMessage('read', 'wallets')); 101 | return EMPTY_ARRAY; 102 | }, 103 | }); 104 | Object.defineProperty(DEFAULT_CONTEXT, 'wallet', { 105 | get() { 106 | console.error(constructMissingProviderErrorMessage('read', 'wallet')); 107 | return null; 108 | }, 109 | }); 110 | Object.defineProperty(DEFAULT_CONTEXT, 'publicKey', { 111 | get() { 112 | console.error(constructMissingProviderErrorMessage('read', 'publicKey')); 113 | return null; 114 | }, 115 | }); 116 | 117 | function constructMissingProviderErrorMessage(action: string, valueName: string) { 118 | return ( 119 | 'You have tried to ' + 120 | ` ${action} "${valueName}"` + 121 | ' on a WalletContext without providing one.' + 122 | ' Make sure to render a WalletProvider' + 123 | ' as an ancestor of the component that uses ' + 124 | 'WalletContext' 125 | ); 126 | } 127 | 128 | export const WalletContext = createContext(DEFAULT_CONTEXT as WalletContextState); 129 | 130 | export function useWallet(): WalletContextState { 131 | return useContext(WalletContext); 132 | } 133 | --------------------------------------------------------------------------------