This is the full developer documentation for iso-filecoin # Filecoin Javascript Standard Library > Connect apps to the Filecoin blockchain with iso-filecoin ## Features [Section titled “Features”](#features) Core Primitives It provides core utilities, abstractions and types for primitives such as: RPC, Signature, Address, Token, Chain, Wallet and more. Ledger Support Provides an API for the Filecoin Ledger embedded app. React Hooks React hooks for wallet, account, balance, transations, signing and more. Wallet Adapters Connect to all the Filecoin Wallets with one single interface, support for Filsnap, Ledger and more. AI support Index this website with your editor and add to your LLM context easily with `llms.txt` support. ## Support [Section titled “Support”](#support) Help support future development and make iso-filecoin a sustainable open-source project: * [GitHub Sponsors](https://github.com/sponsors/hugomrdias) * [Drips](https://filecoin.drips.network/app/projects/github/hugomrdias/filecoin) * [hugomrdias.eth](https://etherscan.io/address/0xb959b6fF9ED21CfD15EEC2BEC15d1C5b87df7F42) # Wallet Adapters > Learn how to use wallet adapters with iso-filecoin-wallets. The `iso-filecoin-wallets` package provides a standardized way to interact with different types of Filecoin wallets through a common interface called `WalletAdapter`. It includes built-in adapters for Hierarchical Deterministic (HD) wallets, wallets created directly from a raw private key and those for browser extensions (e.g., Filsnap/Metamask) or hardware wallets (e.g., Ledger). ## Installation [Section titled “Installation”](#installation) You’ll need `iso-filecoin-wallets` and its peer dependency `iso-filecoin`. If you plan to use external adapters, install them as well. ```bash # Using pnpm (recommended for this monorepo) pnpm add iso-filecoin-wallets iso-filecoin # Example: add Filsnap adapter if needed pnpm add filsnap-adapter ``` ## Core Concept: WalletAdapter [Section titled “Core Concept: WalletAdapter”](#core-concept-walletadapter) All wallet interactions are managed through instances of classes that implement the `WalletAdapter` interface (or extend the `BaseWalletAdapter` class). This ensures a consistent API regardless of the underlying wallet type. Key characteristics of a `WalletAdapter`: * **State Management:** Tracks connection status (`connecting`, `connected`), current account (`account`), and network (`network`). * **Events:** Emits events for `connect`, `disconnect`, `accountChanged`, `networkChanged`, and `error`. * **Actions:** Provides methods like `connect()`, `disconnect()`, `changeNetwork()`, `signMessage()`, `sign()`, and potentially wallet-specific methods like `deriveAccount()`. ## Using Built-in Adapters [Section titled “Using Built-in Adapters”](#using-built-in-adapters) You typically instantiate the specific adapter class you need and then interact with its methods and properties. ### HD Wallet (`WalletAdapterHD`) [Section titled “HD Wallet (WalletAdapterHD)”](#hd-wallet-walletadapterhd) This adapter uses a mnemonic phrase to derive accounts according to standard derivation paths (BIP-44 for Filecoin). index.ts ```ts import { class WalletAdapterHd HD wallet implementation @implements ― WalletAdapter - WalletAdapter WalletAdapterHd } from 'iso-filecoin-wallets'; import { const testnet: Chain Filecoin EVM Calibration testnet chain @type ― {import('./types.js').Chain} testnet } from 'iso-filecoin/chains'; // Or mainnet // Instantiate with mnemonic and optional parameters const const hdAdapter: WalletAdapterHd hdAdapter = class WalletAdapterHd HD wallet implementation @implements ― WalletAdapter - WalletAdapter WalletAdapterHd. WalletAdapterHd.fromMnemonic(config: WalletHDMnemonicConfig): WalletAdapterHd HD wallet from mnemonic @param ― config @returns fromMnemonic ({ WalletHDMnemonicConfig.mnemonic: string mnemonic: 'raw include ecology social turtle still perfect trip dance food welcome aunt patient very toss very program estate diet portion city camera loop guess', WalletHDMnemonicConfig.password?: string password: '123456', index?: number Derivation path address index @default ― 0 index: 0, name?: string Wallet name name: 'My HD Wallet', network?: Network Network @default ― mainnet network: 'testnet', // Initial network // signatureType: 'SECP256K1', // Default type }); async function function useHDWallet(): Promise useHDWallet() { // Check if the environment supports the adapter (mostly relevant for browser extensions) await const hdAdapter: WalletAdapterHd hdAdapter. WalletAdapterHd.checkSupport(): Promise Check if this wallet adapter is supported in the current environment checkSupport(); if ( const hdAdapter: WalletAdapterHd hdAdapter. WalletAdapterHd.support: "NotChecked" | "Detected" | "NotDetected" | "NotSupported" Wallet support status (NotChecked, Detected, NotDetected, NotSupported) support === 'NotSupported') { var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.error(message?: any, ...optionalParams: any[]): void Prints to stderr with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const code = 5; console.error('error #%d', code); // Prints: error #5, to stderr console.error('error', code); // Prints: error 5, to stderr If formatting elements (e.g. %d) are not found in the first string then util.inspect() is called on each argument and the resulting string values are concatenated. See util.format() for more information. @since ― v0.1.100 error('HD Wallet adapter not supported in this environment.'); return; } // Connect to the wallet (derives the account at the specified path) var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Connecting...'); await const hdAdapter: WalletAdapterHd hdAdapter. WalletAdapterHd.connect(params?: { network?: Network; }): Promise<{ account: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").IAccount; network: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network; }> Connect to the wallet @param ― params connect({ network?: Network network: 'testnet' }); // Can override network here if (! const hdAdapter: WalletAdapterHd hdAdapter. WalletAdapterHd.connected: boolean Whether the wallet is currently connected connected || ! const hdAdapter: WalletAdapterHd hdAdapter. WalletAdapterHd.account: IAccount | undefined Currently active account, if connected @type ― {IAccount | undefined} account) { var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.error(message?: any, ...optionalParams: any[]): void Prints to stderr with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const code = 5; console.error('error #%d', code); // Prints: error #5, to stderr console.error('error', code); // Prints: error 5, to stderr If formatting elements (e.g. %d) are not found in the first string then util.inspect() is called on each argument and the resulting string values are concatenated. See util.format() for more information. @since ― v0.1.100 error('Connection failed.'); return; } var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Connected!'); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Adapter Name:', const hdAdapter: WalletAdapterHd hdAdapter. WalletAdapterHd.name: string Human readable wallet name name); // 'HD Wallet' var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Network:', const hdAdapter: WalletAdapterHd hdAdapter. WalletAdapterHd.network: Network Current network (mainnet or testnet) network); // 'testnet' var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Account Address:', const hdAdapter: WalletAdapterHd hdAdapter. WalletAdapterHd.account: IAccount Currently active account, if connected @type ― {IAccount | undefined} account. IAccount.address: IAddress address. IAddress.toString: () => string toString()); // e.g., t1... var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Account Type:', const hdAdapter: WalletAdapterHd hdAdapter. WalletAdapterHd.account: IAccount Currently active account, if connected @type ― {IAccount | undefined} account. IAccount.type: "SECP256K1" | "BLS" type); // 'SECP256K1' // Derive another account (index 1) var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Deriving account 1...'); const const account1: IAccount account1 = await const hdAdapter: WalletAdapterHd hdAdapter. WalletAdapterHd.deriveAccount(index: number): Promise Derive a new account at the given index @param ― index deriveAccount(1); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Account 1 Address:', const account1: IAccount account1. IAccount.address: IAddress address. IAddress.toString: () => string toString()); // Sign a message (raw bytes) const const message: NodeJS.NonSharedUint8Array message = new var TextEncoder: new () => TextEncoder TextEncoder class is a global reference for import { TextEncoder } from 'node:util' https://nodejs.org/api/globals.html#textencoder @since ― v11.0.0 TextEncoder(). TextEncoder.encode(input?: string): NodeJS.NonSharedUint8Array UTF-8 encodes the input string and returns a Uint8Array containing the encoded bytes. @param ― input The text to encode. encode('Hello Filecoin!'); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Signing message...'); const const signature: Signature signature = await const hdAdapter: WalletAdapterHd hdAdapter. WalletAdapterHd.sign(data: Uint8Array): Promise Sign raw bytes @param ― data - Data to sign sign( const message: NodeJS.NonSharedUint8Array message); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Signature:', const signature: Signature signature); // Uint8Array // Change network var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Changing network to mainnet...'); const { const network: Network network, const account: IAccount account } = await const hdAdapter: WalletAdapterHd hdAdapter. WalletAdapterHd.changeNetwork(network: Network): Promise<{ account: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").IAccount; network: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network; }> Change the network and derive a new account @param ― network changeNetwork('mainnet'); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('New Network:', const network: Network network); // 'mainnet' var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('New Address:', const account: IAccount account. IAccount.address: IAddress address. IAddress.toString: () => string toString()); // e.g., f1... // Disconnect var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Disconnecting...'); await const hdAdapter: WalletAdapterHd hdAdapter. WalletAdapterHd.disconnect(): Promise Disconnect from the wallet disconnect(); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Disconnected:', ! const hdAdapter: WalletAdapterHd hdAdapter. WalletAdapterHd.connected: true Whether the wallet is currently connected connected); // true } function useHDWallet(): Promise useHDWallet(); ``` ### Raw Private Key (`WalletAdapterRaw`) [Section titled “Raw Private Key (WalletAdapterRaw)”](#raw-private-key-walletadapterraw) This adapter uses a specific private key directly. It’s simpler but less flexible and generally less secure than HD wallets for managing multiple accounts or for user-facing applications. index.ts ```ts import { class WalletAdapterRaw Raw wallet implementation @implements ― WalletAdapter - WalletAdapter WalletAdapterRaw } from 'iso-filecoin-wallets'; import { const base64pad: Codec base64pad } from 'iso-base/rfc4648' import { const testnet: Chain Filecoin EVM Calibration testnet chain @type ― {import('./types.js').Chain} testnet } from 'iso-filecoin/chains'; // Or mainnet // SECP256k1 Private Key (example, DO NOT USE REAL KEYS LIKE THIS) const const privateKey: "Un+VV/HZZ1YtfC1i4LULcvko0dV7F6CbQmnhSuUJRPU=" privateKey = 'Un+VV/HZZ1YtfC1i4LULcvko0dV7F6CbQmnhSuUJRPU='; // Instantiate with private key and optional parameters const const rawAdapter: WalletAdapterRaw rawAdapter = new new WalletAdapterRaw(config: import("/opt/buildhome/repo/packages/iso-filecoin-wallets/dist/src/types").WalletConfig & ({ privateKey: Uint8Array; })): WalletAdapterRaw @param ― config WalletAdapterRaw({ privateKey: Uint8Array privateKey: const base64pad: Codec base64pad. Codec.decode: (data: Uint8Array | string) => Uint8Array decode( const privateKey: "Un+VV/HZZ1YtfC1i4LULcvko0dV7F6CbQmnhSuUJRPU=" privateKey), WalletConfig.signatureType?: "SECP256K1" | "BLS" Signature type @default ― SECP256K1 signatureType: 'SECP256K1', // Must match the private key type WalletConfig.network?: Network Network @default ― mainnet network: 'testnet', // Initial network }); async function function useRawWallet(): Promise useRawWallet() { await const rawAdapter: WalletAdapterRaw rawAdapter. WalletAdapterRaw.checkSupport(): Promise Check if this wallet adapter is supported in the current environment checkSupport(); // Always supported var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Connecting...'); await const rawAdapter: WalletAdapterRaw rawAdapter. WalletAdapterRaw.connect(params?: { network?: Network; }): Promise<{ account: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").IAccount; network: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network; }> Connect to the wallet @param ― params connect({ network?: Network network: 'testnet' }); if (! const rawAdapter: WalletAdapterRaw rawAdapter. WalletAdapterRaw.connected: boolean Whether the wallet is currently connected connected || ! const rawAdapter: WalletAdapterRaw rawAdapter. WalletAdapterRaw.account: IAccount | undefined Currently active account, if connected @type ― {IAccount | undefined} account) { var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.error(message?: any, ...optionalParams: any[]): void Prints to stderr with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const code = 5; console.error('error #%d', code); // Prints: error #5, to stderr console.error('error', code); // Prints: error 5, to stderr If formatting elements (e.g. %d) are not found in the first string then util.inspect() is called on each argument and the resulting string values are concatenated. See util.format() for more information. @since ― v0.1.100 error('Connection failed.'); return; } var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Connected!'); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Adapter Name:', const rawAdapter: WalletAdapterRaw rawAdapter. WalletAdapterRaw.name: string Human readable wallet name name); // 'Raw Wallet' var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Network:', const rawAdapter: WalletAdapterRaw rawAdapter. WalletAdapterRaw.network: Network Current network (mainnet or testnet) network); // 'testnet' var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Account Address:', const rawAdapter: WalletAdapterRaw rawAdapter. WalletAdapterRaw.account: IAccount Currently active account, if connected @type ― {IAccount | undefined} account. IAccount.address: IAddress address. IAddress.toString: () => string toString()); // e.g., t1... var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Account Type:', const rawAdapter: WalletAdapterRaw rawAdapter. WalletAdapterRaw.account: IAccount Currently active account, if connected @type ― {IAccount | undefined} account. IAccount.type: "SECP256K1" | "BLS" type); // 'SECP256K1' // Change network var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Changing network to mainnet...'); const { const network: Network network, const account: IAccount account } = await const rawAdapter: WalletAdapterRaw rawAdapter. WalletAdapterRaw.changeNetwork(network: Network): Promise<{ account: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").IAccount; network: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network; }> Change the network and derive a new account @param ― network changeNetwork('mainnet'); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('New Network:', const network: Network network); // 'mainnet' var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('New Address:', const account: IAccount account. IAccount.address: IAddress address. IAddress.toString: () => string toString()); // e.g., f1... // Disconnect var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Disconnecting...'); await const rawAdapter: WalletAdapterRaw rawAdapter. WalletAdapterRaw.disconnect(): Promise Disconnect from the wallet disconnect(); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Disconnected:', ! const rawAdapter: WalletAdapterRaw rawAdapter. WalletAdapterRaw.connected: true Whether the wallet is currently connected connected); // true } function useRawWallet(): Promise useRawWallet(); ``` ## Common Adapter API [Section titled “Common Adapter API”](#common-adapter-api) All adapters conforming to the `WalletAdapter` interface share these core methods and properties: * `adapter.name: string`: Human-readable name (e.g., ‘HD Wallet’, ‘Metamask’). * `adapter.id: string`: Unique identifier (e.g., ‘hd’, ‘filsnap’, ‘raw’). * `adapter.support: AdapterSupport`: Indicates if the adapter is ‘Detected’, ‘NotDetected’, or ‘NotSupported’. * `adapter.connecting: boolean`: True if currently attempting to connect. * `adapter.connected: boolean`: True if currently connected. * `adapter.network: Network`: The currently active network (‘mainnet’ or ‘testnet’). * `adapter.account: IAccount | undefined`: The currently connected account object (contains address object and type) or `undefined`. * `adapter.checkSupport(): Promise`: Checks if the adapter is usable in the current environment. * `adapter.connect({ network }): Promise`: Initiates connection, returns account and network info. * `adapter.disconnect(): Promise`: Disconnects the wallet. * `adapter.changeNetwork(network): Promise`: Switches the active network, returns updated account and network. * `adapter.sign(message: Uint8Array): Promise`: Signs raw byte data. * `adapter.signMessage(message: Message): Promise`: Signs a structured Filecoin `Message` object. * `adapter.deriveAccount(index: number): Promise`: (HD Wallet specific, may exist on others) Derives an account at a specific index. * `adapter.on(event, listener)` / `adapter.off(event, listener)`: Methods to subscribe/unsubscribe from events (`connect`, `disconnect`, `error`, `networkChanged`, `accountChanged`). ## Integration with `iso-filecoin-react` [Section titled “Integration with iso-filecoin-react”](#integration-with-iso-filecoin-react) The primary use case for these adapter classes is often within a React application using `iso-filecoin-react`. You instantiate the adapters you want to support and pass them in an array to the `FilecoinProvider`: ```tsx import { FilecoinProvider } from 'iso-filecoin-react'; import { WalletAdapterHd, WalletAdapterRaw } from 'iso-filecoin-wallets'; const adapters = [ new WalletAdapterHd({ /* config */ }), new WalletAdapterRaw({ /* config */ }), // Add other adapter instances... ]; function AppWrapper() { return ( {/* Your App Components */} ); } ``` The `FilecoinProvider` and its hooks (`useConnect`, `useAccount`, etc.) then manage selecting and interacting with these adapter instances. ## Next Steps [Section titled “Next Steps”](#next-steps) * Explore the API Reference for detailed information on adapter classes, interfaces, and types. * See the [iso-filecoin-react guide](./iso-filecoin-react/getting-started.md) for using these adapters within a React application. * Check out the specific documentation for the [filsnap adapter](/api/iso-filecoin-wallets/filsnap/classes/walletadapterfilsnap/) and the [ledger adapter](/api/iso-filecoin-wallets/ledger/classes/walletadapterledger/). # Core > Core Filecoin utilities for addresses, tokens, messages, and RPC interactions. `iso-filecoin` provides the foundational building blocks for working with Filecoin in JavaScript/TypeScript. It handles address formatting, token calculations, message construction, and RPC interactions. ## Installation [Section titled “Installation”](#installation) ```bash pnpm add iso-filecoin ``` ## Core Modules [Section titled “Core Modules”](#core-modules) The package is organized into several focused modules, each available through its own entrypoint: ### Address [Section titled “Address”](#address) Handles Filecoin address parsing, validation, and conversion between different formats. ```ts import { function from(value: Value, network?: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network): IAddress @param ― value - Value to convert to address @param ― network - Network @returns from } from 'iso-filecoin/address'; // Parse any address format const const addr: IAddress addr = function from(value: Value, network?: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network): IAddress @param ― value - Value to convert to address @param ― network - Network @returns from('f1xciji452owqgqmyuphjbv3ubfkhpsvvxrvr7z6q', 'mainnet'); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log( const addr: IAddress addr. IAddress.toString: () => string toString()); // f1xciji452owqgqmyuphjbv3ubfkhpsvvxrvr7z6q var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log( const addr: IAddress addr. IAddress.protocol: ProtocolIndicatorCode protocol); // 1 (secp256k1) ``` ### Wallet [Section titled “Wallet”](#wallet) Provides core wallet functionality for generating and managing Filecoin accounts. ```ts import { function generateMnemonic(): string Generate mnemonic generateMnemonic, function mnemonicToSeed(mnemonic: string, password?: string): Uint8Array Get seed from mnemonic @param ― mnemonic @param ― password mnemonicToSeed, function accountFromSeed(seed: Uint8Array, type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType, path: string, network?: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network): SetRequired Get HD account from seed @param ― seed @param ― type @param ― path @param ― network @returns accountFromSeed, function accountFromPrivateKey(privateKey: Uint8Array, type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType, network: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network, path?: string): SetRequired Get account from private key Lotus BLS private key is little endian so you need to reverse the byte order. Use lotusBlsPrivateKeyToBytes to convert. @param ― privateKey @param ― type @param ― network @param ― path @returns accountFromPrivateKey, function accountFromMnemonic(mnemonic: string, type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType, path: string, password?: string, network?: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network): { type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType; address: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").IAddress; publicKey: Uint8Array; path: string; privateKey: Uint8Array; } Get HD account from mnemonic @param ― mnemonic @param ― type @param ― path @param ― password @param ― network accountFromMnemonic } from 'iso-filecoin/wallet'; import { const base64pad: Codec base64pad } from 'iso-base/rfc4648' // Generate new wallet from mnemonic const const mnemonic: string mnemonic = function generateMnemonic(): string Generate mnemonic generateMnemonic(); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Mnemonic:', const mnemonic: string mnemonic); // Create account from mnemonic (all-in-one) const const account: { type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType; address: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").IAddress; publicKey: Uint8Array; path: string; privateKey: Uint8Array; } account = function accountFromMnemonic(mnemonic: string, type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType, path: string, password?: string, network?: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network): { type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType; address: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").IAddress; publicKey: Uint8Array; path: string; privateKey: Uint8Array; } Get HD account from mnemonic @param ― mnemonic @param ― type @param ― path @param ― password @param ― network accountFromMnemonic( const mnemonic: string mnemonic, 'SECP256K1', // or 'BLS' "m/44'/461'/0'/0/0" // Standard Filecoin derivation path ); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Address:', const account: { type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType; address: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").IAddress; publicKey: Uint8Array; path: string; privateKey: Uint8Array; } account. address: IAddress address. IAddress.toString: () => string toString()); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Type:', const account: { type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType; address: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").IAddress; publicKey: Uint8Array; path: string; privateKey: Uint8Array; } account. type: "SECP256K1" | "BLS" type); // Or step by step with more control const const seed: Uint8Array seed = function mnemonicToSeed(mnemonic: string, password?: string): Uint8Array Get seed from mnemonic @param ― mnemonic @param ― password mnemonicToSeed( const mnemonic: string mnemonic); const const account2: { type: SignatureType; address: IAddress; publicKey: Uint8Array; path: string; privateKey: Uint8Array; } account2 = function accountFromSeed(seed: Uint8Array, type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType, path: string, network?: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network): SetRequired Get HD account from seed @param ― seed @param ― type @param ― path @param ― network @returns accountFromSeed( const seed: Uint8Array seed, 'SECP256K1', "m/44'/461'/0'/0/1" // Different index ); // Create from existing private key // SECP256k1 Private Key (example, DO NOT USE REAL KEYS LIKE THIS) const const privateKey: Uint8Array privateKey = const base64pad: Codec base64pad. Codec.decode: (data: Uint8Array | string) => Uint8Array decode('Un+VV/HZZ1YtfC1i4LULcvko0dV7F6CbQmnhSuUJRPU='); // Your private key hex const const accountFromKey: { type: SignatureType; address: IAddress; publicKey: Uint8Array; path?: string; privateKey: Uint8Array; } accountFromKey = function accountFromPrivateKey(privateKey: Uint8Array, type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType, network: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network, path?: string): SetRequired Get account from private key Lotus BLS private key is little endian so you need to reverse the byte order. Use lotusBlsPrivateKeyToBytes to convert. @param ― privateKey @param ― type @param ― network @param ― path @returns accountFromPrivateKey( const privateKey: Uint8Array privateKey, 'SECP256K1', 'mainnet' ); ``` ### Token [Section titled “Token”](#token) Handles FIL token amounts with precision, supporting conversions between FIL, attoFIL, and picoFIL. ```ts import { class Token Class to work with different Filecoin denominations. @see ― https://docs.filecoin.io/basics/assets/the-fil-token/#denomonations Token } from 'iso-filecoin/token'; // Create from different denominations const const fromFil: Token fromFil = class Token Class to work with different Filecoin denominations. @see ― https://docs.filecoin.io/basics/assets/the-fil-token/#denomonations Token. Token.fromFIL(val: Value): Token @param ― val fromFIL('1.5'); const const fromAtto: Token fromAtto = class Token Class to work with different Filecoin denominations. @see ― https://docs.filecoin.io/basics/assets/the-fil-token/#denomonations Token. Token.fromAttoFIL(val: Value): Token @param ― val fromAttoFIL('1500000000000000000'); const const fromPico: Token fromPico = class Token Class to work with different Filecoin denominations. @see ― https://docs.filecoin.io/basics/assets/the-fil-token/#denomonations Token. Token.fromPicoFIL(val: Value): Token @param ― val fromPicoFIL('1500000000000000'); // Convert between units var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log( const fromFil: Token fromFil. Token.toAttoFIL(): Token toAttoFIL()); // 1500000000000000000n var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log( const fromFil: Token fromFil. Token.toPicoFIL(): Token toPicoFIL()); // 1500000000000000n var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log( const fromFil: Token fromFil. Token.toFIL(): Token toFIL()); // '1.5' // Arithmetic operations const const sum: Token sum = const fromFil: Token fromFil. Token.add(val: Value): Token @param ― val add( class Token Class to work with different Filecoin denominations. @see ― https://docs.filecoin.io/basics/assets/the-fil-token/#denomonations Token. Token.fromFIL(val: Value): Token @param ― val fromFIL('0.5')); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log( const sum: Token sum. Token.toFIL(): Token toFIL()); // '2' ``` ### Message [Section titled “Message”](#message) Constructs and handles Filecoin messages (transactions). ```ts import { class Message Filecoin Message class Message } from 'iso-filecoin/message'; import { class Token Class to work with different Filecoin denominations. @see ― https://docs.filecoin.io/basics/assets/the-fil-token/#denomonations Token } from 'iso-filecoin/token'; import { class RPC RPC RPC } from 'iso-filecoin/rpc'; import { const mainnet: Chain Filecoin EVM Mainnet chain @type ― {import('./types.js').Chain} mainnet } from 'iso-filecoin/chains'; const const rpc: RPC rpc = new new RPC({ api, token, network, fetch, }: Options, fetchOptions?: RequestOptions): RPC TODO: remove fetch from Options and use fetch from RequestOptions TODO: either remove token or merge this.headers with fetchOptions.headers @param ― options @param ― fetchOptions RPC({ Options.network?: Network network: 'mainnet', Options.api: string | URL api: const mainnet: Chain Filecoin EVM Mainnet chain @type ― {import('./types.js').Chain} mainnet. Chain.rpcUrls: { [key: string]: ChainRpcUrls; default: ChainRpcUrls; } rpcUrls. default: ChainRpcUrls default. http: string[] http[0] }); // Create a new message const const msg: Message msg = new new Message(msg: PartialMessageObj): Message @param ― msg Message({ to: string to: 'f1xciji452owqgqmyuphjbv3ubfkhpsvvxrvr7z6q', from: string from: 'f1ssi7mcnxvwhhhtz6ludvpbsljyn26wmyfdgqnaq', value: string value: class Token Class to work with different Filecoin denominations. @see ― https://docs.filecoin.io/basics/assets/the-fil-token/#denomonations Token. Token.fromFIL(val: Value): Token @param ― val fromFIL('1'). Token.toString(base?: number | undefined): string Serialize the number to a string using the given base. @param ― base toString(), }); // Prepare the message (gets nonce and estimates gas) const const prepared: Message prepared = await const msg: Message msg. Message.prepare(rpc: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/rpc").RPC): Promise Prepare message for signing with nonce and gas estimation @param ― rpc prepare( const rpc: RPC rpc); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log( const prepared: Message prepared); ``` ### RPC [Section titled “RPC”](#rpc) Provides a type-safe client for interacting with Filecoin JSON-RPC nodes. ```ts import { class RPC RPC RPC } from 'iso-filecoin/rpc'; import { const mainnet: Chain Filecoin EVM Mainnet chain @type ― {import('./types.js').Chain} mainnet } from 'iso-filecoin/chains'; // Create RPC client const const rpc: RPC rpc = new new RPC({ api, token, network, fetch, }: Options, fetchOptions?: RequestOptions): RPC TODO: remove fetch from Options and use fetch from RequestOptions TODO: either remove token or merge this.headers with fetchOptions.headers @param ― options @param ― fetchOptions RPC({ Options.api: string | URL api: const mainnet: Chain Filecoin EVM Mainnet chain @type ― {import('./types.js').Chain} mainnet. Chain.rpcUrls: { [key: string]: ChainRpcUrls; default: ChainRpcUrls; } rpcUrls. default: ChainRpcUrls default. http: string[] http[0], // Optional, defaults per network Options.network?: Network network: 'mainnet', }); // Get chain head const const head: MaybeResult head = await const rpc: RPC rpc. RPC.chainHead(fetchOptions?: RequestOptions): Promise> The current head of the chain. @see ― https://github.com/filecoin-project/filecoin-docs/blob/main/reference/json-rpc/chain.md#chainhead @param ― fetchOptions @returns chainHead(); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log( const head: MaybeResult head. result?: TipSet | undefined result); // Get balance const const balance: MaybeResult balance = await const rpc: RPC rpc. RPC.balance(address: string, fetchOptions?: RequestOptions): Promise> WalletBalance returns the balance of the given address at the current head of the chain. @see ― https://lotus.filecoin.io/reference/lotus/wallet/#walletbalance @param ― address @param ― fetchOptions @returns balance('f1xciji452owqgqmyuphjbv3ubfkhpsvvxrvr7z6q'); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log( const balance: MaybeResult balance. result?: string | undefined result); ``` ### Chains [Section titled “Chains”](#chains) Provides network configurations and chain information. ```ts import { const mainnet: Chain Filecoin EVM Mainnet chain @type ― {import('./types.js').Chain} mainnet, const testnet: Chain Filecoin EVM Calibration testnet chain @type ― {import('./types.js').Chain} testnet } from 'iso-filecoin/chains'; var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log( const mainnet: Chain Filecoin EVM Mainnet chain @type ― {import('./types.js').Chain} mainnet. Chain.id: number id); // 314 var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log( const mainnet: Chain Filecoin EVM Mainnet chain @type ― {import('./types.js').Chain} mainnet. Chain.name: string name); // 'Filecoin Mainnet' var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log( const mainnet: Chain Filecoin EVM Mainnet chain @type ― {import('./types.js').Chain} mainnet. Chain.nativeCurrency: { name: string; symbol: string; decimals: number; } nativeCurrency); // { name: 'Filecoin', symbol: 'FIL', decimals: 18 } var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log( const mainnet: Chain Filecoin EVM Mainnet chain @type ― {import('./types.js').Chain} mainnet. Chain.rpcUrls: { [key: string]: ChainRpcUrls; default: ChainRpcUrls; } rpcUrls. default: ChainRpcUrls default. http: string[] http); // Array of default RPC URLs ``` ### Utils [Section titled “Utils”](#utils) Common utilities for working with Filecoin data. ```ts import { function parseDerivationPath(path: string): import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").DerivationPathComponents Parse a derivation path into its components @see ― https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#path-levels @param ― path - The derivation path to parse @returns ― An object containing the derivation path components @example import { parseDerivationPath } from 'iso-filecoin/utils' const components = parseDerivationPath("m/44'/461'/0'/0/0") // { // purpose: 44, // coinType: 461, // account: 0, // change: 0, // addressIndex: 0 // } parseDerivationPath } from 'iso-filecoin/utils'; // Parse BIP-44 derivation paths const const path: DerivationPathComponents path = function parseDerivationPath(path: string): import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").DerivationPathComponents Parse a derivation path into its components @see ― https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#path-levels @param ― path - The derivation path to parse @returns ― An object containing the derivation path components @example import { parseDerivationPath } from 'iso-filecoin/utils' const components = parseDerivationPath("m/44'/461'/0'/0/0") // { // purpose: 44, // coinType: 461, // account: 0, // change: 0, // addressIndex: 0 // } parseDerivationPath("m/44'/461'/0'/0/0"); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log( const path: DerivationPathComponents path); // { purpose: 44, coinType: 461, account: 0, change: 0, index: 0 } ``` ### Ledger [Section titled “Ledger”](#ledger) Handles communication with Ledger hardware wallets through their Filecoin app. ```ts import { class LedgerFilecoin Ledger Filecoin app client LedgerFilecoin, } from 'iso-filecoin/ledger'; import class TransportWebUSB WebUSB Transport implementation @example import TransportWebUSB from "@ledgerhq/hw-transport-webusb"; ... TransportWebUSB.create().then(transport => ...) TransportWebUSB from '@ledgerhq/hw-transport-webusb' async function function ledgerExample(): Promise ledgerExample() { // Get USB transport const const transport: Transport transport = await class TransportWebUSB WebUSB Transport implementation @example import TransportWebUSB from "@ledgerhq/hw-transport-webusb"; ... TransportWebUSB.create().then(transport => ...) TransportWebUSB. Transport.create(openTimeout?: number, listenTimeout?: number): Promise create() allows to open the first descriptor available or throw if there is none or if timeout is reached. This is a light helper, alternative to using listen() and open() (that you may need for any more advanced usecase) @example TransportFoo.create().then(transport => ...) create(); // Create Filecoin app instance const const app: LedgerFilecoin app = new new LedgerFilecoin(transport: Transport): LedgerFilecoin @param ― transport - Ledger transport LedgerFilecoin( const transport: Transport transport); // Get app version const const version: string version = await const app: LedgerFilecoin app. LedgerFilecoin.getVersion(): Promise Get the version of the Filecoin app @see ― https://github.com/LedgerHQ/app-filecoin/blob/develop/docs/APDUSPEC.md#get_version @example import { LedgerFilecoin } from 'iso-filecoin/ledger' import TransportWebUSB from '@ledgerhq/hw-transport-webusb' const transport = await TransportWebUSB.create() const ledger = new LedgerFilecoin(transport) const version = await ledger.getVersion() // => '1.0.0' getVersion(); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('App Version:', const version: string version); // Get public key and address const const path: "m/44'/461'/0'/0/0" path = "m/44'/461'/0'/0/0"; const { const publicKey: Uint8Array publicKey, const address: IAddress address } = await const app: LedgerFilecoin app. LedgerFilecoin.getAddress(path: string, showOnDevice?: boolean): Promise Get the secp256k1 address for a given derivation path @see ― https://github.com/LedgerHQ/app-filecoin/blob/develop/docs/APDUSPEC.md#ins_get_addr_secp256k1 @param ― path - Derivation path @param ― showOnDevice - Whether to show the address on the device @returns getAddress( const path: "m/44'/461'/0'/0/0" path); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Address:', const address: IAddress address. IAddress.toString: () => string toString()); // Sign a message const const message: Uint8Array message = new var Uint8Array: Uint8ArrayConstructor new (elements: Iterable) => Uint8Array (+6 overloads) Uint8Array([/* your message */]); const const signature: Uint8Array signature = await const app: LedgerFilecoin app. LedgerFilecoin.sign(path: string, message: Uint8Array, type?: SignatureType): Promise> Sign a message @param ― path - Derivation path @param ― message - Message to sign in bytes @param ― type - Signature type sign( const path: "m/44'/461'/0'/0/0" path, const message: Uint8Array message); var console: Console The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. A global console instance configured to write to process.stdout and process.stderr. The global console can be used without importing the node:console module. Warning: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the note on process I/O for more information. Example using the global console: console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err @see ― source console. Console.log(message?: any, ...optionalParams: any[]): void Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout See util.format() for more information. @since ― v0.1.100 log('Signature:', const signature: Uint8Array signature); // Always close transport when done await const transport: Transport transport. Transport.close(): Promise Close the connection with the device. Note: for certain transports (hw-transport-node-hid-singleton for ex), once the promise resolved, the transport instance is actually still cached, and the device is disconnected only after a defined timeout. But for the consumer of the Transport, this does not matter and it can consider the transport to be closed. @returns ― A promise that resolves when the transport is closed. close(); } ``` The Ledger module requires: * A connected Ledger device * The Filecoin app installed and opened on the device * Browser with WebUSB support (for web applications) * `@ledgerhq/hw-transport-node-hid` package for Node.js applications Example Node.js setup: ```ts import { FilecoinApp } from 'iso-filecoin/ledger'; import TransportHID from '@ledgerhq/hw-transport-node-hid'; async function nodeLedgerExample() { const transport = await TransportHID.create(); const app = new FilecoinApp(transport); // Use app methods... await transport.close(); } ``` **Important Ledger Notes:** * Always verify the transaction details on your Ledger device before signing * Keep your Ledger firmware and the Filecoin app updated * The Ledger will only sign transactions for addresses derived from its seed * Different derivation paths might require user verification on the device ## Integration with Other Packages [Section titled “Integration with Other Packages”](#integration-with-other-packages) `iso-filecoin` is designed to work seamlessly with: * `iso-filecoin-wallets`: Uses the address, token, and message modules to implement wallet adapters. * `iso-filecoin-react`: Uses all core modules to provide React hooks for Filecoin functionality. ## Next Steps [Section titled “Next Steps”](#next-steps) * Explore the API Reference for detailed information on all modules and types. * Learn about [Wallet Adapters](../iso-filecoin-wallets/getting-started.md) built on top of these utilities. * See the [React Integration Guide](../iso-filecoin-react/getting-started.md) for using these modules in React applications. * Check out the [Examples](https://github.com/hugomrdias/filecoin/tree/main/examples) for more usage patterns. # React > Learn how to set up and use iso-filecoin-react hooks. `iso-filecoin-react` provides React hooks and context to easily integrate Filecoin wallet interactions into your React applications. It works seamlessly with the wallet adapters from `iso-filecoin-wallets`. ## Installation [Section titled “Installation”](#installation) First, you need to install the necessary packages. You’ll typically need `iso-filecoin-react`, `iso-filecoin` (as a peer dependency), and at least one wallet adapter from `iso-filecoin-wallets`. You might also need `@tanstack/react-query` if you haven’t installed it already, as it’s a peer dependency for hooks. ```bash # Using pnpm (recommended for this monorepo) pnpm add iso-filecoin-react iso-filecoin iso-filecoin-wallets @tanstack/react-query ``` ## Setup: The FilecoinProvider [Section titled “Setup: The FilecoinProvider”](#setup-the-filecoinprovider) Wrap your application (or the relevant part of it) with the `FilecoinProvider`. This component initializes the context and makes the wallet state and hooks available throughout your app. You need to pass an array of instantiated wallet adapters to the `adapters` prop. ```tsx // Import the actual provider name import { FilecoinProvider } from 'iso-filecoin-react'; import { WalletAdapterHd, WalletAdapterLedger, } from 'iso-filecoin-wallets' import TransportWebUSB from '@ledgerhq/hw-transport-webusb' // Need QueryClientProvider for TanStack Query hooks import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' import App from './App'; // Instantiate the wallet adapters you want to support const adapters = [ new WalletAdapterLedger({ transport: TransportWebUSB, }), new WalletAdapterHd(), ] const queryClient = new QueryClient(); createRoot(document.getElementById('root')!).render( {/* Wrap with QueryClientProvider */} {/* Use FilecoinProvider and the correct prop names */} , ); // @filename: App.tsx export default function App() { return
My Filecoin App
; } ``` **Props for `FilecoinProvider`:** * `adapters`: (`WalletAdapter[]`, Required) An array of initialized wallet adapter instances (e.g., `new WalletAdapterHD()`). * `network`: (`Network`, Optional) The initial network to use (‘mainnet’ or ‘testnet’). Defaults to `'mainnet'`. * `rpcs`: (`Record`, Optional) An object mapping network names to initialized `RPC` client instances from `iso-filecoin/rpc`. If not provided, defaults are used for mainnet and testnet. * `reconnectOnMount`: (`boolean`, Optional) If `true`, tries to automatically connect to the last used wallet adapter stored in local storage upon mounting. Defaults to `true`. * `children`: (`React.ReactNode`, Required) Your application components. ## Basic Usage: Accessing Wallet State [Section titled “Basic Usage: Accessing Wallet State”](#basic-usage-accessing-wallet-state) Once the provider is set up, you can use the hooks provided by `iso-filecoin-react` within any child component. ### `useAdapter` [Section titled “useAdapter”](#useadapter) Provides access to the currently selected adapter instance, loading/reconnecting states, errors, and the current network. WalletInfo.tsx ```tsx import { function useAdapter(): Pick Hook to access the current wallet adapter and its state @example import { useAdapter } from 'iso-filecoin-react' function App() { const { adapter, error, loading } = useAdapter() if (loading) return
Loading...
if (error) return
Error: {error.message}
return
Current adapter: {adapter?.name}
} @returns ― Wallet adapter state useAdapter } from 'iso-filecoin-react'; export function function WalletInfo(): JSX.Element WalletInfo() { const { const adapter: WalletAdapter | undefined Currently selected wallet adapter adapter, const loading: boolean Provider is checking adapters support loading, const error: Error | undefined Last error that occurred on the selected adapter error, const network: Network Current network (mainnet or testnet) network, const reconnecting: boolean Provider is reconnecting to the last selected adapter reconnecting } = function useAdapter(): Pick Hook to access the current wallet adapter and its state @example import { useAdapter } from 'iso-filecoin-react' function App() { const { adapter, error, loading } = useAdapter() if (loading) return
Loading...
if (error) return
Error: {error.message}
return
Current adapter: {adapter?.name}
} @returns ― Wallet adapter state useAdapter(); // loading is true only during initial provider setup/adapter check if ( const loading: boolean Provider is checking adapters support loading) return < JSX.IntrinsicElements.div: DetailedHTMLProps, HTMLDivElement> div>Checking adapter support..., HTMLDivElement> div>; // reconnecting is true if reconnectOnMount is true and it's trying to connect if ( const reconnecting: boolean Provider is reconnecting to the last selected adapter reconnecting) return < JSX.IntrinsicElements.div: DetailedHTMLProps, HTMLDivElement> div>Reconnecting wallet..., HTMLDivElement> div>; if ( const error: Error | undefined Last error that occurred on the selected adapter error) return < JSX.IntrinsicElements.div: DetailedHTMLProps, HTMLDivElement> div>Error: { const error: Error Last error that occurred on the selected adapter error. Error.message: string message}, HTMLDivElement> div>; // adapter can be undefined if no wallet is selected/connected yet if (! const adapter: WalletAdapter | undefined Currently selected wallet adapter adapter) return < JSX.IntrinsicElements.div: DetailedHTMLProps, HTMLDivElement> div>No wallet adapter selected., HTMLDivElement> div>; return ( < JSX.IntrinsicElements.div: DetailedHTMLProps, HTMLDivElement> div> < JSX.IntrinsicElements.p: DetailedHTMLProps, HTMLParagraphElement> p>Selected Adapter: { const adapter: WalletAdapter Currently selected wallet adapter adapter. WalletAdapter.name: string Human readable wallet name name}, HTMLParagraphElement> p> {/* adapter.connected and adapter.connecting reflect the *adapter's* state */} < JSX.IntrinsicElements.p: DetailedHTMLProps, HTMLParagraphElement> p>Is Connected: { const adapter: WalletAdapter Currently selected wallet adapter adapter. WalletAdapter.connected: boolean Whether the wallet is currently connected connected ? 'Yes' : 'No'}, HTMLParagraphElement> p> < JSX.IntrinsicElements.p: DetailedHTMLProps, HTMLParagraphElement> p>Is Connecting: { const adapter: WalletAdapter Currently selected wallet adapter adapter. WalletAdapter.connecting: boolean Whether the wallet is in the process of connecting connecting ? 'Yes' : 'No'}, HTMLParagraphElement> p> < JSX.IntrinsicElements.p: DetailedHTMLProps, HTMLParagraphElement> p>Network: { const network: Network Current network (mainnet or testnet) network}, HTMLParagraphElement> p> {/* 'mainnet' or 'testnet' - reflects provider state */} , HTMLDivElement> div> ); } ``` **Return value of `useAdapter`:** * `adapter`: (`WalletAdapter | undefined`) The currently selected wallet adapter instance, or `undefined` if none is selected/connected. * `loading`: (`boolean`) `true` while the provider checks adapter support on initial mount. * `error`: (`Error | undefined`) The last error encountered related to the adapter or provider state. * `network`: (`Network`) The current network (‘mainnet’ or ‘testnet’) set in the provider state. * `reconnecting`: (`boolean`) `true` if the provider is attempting to auto-connect via `reconnectOnMount`. ### `useAccount` [Section titled “useAccount”](#useaccount) Provides access to the connected account details (`IAccount`), the active adapter instance, network/chain information, the derived connection state, and the address string. AccountDisplay.tsx ```tsx import { function useAccount(): UseAccountReturnType Hook to access the current account and its state @example import { useAccount } from 'iso-filecoin-react' function App() { const { account, adapter, network, chain, state } = useAccount() return
Current address: {account?.address.toString()}
} @returns ― Account state useAccount } from 'iso-filecoin-react'; import type { type ConnectionState = "connected" | "disconnected" | "connecting" | "reconnecting" ConnectionState } from 'iso-filecoin-react'; // Import type if needed export function function AccountDisplay(): JSX.Element AccountDisplay() { // address is returned directly for convenience const { const account: IAccount | undefined Currently connected account account, const address: string Current address address, const adapter: WalletAdapter | undefined Currently selected wallet adapter adapter, const network: Network Current network (mainnet or testnet) network, const chain: Chain Current chain chain, const state: ConnectionState Current connection state state } = function useAccount(): UseAccountReturnType Hook to access the current account and its state @example import { useAccount } from 'iso-filecoin-react' function App() { const { account, adapter, network, chain, state } = useAccount() return
Current address: {account?.address.toString()}
} @returns ― Account state useAccount(); // State provides a string representation: 'disconnected', 'connecting', 'connected', 'reconnecting' const const displayState: ConnectionState displayState: type ConnectionState = "connected" | "disconnected" | "connecting" | "reconnecting" ConnectionState = const state: ConnectionState Current connection state state; if ( const displayState: ConnectionState displayState === 'connecting' || const displayState: "connected" | "disconnected" | "reconnecting" displayState === 'reconnecting') { return < JSX.IntrinsicElements.div: DetailedHTMLProps, HTMLDivElement> div>Status: { const displayState: "connecting" | "reconnecting" displayState}..., HTMLDivElement> div>; } if ( const displayState: "connected" | "disconnected" displayState === 'disconnected' || ! const account: IAccount | undefined Currently connected account account) { return < JSX.IntrinsicElements.div: DetailedHTMLProps, HTMLDivElement> div>Status: Disconnected. Please connect a wallet., HTMLDivElement> div>; } // State is 'connected' here return ( < JSX.IntrinsicElements.div: DetailedHTMLProps, HTMLDivElement> div> < JSX.IntrinsicElements.h2: DetailedHTMLProps, HTMLHeadingElement> h2>Connected Account, HTMLHeadingElement> h2> {/* Use the direct address string */} < JSX.IntrinsicElements.p: DetailedHTMLProps, HTMLParagraphElement> p>Address: { const address: string Current address address}, HTMLParagraphElement> p> < JSX.IntrinsicElements.p: DetailedHTMLProps, HTMLParagraphElement> p>Type: { const account: IAccount Currently connected account account. IAccount.type: "SECP256K1" | "BLS" type}, HTMLParagraphElement> p> {/* 'SECP256K1' or 'BLS' */} < JSX.IntrinsicElements.p: DetailedHTMLProps, HTMLParagraphElement> p>Network: { const network: Network Current network (mainnet or testnet) network}, HTMLParagraphElement> p> {/* 'mainnet' or 'testnet' */} < JSX.IntrinsicElements.p: DetailedHTMLProps, HTMLParagraphElement> p>Chain ID: { const chain: Chain Current chain chain. Chain.id: number id}, HTMLParagraphElement> p> {/* e.g., 314 for mainnet */} < JSX.IntrinsicElements.p: DetailedHTMLProps, HTMLParagraphElement> p>Adapter: { const adapter: WalletAdapter | undefined Currently selected wallet adapter adapter?. WalletAdapter.name: string | undefined Human readable wallet name name}, HTMLParagraphElement> p> < JSX.IntrinsicElements.p: DetailedHTMLProps, HTMLParagraphElement> p>State: { const displayState: "connected" displayState}, HTMLParagraphElement> p> , HTMLDivElement> div> ); } ``` **Return value of `useAccount`:** * `account`: (`IAccount | undefined`) The currently connected account object, or `undefined` if not connected. Contains `address` (as `IAddress` object) and `type`. * `address`: (`string | undefined`) The string representation of the connected account’s address, or `undefined`. * `adapter`: (`WalletAdapter | undefined`) The currently selected and connected wallet adapter instance. * `chain`: (`Chain`) An object representing the current Filecoin chain based on the provider’s `network` state (e.g., `{ id: 314, name: 'Filecoin Mainnet' }`). * `network`: (`Network`) The current network (‘mainnet’ or ‘testnet’) from the provider state. * `state`: (`ConnectionState`) The derived connection status string: `'disconnected'`, `'connecting'`, `'connected'`, or `'reconnecting'`. ## Other Core Hooks [Section titled “Other Core Hooks”](#other-core-hooks) These hooks provide mutation functions (leveraging `@tanstack/react-query`), query results, or access context state for performing common wallet actions: * [`useConnect`](/api/iso-filecoin-react/index/functions/useconnect/): Returns the `connect` mutation function to initiate connection to a selected wallet adapter. Also provides the list of available `adapters`, the currently selected `adapter` (if any), and the provider’s initial `loading` state. * [`useDisconnect`](/api/iso-filecoin-react/index/functions/usedisconnect/): Returns the `disconnect` mutation function to disconnect the currently connected wallet adapter. * [`useChangeNetwork`](/api/iso-filecoin-react/index/functions/usechangenetwork/): Returns the `changeNetwork` mutation function to switch the provider’s and potentially the adapter’s active network (between ‘mainnet’ and ‘testnet’). * [`useDeriveAccount`](/api/iso-filecoin-react/index/functions/usederiveaccount/): Returns the `deriveAccount` mutation function to derive a new account from the current adapter at a specific index (if supported by the adapter). * [`useBalance`](/api/iso-filecoin-react/index/functions/usebalance/): Returns a TanStack Query query result object (`{ data, isLoading, error, ... }`) for fetching the FIL balance (`{ value: Token, symbol: string }` | `undefined`) of the connected account. Requires RPC client configuration. * [`useAddresses`](/api/iso-filecoin-react/index/functions/useaddresses/): Takes an optional address string and returns TanStack Query query result objects for resolving its corresponding ID address (`addressId: { data, ... }`) and f4/0x address (`address0x: { data, ... }`) using the configured RPC client. * [`useEstimateGas`](/api/iso-filecoin-react/index/functions/useestimategas/): Takes message parameters (`to`, `value`, `maxFee`) and returns a TanStack Query query result object (`{ data, ... }`) containing the estimated gas cost (`{ gas: bigint, total: bigint, symbol: string }` | `undefined`) for sending the message from the currently connected account. Requires RPC client configuration. * [`useSendMessage`](/api/iso-filecoin-react/index/functions/usesendmessage/): Returns the `sendMessage` mutation function. Takes a partial message object, prepares it using the RPC client (getting nonce, gas estimation), signs it using the adapter, and pushes it to the network via the RPC client. Returns the message CID (`{ '/': string }`). * [`useSign`](/api/iso-filecoin-react/index/functions/usesign/): Returns the `sign` mutation function. Takes a raw `Uint8Array` message and requests a signature from the connected adapter using the adapter’s generic `sign` method. *(Note: This is different from `useSignMessage` which prepares and signs a specific Filecoin message structure).* ## Playground [Section titled “Playground”](#playground) Play with all the hooks in this StackBlitz example: Check the source code [here](https://github.com/hugomrdias/filecoin/tree/main/examples/ledger). ## Next Steps [Section titled “Next Steps”](#next-steps) * Explore the API Reference for detailed information on all hooks and types. * See the guide on [Using Wallet Adapters](./iso-filecoin-wallets/index.md) for more on specific adapters. * Check out the [examples](https://github.com/hugomrdias/filecoin/tree/main/examples) folder in the repository for practical examples. # Reown Appkit > Learn how to use the Reown Appkit to connect to a Filecoin Account. Learn how to use the Reown Appkit to connect to a Filecoin Account using the `iso-filecoin-wallets` library. ## Installation [Section titled “Installation”](#installation) ```bash # Using pnpm (recommended for this monorepo) pnpm add iso-filecoin-react iso-filecoin iso-filecoin-wallets @tanstack/react-query filsnap-adapter ``` ## Usage [Section titled “Usage”](#usage) The wallets package provides hooks and an Appkit Adapter to build a Filecoin connect wallet using Reown Appkit. ### Setup Providers [Section titled “Setup Providers”](#setup-providers) App.tsx ```tsx import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' import { createAppKit } from '@reown/appkit/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import * as Chains from 'iso-filecoin/chains' import { FilecoinProvider } from 'iso-filecoin-react' import { FilecoinAppKitAdapter, chainImages } from 'iso-filecoin-wallets/appkit' import { WalletAdapterFilsnap } from 'iso-filecoin-wallets/filsnap' import { WalletAdapterLedger } from 'iso-filecoin-wallets/ledger' import TransportWebUSB from '@ledgerhq/hw-transport-webusb' import { WagmiProvider, http } from 'wagmi' // Get projectId from https://cloud.reown.com export const projectId = '' //Set up the Wagmi Adapter (Config) for Filecoin export const wagmiAdapter = new WagmiAdapter({ projectId, networks: [Chains.mainnet, Chains.testnet] as [ AppKitNetwork, ...AppKitNetwork[], ], transports: { [Chains.mainnet.id]: http(), [Chains.testnet.id]: http(), }, }) // Set up the Filecoin Adapters const adapters = [ new WalletAdapterFilsnap({ syncWithProvider: true, }), new WalletAdapterLedger({ transport: TransportWebUSB, }), ] // Create the Filecoin Appkit Adapter export const filecoinAdapter = new FilecoinAppKitAdapter({ adapters }) // Create modal createAppKit({ adapters: [filecoinAdapter], projectId, networks: [ Chains.mainnet, Chains.testnet, Chains.filecoinNative, Chains.filecoinNativeCalibration, ] as [AppKitNetwork, ...AppKitNetwork[]], chainImages, themeMode: 'light', }) export function App() { return ( ) } ``` ### Using Appkit Hooks [Section titled “Using Appkit Hooks”](#using-appkit-hooks) Now lets create a component to use the Appkit hooks. actions-list.tsx ```tsx import type { AppKitNetwork } from '@reown/appkit-common' import { useAppKit, useAppKitAccount, useAppKitNetwork, useDisconnect, } from '@reown/appkit/react' import { filecoinNative, filecoinNativeCalibration } from 'iso-filecoin/chains' export const ActionButtonList = () => { const { disconnect } = useDisconnect() // AppKit hook to disconnect const { open } = useAppKit() // AppKit hook to open the modal const { switchNetwork } = useAppKitNetwork() // AppKithook to switch network const { isConnected } = useAppKitAccount() // AppKit hook to get the address and check if the user is connected const handleDisconnect = async () => { try { await disconnect() } catch (error) { console.error('Failed to disconnect:', error) } } return ( isConnected && (
) ) } ``` ### Using Filecoin Hooks [Section titled “Using Filecoin Hooks”](#using-filecoin-hooks) To use the Filecoin hooks, you need to set the adapter in the Filecoin Provider. info-list.tsx ```tsx import type { ChainNamespace } from '@reown/appkit-common' import { useAppKitAccount, useAppKitProvider, } from '@reown/appkit/react' import { type WalletAdapter, useAccount, useAppKitAdapter, useBalance, } from 'iso-filecoin-react' export const InfoList = () => { const { address, caipAddress, isConnected, status, embeddedWalletInfo } = useAppKitAccount() // AppKit hook to get the account information // Get the Filecoin Wallet Adapter from the Appkit Provider const { walletProvider } = useAppKitProvider( 'fil' as ChainNamespace ) // Set the adapter in the Filecoin Provider useAppKitAdapter({ adapter: walletProvider, }) // Now you can use all the Filecoin Hooks from `iso-filecoin-react` const { account } = useAccount() const { data: balance } = useBalance() return ( <>

Filecoin Hooks

          Address: {account?.address.toString()}
          
Balance: {balance?.value.toFIL().toFormat({ decimalPlaces: 1 })}

useAppKit

          Address: {address}
          
caip Address: {caipAddress}
Connected: {isConnected.toString()}
Status: {status}
Account Type: {embeddedWalletInfo?.accountType}
) } ``` ## Full example [Section titled “Full example”](#full-example) Play with the reown appkit provider and hooks in this StackBlitz example: Check the source code [here](https://github.com/hugomrdias/filecoin/tree/main/examples/appkit). # Getting Started > Learn how to install and use the iso-filecoin libraries. iso-filecoin is a **Filecoin Standard Library** that provides a set of lightweight, performant and type-safe Javascript modules. It provides core utilities, abstractions and types for primitives such as: RPC, Signature, Address, Token, Chain, Wallet and more. Used by the [Metamask Filecoin Wallet](https://github.com/filecoin-project/filsnap) and [Ledger Live Filecoin app](https://www.ledger.com/coin/wallet/filecoin). ## Installation [Section titled “Installation”](#installation) Install the required packages using `pnpm`. Make sure you have Node.js >= 20 installed. ```bash pnpm add iso-filecoin ``` If you plan to use React hooks, install `iso-filecoin-react` as well: ```bash pnpm add iso-filecoin-react ``` For wallet functionalities (Ledger, Filecoin App), install `iso-filecoin-wallets`: ```bash pnpm add iso-filecoin-wallets ``` *** ## Project Structure [Section titled “Project Structure”](#project-structure) This project uses a monorepo structure managed by `pnpm` workspaces. Core libraries reside in the `packages/` directory, examples in `examples/`, and this documentation site in `docs/`. * packages/ * iso-filecoin/ Core Filecoin library * … * iso-filecoin-react/ React hooks and context * … * iso-filecoin-wallets/ Wallet adapters * … * examples/ Usage examples and demos * … * docs/ This documentation site * … * pnpm-workspace.yaml Workspace configuration * package.json Root package file ## Usage [Section titled “Usage”](#usage) Here’s a basic example of how to use `iso-filecoin` to generate a wallet and address: ```ts import * as import Wallet Wallet from 'iso-filecoin/wallet' const const mnemonic: string mnemonic = import Wallet Wallet. function generateMnemonic(): string Generate mnemonic generateMnemonic() const const account: { type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType; address: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").IAddress; publicKey: Uint8Array; path: string; privateKey: Uint8Array; } account = import Wallet Wallet. function accountFromMnemonic(mnemonic: string, type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType, path: string, password?: string, network?: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network): { type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType; address: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").IAddress; publicKey: Uint8Array; path: string; privateKey: Uint8Array; } Get HD account from mnemonic @param ― mnemonic @param ― type @param ― path @param ― password @param ― network accountFromMnemonic( const mnemonic: string mnemonic, 'SECP256K1', "m/44'/461'/0'/0/0" ) const const address: string address = const account: { type: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/signature").SignatureType; address: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").IAddress; publicKey: Uint8Array; path: string; privateKey: Uint8Array; } account. address: IAddress address. IAddress.toString: () => string toString() // 'f1...' ``` Here’s how to create a message: ```ts import { class Message Filecoin Message class Message } from 'iso-filecoin/message' import { class Token Class to work with different Filecoin denominations. @see ― https://docs.filecoin.io/basics/assets/the-fil-token/#denomonations Token } from 'iso-filecoin/token' const const msg: Message msg = new new Message(msg: PartialMessageObj): Message @param ― msg Message({ from: string from: 'f1...', to: string to: 'f4...', value: string value: class Token Class to work with different Filecoin denominations. @see ― https://docs.filecoin.io/basics/assets/the-fil-token/#denomonations Token. Token.fromFIL(val: Value): Token @param ― val fromFIL(1). Token.toAttoFIL(): Token toAttoFIL(). Token.toString(base?: number | undefined): string Serialize the number to a string using the given base. @param ― base toString() }) ``` ## Playground [Section titled “Playground”](#playground) Play with all the `iso-filecoin` modules in this StackBlitz example: Check the source code [here](https://github.com/hugomrdias/filecoin/tree/main/examples/ledger). ## Further Resources [Section titled “Further Resources”](#further-resources) * API Reference * [Examples](https://github.com/hugomrdias/filecoin/tree/main/examples) * [GitHub Repository](https://github.com/hugomrdias/filecoin) # FilecoinProvider > **FilecoinProvider**(`props`): `FunctionComponentElement`<`ProviderProps`<[`FilecoinContextType`](/reference/iso-filecoin-react/types/type-aliases/filecoincontexttype/)>> Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:104](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L104) ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | --------------------------------------------------------------------------------------------------------------------- | | `props` | `PropsWithChildren`<[`FilecoinProviderProps`](/reference/iso-filecoin-react/types/interfaces/filecoinproviderprops/)> | ## Returns [Section titled “Returns”](#returns) `FunctionComponentElement`<`ProviderProps`<[`FilecoinContextType`](/reference/iso-filecoin-react/types/type-aliases/filecoincontexttype/)>> # useAccount > **useAccount**(): `object` Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:348](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L348) Hook to access the current account and its state ## Returns [Section titled “Returns”](#returns) Account state ### account [Section titled “account”](#account) > **account**: [`IAccount`](/reference/iso-filecoin-react/types/interfaces/iaccount/) | `undefined` Currently connected account ### adapter [Section titled “adapter”](#adapter) > **adapter**: [`WalletAdapter`](/reference/iso-filecoin-react/index/interfaces/walletadapter/) | `undefined` Currently selected wallet adapter ### address [Section titled “address”](#address) > **address**: `string` Current address ### chain [Section titled “chain”](#chain) > **chain**: [`Chain`](/reference/iso-filecoin/types/interfaces/chain/) Current chain ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin-react/types/type-aliases/network/) Current network (mainnet or testnet) ### state [Section titled “state”](#state) > **state**: [`ConnectionState`](/reference/iso-filecoin-react/types/type-aliases/connectionstate/) Current connection state ## Example [Section titled “Example”](#example) ```tsx import { function useAccount(): UseAccountReturnType Hook to access the current account and its state @example import { useAccount } from 'iso-filecoin-react' function App() { const { account, adapter, network, chain, state } = useAccount() return
Current address: {account?.address.toString()}
} @returns ― Account state useAccount } from 'iso-filecoin-react' function function App(): JSX.Element App() { const { const account: IAccount | undefined Currently connected account account, const adapter: WalletAdapter | undefined Currently selected wallet adapter adapter, const network: Network Current network (mainnet or testnet) network, const chain: Chain Current chain chain, const state: ConnectionState Current connection state state } = function useAccount(): UseAccountReturnType Hook to access the current account and its state @example import { useAccount } from 'iso-filecoin-react' function App() { const { account, adapter, network, chain, state } = useAccount() return
Current address: {account?.address.toString()}
} @returns ― Account state useAccount() return < JSX.IntrinsicElements.div: DetailedHTMLProps, HTMLDivElement> div>Current address: { const account: IAccount | undefined Currently connected account account?. IAccount.address: IAddress address. IAddress.toString: () => string toString()}, HTMLDivElement> div> } ``` # useAdapter > **useAdapter**(): [`Pick`](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys)<[`FilecoinContextType`](/reference/iso-filecoin-react/types/type-aliases/filecoincontexttype/), `"reconnecting"` | `"adapter"` | `"network"` | `"loading"` | `"error"`> Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:310](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L310) Hook to access the current wallet adapter and its state ## Returns [Section titled “Returns”](#returns) [`Pick`](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys)<[`FilecoinContextType`](/reference/iso-filecoin-react/types/type-aliases/filecoincontexttype/), `"reconnecting"` | `"adapter"` | `"network"` | `"loading"` | `"error"`> Wallet adapter state ## Example [Section titled “Example”](#example) ```tsx import { function useAdapter(): Pick Hook to access the current wallet adapter and its state @example import { useAdapter } from 'iso-filecoin-react' function App() { const { adapter, error, loading } = useAdapter() if (loading) return
Loading...
if (error) return
Error: {error.message}
return
Current adapter: {adapter?.name}
} @returns ― Wallet adapter state useAdapter } from 'iso-filecoin-react' function function App(): JSX.Element App() { const { const adapter: WalletAdapter | undefined Currently selected wallet adapter adapter, const error: Error | undefined Last error that occurred on the selected adapter error, const loading: boolean Provider is checking adapters support loading } = function useAdapter(): Pick Hook to access the current wallet adapter and its state @example import { useAdapter } from 'iso-filecoin-react' function App() { const { adapter, error, loading } = useAdapter() if (loading) return
Loading...
if (error) return
Error: {error.message}
return
Current adapter: {adapter?.name}
} @returns ― Wallet adapter state useAdapter() if ( const loading: boolean Provider is checking adapters support loading) return < JSX.IntrinsicElements.div: DetailedHTMLProps, HTMLDivElement> div>Loading..., HTMLDivElement> div> if ( const error: Error | undefined Last error that occurred on the selected adapter error) return < JSX.IntrinsicElements.div: DetailedHTMLProps, HTMLDivElement> div>Error: { const error: Error Last error that occurred on the selected adapter error. Error.message: string message}, HTMLDivElement> div> return < JSX.IntrinsicElements.div: DetailedHTMLProps, HTMLDivElement> div>Current adapter: { const adapter: WalletAdapter | undefined Currently selected wallet adapter adapter?. WalletAdapter.name: string | undefined Human readable wallet name name}, HTMLDivElement> div> } ``` # useAddresses > **useAddresses**(`options`): `object` Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:521](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L521) Resolve addresses from the network TODO: use cache ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ----------------- | ------------------------ | | `options` | { `address`: `string`; } | | `options.address` | `string` | ## Returns [Section titled “Returns”](#returns) `object` ### address0x [Section titled “address0x”](#address0x) > **address0x**: `UseQueryResult`<`string` | `undefined`, [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error)> ### addressId [Section titled “addressId”](#addressid) > **addressId**: `UseQueryResult`<[`AddressId`](/reference/iso-filecoin/address/classes/addressid/) | `undefined`, [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error)> # useAppKitAdapter > **useAppKitAdapter**(`param0`): `void` Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:322](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L322) Hook to sync the adapter to the context for AppKit ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ---------------- | ------------------------------------------------------------------------------------------------ | | `param0` | { `adapter`: [`WalletAdapter`](/reference/iso-filecoin-react/index/interfaces/walletadapter/); } | | `param0.adapter` | [`WalletAdapter`](/reference/iso-filecoin-react/index/interfaces/walletadapter/) | ## Returns [Section titled “Returns”](#returns) `void` # useBalance > **useBalance**(): `UseQueryResult`<{ `symbol`: `string`; `value`: [`Token`](/reference/iso-filecoin/token/classes/token/); }, [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error)> Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:491](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L491) ## Returns [Section titled “Returns”](#returns) `UseQueryResult`<{ `symbol`: `string`; `value`: [`Token`](/reference/iso-filecoin/token/classes/token/); }, [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error)> # useChangeNetwork > **useChangeNetwork**(): `UseMutationResult`<[`Network`](/reference/iso-filecoin-react/types/type-aliases/network/), [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), [`Network`](/reference/iso-filecoin-react/types/type-aliases/network/), `unknown`> Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:457](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L457) ## Returns [Section titled “Returns”](#returns) `UseMutationResult`<[`Network`](/reference/iso-filecoin-react/types/type-aliases/network/), [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), [`Network`](/reference/iso-filecoin-react/types/type-aliases/network/), `unknown`> # useConnect > **useConnect**(): `UseMutationResult`<[`AccountNetwork`](/reference/iso-filecoin-react/types/interfaces/accountnetwork/), [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), { `adapter`: [`WalletAdapter`](/reference/iso-filecoin-react/index/interfaces/walletadapter/); }, `void`> & [`Pick`](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys)<[`FilecoinContextType`](/reference/iso-filecoin-react/types/type-aliases/filecoincontexttype/), `"adapter"` | `"adapters"` | `"loading"`> Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:423](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L423) Hook to connect a wallet adapter ## Returns [Section titled “Returns”](#returns) `UseMutationResult`<[`AccountNetwork`](/reference/iso-filecoin-react/types/interfaces/accountnetwork/), [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), { `adapter`: [`WalletAdapter`](/reference/iso-filecoin-react/index/interfaces/walletadapter/); }, `void`> & [`Pick`](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys)<[`FilecoinContextType`](/reference/iso-filecoin-react/types/type-aliases/filecoincontexttype/), `"adapter"` | `"adapters"` | `"loading"`> Connection mutation and state ## Example [Section titled “Example”](#example) ```tsx import { function useConnect(): UseMutationResult & Pick Hook to connect a wallet adapter @example import { useConnect } from 'iso-filecoin-react' function App() { const { adapters, error, mutate: connect, isPending } = useConnect() return (
{adapters.map(adapter => ( ))} {error &&
Error: {error.message}
}
) } @returns ― Connection mutation and state useConnect } from 'iso-filecoin-react' function function App(): JSX.Element App() { const { const adapters: WalletAdapter[] List of available wallet adapters adapters, const error: Error | null The error object for the mutation, if an error was encountered. Defaults to null. error, mutate: UseMutateFunction The mutation function you can call with variables to trigger the mutation and optionally hooks on additional callback options. @param ― variables - The variables object to pass to the mutationFn. @param ― options.onSuccess - This function will fire when the mutation is successful and will be passed the mutation's result. @param ― options.onError - This function will fire if the mutation encounters an error and will be passed the error. @param ― options.onSettled - This function will fire when the mutation is either successfully fetched or encounters an error and be passed either the data or error. mutate: const connect: UseMutateFunction The mutation function you can call with variables to trigger the mutation and optionally hooks on additional callback options. connect, const isPending: boolean A boolean variable derived from status. true if the mutation is currently executing. isPending } = function useConnect(): UseMutationResult & Pick Hook to connect a wallet adapter @example import { useConnect } from 'iso-filecoin-react' function App() { const { adapters, error, mutate: connect, isPending } = useConnect() return (
{adapters.map(adapter => ( ))} {error &&
Error: {error.message}
}
) } @returns ― Connection mutation and state useConnect() return ( < JSX.IntrinsicElements.div: DetailedHTMLProps, HTMLDivElement> div> { const adapters: WalletAdapter[] List of available wallet adapters adapters. Array.map(callbackfn: (value: WalletAdapter, index: number, array: WalletAdapter[]) => JSX.Element, thisArg?: any): JSX.Element[] Calls a defined callback function on each element of an array, and returns an array that contains the results. @param ― callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. @param ― thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. map( adapter: WalletAdapter adapter => ( < JSX.IntrinsicElements.button: DetailedHTMLProps, HTMLButtonElement> button Attributes.key?: Key | null | undefined key={ adapter: WalletAdapter adapter. WalletAdapter.name: string Human readable wallet name name} DOMAttributes.onClick?: MouseEventHandler | undefined onClick={() => const connect: (variables: { adapter: WalletAdapter; }, options?: MutateOptions | undefined) => void The mutation function you can call with variables to trigger the mutation and optionally hooks on additional callback options. connect({ adapter: WalletAdapter adapter })} ButtonHTMLAttributes.disabled?: boolean | undefined disabled={ const isPending: boolean A boolean variable derived from status. true if the mutation is currently executing. isPending} > Connect { adapter: WalletAdapter adapter. WalletAdapter.name: string Human readable wallet name name} , HTMLButtonElement> button> ))} { const error: Error | null The error object for the mutation, if an error was encountered. Defaults to null. error && < JSX.IntrinsicElements.div: DetailedHTMLProps, HTMLDivElement> div>Error: { const error: Error The error object for the mutation, if an error was encountered. Defaults to null. error. Error.message: string message}, HTMLDivElement> div>} , HTMLDivElement> div> ) } ``` # useDeriveAccount > **useDeriveAccount**(): `UseMutationResult`<[`IAccount`](/reference/iso-filecoin-react/types/interfaces/iaccount/), [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), `number`, `unknown`> Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:478](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L478) ## Returns [Section titled “Returns”](#returns) `UseMutationResult`<[`IAccount`](/reference/iso-filecoin-react/types/interfaces/iaccount/), [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), `number`, `unknown`> # useDisconnect > **useDisconnect**(): `UseMutationResult`<`void`, [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), `void`, `unknown`> Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:444](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L444) ## Returns [Section titled “Returns”](#returns) `UseMutationResult`<`void`, [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), `void`, `unknown`> # useEstimateGas > **useEstimateGas**(`options`): `UseQueryResult`<{ `gas`: `bigint`; `symbol`: `string`; `total`: `bigint`; }, [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error)> Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:571](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L571) Estimate the gas for a message ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Description | | ----------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | | `options` | { `maxFee?`: `bigint`; `to`: `string`; `value`: `bigint`; } | - | | `options.maxFee?` | `bigint` | Max fee to pay for gas (attoFIL/gas units). Defaults to 0n. | | `options.to` | `string` | Address to send the message to | | `options.value` | `bigint` | Value to send with the message | ## Returns [Section titled “Returns”](#returns) `UseQueryResult`<{ `gas`: `bigint`; `symbol`: `string`; `total`: `bigint`; }, [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error)> # useFilecoinProvider > **useFilecoinProvider**(): [`FilecoinContextType`](/reference/iso-filecoin-react/types/type-aliases/filecoincontexttype/) Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:283](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L283) ## Returns [Section titled “Returns”](#returns) [`FilecoinContextType`](/reference/iso-filecoin-react/types/type-aliases/filecoincontexttype/) # useSendMessage > **useSendMessage**(): `UseMutationResult`<[`CID`](/reference/iso-filecoin/types/type-aliases/cid/), [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), { `from?`: `string`; `gasFeeCap?`: `string`; `gasLimit?`: `number`; `gasPremium?`: `string`; `method?`: `number`; `nonce?`: `number`; `params?`: `string`; `to`: `string`; `value`: `string`; `version?`: `0`; }, `unknown`> Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:606](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L606) ## Returns [Section titled “Returns”](#returns) `UseMutationResult`<[`CID`](/reference/iso-filecoin/types/type-aliases/cid/), [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), { `from?`: `string`; `gasFeeCap?`: `string`; `gasLimit?`: `number`; `gasPremium?`: `string`; `method?`: `number`; `nonce?`: `number`; `params?`: `string`; `to`: `string`; `value`: `string`; `version?`: `0`; }, `unknown`> # useSign > **useSign**(): `UseMutationResult`<[`Signature`](/reference/iso-filecoin/signature/classes/signature/), [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>, `unknown`> Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:656](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L656) Hook to sign a message ## Returns [Section titled “Returns”](#returns) `UseMutationResult`<[`Signature`](/reference/iso-filecoin/signature/classes/signature/), [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>, `unknown`> ## Example [Section titled “Example”](#example) ```tsx import { function useSign(): UseMutationResult, unknown> Hook to sign a message @example import { useSign } from 'iso-filecoin-react' useSign } from 'iso-filecoin-react' ``` # WalletAdapter Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:63 Wallet adapter interface ## Extends [Section titled “Extends”](#extends) * `TypedEventTarget`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)> ## Properties [Section titled “Properties”](#properties) ### account [Section titled “account”](#account) > `readonly` **account**: [`IAccount`](/reference/iso-filecoin-react/types/interfaces/iaccount/) | `undefined` Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:99 Currently active account, if connected *** ### changeNetwork() [Section titled “changeNetwork()”](#changenetwork) > **changeNetwork**: (`network`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AccountNetwork`](/reference/iso-filecoin-react/types/interfaces/accountnetwork/)> Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:124 Change the network and derive a new account #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Description | | --------- | ---------------------------------------------------------------------- | ------------------------ | | `network` | [`Network`](/reference/iso-filecoin-react/types/type-aliases/network/) | The network to change to | #### Returns [Section titled “Returns”](#returns) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AccountNetwork`](/reference/iso-filecoin-react/types/interfaces/accountnetwork/)> *** ### checkSupport() [Section titled “checkSupport()”](#checksupport) > **checkSupport**: () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:103 Check if this wallet adapter is supported in the current environment #### Returns [Section titled “Returns”](#returns-1) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> *** ### connect() [Section titled “connect()”](#connect) > **connect**: (`params`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AccountNetwork`](/reference/iso-filecoin-react/types/interfaces/accountnetwork/)> Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:108 Connect to the wallet #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | Description | | ----------------- | --------------------------------------------------------------------------------------- | -------------- | | `params` | { `network?`: [`Network`](/reference/iso-filecoin-react/types/type-aliases/network/); } | Connect params | | `params.network?` | [`Network`](/reference/iso-filecoin-react/types/type-aliases/network/) | - | #### Returns [Section titled “Returns”](#returns-2) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AccountNetwork`](/reference/iso-filecoin-react/types/interfaces/accountnetwork/)> *** ### connected [Section titled “connected”](#connected) > `readonly` **connected**: `boolean` Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:95 Whether the wallet is currently connected *** ### connecting [Section titled “connecting”](#connecting) > `readonly` **connecting**: `boolean` Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:91 Whether the wallet is in the process of connecting *** ### deriveAccount() [Section titled “deriveAccount()”](#deriveaccount) > **deriveAccount**: (`index`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`IAccount`](/reference/iso-filecoin-react/types/interfaces/iaccount/)> Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:119 Derive a new account at the given index #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | Description | | --------- | -------- | ------------------------- | | `index` | `number` | The derivation path index | #### Returns [Section titled “Returns”](#returns-3) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`IAccount`](/reference/iso-filecoin-react/types/interfaces/iaccount/)> *** ### disconnect() [Section titled “disconnect()”](#disconnect) > **disconnect**: () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:114 Disconnect from the wallet #### Returns [Section titled “Returns”](#returns-4) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> *** ### id [Section titled “id”](#id) > `readonly` **id**: `string` Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:71 Wallet adapter identifier (e.g. ‘filsnap’, ‘ledger’, ‘hd’, ‘raw’) *** ### name [Section titled “name”](#name) > **name**: `string` Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:75 Human readable wallet name *** ### network [Section titled “network”](#network) > `readonly` **network**: [`Network`](/reference/iso-filecoin-react/types/type-aliases/network/) Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:83 Current network (mainnet or testnet) *** ### personalSign() [Section titled “personalSign()”](#personalsign) > **personalSign**: (`data`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:138 Sign FRC-102 message #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | Description | | --------- | ----------------------------------------------------------------------------------------------------- | ----------------- | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | raw bytes to sign | #### Returns [Section titled “Returns”](#returns-5) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> #### See [Section titled “See”](#see) *** ### signMessage() [Section titled “signMessage()”](#signmessage) > **signMessage**: (`message`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:144 Sign filecoin message #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | Description | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | | `message` | { `from`: `string`; `gasFeeCap`: `string`; `gasLimit`: `number`; `gasPremium`: `string`; `method`: `number`; `nonce`: `number`; `params`: `string`; `to`: `string`; `value`: `string`; `version`: `0`; } | Filecoin message to sign | | `message.from` | `string` | - | | `message.gasFeeCap` | `string` | - | | `message.gasLimit` | `number` | - | | `message.gasPremium` | `string` | - | | `message.method` | `number` | - | | `message.nonce` | `number` | - | | `message.params` | `string` | - | | `message.to` | `string` | - | | `message.value` | `string` | - | | `message.version` | `0` | - | #### Returns [Section titled “Returns”](#returns-6) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> *** ### support [Section titled “support”](#support) > `readonly` **support**: `"NotChecked"` | `"Detected"` | `"NotDetected"` | `"NotSupported"` Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:87 Wallet support status (NotChecked, Detected, NotDetected, NotSupported) *** ### uid [Section titled “uid”](#uid) > `readonly` **uid**: `string` Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:67 Unique identifier for this wallet instance *** ### url [Section titled “url”](#url) > **url**: `string` Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:79 Wallet homepage URL ## Methods [Section titled “Methods”](#methods) ### addEventListener() [Section titled “addEventListener()”](#addeventlistener) > **addEventListener**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:29 #### Type Parameters [Section titled “Type Parameters”](#type-parameters) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"error"` \| `"connect"` \| `"disconnect"` \| `"accountChanged"` \| `"networkChanged"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-5) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `AddEventListenerOptions` | #### Returns [Section titled “Returns”](#returns-7) `void` #### Inherit Doc [Section titled “Inherit Doc”](#inherit-doc) #### Inherited from [Section titled “Inherited from”](#inherited-from) `TypedEventTarget.addEventListener` *** ### dispatchEvent() [Section titled “dispatchEvent()”](#dispatchevent) > **dispatchEvent**(`event`): `boolean` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.dom.d.ts:11575 The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent) #### Parameters [Section titled “Parameters”](#parameters-6) | Parameter | Type | | --------- | ----------------------------------------------------------- | | `event` | [`Event`](https://developer.mozilla.org/docs/Web/API/Event) | #### Returns [Section titled “Returns”](#returns-8) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `TypedEventTarget.dispatchEvent` *** ### dispatchTypedEvent() [Section titled “dispatchTypedEvent()”](#dispatchtypedevent) > **dispatchTypedEvent**<`T`>(`_type`, `event`): `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:20 Dispatches a synthetic event to target and returns true if either event’s cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. #### Type Parameters [Section titled “Type Parameters”](#type-parameters-1) | Type Parameter | | ------------------------------------------------------------------------------------------------------ | | `T` *extends* keyof [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/) | #### Parameters [Section titled “Parameters”](#parameters-7) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------- | | `_type` | `T` | | `event` | [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`] | #### Returns [Section titled “Returns”](#returns-9) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `TypedEventTarget.dispatchTypedEvent` *** ### emit() [Section titled “emit()”](#emit) > **emit**<`T`>(…`args`): `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:21 #### Type Parameters [Section titled “Type Parameters”](#type-parameters-2) | Type Parameter | | ------------------------------------------------------------------------------------------------------ | | `T` *extends* keyof [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/) | #### Parameters [Section titled “Parameters”](#parameters-8) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | …`args` | [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`] *extends* `IsAny`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`]> ? \[`T`, `unknown`] : \[`T`, [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`]] | #### Returns [Section titled “Returns”](#returns-10) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `TypedEventTarget.emit` *** ### off() [Section titled “off()”](#off) > **off**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:55 Alias for [TypedEventTarget.removeEventListener](/reference/iso-filecoin-react/index/interfaces/walletadapter/#removeeventlistener) #### Type Parameters [Section titled “Type Parameters”](#type-parameters-3) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"error"` \| `"connect"` \| `"disconnect"` \| `"accountChanged"` \| `"networkChanged"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-9) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `EventListenerOptions` | #### Returns [Section titled “Returns”](#returns-11) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `TypedEventTarget.off` *** ### on() [Section titled “on()”](#on) > **on**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:38 Alias for [TypedEventTarget.addEventListener](/reference/iso-filecoin-react/index/interfaces/walletadapter/#addeventlistener) #### Type Parameters [Section titled “Type Parameters”](#type-parameters-4) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"error"` \| `"connect"` \| `"disconnect"` \| `"accountChanged"` \| `"networkChanged"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-10) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `AddEventListenerOptions` | #### Returns [Section titled “Returns”](#returns-12) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-5) `TypedEventTarget.on` *** ### removeEventListener() [Section titled “removeEventListener()”](#removeeventlistener) > **removeEventListener**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:46 #### Type Parameters [Section titled “Type Parameters”](#type-parameters-5) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"error"` \| `"connect"` \| `"disconnect"` \| `"accountChanged"` \| `"networkChanged"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-11) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `EventListenerOptions` | #### Returns [Section titled “Returns”](#returns-13) `void` #### Inherit Doc [Section titled “Inherit Doc”](#inherit-doc-1) #### Inherited from [Section titled “Inherited from”](#inherited-from-6) `TypedEventTarget.removeEventListener` *** ### ~~sign()~~ [Section titled “sign()”](#sign) > **sign**(`data`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:131 Sign raw bytes Deprecated Use [personalSign](/reference/iso-filecoin-react/index/interfaces/walletadapter/#personalsign) instead #### Parameters [Section titled “Parameters”](#parameters-12) | Parameter | Type | Description | | --------- | ----------------------------------------------------------------------------------------------------- | ----------------- | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | raw bytes to sign | #### Returns [Section titled “Returns”](#returns-14) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> # Index Context and hooks for Filecoin wallets. ## Interfaces [Section titled “Interfaces”](#interfaces) | Interface | Description | | ------------------------------------------------------------------------------ | ------------------------ | | [WalletAdapter](/reference/iso-filecoin-react/index/interfaces/walletadapter/) | Wallet adapter interface | ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | ---------------------------------------------------------------- | ----------- | | [Chain](/reference/iso-filecoin-react/index/type-aliases/chain/) | - | ## Variables [Section titled “Variables”](#variables) | Variable | Description | | ----------------------------------------------------------------- | -------------------------------------- | | [mainnet](/reference/iso-filecoin-react/index/variables/mainnet/) | Filecoin EVM Mainnet chain | | [testnet](/reference/iso-filecoin-react/index/variables/testnet/) | Filecoin EVM Calibration testnet chain | ## Functions [Section titled “Functions”](#functions) | Function | Description | | ----------------------------------------------------------------------------------------- | ------------------------------------------------------- | | [FilecoinProvider](/reference/iso-filecoin-react/index/functions/filecoinprovider/) | - | | [useAccount](/reference/iso-filecoin-react/index/functions/useaccount/) | Hook to access the current account and its state | | [useAdapter](/reference/iso-filecoin-react/index/functions/useadapter/) | Hook to access the current wallet adapter and its state | | [useAddresses](/reference/iso-filecoin-react/index/functions/useaddresses/) | Resolve addresses from the network TODO: use cache | | [useAppKitAdapter](/reference/iso-filecoin-react/index/functions/useappkitadapter/) | Hook to sync the adapter to the context for AppKit | | [useBalance](/reference/iso-filecoin-react/index/functions/usebalance/) | - | | [useChangeNetwork](/reference/iso-filecoin-react/index/functions/usechangenetwork/) | - | | [useConnect](/reference/iso-filecoin-react/index/functions/useconnect/) | Hook to connect a wallet adapter | | [useDeriveAccount](/reference/iso-filecoin-react/index/functions/usederiveaccount/) | - | | [useDisconnect](/reference/iso-filecoin-react/index/functions/usedisconnect/) | - | | [useEstimateGas](/reference/iso-filecoin-react/index/functions/useestimategas/) | Estimate the gas for a message | | [useFilecoinProvider](/reference/iso-filecoin-react/index/functions/usefilecoinprovider/) | - | | [useSendMessage](/reference/iso-filecoin-react/index/functions/usesendmessage/) | - | | [useSign](/reference/iso-filecoin-react/index/functions/usesign/) | Hook to sign a message | ## References [Section titled “References”](#references) ### ConnectionState [Section titled “ConnectionState”](#connectionstate) Re-exports [ConnectionState](/reference/iso-filecoin-react/types/type-aliases/connectionstate/) # Chain > **Chain** = [`Chain`](/reference/iso-filecoin/types/interfaces/chain/) Defined in: [packages/iso-filecoin-react/src/wallet-provider.js:22](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/wallet-provider.js#L22) # mainnet > `const` **mainnet**: [`Chain`](/reference/iso-filecoin/types/interfaces/chain/) Defined in: packages/iso-filecoin/dist/src/chains.d.ts:13 Filecoin EVM Mainnet chain # testnet > `const` **testnet**: [`Chain`](/reference/iso-filecoin/types/interfaces/chain/) Defined in: packages/iso-filecoin/dist/src/chains.d.ts:19 Filecoin EVM Calibration testnet chain # Index ## Modules [Section titled “Modules”](#modules) | Module | Description | | ---------------------------------------------------- | --------------------------------------- | | [index](/reference/iso-filecoin-react/index/readme/) | Context and hooks for Filecoin wallets. | | [types](/reference/iso-filecoin-react/types/readme/) | - | # AccountNetwork Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:56 ## Properties [Section titled “Properties”](#properties) ### account [Section titled “account”](#account) > **account**: [`IAccount`](/reference/iso-filecoin-react/types/interfaces/iaccount/) Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:58 *** ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin-react/types/type-aliases/network/) Defined in: packages/iso-filecoin-wallets/dist/src/types.d.ts:57 # FilecoinProviderProps Defined in: [packages/iso-filecoin-react/src/types.ts:15](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L15) Wallet provider props ## Properties [Section titled “Properties”](#properties) ### adapters [Section titled “adapters”](#adapters) > **adapters**: [`WalletAdapter`](/reference/iso-filecoin-react/index/interfaces/walletadapter/)\[] Defined in: [packages/iso-filecoin-react/src/types.ts:20](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L20) *** ### network? [Section titled “network?”](#network) > `optional` **network**: [`Network`](/reference/iso-filecoin-react/types/type-aliases/network/) Defined in: [packages/iso-filecoin-react/src/types.ts:19](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L19) #### Default [Section titled “Default”](#default) ```ts 'mainnet' ``` *** ### reconnectOnMount? [Section titled “reconnectOnMount?”](#reconnectonmount) > `optional` **reconnectOnMount**: `boolean` Defined in: [packages/iso-filecoin-react/src/types.ts:25](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L25) #### Default [Section titled “Default”](#default-1) ```ts true ``` *** ### rpcs? [Section titled “rpcs?”](#rpcs) > `optional` **rpcs**: [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)<[`Network`](/reference/iso-filecoin-react/types/type-aliases/network/), [`RPC`](/reference/iso-filecoin/rpc/classes/rpc/)> Defined in: [packages/iso-filecoin-react/src/types.ts:21](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L21) # IAccount Defined in: packages/iso-filecoin/dist/src/types.d.ts:31 Account interface ## Properties [Section titled “Properties”](#properties) ### address [Section titled “address”](#address) > **address**: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) Defined in: packages/iso-filecoin/dist/src/types.d.ts:33 *** ### path? [Section titled “path?”](#path) > `optional` **path**: `string` Defined in: packages/iso-filecoin/dist/src/types.d.ts:38 Derivation path - only for HD wallets *** ### privateKey? [Section titled “privateKey?”](#privatekey) > `optional` **privateKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: packages/iso-filecoin/dist/src/types.d.ts:42 Private key - only for RAW and HD wallets *** ### publicKey [Section titled “publicKey”](#publickey) > **publicKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) Defined in: packages/iso-filecoin/dist/src/types.d.ts:34 *** ### type [Section titled “type”](#type) > **type**: `"SECP256K1"` | `"BLS"` Defined in: packages/iso-filecoin/dist/src/types.d.ts:32 # Index ## Interfaces [Section titled “Interfaces”](#interfaces) | Interface | Description | | ---------------------------------------------------------------------------------------------- | --------------------- | | [AccountNetwork](/reference/iso-filecoin-react/types/interfaces/accountnetwork/) | - | | [FilecoinProviderProps](/reference/iso-filecoin-react/types/interfaces/filecoinproviderprops/) | Wallet provider props | | [IAccount](/reference/iso-filecoin-react/types/interfaces/iaccount/) | Account interface | ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------- | | [Compute](/reference/iso-filecoin-react/types/type-aliases/compute/) | Combines members of an intersection into a readable type. | | [ConnectionState](/reference/iso-filecoin-react/types/type-aliases/connectionstate/) | Connection state | | [FilecoinContextType](/reference/iso-filecoin-react/types/type-aliases/filecoincontexttype/) | Wallet context type | | [Network](/reference/iso-filecoin-react/types/type-aliases/network/) | - | | [UseAccountReturnType](/reference/iso-filecoin-react/types/type-aliases/useaccountreturntype/) | Use account return type | ## References [Section titled “References”](#references) ### WalletAdapter [Section titled “WalletAdapter”](#walletadapter) Re-exports [WalletAdapter](/reference/iso-filecoin-react/index/interfaces/walletadapter/) # Compute > **Compute**<`type`> = `{ [key in keyof type]: type[key] }` & `unknown` Defined in: [packages/iso-filecoin-react/src/types.ts:10](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L10) Combines members of an intersection into a readable type. ## Type Parameters [Section titled “Type Parameters”](#type-parameters) | Type Parameter | | -------------- | | `type` | # ConnectionState > **ConnectionState** = `"connected"` | `"disconnected"` | `"connecting"` | `"reconnecting"` Defined in: [packages/iso-filecoin-react/src/types.ts:63](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L63) Connection state # FilecoinContextType > **FilecoinContextType** = `object` Defined in: [packages/iso-filecoin-react/src/types.ts:31](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L31) Wallet context type ## Properties [Section titled “Properties”](#properties) ### account [Section titled “account”](#account) > **account**: [`IAccount`](/reference/iso-filecoin-react/types/interfaces/iaccount/) | `undefined` Defined in: [packages/iso-filecoin-react/src/types.ts:39](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L39) Currently connected account *** ### adapter [Section titled “adapter”](#adapter) > **adapter**: [`WalletAdapter`](/reference/iso-filecoin-react/index/interfaces/walletadapter/) | `undefined` Defined in: [packages/iso-filecoin-react/src/types.ts:37](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L37) Currently selected wallet adapter *** ### adapters [Section titled “adapters”](#adapters) > **adapters**: [`WalletAdapter`](/reference/iso-filecoin-react/index/interfaces/walletadapter/)\[] Defined in: [packages/iso-filecoin-react/src/types.ts:35](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L35) List of available wallet adapters *** ### error [Section titled “error”](#error) > **error**: [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) | `undefined` Defined in: [packages/iso-filecoin-react/src/types.ts:49](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L49) Last error that occurred on the selected adapter *** ### loading [Section titled “loading”](#loading) > **loading**: `boolean` Defined in: [packages/iso-filecoin-react/src/types.ts:43](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L43) Provider is checking adapters support *** ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin-react/types/type-aliases/network/) Defined in: [packages/iso-filecoin-react/src/types.ts:33](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L33) Current network (mainnet or testnet) *** ### reconnecting [Section titled “reconnecting”](#reconnecting) > **reconnecting**: `boolean` Defined in: [packages/iso-filecoin-react/src/types.ts:47](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L47) Provider is reconnecting to the last selected adapter *** ### rpcs [Section titled “rpcs”](#rpcs) > **rpcs**: [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)<[`Network`](/reference/iso-filecoin-react/types/type-aliases/network/), [`RPC`](/reference/iso-filecoin/rpc/classes/rpc/)> Defined in: [packages/iso-filecoin-react/src/types.ts:51](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L51) RPC clients for each network *** ### setAccount() [Section titled “setAccount()”](#setaccount) > **setAccount**: (`value`) => `void` Defined in: [packages/iso-filecoin-react/src/types.ts:53](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L53) Set the current account #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------- | | `value` | `React.SetStateAction`<[`IAccount`](/reference/iso-filecoin-react/types/interfaces/iaccount/) \| `undefined`> | #### Returns [Section titled “Returns”](#returns) `void` *** ### setAdapter() [Section titled “setAdapter()”](#setadapter) > **setAdapter**: (`value`) => `void` Defined in: [packages/iso-filecoin-react/src/types.ts:57](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L57) Set the current wallet adapter #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | --------- | ----------------------------------------------------------------------------------------------------------------------- | | `value` | `React.SetStateAction`<[`WalletAdapter`](/reference/iso-filecoin-react/index/interfaces/walletadapter/) \| `undefined`> | #### Returns [Section titled “Returns”](#returns-1) `void` *** ### setNetwork() [Section titled “setNetwork()”](#setnetwork) > **setNetwork**: (`value`) => `void` Defined in: [packages/iso-filecoin-react/src/types.ts:55](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L55) Set the current network #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------------- | | `value` | `React.SetStateAction`<[`Network`](/reference/iso-filecoin-react/types/type-aliases/network/)> | #### Returns [Section titled “Returns”](#returns-2) `void` # Network > **Network** = `"mainnet"` | `"testnet"` Defined in: packages/iso-filecoin/dist/src/types.d.ts:94 # UseAccountReturnType > **UseAccountReturnType** = [`Compute`](/reference/iso-filecoin-react/types/type-aliases/compute/)<[`Pick`](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys)<[`FilecoinContextType`](/reference/iso-filecoin-react/types/type-aliases/filecoincontexttype/), `"account"` | `"adapter"` | `"network"`> & `object`> Defined in: [packages/iso-filecoin-react/src/types.ts:72](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-react/src/types.ts#L72) Use account return type # FilecoinAppKitAdapter Defined in: [packages/iso-filecoin-wallets/src/appkit.js:28](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L28) TODO: * auth provider for SIWX ## Description [Section titled “Description”](#description) Filecoin adapter for AppKit ## Extends [Section titled “Extends”](#extends) * `AdapterBlueprint` ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new FilecoinAppKitAdapter**(`params`): `FilecoinAppKitAdapter` Defined in: [packages/iso-filecoin-wallets/src/appkit.js:42](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L42) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------------ | | `params` | { `adapters`: [`WalletAdapter`](/reference/iso-filecoin-wallets/local/interfaces/walletadapter/)\[]; } | | `params.adapters` | [`WalletAdapter`](/reference/iso-filecoin-wallets/local/interfaces/walletadapter/)\[] | #### Returns [Section titled “Returns”](#returns) `FilecoinAppKitAdapter` #### Overrides [Section titled “Overrides”](#overrides) `AdapterBlueprint.constructor` ## Properties [Section titled “Properties”](#properties) ### adapters [Section titled “adapters”](#adapters) > **adapters**: [`WalletAdapter`](/reference/iso-filecoin-wallets/local/interfaces/walletadapter/)\[] Defined in: [packages/iso-filecoin-wallets/src/appkit.js:37](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L37) *** ### adapterType [Section titled “adapterType”](#adaptertype) > **adapterType**: `string` | `undefined` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:32 #### Inherited from [Section titled “Inherited from”](#inherited-from) `AdapterBlueprint.adapterType` *** ### availableConnections [Section titled “availableConnections”](#availableconnections) > `protected` **availableConnections**: `Connection`\[] Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:36 #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `AdapterBlueprint.availableConnections` *** ### availableConnectors [Section titled “availableConnectors”](#availableconnectors) > `protected` **availableConnectors**: `FilecoinConnector`\[] Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:35 #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `AdapterBlueprint.availableConnectors` *** ### caipNetworks [Section titled “caipNetworks”](#caipnetworks) > **caipNetworks**: `CaipNetwork`\[] | `undefined` Defined in: [packages/iso-filecoin-wallets/src/appkit.js:61](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L61) *** ### connector? [Section titled “connector?”](#connector) > `protected` `optional` **connector**: `FilecoinConnector` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:37 #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `AdapterBlueprint.connector` *** ### getCaipNetworks() [Section titled “getCaipNetworks()”](#getcaipnetworks) > **getCaipNetworks**: (`namespace?`) => `CaipNetwork`\[] Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:33 #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ------------ | ---------------- | | `namespace?` | `ChainNamespace` | #### Returns [Section titled “Returns”](#returns-1) `CaipNetwork`\[] #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `AdapterBlueprint.getCaipNetworks` *** ### getConnectorId() [Section titled “getConnectorId()”](#getconnectorid) > **getConnectorId**: (`namespace`) => `string` | `undefined` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:34 #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | ----------- | ---------------- | | `namespace` | `ChainNamespace` | #### Returns [Section titled “Returns”](#returns-2) `string` | `undefined` #### Inherited from [Section titled “Inherited from”](#inherited-from-5) `AdapterBlueprint.getConnectorId` *** ### namespace [Section titled “namespace”](#namespace) > **namespace**: `ChainNamespace` | `undefined` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:30 #### Inherited from [Section titled “Inherited from”](#inherited-from-6) `AdapterBlueprint.namespace` *** ### projectId? [Section titled “projectId?”](#projectid) > `optional` **projectId**: `string` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:31 #### Inherited from [Section titled “Inherited from”](#inherited-from-7) `AdapterBlueprint.projectId` *** ### provider? [Section titled “provider?”](#provider) > `protected` `optional` **provider**: `Provider` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:38 #### Inherited from [Section titled “Inherited from”](#inherited-from-8) `AdapterBlueprint.provider` *** ### providerHandlers [Section titled “providerHandlers”](#providerhandlers) > `protected` **providerHandlers**: [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)<`string`, { `accountsChanged`: (`accounts`) => `void`; `chainChanged`: (`chainId`) => `void`; `disconnect`: () => `void`; `provider`: `Provider` | `CombinedProvider`; } | `null`> Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:39 #### Inherited from [Section titled “Inherited from”](#inherited-from-9) `AdapterBlueprint.providerHandlers` ## Accessors [Section titled “Accessors”](#accessors) ### connections [Section titled “connections”](#connections) #### Get Signature [Section titled “Get Signature”](#get-signature) > **get** **connections**(): `Connection`\[] Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:65 Gets the available connections. ##### Returns [Section titled “Returns”](#returns-3) `Connection`\[] An array of available connections #### Inherited from [Section titled “Inherited from”](#inherited-from-10) `AdapterBlueprint.connections` *** ### connectors [Section titled “connectors”](#connectors) #### Get Signature [Section titled “Get Signature”](#get-signature-1) > **get** **connectors**(): `Connector`\[] Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:60 Gets the available connectors. ##### Returns [Section titled “Returns”](#returns-4) `Connector`\[] An array of available connectors #### Inherited from [Section titled “Inherited from”](#inherited-from-11) `AdapterBlueprint.connectors` *** ### networks [Section titled “networks”](#networks) #### Get Signature [Section titled “Get Signature”](#get-signature-2) > **get** **networks**(): `CaipNetwork`\[] Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:70 Gets the supported networks. ##### Returns [Section titled “Returns”](#returns-5) `CaipNetwork`\[] An array of supported networks #### Inherited from [Section titled “Inherited from”](#inherited-from-12) `AdapterBlueprint.networks` ## Methods [Section titled “Methods”](#methods) ### addConnection() [Section titled “addConnection()”](#addconnection) > `protected` **addConnection**(…`connections`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:95 Adds connections to the available connections list #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | Description | | -------------- | --------------- | ---------------------- | | …`connections` | `Connection`\[] | The connections to add | #### Returns [Section titled “Returns”](#returns-6) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-13) `AdapterBlueprint.addConnection` *** ### addConnector() [Section titled “addConnector()”](#addconnector) > `protected` **addConnector**(…`connectors`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:90 Adds one or more connectors to the available connectors list. #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | Description | | ------------- | ---------------------- | --------------------- | | …`connectors` | `FilecoinConnector`\[] | The connectors to add | #### Returns [Section titled “Returns”](#returns-7) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-14) `AdapterBlueprint.addConnector` *** ### clearConnections() [Section titled “clearConnections()”](#clearconnections) > `protected` **clearConnections**(`emit?`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:105 Clears all connections from the available connections list #### Parameters [Section titled “Parameters”](#parameters-5) | Parameter | Type | Description | | --------- | --------- | ------------------------------------- | | `emit?` | `boolean` | Whether to emit the connections event | #### Returns [Section titled “Returns”](#returns-8) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-15) `AdapterBlueprint.clearConnections` *** ### connect() [Section titled “connect()”](#connect) > **connect**(`params`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`ConnectResult`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:128](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L128) Connect #### Parameters [Section titled “Parameters”](#parameters-6) | Parameter | Type | | --------- | --------------- | | `params` | `ConnectParams` | #### Returns [Section titled “Returns”](#returns-9) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`ConnectResult`> #### Overrides [Section titled “Overrides”](#overrides-1) `AdapterBlueprint.connect` *** ### connectWalletConnect() [Section titled “connectWalletConnect()”](#connectwalletconnect) > **connectWalletConnect**(`_chainId?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `clientId`: `string`; } | `undefined`> Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:136 Connects to WalletConnect. #### Parameters [Section titled “Parameters”](#parameters-7) | Parameter | Type | Description | | ----------- | -------------------- | ------------------------------- | | `_chainId?` | `string` \| `number` | Optional chain ID to connect to | #### Returns [Section titled “Returns”](#returns-10) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `clientId`: `string`; } | `undefined`> #### Inherited from [Section titled “Inherited from”](#inherited-from-16) `AdapterBlueprint.connectWalletConnect` *** ### construct() [Section titled “construct()”](#construct) > **construct**(`params`): `void` Defined in: [packages/iso-filecoin-wallets/src/appkit.js:53](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L53) #### Parameters [Section titled “Parameters”](#parameters-8) | Parameter | Type | | --------- | -------- | | `params` | `Params` | #### Returns [Section titled “Returns”](#returns-11) `void` #### Overrides [Section titled “Overrides”](#overrides-2) `AdapterBlueprint.construct` *** ### deleteConnection() [Section titled “deleteConnection()”](#deleteconnection) > `protected` **deleteConnection**(`connectorId`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:100 Deletes a connection from the available connections list #### Parameters [Section titled “Parameters”](#parameters-9) | Parameter | Type | Description | | ------------- | -------- | -------------------------------------------- | | `connectorId` | `string` | The connector ID of the connection to delete | #### Returns [Section titled “Returns”](#returns-12) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-17) `AdapterBlueprint.deleteConnection` *** ### disconnect() [Section titled “disconnect()”](#disconnect) > **disconnect**(`_params`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`DisconnectResult`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:203](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L203) Disconnect #### Parameters [Section titled “Parameters”](#parameters-10) | Parameter | Type | | --------- | ------------------ | | `_params` | `DisconnectParams` | #### Returns [Section titled “Returns”](#returns-13) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`DisconnectResult`> #### Overrides [Section titled “Overrides”](#overrides-3) `AdapterBlueprint.disconnect` *** ### emit() [Section titled “emit()”](#emit) > `protected` **emit**<`T`>(`eventName`, `data?`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:131 Emits an event with the given name and optional data. #### Type Parameters [Section titled “Type Parameters”](#type-parameters) | Type Parameter | | ------------------------- | | `T` *extends* `EventName` | #### Parameters [Section titled “Parameters”](#parameters-11) | Parameter | Type | Description | | ----------- | ----------------- | ----------------------------------------------------- | | `eventName` | `T` | The name of the event to emit | | `data?` | `EventData`\[`T`] | The optional data to be passed to the event listeners | #### Returns [Section titled “Returns”](#returns-14) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-18) `AdapterBlueprint.emit` *** ### emitFirstAvailableConnection() [Section titled “emitFirstAvailableConnection()”](#emitfirstavailableconnection) > `protected` **emitFirstAvailableConnection**(): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:274 Emits the first available connection. #### Returns [Section titled “Returns”](#returns-15) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-19) `AdapterBlueprint.emitFirstAvailableConnection` *** ### estimateGas() [Section titled “estimateGas()”](#estimategas) > **estimateGas**(`_params`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`EstimateGasTransactionResult`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:312](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L312) Estimate gas #### Parameters [Section titled “Parameters”](#parameters-12) | Parameter | Type | | --------- | ---------------------------- | | `_params` | `EstimateGasTransactionArgs` | #### Returns [Section titled “Returns”](#returns-16) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`EstimateGasTransactionResult`> #### Overrides [Section titled “Overrides”](#overrides-4) `AdapterBlueprint.estimateGas` *** ### formatUnits() [Section titled “formatUnits()”](#formatunits) > **formatUnits**(`_params`): `string` Defined in: [packages/iso-filecoin-wallets/src/appkit.js:346](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L346) Format units #### Parameters [Section titled “Parameters”](#parameters-13) | Parameter | Type | | --------- | ------------------- | | `_params` | `FormatUnitsParams` | #### Returns [Section titled “Returns”](#returns-17) `string` #### Overrides [Section titled “Overrides”](#overrides-5) `AdapterBlueprint.formatUnits` *** ### getAccounts() [Section titled “getAccounts()”](#getaccounts) > **getAccounts**(`params`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`GetAccountsResult`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:79](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L79) Get accounts #### Parameters [Section titled “Parameters”](#parameters-14) | Parameter | Type | | --------- | ------------------- | | `params` | `GetAccountsParams` | #### Returns [Section titled “Returns”](#returns-18) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`GetAccountsResult`> #### Overrides [Section titled “Overrides”](#overrides-6) `AdapterBlueprint.getAccounts` *** ### getBalance() [Section titled “getBalance()”](#getbalance) > **getBalance**(`params`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`GetBalanceResult`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:236](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L236) Get balance #### Parameters [Section titled “Parameters”](#parameters-15) | Parameter | Type | | --------- | ------------------ | | `params` | `GetBalanceParams` | #### Returns [Section titled “Returns”](#returns-19) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`GetBalanceResult`> #### Overrides [Section titled “Overrides”](#overrides-7) `AdapterBlueprint.getBalance` *** ### getCapabilities() [Section titled “getCapabilities()”](#getcapabilities) > **getCapabilities**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ }> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:356](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L356) #### Returns [Section titled “Returns”](#returns-20) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ }> #### Overrides [Section titled “Overrides”](#overrides-8) `AdapterBlueprint.getCapabilities` *** ### getConnection() [Section titled “getConnection()”](#getconnection) > **getConnection**(`params`): { `account`: { `address`: `string`; `publicKey?`: `string`; `type?`: `string`; } | `undefined`; `accounts`: `object`\[]; `auth?`: { `name`: `string` | `undefined`; `username`: `string` | `undefined`; }; `caipNetwork?`: `CaipNetwork`; `connector`: `ChainAdapterConnector` | `undefined`; `connectorId`: `string`; `icon?`: `string`; `name?`: `string`; `networkIcon?`: `string`; } | `null` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:287 Gets a connection based on provided parameters. If connectorId is provided, returns connection for that specific connector. Otherwise, returns the first available valid connection. #### Parameters [Section titled “Parameters”](#parameters-16) | Parameter | Type | Description | | --------- | --------------------- | --------------------- | | `params` | `GetConnectionParams` | Connection parameters | #### Returns [Section titled “Returns”](#returns-21) { `account`: { `address`: `string`; `publicKey?`: `string`; `type?`: `string`; } | `undefined`; `accounts`: `object`\[]; `auth?`: { `name`: `string` | `undefined`; `username`: `string` | `undefined`; }; `caipNetwork?`: `CaipNetwork`; `connector`: `ChainAdapterConnector` | `undefined`; `connectorId`: `string`; `icon?`: `string`; `name?`: `string`; `networkIcon?`: `string`; } | `null` Connection or null if none found #### Inherited from [Section titled “Inherited from”](#inherited-from-20) `AdapterBlueprint.getConnection` *** ### getProfile() [Section titled “getProfile()”](#getprofile) > **getProfile**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `profileImage`: `undefined`; `profileName`: `undefined`; }> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:350](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L350) #### Returns [Section titled “Returns”](#returns-22) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `profileImage`: `undefined`; `profileName`: `undefined`; }> *** ### getWalletConnectConnector() [Section titled “getWalletConnectConnector()”](#getwalletconnectconnector) > `protected` **getWalletConnectConnector**(): `WalletConnectConnector` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:236 #### Returns [Section titled “Returns”](#returns-23) `WalletConnectConnector` #### Inherited from [Section titled “Inherited from”](#inherited-from-21) `AdapterBlueprint.getWalletConnectConnector` *** ### getWalletConnectProvider() [Section titled “getWalletConnectProvider()”](#getwalletconnectprovider) > **getWalletConnectProvider**(`params`): `any` Defined in: [packages/iso-filecoin-wallets/src/appkit.js:386](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L386) #### Parameters [Section titled “Parameters”](#parameters-17) | Parameter | Type | | ----------------- | ---------------------- | | `params` | { `provider`: `any`; } | | `params.provider` | `any` | #### Returns [Section titled “Returns”](#returns-24) `any` #### Overrides [Section titled “Overrides”](#overrides-9) `AdapterBlueprint.getWalletConnectProvider` *** ### grantPermissions() [Section titled “grantPermissions()”](#grantpermissions) > **grantPermissions**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ }> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:359](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L359) #### Returns [Section titled “Returns”](#returns-25) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ }> #### Overrides [Section titled “Overrides”](#overrides-10) `AdapterBlueprint.grantPermissions` *** ### listenProviderEvents() [Section titled “listenProviderEvents()”](#listenproviderevents) > `protected` **listenProviderEvents**(`connectorId`, `provider`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:265 Listens to provider events for a specific connector. #### Parameters [Section titled “Parameters”](#parameters-18) | Parameter | Type | Description | | ------------- | -------------------------------- | ------------------------- | | `connectorId` | `string` | The ID of the connector | | `provider` | `Provider` \| `CombinedProvider` | The provider to listen to | #### Returns [Section titled “Returns”](#returns-26) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-22) `AdapterBlueprint.listenProviderEvents` *** ### off() [Section titled “off()”](#off) > **off**<`T`>(`eventName`, `callback`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:120 Removes an event listener for a specific event. #### Type Parameters [Section titled “Type Parameters”](#type-parameters-1) | Type Parameter | | ------------------------- | | `T` *extends* `EventName` | #### Parameters [Section titled “Parameters”](#parameters-19) | Parameter | Type | Description | | ----------- | -------------------- | ----------------------------------- | | `eventName` | `T` | The name of the event | | `callback` | `EventCallback`<`T`> | The callback function to be removed | #### Returns [Section titled “Returns”](#returns-27) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-23) `AdapterBlueprint.off` *** ### on() [Section titled “on()”](#on) > **on**<`T`>(`eventName`, `callback`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:113 Adds an event listener for a specific event. #### Type Parameters [Section titled “Type Parameters”](#type-parameters-2) | Type Parameter | | ------------------------- | | `T` *extends* `EventName` | #### Parameters [Section titled “Parameters”](#parameters-20) | Parameter | Type | Description | | ----------- | -------------------- | ------------------------------------------------------------ | | `eventName` | `T` | The name of the event | | `callback` | `EventCallback`<`T`> | The callback function to be called when the event is emitted | #### Returns [Section titled “Returns”](#returns-28) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-24) `AdapterBlueprint.on` *** ### onAccountsChanged() [Section titled “onAccountsChanged()”](#onaccountschanged) > `protected` **onAccountsChanged**(`accounts`, `connectorId`, `disconnectIfNoAccounts?`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:248 Handles accounts changed event for a specific connector. #### Parameters [Section titled “Parameters”](#parameters-21) | Parameter | Type | Description | | ------------------------- | ------------------------------------ | ------------------------- | | `accounts` | (`string` \| `ParsedCaipAddress`)\[] | The accounts that changed | | `connectorId` | `string` | The ID of the connector | | `disconnectIfNoAccounts?` | `boolean` | - | #### Returns [Section titled “Returns”](#returns-29) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-25) `AdapterBlueprint.onAccountsChanged` *** ### onChainChanged() [Section titled “onChainChanged()”](#onchainchanged) > `protected` **onChainChanged**(`chainId`, `connectorId`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:259 Handles chain changed event for a specific connector. #### Parameters [Section titled “Parameters”](#parameters-22) | Parameter | Type | Description | | ------------- | -------------------- | -------------------------------- | | `chainId` | `string` \| `number` | The ID of the chain that changed | | `connectorId` | `string` | The ID of the connector | #### Returns [Section titled “Returns”](#returns-30) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-26) `AdapterBlueprint.onChainChanged` *** ### onConnect() [Section titled “onConnect()”](#onconnect) > `protected` **onConnect**(`accounts`, `connectorId`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:242 Handles connect event for a specific connector. #### Parameters [Section titled “Parameters”](#parameters-23) | Parameter | Type | Description | | ------------- | ------------------------------------ | ------------------------- | | `accounts` | (`string` \| `ParsedCaipAddress`)\[] | The accounts that changed | | `connectorId` | `string` | The ID of the connector | #### Returns [Section titled “Returns”](#returns-31) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-27) `AdapterBlueprint.onConnect` *** ### onDisconnect() [Section titled “onDisconnect()”](#ondisconnect) > `protected` **onDisconnect**(`connectorId`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:253 Handles disconnect event for a specific connector. #### Parameters [Section titled “Parameters”](#parameters-24) | Parameter | Type | Description | | ------------- | -------- | ----------------------- | | `connectorId` | `string` | The ID of the connector | #### Returns [Section titled “Returns”](#returns-32) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-28) `AdapterBlueprint.onDisconnect` *** ### parseUnits() [Section titled “parseUnits()”](#parseunits) > **parseUnits**(`_params`): `bigint` Defined in: [packages/iso-filecoin-wallets/src/appkit.js:336](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L336) Parse units #### Parameters [Section titled “Parameters”](#parameters-25) | Parameter | Type | | --------- | ------------------ | | `_params` | `ParseUnitsParams` | #### Returns [Section titled “Returns”](#returns-33) `bigint` #### Overrides [Section titled “Overrides”](#overrides-11) `AdapterBlueprint.parseUnits` *** ### reconnect()? [Section titled “reconnect()?”](#reconnect) > `optional` **reconnect**(`params`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:231 Reconnects to a wallet. #### Parameters [Section titled “Parameters”](#parameters-26) | Parameter | Type | Description | | --------- | --------------- | ----------------------- | | `params` | `ConnectParams` | Reconnection parameters | #### Returns [Section titled “Returns”](#returns-34) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> #### Inherited from [Section titled “Inherited from”](#inherited-from-29) `AdapterBlueprint.reconnect` *** ### removeAllEventListeners() [Section titled “removeAllEventListeners()”](#removealleventlisteners) > **removeAllEventListeners**(): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:124 Removes all event listeners. #### Returns [Section titled “Returns”](#returns-35) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-30) `AdapterBlueprint.removeAllEventListeners` *** ### removeProviderListeners() [Section titled “removeProviderListeners()”](#removeproviderlisteners) > `protected` **removeProviderListeners**(`connectorId`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:270 Removes provider listeners for a specific connector. #### Parameters [Section titled “Parameters”](#parameters-27) | Parameter | Type | Description | | ------------- | -------- | ----------------------- | | `connectorId` | `string` | The ID of the connector | #### Returns [Section titled “Returns”](#returns-36) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-31) `AdapterBlueprint.removeProviderListeners` *** ### revokePermissions() [Section titled “revokePermissions()”](#revokepermissions) > **revokePermissions**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`` `0x${string}` ``> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:362](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L362) #### Returns [Section titled “Returns”](#returns-37) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`` `0x${string}` ``> #### Overrides [Section titled “Overrides”](#overrides-12) `AdapterBlueprint.revokePermissions` *** ### sendTransaction() [Section titled “sendTransaction()”](#sendtransaction) > **sendTransaction**(`_params`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`SendTransactionResult`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:324](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L324) Send transaction #### Parameters [Section titled “Parameters”](#parameters-28) | Parameter | Type | | --------- | ----------------------- | | `_params` | `SendTransactionParams` | #### Returns [Section titled “Returns”](#returns-38) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`SendTransactionResult`> #### Overrides [Section titled “Overrides”](#overrides-13) `AdapterBlueprint.sendTransaction` *** ### setAuthProvider() [Section titled “setAuthProvider()”](#setauthprovider) > **setAuthProvider**(`authProvider`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:85 Sets the auth provider. #### Parameters [Section titled “Parameters”](#parameters-29) | Parameter | Type | Description | | -------------- | ------------------ | -------------------------- | | `authProvider` | `W3mFrameProvider` | The auth provider instance | #### Returns [Section titled “Returns”](#returns-39) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-32) `AdapterBlueprint.setAuthProvider` *** ### setStatus() [Section titled “setStatus()”](#setstatus) > `protected` **setStatus**(`status`, `chainNamespace?`): `void` Defined in: node\_modules/.pnpm/@reown+appkit-controllers\@1.8.14\_@@<4.0.9_react@19.2.1_type_dc0f47de38012d7a751cce43b8aa162b>/node\_modules/@reown/appkit-controllers/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts:106 #### Parameters [Section titled “Parameters”](#parameters-30) | Parameter | Type | | ----------------- | -------------------------------------------------------------------------------------- | | `status` | `"reconnecting"` \| `"connected"` \| `"disconnected"` \| `"connecting"` \| `undefined` | | `chainNamespace?` | `ChainNamespace` | #### Returns [Section titled “Returns”](#returns-40) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-33) `AdapterBlueprint.setStatus` *** ### setUniversalProvider() [Section titled “setUniversalProvider()”](#setuniversalprovider) > **setUniversalProvider**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:380](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L380) Sets the universal provider for WalletConnect. #### Returns [Section titled “Returns”](#returns-41) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> #### Overrides [Section titled “Overrides”](#overrides-14) `AdapterBlueprint.setUniversalProvider` *** ### signMessage() [Section titled “signMessage()”](#signmessage) > **signMessage**(`_params`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`SignMessageResult`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:300](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L300) Sign message #### Parameters [Section titled “Parameters”](#parameters-31) | Parameter | Type | | --------- | ------------------- | | `_params` | `SignMessageParams` | #### Returns [Section titled “Returns”](#returns-42) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`SignMessageResult`> #### Overrides [Section titled “Overrides”](#overrides-15) `AdapterBlueprint.signMessage` *** ### switchNetwork() [Section titled “switchNetwork()”](#switchnetwork) > **switchNetwork**(`params`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:220](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L220) Switch network #### Parameters [Section titled “Parameters”](#parameters-32) | Parameter | Type | | --------- | --------------------- | | `params` | `SwitchNetworkParams` | #### Returns [Section titled “Returns”](#returns-43) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> #### Overrides [Section titled “Overrides”](#overrides-16) `AdapterBlueprint.switchNetwork` *** ### syncConnection() [Section titled “syncConnection()”](#syncconnection) > **syncConnection**(`params`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`ConnectResult`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:190](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L190) Sync connection #### Parameters [Section titled “Parameters”](#parameters-33) | Parameter | Type | | --------- | ---------------------- | | `params` | `SyncConnectionParams` | #### Returns [Section titled “Returns”](#returns-44) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`ConnectResult`> #### Overrides [Section titled “Overrides”](#overrides-17) `AdapterBlueprint.syncConnection` *** ### syncConnections() [Section titled “syncConnections()”](#syncconnections) > **syncConnections**(`_params`): `void` | [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:118](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L118) Sync connections #### Parameters [Section titled “Parameters”](#parameters-34) | Parameter | Type | | --------- | ----------------------- | | `_params` | `SyncConnectionsParams` | #### Returns [Section titled “Returns”](#returns-45) `void` | [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> #### Overrides [Section titled “Overrides”](#overrides-18) `AdapterBlueprint.syncConnections` *** ### syncConnectors() [Section titled “syncConnectors()”](#syncconnectors) > **syncConnectors**(): `void` | [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:106](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L106) Sync connectors #### Returns [Section titled “Returns”](#returns-46) `void` | [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> #### Overrides [Section titled “Overrides”](#overrides-19) `AdapterBlueprint.syncConnectors` *** ### walletGetAssets() [Section titled “walletGetAssets()”](#walletgetassets) > **walletGetAssets**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ }> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:365](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L365) #### Returns [Section titled “Returns”](#returns-47) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ }> #### Overrides [Section titled “Overrides”](#overrides-20) `AdapterBlueprint.walletGetAssets` *** ### writeContract() [Section titled “writeContract()”](#writecontract) > **writeContract**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`WriteContractResult`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:374](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L374) Write contract #### Returns [Section titled “Returns”](#returns-48) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`WriteContractResult`> #### Overrides [Section titled “Overrides”](#overrides-21) `AdapterBlueprint.writeContract` # Index ## Classes [Section titled “Classes”](#classes) | Class | Description | | ---------------------------------------------------------------------------------------------- | ------------------------------ | | [FilecoinAppKitAdapter](/reference/iso-filecoin-wallets/appkit/classes/filecoinappkitadapter/) | TODO: - auth provider for SIWX | ## Variables [Section titled “Variables”](#variables) | Variable | Description | | ------------------------------------------------------------------------------------ | ----------------------- | | [chainImages](/reference/iso-filecoin-wallets/appkit/variables/chainimages/) | Appkit chain images | | [connectorImages](/reference/iso-filecoin-wallets/appkit/variables/connectorimages/) | Appkit connector images | | [filNamespace](/reference/iso-filecoin-wallets/appkit/variables/filnamespace/) | - | # chainImages > `const` **chainImages**: [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)<`string`, `string`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:458](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L458) Appkit chain images # connectorImages > `const` **connectorImages**: [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)<`string`, `string`> Defined in: [packages/iso-filecoin-wallets/src/appkit.js:446](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L446) Appkit connector images # filNamespace > `const` **filNamespace**: `ChainNamespace` Defined in: [packages/iso-filecoin-wallets/src/appkit.js:19](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/appkit.js#L19) ## Description [Section titled “Description”](#description) Filecoin namespace # WalletAdapterFilsnap Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:28](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L28) Filsnap wallet implementation ## Implements [Section titled “Implements”](#implements) * [WalletAdapter](/reference/iso-filecoin-wallets/local/interfaces/walletadapter/) ## Extends [Section titled “Extends”](#extends) * `TypedEventTarget` ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new WalletAdapterFilsnap**(`config`): `WalletAdapterFilsnap` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:64](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L64) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------- | | `config` | [`WalletConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/) & `object` | #### Returns [Section titled “Returns”](#returns) `WalletAdapterFilsnap` #### Overrides [Section titled “Overrides”](#overrides) `TypedEventTarget.constructor` ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` = `true` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:30](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L30) *** ### account [Section titled “account”](#account) > **account**: { `address`: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/); `path`: `string`; `privateKey?`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>; `publicKey`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array); `type`: `"SECP256K1"` | `"BLS"`; } | `undefined` = `undefined` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:37](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L37) #### Type Declaration [Section titled “Type Declaration”](#type-declaration) { `address`: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/); `path`: `string`; `privateKey?`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>; `publicKey`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array); `type`: `"SECP256K1"` | `"BLS"`; } #### address [Section titled “address”](#address) > **address**: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) #### path [Section titled “path”](#path) > **path**: `string` Derivation path - only for HD wallets #### privateKey? [Section titled “privateKey?”](#privatekey) > `optional` **privateKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Private key - only for RAW and HD wallets #### publicKey [Section titled “publicKey”](#publickey) > **publicKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) #### type [Section titled “type”](#type) > **type**: `"SECP256K1"` | `"BLS"` `undefined` *** ### filsnap [Section titled “filsnap”](#filsnap) > **filsnap**: `FilsnapAdapter` | `undefined` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:43](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L43) *** ### id [Section titled “id”](#id) > **id**: `string` = `'filsnap'` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:32](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L32) Wallet adapter identifier (e.g. ‘filsnap’, ‘ledger’, ‘hd’, ‘raw’) *** ### name [Section titled “name”](#name) > **name**: `string` = `'Filsnap'` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:33](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L33) Human readable wallet name *** ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:70](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L70) *** ### signatureType [Section titled “signatureType”](#signaturetype) > **signatureType**: `"SECP256K1"` | `"BLS"` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:71](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L71) *** ### syncWithProvider [Section titled “syncWithProvider”](#syncwithprovider) > **syncWithProvider**: `boolean` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:72](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L72) *** ### uid [Section titled “uid”](#uid) > **uid**: `string` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:31](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L31) Unique identifier for this wallet instance *** ### url [Section titled “url”](#url) > **url**: `string` = `'https://snaps.metamask.io/snap/npm/filsnap/'` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:34](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L34) Wallet homepage URL *** ### version [Section titled “version”](#version) > **version**: `string` | `undefined` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:69](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L69) ## Accessors [Section titled “Accessors”](#accessors) ### connected [Section titled “connected”](#connected) #### Get Signature [Section titled “Get Signature”](#get-signature) > **get** **connected**(): `boolean` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:148](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L148) Whether the wallet is currently connected ##### Returns [Section titled “Returns”](#returns-1) `boolean` *** ### connecting [Section titled “connecting”](#connecting) #### Get Signature [Section titled “Get Signature”](#get-signature-1) > **get** **connecting**(): `boolean` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:144](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L144) Whether the wallet is in the process of connecting ##### Returns [Section titled “Returns”](#returns-2) `boolean` *** ### support [Section titled “support”](#support) #### Get Signature [Section titled “Get Signature”](#get-signature-2) > **get** **support**(): `"NotChecked"` | `"Detected"` | `"NotDetected"` | `"NotSupported"` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:152](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L152) Wallet support status (NotChecked, Detected, NotDetected, NotSupported) ##### Returns [Section titled “Returns”](#returns-3) `"NotChecked"` | `"Detected"` | `"NotDetected"` | `"NotSupported"` ## Methods [Section titled “Methods”](#methods) ### addEventListener() [Section titled “addEventListener()”](#addeventlistener) > **addEventListener**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:29 #### Type Parameters [Section titled “Type Parameters”](#type-parameters) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `AddEventListenerOptions` | #### Returns [Section titled “Returns”](#returns-4) `void` #### Inherit Doc [Section titled “Inherit Doc”](#inherit-doc) #### Inherited from [Section titled “Inherited from”](#inherited-from) `TypedEventTarget.addEventListener` *** ### changeNetwork() [Section titled “changeNetwork()”](#changenetwork) > **changeNetwork**(`network`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: { `address`: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/); `path`: `string`; `privateKey?`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>; `publicKey`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array); `type`: `"SECP256K1"` | `"BLS"`; }; `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:159](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L159) #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | -------------------------------------------------------------------------- | | `network` | [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-5) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: { `address`: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/); `path`: `string`; `privateKey?`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>; `publicKey`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array); `type`: `"SECP256K1"` | `"BLS"`; }; `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> *** ### checkSupport() [Section titled “checkSupport()”](#checksupport) > **checkSupport**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:283](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L283) Check if this wallet adapter is supported in the current environment #### Returns [Section titled “Returns”](#returns-6) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> *** ### connect() [Section titled “connect()”](#connect) > **connect**(`params?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: { `address`: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/); `path`: `string`; `privateKey?`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>; `publicKey`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array); `type`: `"SECP256K1"` | `"BLS"`; }; `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:86](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L86) #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------- | | `params?` | { `network?`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); } | | `params.network?` | [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-7) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: { `address`: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/); `path`: `string`; `privateKey?`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>; `publicKey`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array); `type`: `"SECP256K1"` | `"BLS"`; }; `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> *** ### deriveAccount() [Section titled “deriveAccount()”](#deriveaccount) > **deriveAccount**(`_index`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `address`: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/); `path`: `string`; `privateKey?`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>; `publicKey`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array); `type`: `"SECP256K1"` | `"BLS"`; }> Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:199](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L199) #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | | --------- | -------- | | `_index` | `number` | #### Returns [Section titled “Returns”](#returns-8) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `address`: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/); `path`: `string`; `privateKey?`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>; `publicKey`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array); `type`: `"SECP256K1"` | `"BLS"`; }> *** ### disconnect() [Section titled “disconnect()”](#disconnect) > **disconnect**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:295](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L295) Disconnect from the wallet #### Returns [Section titled “Returns”](#returns-9) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> *** ### dispatchEvent() [Section titled “dispatchEvent()”](#dispatchevent) > **dispatchEvent**(`event`): `boolean` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.dom.d.ts:11575 The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent) #### Parameters [Section titled “Parameters”](#parameters-5) | Parameter | Type | | --------- | ----------------------------------------------------------- | | `event` | [`Event`](https://developer.mozilla.org/docs/Web/API/Event) | #### Returns [Section titled “Returns”](#returns-10) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `TypedEventTarget.dispatchEvent` *** ### dispatchTypedEvent() [Section titled “dispatchTypedEvent()”](#dispatchtypedevent) > **dispatchTypedEvent**<`T`>(`_type`, `event`): `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:20 Dispatches a synthetic event to target and returns true if either event’s cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. #### Type Parameters [Section titled “Type Parameters”](#type-parameters-1) | Type Parameter | | ------------------------------------------------------------------------------------------------------ | | `T` *extends* keyof [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/) | #### Parameters [Section titled “Parameters”](#parameters-6) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------- | | `_type` | `T` | | `event` | [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`] | #### Returns [Section titled “Returns”](#returns-11) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `TypedEventTarget.dispatchTypedEvent` *** ### emit() [Section titled “emit()”](#emit) > **emit**<`T`>(…`args`): `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:21 #### Type Parameters [Section titled “Type Parameters”](#type-parameters-2) | Type Parameter | | ------------------------------------------------------------------------------------------------------ | | `T` *extends* keyof [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/) | #### Parameters [Section titled “Parameters”](#parameters-7) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | …`args` | [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`] *extends* `IsAny`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`]> ? \[`T`, `unknown`] : \[`T`, [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`]] | #### Returns [Section titled “Returns”](#returns-12) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `TypedEventTarget.emit` *** ### off() [Section titled “off()”](#off) > **off**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:55 Alias for [TypedEventTarget.removeEventListener](/reference/iso-filecoin-react/index/interfaces/walletadapter/#removeeventlistener) #### Type Parameters [Section titled “Type Parameters”](#type-parameters-3) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-8) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `EventListenerOptions` | #### Returns [Section titled “Returns”](#returns-13) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `TypedEventTarget.off` *** ### on() [Section titled “on()”](#on) > **on**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:38 Alias for [TypedEventTarget.addEventListener](/reference/iso-filecoin-react/index/interfaces/walletadapter/#addeventlistener) #### Type Parameters [Section titled “Type Parameters”](#type-parameters-4) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-9) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `AddEventListenerOptions` | #### Returns [Section titled “Returns”](#returns-14) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-5) `TypedEventTarget.on` *** ### personalSign() [Section titled “personalSign()”](#personalsign) > **personalSign**(`data`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:246](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L246) #### Parameters [Section titled “Parameters”](#parameters-10) | Parameter | Type | | --------- | ----------------------------------------------------------------------------------------------------- | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | #### Returns [Section titled “Returns”](#returns-15) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> *** ### removeEventListener() [Section titled “removeEventListener()”](#removeeventlistener) > **removeEventListener**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:46 #### Type Parameters [Section titled “Type Parameters”](#type-parameters-5) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-11) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `EventListenerOptions` | #### Returns [Section titled “Returns”](#returns-16) `void` #### Inherit Doc [Section titled “Inherit Doc”](#inherit-doc-1) #### Inherited from [Section titled “Inherited from”](#inherited-from-6) `TypedEventTarget.removeEventListener` *** ### sign() [Section titled “sign()”](#sign) > **sign**(`data`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:228](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L228) #### Parameters [Section titled “Parameters”](#parameters-12) | Parameter | Type | Description | | --------- | ------------------------------------------------------------------------------------------------------------------------ | ------------ | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | Data to sign | #### Returns [Section titled “Returns”](#returns-17) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> *** ### signMessage() [Section titled “signMessage()”](#signmessage) > **signMessage**(`message`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:264](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L264) #### Parameters [Section titled “Parameters”](#parameters-13) | Parameter | Type | Description | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | | `message` | { `from`: `string`; `gasFeeCap`: `string`; `gasLimit`: `number`; `gasPremium`: `string`; `method`: `number`; `nonce`: `number`; `params`: `string`; `to`: `string`; `value`: `string`; `version`: `0`; } | Filecoin message to sign | | `message.from` | `string` | - | | `message.gasFeeCap` | `string` | - | | `message.gasLimit` | `number` | - | | `message.gasPremium` | `string` | - | | `message.method` | `number` | - | | `message.nonce` | `number` | - | | `message.params` | `string` | - | | `message.to` | `string` | - | | `message.value` | `string` | - | | `message.version` | `0` | - | #### Returns [Section titled “Returns”](#returns-18) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> *** ### is() [Section titled “is()”](#is) > `static` **is**(`value`): `value is WalletAdapterFilsnap` Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:79](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L79) #### Parameters [Section titled “Parameters”](#parameters-14) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------- | | `value` | [`WalletAdapter`](/reference/iso-filecoin-wallets/local/interfaces/walletadapter/) | #### Returns [Section titled “Returns”](#returns-19) `value is WalletAdapterFilsnap` # Index ## Classes [Section titled “Classes”](#classes) | Class | Description | | --------------------------------------------------------------------------------------------- | ----------------------------- | | [WalletAdapterFilsnap](/reference/iso-filecoin-wallets/filsnap/classes/walletadapterfilsnap/) | Filsnap wallet implementation | ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | ------------------------------------------------------------------------------------ | ----------- | | [IAccount](/reference/iso-filecoin-wallets/filsnap/type-aliases/iaccount/) | - | | [MessageObj](/reference/iso-filecoin-wallets/filsnap/type-aliases/messageobj/) | - | | [Network](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) | - | | [SignatureType](/reference/iso-filecoin-wallets/filsnap/type-aliases/signaturetype/) | - | # IAccount > **IAccount** = `SetRequired`<[`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/), `"path"`> Defined in: packages/iso-filecoin/dist/src/types.d.ts:44 # MessageObj > **MessageObj** = `z.infer`<*typeof* [`MessageSchema`](/reference/iso-filecoin/message/variables/messageschema/)> Defined in: packages/iso-filecoin/dist/src/types.d.ts:16 # Network > **Network** = `"mainnet"` | `"testnet"` Defined in: packages/iso-filecoin/dist/src/types.d.ts:94 # SignatureType > **SignatureType** = [`SignatureType`](/reference/iso-filecoin/signature/type-aliases/signaturetype/) Defined in: [packages/iso-filecoin-wallets/src/filsnap.js:17](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/filsnap.js#L17) # WalletAdapterHd Defined in: [packages/iso-filecoin-wallets/src/hd.js:33](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L33) HD wallet implementation ## Implements [Section titled “Implements”](#implements) * [WalletAdapter](/reference/iso-filecoin-wallets/local/interfaces/walletadapter/) ## Extends [Section titled “Extends”](#extends) * `TypedEventTarget` ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new WalletAdapterHd**(`config`): `WalletAdapterHd` Defined in: [packages/iso-filecoin-wallets/src/hd.js:59](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L59) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------ | | `config` | [`WalletHDConfig`](/reference/iso-filecoin-wallets/types/interfaces/wallethdconfig/) | #### Returns [Section titled “Returns”](#returns) `WalletAdapterHd` #### Overrides [Section titled “Overrides”](#overrides) `TypedEventTarget.constructor` ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` = `true` Defined in: [packages/iso-filecoin-wallets/src/hd.js:35](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L35) *** ### account [Section titled “account”](#account) > **account**: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/) | `undefined` = `undefined` Defined in: [packages/iso-filecoin-wallets/src/hd.js:41](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L41) *** ### id [Section titled “id”](#id) > **id**: `string` = `'hd'` Defined in: [packages/iso-filecoin-wallets/src/hd.js:37](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L37) Wallet adapter identifier (e.g. ‘filsnap’, ‘ledger’, ‘hd’, ‘raw’) *** ### name [Section titled “name”](#name) > **name**: `string` = `'Burner Wallet'` Defined in: [packages/iso-filecoin-wallets/src/hd.js:38](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L38) Human readable wallet name *** ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) Defined in: [packages/iso-filecoin-wallets/src/hd.js:66](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L66) *** ### signatureType [Section titled “signatureType”](#signaturetype) > **signatureType**: `"SECP256K1"` | `"BLS"` Defined in: [packages/iso-filecoin-wallets/src/hd.js:67](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L67) *** ### uid [Section titled “uid”](#uid) > **uid**: `string` Defined in: [packages/iso-filecoin-wallets/src/hd.js:36](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L36) Unique identifier for this wallet instance *** ### url [Section titled “url”](#url) > **url**: `string` = `'https://filecoin.io'` Defined in: [packages/iso-filecoin-wallets/src/hd.js:39](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L39) Wallet homepage URL ## Accessors [Section titled “Accessors”](#accessors) ### connected [Section titled “connected”](#connected) #### Get Signature [Section titled “Get Signature”](#get-signature) > **get** **connected**(): `boolean` Defined in: [packages/iso-filecoin-wallets/src/hd.js:99](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L99) Whether the wallet is currently connected ##### Returns [Section titled “Returns”](#returns-1) `boolean` *** ### connecting [Section titled “connecting”](#connecting) #### Get Signature [Section titled “Get Signature”](#get-signature-1) > **get** **connecting**(): `boolean` Defined in: [packages/iso-filecoin-wallets/src/hd.js:95](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L95) Whether the wallet is in the process of connecting ##### Returns [Section titled “Returns”](#returns-2) `boolean` *** ### support [Section titled “support”](#support) #### Get Signature [Section titled “Get Signature”](#get-signature-2) > **get** **support**(): `"NotChecked"` | `"Detected"` | `"NotDetected"` | `"NotSupported"` Defined in: [packages/iso-filecoin-wallets/src/hd.js:103](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L103) Wallet support status (NotChecked, Detected, NotDetected, NotSupported) ##### Returns [Section titled “Returns”](#returns-3) `"NotChecked"` | `"Detected"` | `"NotDetected"` | `"NotSupported"` ## Methods [Section titled “Methods”](#methods) ### addEventListener() [Section titled “addEventListener()”](#addeventlistener) > **addEventListener**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:29 #### Type Parameters [Section titled “Type Parameters”](#type-parameters) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `AddEventListenerOptions` | #### Returns [Section titled “Returns”](#returns-4) `void` #### Inherit Doc [Section titled “Inherit Doc”](#inherit-doc) #### Inherited from [Section titled “Inherited from”](#inherited-from) `TypedEventTarget.addEventListener` *** ### changeNetwork() [Section titled “changeNetwork()”](#changenetwork) > **changeNetwork**(`network`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/); `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> Defined in: [packages/iso-filecoin-wallets/src/hd.js:160](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L160) #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | -------------------------------------------------------------------------- | | `network` | [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-5) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/); `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> *** ### checkSupport() [Section titled “checkSupport()”](#checksupport) > **checkSupport**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin-wallets/src/hd.js:107](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L107) Check if this wallet adapter is supported in the current environment #### Returns [Section titled “Returns”](#returns-6) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> *** ### connect() [Section titled “connect()”](#connect) > **connect**(`params?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/); `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> Defined in: [packages/iso-filecoin-wallets/src/hd.js:124](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L124) #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------- | | `params?` | { `network?`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); } | | `params.network?` | [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-7) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/); `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> *** ### deriveAccount() [Section titled “deriveAccount()”](#deriveaccount) > **deriveAccount**(`index`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/)> Defined in: [packages/iso-filecoin-wallets/src/hd.js:187](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L187) #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | | --------- | -------- | | `index` | `number` | #### Returns [Section titled “Returns”](#returns-8) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/)> *** ### disconnect() [Section titled “disconnect()”](#disconnect) > **disconnect**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin-wallets/src/hd.js:152](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L152) Disconnect from the wallet #### Returns [Section titled “Returns”](#returns-9) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> *** ### dispatchEvent() [Section titled “dispatchEvent()”](#dispatchevent) > **dispatchEvent**(`event`): `boolean` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.dom.d.ts:11575 The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent) #### Parameters [Section titled “Parameters”](#parameters-5) | Parameter | Type | | --------- | ----------------------------------------------------------- | | `event` | [`Event`](https://developer.mozilla.org/docs/Web/API/Event) | #### Returns [Section titled “Returns”](#returns-10) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `TypedEventTarget.dispatchEvent` *** ### dispatchTypedEvent() [Section titled “dispatchTypedEvent()”](#dispatchtypedevent) > **dispatchTypedEvent**<`T`>(`_type`, `event`): `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:20 Dispatches a synthetic event to target and returns true if either event’s cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. #### Type Parameters [Section titled “Type Parameters”](#type-parameters-1) | Type Parameter | | ------------------------------------------------------------------------------------------------------ | | `T` *extends* keyof [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/) | #### Parameters [Section titled “Parameters”](#parameters-6) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------- | | `_type` | `T` | | `event` | [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`] | #### Returns [Section titled “Returns”](#returns-11) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `TypedEventTarget.dispatchTypedEvent` *** ### emit() [Section titled “emit()”](#emit) > **emit**<`T`>(…`args`): `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:21 #### Type Parameters [Section titled “Type Parameters”](#type-parameters-2) | Type Parameter | | ------------------------------------------------------------------------------------------------------ | | `T` *extends* keyof [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/) | #### Parameters [Section titled “Parameters”](#parameters-7) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | …`args` | [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`] *extends* `IsAny`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`]> ? \[`T`, `unknown`] : \[`T`, [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`]] | #### Returns [Section titled “Returns”](#returns-12) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `TypedEventTarget.emit` *** ### off() [Section titled “off()”](#off) > **off**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:55 Alias for [TypedEventTarget.removeEventListener](/reference/iso-filecoin-react/index/interfaces/walletadapter/#removeeventlistener) #### Type Parameters [Section titled “Type Parameters”](#type-parameters-3) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-8) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `EventListenerOptions` | #### Returns [Section titled “Returns”](#returns-13) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `TypedEventTarget.off` *** ### on() [Section titled “on()”](#on) > **on**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:38 Alias for [TypedEventTarget.addEventListener](/reference/iso-filecoin-react/index/interfaces/walletadapter/#addeventlistener) #### Type Parameters [Section titled “Type Parameters”](#type-parameters-4) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-9) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `AddEventListenerOptions` | #### Returns [Section titled “Returns”](#returns-14) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-5) `TypedEventTarget.on` *** ### personalSign() [Section titled “personalSign()”](#personalsign) > **personalSign**(`data`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/hd.js:222](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L222) #### Parameters [Section titled “Parameters”](#parameters-10) | Parameter | Type | | --------- | ----------------------------------------------------------------------------------------------------- | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | #### Returns [Section titled “Returns”](#returns-15) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> *** ### removeEventListener() [Section titled “removeEventListener()”](#removeeventlistener) > **removeEventListener**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:46 #### Type Parameters [Section titled “Type Parameters”](#type-parameters-5) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-11) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `EventListenerOptions` | #### Returns [Section titled “Returns”](#returns-16) `void` #### Inherit Doc [Section titled “Inherit Doc”](#inherit-doc-1) #### Inherited from [Section titled “Inherited from”](#inherited-from-6) `TypedEventTarget.removeEventListener` *** ### setup() [Section titled “setup()”](#setup) > **setup**(`config`): `void` Defined in: [packages/iso-filecoin-wallets/src/hd.js:116](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L116) Setup the wallet from a mnemonic #### Parameters [Section titled “Parameters”](#parameters-12) | Parameter | Type | | --------- | --------------------------------------------------------------------------------------------------------------- | | `config` | [`WalletHDMnemonicConfig`](/reference/iso-filecoin-wallets/types/interfaces/wallethdmnemonicconfig/) & `object` | #### Returns [Section titled “Returns”](#returns-17) `void` *** ### sign() [Section titled “sign()”](#sign) > **sign**(`data`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/hd.js:207](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L207) #### Parameters [Section titled “Parameters”](#parameters-13) | Parameter | Type | Description | | --------- | ------------------------------------------------------------------------------------------------------------------------ | ------------ | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | Data to sign | #### Returns [Section titled “Returns”](#returns-18) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> *** ### signMessage() [Section titled “signMessage()”](#signmessage) > **signMessage**(`message`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/hd.js:237](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L237) #### Parameters [Section titled “Parameters”](#parameters-14) | Parameter | Type | Description | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | | `message` | { `from`: `string`; `gasFeeCap`: `string`; `gasLimit`: `number`; `gasPremium`: `string`; `method`: `number`; `nonce`: `number`; `params`: `string`; `to`: `string`; `value`: `string`; `version`: `0`; } | Filecoin message to sign | | `message.from` | `string` | - | | `message.gasFeeCap` | `string` | - | | `message.gasLimit` | `number` | - | | `message.gasPremium` | `string` | - | | `message.method` | `number` | - | | `message.nonce` | `number` | - | | `message.params` | `string` | - | | `message.to` | `string` | - | | `message.value` | `string` | - | | `message.version` | `0` | - | #### Returns [Section titled “Returns”](#returns-19) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> *** ### fromMnemonic() [Section titled “fromMnemonic()”](#frommnemonic) > `static` **fromMnemonic**(`config`): `WalletAdapterHd` Defined in: [packages/iso-filecoin-wallets/src/hd.js:84](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L84) HD wallet from mnemonic #### Parameters [Section titled “Parameters”](#parameters-15) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------------------- | | `config` | [`WalletHDMnemonicConfig`](/reference/iso-filecoin-wallets/types/interfaces/wallethdmnemonicconfig/) | #### Returns [Section titled “Returns”](#returns-20) `WalletAdapterHd` *** ### is() [Section titled “is()”](#is) > `static` **is**(`value`): `value is WalletAdapterHd` Defined in: [packages/iso-filecoin-wallets/src/hd.js:74](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L74) #### Parameters [Section titled “Parameters”](#parameters-16) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------- | | `value` | [`WalletAdapter`](/reference/iso-filecoin-wallets/local/interfaces/walletadapter/) | #### Returns [Section titled “Returns”](#returns-21) `value is WalletAdapterHd` # Index ## Classes [Section titled “Classes”](#classes) | Class | Description | | ------------------------------------------------------------------------------ | ------------------------ | | [WalletAdapterHd](/reference/iso-filecoin-wallets/hd/classes/walletadapterhd/) | HD wallet implementation | ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | ------------------------------------------------------------------------------- | ----------- | | [SignatureType](/reference/iso-filecoin-wallets/hd/type-aliases/signaturetype/) | - | ## References [Section titled “References”](#references) ### IAccount [Section titled “IAccount”](#iaccount) Re-exports [IAccount](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/) *** ### MessageObj [Section titled “MessageObj”](#messageobj) Re-exports [MessageObj](/reference/iso-filecoin-wallets/filsnap/type-aliases/messageobj/) *** ### Network [Section titled “Network”](#network) Re-exports [Network](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) # SignatureType > **SignatureType** = [`SignatureType`](/reference/iso-filecoin/signature/type-aliases/signaturetype/) Defined in: [packages/iso-filecoin-wallets/src/hd.js:24](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/hd.js#L24) # WalletAdapterLedger Defined in: [packages/iso-filecoin-wallets/src/ledger.js:54](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L54) Ledger wallet implementation ## Implements [Section titled “Implements”](#implements) * [WalletAdapter](/reference/iso-filecoin-wallets/local/interfaces/walletadapter/) ## Extends [Section titled “Extends”](#extends) * `TypedEventTarget` ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new WalletAdapterLedger**(`config`): `WalletAdapterLedger` Defined in: [packages/iso-filecoin-wallets/src/ledger.js:86](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L86) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | -------------------------------------------------------------------------------------------- | | `config` | [`WalletLedgerConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletledgerconfig/) | #### Returns [Section titled “Returns”](#returns) `WalletAdapterLedger` #### Overrides [Section titled “Overrides”](#overrides) `TypedEventTarget.constructor` ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` = `true` Defined in: [packages/iso-filecoin-wallets/src/ledger.js:56](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L56) *** ### account [Section titled “account”](#account) > **account**: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/) | `undefined` = `undefined` Defined in: [packages/iso-filecoin-wallets/src/ledger.js:63](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L63) *** ### id [Section titled “id”](#id) > **id**: `string` = `'ledger'` Defined in: [packages/iso-filecoin-wallets/src/ledger.js:58](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L58) Wallet adapter identifier (e.g. ‘filsnap’, ‘ledger’, ‘hd’, ‘raw’) *** ### name [Section titled “name”](#name) > **name**: `string` = `'Ledger'` Defined in: [packages/iso-filecoin-wallets/src/ledger.js:59](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L59) Human readable wallet name *** ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) Defined in: [packages/iso-filecoin-wallets/src/ledger.js:92](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L92) *** ### signatureType [Section titled “signatureType”](#signaturetype) > **signatureType**: `"SECP256K1"` | `"BLS"` Defined in: [packages/iso-filecoin-wallets/src/ledger.js:93](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L93) *** ### uid [Section titled “uid”](#uid) > **uid**: `string` Defined in: [packages/iso-filecoin-wallets/src/ledger.js:57](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L57) Unique identifier for this wallet instance *** ### url [Section titled “url”](#url) > **url**: `string` = `'https://ledger.com'` Defined in: [packages/iso-filecoin-wallets/src/ledger.js:60](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L60) Wallet homepage URL ## Accessors [Section titled “Accessors”](#accessors) ### app [Section titled “app”](#app) #### Get Signature [Section titled “Get Signature”](#get-signature) > **get** **app**(): [`LedgerFilecoin`](/reference/iso-filecoin/ledger/classes/ledgerfilecoin/) | `undefined` Defined in: [packages/iso-filecoin-wallets/src/ledger.js:105](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L105) ##### Returns [Section titled “Returns”](#returns-1) [`LedgerFilecoin`](/reference/iso-filecoin/ledger/classes/ledgerfilecoin/) | `undefined` *** ### connected [Section titled “connected”](#connected) #### Get Signature [Section titled “Get Signature”](#get-signature-1) > **get** **connected**(): `boolean` Defined in: [packages/iso-filecoin-wallets/src/ledger.js:101](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L101) Whether the wallet is currently connected ##### Returns [Section titled “Returns”](#returns-2) `boolean` *** ### connecting [Section titled “connecting”](#connecting) #### Get Signature [Section titled “Get Signature”](#get-signature-2) > **get** **connecting**(): `boolean` Defined in: [packages/iso-filecoin-wallets/src/ledger.js:97](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L97) Whether the wallet is in the process of connecting ##### Returns [Section titled “Returns”](#returns-3) `boolean` *** ### support [Section titled “support”](#support) #### Get Signature [Section titled “Get Signature”](#get-signature-3) > **get** **support**(): `"NotChecked"` | `"Detected"` | `"NotDetected"` | `"NotSupported"` Defined in: [packages/iso-filecoin-wallets/src/ledger.js:109](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L109) Wallet support status (NotChecked, Detected, NotDetected, NotSupported) ##### Returns [Section titled “Returns”](#returns-4) `"NotChecked"` | `"Detected"` | `"NotDetected"` | `"NotSupported"` ## Methods [Section titled “Methods”](#methods) ### addEventListener() [Section titled “addEventListener()”](#addeventlistener) > **addEventListener**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:29 #### Type Parameters [Section titled “Type Parameters”](#type-parameters) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `AddEventListenerOptions` | #### Returns [Section titled “Returns”](#returns-5) `void` #### Inherit Doc [Section titled “Inherit Doc”](#inherit-doc) #### Inherited from [Section titled “Inherited from”](#inherited-from) `TypedEventTarget.addEventListener` *** ### changeNetwork() [Section titled “changeNetwork()”](#changenetwork) > **changeNetwork**(`network`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/); `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> Defined in: [packages/iso-filecoin-wallets/src/ledger.js:184](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L184) #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | -------------------------------------------------------------------------- | | `network` | [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-6) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/); `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> *** ### checkSupport() [Section titled “checkSupport()”](#checksupport) > **checkSupport**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin-wallets/src/ledger.js:113](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L113) Check if this wallet adapter is supported in the current environment #### Returns [Section titled “Returns”](#returns-7) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> *** ### connect() [Section titled “connect()”](#connect) > **connect**(`params?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/); `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> Defined in: [packages/iso-filecoin-wallets/src/ledger.js:131](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L131) #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------- | | `params?` | { `network?`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); } | | `params.network?` | [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-8) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/); `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> *** ### deriveAccount() [Section titled “deriveAccount()”](#deriveaccount) > **deriveAccount**(`index`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/)> Defined in: [packages/iso-filecoin-wallets/src/ledger.js:212](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L212) #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | | --------- | -------- | | `index` | `number` | #### Returns [Section titled “Returns”](#returns-9) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/)> *** ### disconnect() [Section titled “disconnect()”](#disconnect) > **disconnect**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin-wallets/src/ledger.js:167](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L167) Disconnect from the wallet #### Returns [Section titled “Returns”](#returns-10) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> *** ### dispatchEvent() [Section titled “dispatchEvent()”](#dispatchevent) > **dispatchEvent**(`event`): `boolean` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.dom.d.ts:11575 The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent) #### Parameters [Section titled “Parameters”](#parameters-5) | Parameter | Type | | --------- | ----------------------------------------------------------- | | `event` | [`Event`](https://developer.mozilla.org/docs/Web/API/Event) | #### Returns [Section titled “Returns”](#returns-11) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `TypedEventTarget.dispatchEvent` *** ### dispatchTypedEvent() [Section titled “dispatchTypedEvent()”](#dispatchtypedevent) > **dispatchTypedEvent**<`T`>(`_type`, `event`): `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:20 Dispatches a synthetic event to target and returns true if either event’s cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. #### Type Parameters [Section titled “Type Parameters”](#type-parameters-1) | Type Parameter | | ------------------------------------------------------------------------------------------------------ | | `T` *extends* keyof [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/) | #### Parameters [Section titled “Parameters”](#parameters-6) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------- | | `_type` | `T` | | `event` | [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`] | #### Returns [Section titled “Returns”](#returns-12) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `TypedEventTarget.dispatchTypedEvent` *** ### emit() [Section titled “emit()”](#emit) > **emit**<`T`>(…`args`): `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:21 #### Type Parameters [Section titled “Type Parameters”](#type-parameters-2) | Type Parameter | | ------------------------------------------------------------------------------------------------------ | | `T` *extends* keyof [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/) | #### Parameters [Section titled “Parameters”](#parameters-7) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | …`args` | [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`] *extends* `IsAny`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`]> ? \[`T`, `unknown`] : \[`T`, [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`]] | #### Returns [Section titled “Returns”](#returns-13) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `TypedEventTarget.emit` *** ### off() [Section titled “off()”](#off) > **off**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:55 Alias for [TypedEventTarget.removeEventListener](/reference/iso-filecoin-react/index/interfaces/walletadapter/#removeeventlistener) #### Type Parameters [Section titled “Type Parameters”](#type-parameters-3) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-8) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `EventListenerOptions` | #### Returns [Section titled “Returns”](#returns-14) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `TypedEventTarget.off` *** ### on() [Section titled “on()”](#on) > **on**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:38 Alias for [TypedEventTarget.addEventListener](/reference/iso-filecoin-react/index/interfaces/walletadapter/#addeventlistener) #### Type Parameters [Section titled “Type Parameters”](#type-parameters-4) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-9) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `AddEventListenerOptions` | #### Returns [Section titled “Returns”](#returns-15) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-5) `TypedEventTarget.on` *** ### personalSign() [Section titled “personalSign()”](#personalsign) > **personalSign**(`data`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/ledger.js:258](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L258) #### Parameters [Section titled “Parameters”](#parameters-10) | Parameter | Type | | --------- | ----------------------------------------------------------------------------------------------------- | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | #### Returns [Section titled “Returns”](#returns-16) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> *** ### removeEventListener() [Section titled “removeEventListener()”](#removeeventlistener) > **removeEventListener**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:46 #### Type Parameters [Section titled “Type Parameters”](#type-parameters-5) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-11) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `EventListenerOptions` | #### Returns [Section titled “Returns”](#returns-17) `void` #### Inherit Doc [Section titled “Inherit Doc”](#inherit-doc-1) #### Inherited from [Section titled “Inherited from”](#inherited-from-6) `TypedEventTarget.removeEventListener` *** ### sign() [Section titled “sign()”](#sign) > **sign**(`data`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/ledger.js:231](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L231) #### Parameters [Section titled “Parameters”](#parameters-12) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------ | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | #### Returns [Section titled “Returns”](#returns-18) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> *** ### signMessage() [Section titled “signMessage()”](#signmessage) > **signMessage**(`message`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/ledger.js:284](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L284) #### Parameters [Section titled “Parameters”](#parameters-13) | Parameter | Type | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `message` | { `from`: `string`; `gasFeeCap`: `string`; `gasLimit`: `number`; `gasPremium`: `string`; `method`: `number`; `nonce`: `number`; `params`: `string`; `to`: `string`; `value`: `string`; `version`: `0`; } | | `message.from` | `string` | | `message.gasFeeCap` | `string` | | `message.gasLimit` | `number` | | `message.gasPremium` | `string` | | `message.method` | `number` | | `message.nonce` | `number` | | `message.params` | `string` | | `message.to` | `string` | | `message.value` | `string` | | `message.version` | `0` | #### Returns [Section titled “Returns”](#returns-19) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> # pathFromNetwork > **pathFromNetwork**(`network`, `index?`): `string` Defined in: [packages/iso-filecoin-wallets/src/ledger.js:35](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L35) Derivation path from chain for Ledger ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Default value | Description | | --------- | -------------------------------------------------------------------------- | ------------- | ------------------------- | | `network` | [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) | `undefined` | - | | `index?` | `number` | `0` | Account index (default 0) | ## Returns [Section titled “Returns”](#returns) `string` ## Example [Section titled “Example”](#example) ```ts import { function pathFromNetwork(network: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network, index?: number): string Derivation path from chain @param ― network @param ― index - Account index (default 0) @example import { pathFromNetwork } from 'iso-filecoin/utils' const path = pathFromNetwork('mainnet') // => 'm/44'/461'/0'/0/0' pathFromNetwork } from 'iso-filecoin/utils' const const path: string path = function pathFromNetwork(network: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network, index?: number): string Derivation path from chain @param ― network @param ― index - Account index (default 0) @example import { pathFromNetwork } from 'iso-filecoin/utils' const path = pathFromNetwork('mainnet') // => 'm/44'/461'/0'/0/0' pathFromNetwork('mainnet') // => 'm/44'/461'/0'/0/0' ``` # IAccount Defined in: packages/iso-filecoin/dist/src/types.d.ts:31 Account interface ## Properties [Section titled “Properties”](#properties) ### address [Section titled “address”](#address) > **address**: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) Defined in: packages/iso-filecoin/dist/src/types.d.ts:33 *** ### path? [Section titled “path?”](#path) > `optional` **path**: `string` Defined in: packages/iso-filecoin/dist/src/types.d.ts:38 Derivation path - only for HD wallets *** ### privateKey? [Section titled “privateKey?”](#privatekey) > `optional` **privateKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: packages/iso-filecoin/dist/src/types.d.ts:42 Private key - only for RAW and HD wallets *** ### publicKey [Section titled “publicKey”](#publickey) > **publicKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) Defined in: packages/iso-filecoin/dist/src/types.d.ts:34 *** ### type [Section titled “type”](#type) > **type**: `"SECP256K1"` | `"BLS"` Defined in: packages/iso-filecoin/dist/src/types.d.ts:32 # Index ## Classes [Section titled “Classes”](#classes) | Class | Description | | ------------------------------------------------------------------------------------------ | ---------------------------- | | [WalletAdapterLedger](/reference/iso-filecoin-wallets/ledger/classes/walletadapterledger/) | Ledger wallet implementation | ## Interfaces [Section titled “Interfaces”](#interfaces) | Interface | Description | | ----------------------------------------------------------------------- | ----------------- | | [IAccount](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/) | Account interface | ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | ----------------------------------------------------------------------------------- | ----------- | | [SignatureType](/reference/iso-filecoin-wallets/ledger/type-aliases/signaturetype/) | - | ## Variables [Section titled “Variables”](#variables) | Variable | Description | | -------------------------------------------------------------------------------- | ----------- | | [WalletSupport](/reference/iso-filecoin-wallets/ledger/variables/walletsupport/) | - | ## Functions [Section titled “Functions”](#functions) | Function | Description | | ------------------------------------------------------------------------------------ | ------------------------------------- | | [pathFromNetwork](/reference/iso-filecoin-wallets/ledger/functions/pathfromnetwork/) | Derivation path from chain for Ledger | ## References [Section titled “References”](#references) ### MessageObj [Section titled “MessageObj”](#messageobj) Re-exports [MessageObj](/reference/iso-filecoin-wallets/filsnap/type-aliases/messageobj/) *** ### Network [Section titled “Network”](#network) Re-exports [Network](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) # SignatureType > **SignatureType** = [`SignatureType`](/reference/iso-filecoin/signature/type-aliases/signaturetype/) Defined in: [packages/iso-filecoin-wallets/src/ledger.js:20](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/ledger.js#L20) # WalletSupport > `const` **WalletSupport**: `object` Defined in: [packages/iso-filecoin-wallets/src/common.js:1](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/common.js#L1) ## Type Declaration [Section titled “Type Declaration”](#type-declaration) ### Detected [Section titled “Detected”](#detected) > `readonly` **Detected**: `"Detected"` = `'Detected'` ### NotChecked [Section titled “NotChecked”](#notchecked) > `readonly` **NotChecked**: `"NotChecked"` = `'NotChecked'` ### NotDetected [Section titled “NotDetected”](#notdetected) > `readonly` **NotDetected**: `"NotDetected"` = `'NotDetected'` ### NotSupported [Section titled “NotSupported”](#notsupported) > `readonly` **NotSupported**: `"NotSupported"` = `'NotSupported'` # WalletAdapterRaw Defined in: [packages/iso-filecoin-wallets/src/local.js:50](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L50) Raw wallet implementation ## Implements [Section titled “Implements”](#implements) * [WalletAdapter](/reference/iso-filecoin-wallets/local/interfaces/walletadapter/) ## Extends [Section titled “Extends”](#extends) * `TypedEventTarget` ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new WalletAdapterRaw**(`config`): `WalletAdapterRaw` Defined in: [packages/iso-filecoin-wallets/src/local.js:71](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L71) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------- | | `config` | [`WalletConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/) & `object` | #### Returns [Section titled “Returns”](#returns) `WalletAdapterRaw` #### Overrides [Section titled “Overrides”](#overrides) `TypedEventTarget.constructor` ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` = `true` Defined in: [packages/iso-filecoin-wallets/src/local.js:52](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L52) *** ### account [Section titled “account”](#account) > **account**: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/) | `undefined` = `undefined` Defined in: [packages/iso-filecoin-wallets/src/local.js:59](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L59) *** ### id [Section titled “id”](#id) > **id**: `string` = `'raw'` Defined in: [packages/iso-filecoin-wallets/src/local.js:54](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L54) Wallet adapter identifier (e.g. ‘filsnap’, ‘ledger’, ‘hd’, ‘raw’) *** ### name [Section titled “name”](#name) > **name**: `string` = `'Raw (Unsafe)'` Defined in: [packages/iso-filecoin-wallets/src/local.js:55](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L55) Human readable wallet name *** ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) Defined in: [packages/iso-filecoin-wallets/src/local.js:74](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L74) *** ### privateKey [Section titled “privateKey”](#privatekey) > **privateKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin-wallets/src/local.js:76](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L76) *** ### signatureType [Section titled “signatureType”](#signaturetype) > **signatureType**: `"SECP256K1"` | `"BLS"` Defined in: [packages/iso-filecoin-wallets/src/local.js:75](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L75) *** ### uid [Section titled “uid”](#uid) > **uid**: `string` Defined in: [packages/iso-filecoin-wallets/src/local.js:53](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L53) Unique identifier for this wallet instance *** ### url [Section titled “url”](#url) > **url**: `string` = `'https://filecoin.io'` Defined in: [packages/iso-filecoin-wallets/src/local.js:56](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L56) Wallet homepage URL ## Accessors [Section titled “Accessors”](#accessors) ### connected [Section titled “connected”](#connected) #### Get Signature [Section titled “Get Signature”](#get-signature) > **get** **connected**(): `boolean` Defined in: [packages/iso-filecoin-wallets/src/local.js:127](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L127) Whether the wallet is currently connected ##### Returns [Section titled “Returns”](#returns-1) `boolean` *** ### connecting [Section titled “connecting”](#connecting) #### Get Signature [Section titled “Get Signature”](#get-signature-1) > **get** **connecting**(): `boolean` Defined in: [packages/iso-filecoin-wallets/src/local.js:123](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L123) Whether the wallet is in the process of connecting ##### Returns [Section titled “Returns”](#returns-2) `boolean` *** ### support [Section titled “support”](#support) #### Get Signature [Section titled “Get Signature”](#get-signature-2) > **get** **support**(): `"NotChecked"` | `"Detected"` | `"NotDetected"` | `"NotSupported"` Defined in: [packages/iso-filecoin-wallets/src/local.js:130](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L130) Wallet support status (NotChecked, Detected, NotDetected, NotSupported) ##### Returns [Section titled “Returns”](#returns-3) `"NotChecked"` | `"Detected"` | `"NotDetected"` | `"NotSupported"` ## Methods [Section titled “Methods”](#methods) ### addEventListener() [Section titled “addEventListener()”](#addeventlistener) > **addEventListener**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:29 #### Type Parameters [Section titled “Type Parameters”](#type-parameters) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `AddEventListenerOptions` | #### Returns [Section titled “Returns”](#returns-4) `void` #### Inherit Doc [Section titled “Inherit Doc”](#inherit-doc) #### Inherited from [Section titled “Inherited from”](#inherited-from) `TypedEventTarget.addEventListener` *** ### changeNetwork() [Section titled “changeNetwork()”](#changenetwork) > **changeNetwork**(`network`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/); `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> Defined in: [packages/iso-filecoin-wallets/src/local.js:147](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L147) #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | -------------------------------------------------------------------------- | | `network` | [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-5) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/); `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> *** ### checkSupport() [Section titled “checkSupport()”](#checksupport) > **checkSupport**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin-wallets/src/local.js:134](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L134) Check if this wallet adapter is supported in the current environment #### Returns [Section titled “Returns”](#returns-6) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> *** ### connect() [Section titled “connect()”](#connect) > **connect**(`params?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/); `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> Defined in: [packages/iso-filecoin-wallets/src/local.js:99](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L99) #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------- | | `params?` | { `network?`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); } | | `params.network?` | [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-7) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{ `account`: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/); `network`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); }> *** ### deriveAccount() [Section titled “deriveAccount()”](#deriveaccount) > **deriveAccount**(`_index`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/)> Defined in: [packages/iso-filecoin-wallets/src/local.js:169](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L169) #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | | --------- | -------- | | `_index` | `number` | #### Returns [Section titled “Returns”](#returns-8) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/)> *** ### disconnect() [Section titled “disconnect()”](#disconnect) > **disconnect**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin-wallets/src/local.js:138](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L138) Disconnect from the wallet #### Returns [Section titled “Returns”](#returns-9) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> *** ### dispatchEvent() [Section titled “dispatchEvent()”](#dispatchevent) > **dispatchEvent**(`event`): `boolean` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.dom.d.ts:11575 The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent) #### Parameters [Section titled “Parameters”](#parameters-5) | Parameter | Type | | --------- | ----------------------------------------------------------- | | `event` | [`Event`](https://developer.mozilla.org/docs/Web/API/Event) | #### Returns [Section titled “Returns”](#returns-10) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `TypedEventTarget.dispatchEvent` *** ### dispatchTypedEvent() [Section titled “dispatchTypedEvent()”](#dispatchtypedevent) > **dispatchTypedEvent**<`T`>(`_type`, `event`): `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:20 Dispatches a synthetic event to target and returns true if either event’s cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. #### Type Parameters [Section titled “Type Parameters”](#type-parameters-1) | Type Parameter | | ------------------------------------------------------------------------------------------------------ | | `T` *extends* keyof [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/) | #### Parameters [Section titled “Parameters”](#parameters-6) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------- | | `_type` | `T` | | `event` | [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`] | #### Returns [Section titled “Returns”](#returns-11) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `TypedEventTarget.dispatchTypedEvent` *** ### emit() [Section titled “emit()”](#emit) > **emit**<`T`>(…`args`): `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:21 #### Type Parameters [Section titled “Type Parameters”](#type-parameters-2) | Type Parameter | | ------------------------------------------------------------------------------------------------------ | | `T` *extends* keyof [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/) | #### Parameters [Section titled “Parameters”](#parameters-7) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | …`args` | [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`] *extends* `IsAny`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`]> ? \[`T`, `unknown`] : \[`T`, [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`]] | #### Returns [Section titled “Returns”](#returns-12) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `TypedEventTarget.emit` *** ### off() [Section titled “off()”](#off) > **off**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:55 Alias for [TypedEventTarget.removeEventListener](/reference/iso-filecoin-react/index/interfaces/walletadapter/#removeeventlistener) #### Type Parameters [Section titled “Type Parameters”](#type-parameters-3) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-8) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `EventListenerOptions` | #### Returns [Section titled “Returns”](#returns-13) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `TypedEventTarget.off` *** ### on() [Section titled “on()”](#on) > **on**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:38 Alias for [TypedEventTarget.addEventListener](/reference/iso-filecoin-react/index/interfaces/walletadapter/#addeventlistener) #### Type Parameters [Section titled “Type Parameters”](#type-parameters-4) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-9) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `AddEventListenerOptions` | #### Returns [Section titled “Returns”](#returns-14) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-5) `TypedEventTarget.on` *** ### personalSign() [Section titled “personalSign()”](#personalsign) > **personalSign**(`data`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/local.js:189](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L189) #### Parameters [Section titled “Parameters”](#parameters-10) | Parameter | Type | | --------- | ----------------------------------------------------------------------------------------------------- | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | #### Returns [Section titled “Returns”](#returns-15) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> *** ### removeEventListener() [Section titled “removeEventListener()”](#removeeventlistener) > **removeEventListener**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:46 #### Type Parameters [Section titled “Type Parameters”](#type-parameters-5) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-11) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `EventListenerOptions` | #### Returns [Section titled “Returns”](#returns-16) `void` #### Inherit Doc [Section titled “Inherit Doc”](#inherit-doc-1) #### Inherited from [Section titled “Inherited from”](#inherited-from-6) `TypedEventTarget.removeEventListener` *** ### ~~sign()~~ [Section titled “sign()”](#sign) > **sign**(`data`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/local.js:178](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L178) Sign raw bytes Deprecated Use [personalSign](/reference/iso-filecoin-wallets/local/interfaces/walletadapter/#personalsign) instead #### Parameters [Section titled “Parameters”](#parameters-12) | Parameter | Type | Description | | --------- | ----------------------------------------------------------------------------------------------------- | ----------------- | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | raw bytes to sign | #### Returns [Section titled “Returns”](#returns-17) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> *** ### signMessage() [Section titled “signMessage()”](#signmessage) > **signMessage**(`message`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/local.js:200](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L200) #### Parameters [Section titled “Parameters”](#parameters-13) | Parameter | Type | Description | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | | `message` | { `from`: `string`; `gasFeeCap`: `string`; `gasLimit`: `number`; `gasPremium`: `string`; `method`: `number`; `nonce`: `number`; `params`: `string`; `to`: `string`; `value`: `string`; `version`: `0`; } | Filecoin message to sign | | `message.from` | `string` | - | | `message.gasFeeCap` | `string` | - | | `message.gasLimit` | `number` | - | | `message.gasPremium` | `string` | - | | `message.method` | `number` | - | | `message.nonce` | `number` | - | | `message.params` | `string` | - | | `message.to` | `string` | - | | `message.value` | `string` | - | | `message.version` | `0` | - | #### Returns [Section titled “Returns”](#returns-18) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> *** ### create() [Section titled “create()”](#create) > `static` **create**(): `WalletAdapterRaw` Defined in: [packages/iso-filecoin-wallets/src/local.js:87](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L87) #### Returns [Section titled “Returns”](#returns-19) `WalletAdapterRaw` # WalletAdapter Defined in: [packages/iso-filecoin-wallets/src/types.ts:76](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L76) Wallet adapter interface ## Extends [Section titled “Extends”](#extends) * `TypedEventTarget`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)> ## Properties [Section titled “Properties”](#properties) ### account [Section titled “account”](#account) > `readonly` **account**: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/) | `undefined` Defined in: [packages/iso-filecoin-wallets/src/types.ts:120](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L120) Currently active account, if connected *** ### changeNetwork() [Section titled “changeNetwork()”](#changenetwork) > **changeNetwork**: (`network`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AccountNetwork`](/reference/iso-filecoin-wallets/types/interfaces/accountnetwork/)> Defined in: [packages/iso-filecoin-wallets/src/types.ts:146](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L146) Change the network and derive a new account #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Description | | --------- | -------------------------------------------------------------------------- | ------------------------ | | `network` | [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) | The network to change to | #### Returns [Section titled “Returns”](#returns) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AccountNetwork`](/reference/iso-filecoin-wallets/types/interfaces/accountnetwork/)> *** ### checkSupport() [Section titled “checkSupport()”](#checksupport) > **checkSupport**: () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin-wallets/src/types.ts:125](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L125) Check if this wallet adapter is supported in the current environment #### Returns [Section titled “Returns”](#returns-1) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> *** ### connect() [Section titled “connect()”](#connect) > **connect**: (`params`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AccountNetwork`](/reference/iso-filecoin-wallets/types/interfaces/accountnetwork/)> Defined in: [packages/iso-filecoin-wallets/src/types.ts:130](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L130) Connect to the wallet #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | Description | | ----------------- | ------------------------------------------------------------------------------------------- | -------------- | | `params` | { `network?`: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/); } | Connect params | | `params.network?` | [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) | - | #### Returns [Section titled “Returns”](#returns-2) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AccountNetwork`](/reference/iso-filecoin-wallets/types/interfaces/accountnetwork/)> *** ### connected [Section titled “connected”](#connected) > `readonly` **connected**: `boolean` Defined in: [packages/iso-filecoin-wallets/src/types.ts:115](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L115) Whether the wallet is currently connected *** ### connecting [Section titled “connecting”](#connecting) > `readonly` **connecting**: `boolean` Defined in: [packages/iso-filecoin-wallets/src/types.ts:110](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L110) Whether the wallet is in the process of connecting *** ### deriveAccount() [Section titled “deriveAccount()”](#deriveaccount) > **deriveAccount**: (`index`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/)> Defined in: [packages/iso-filecoin-wallets/src/types.ts:140](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L140) Derive a new account at the given index #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | Description | | --------- | -------- | ------------------------- | | `index` | `number` | The derivation path index | #### Returns [Section titled “Returns”](#returns-3) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/)> *** ### disconnect() [Section titled “disconnect()”](#disconnect) > **disconnect**: () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin-wallets/src/types.ts:134](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L134) Disconnect from the wallet #### Returns [Section titled “Returns”](#returns-4) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> *** ### id [Section titled “id”](#id) > `readonly` **id**: `string` Defined in: [packages/iso-filecoin-wallets/src/types.ts:85](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L85) Wallet adapter identifier (e.g. ‘filsnap’, ‘ledger’, ‘hd’, ‘raw’) *** ### name [Section titled “name”](#name) > **name**: `string` Defined in: [packages/iso-filecoin-wallets/src/types.ts:90](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L90) Human readable wallet name *** ### network [Section titled “network”](#network) > `readonly` **network**: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) Defined in: [packages/iso-filecoin-wallets/src/types.ts:100](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L100) Current network (mainnet or testnet) *** ### personalSign() [Section titled “personalSign()”](#personalsign) > **personalSign**: (`data`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/types.ts:162](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L162) Sign FRC-102 message #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | Description | | --------- | ----------------------------------------------------------------------------------------------------- | ----------------- | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | raw bytes to sign | #### Returns [Section titled “Returns”](#returns-5) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> #### See [Section titled “See”](#see) *** ### signMessage() [Section titled “signMessage()”](#signmessage) > **signMessage**: (`message`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/types.ts:169](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L169) Sign filecoin message #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | Description | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | | `message` | { `from`: `string`; `gasFeeCap`: `string`; `gasLimit`: `number`; `gasPremium`: `string`; `method`: `number`; `nonce`: `number`; `params`: `string`; `to`: `string`; `value`: `string`; `version`: `0`; } | Filecoin message to sign | | `message.from` | `string` | - | | `message.gasFeeCap` | `string` | - | | `message.gasLimit` | `number` | - | | `message.gasPremium` | `string` | - | | `message.method` | `number` | - | | `message.nonce` | `number` | - | | `message.params` | `string` | - | | `message.to` | `string` | - | | `message.value` | `string` | - | | `message.version` | `0` | - | #### Returns [Section titled “Returns”](#returns-6) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> *** ### support [Section titled “support”](#support) > `readonly` **support**: `"NotChecked"` | `"Detected"` | `"NotDetected"` | `"NotSupported"` Defined in: [packages/iso-filecoin-wallets/src/types.ts:105](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L105) Wallet support status (NotChecked, Detected, NotDetected, NotSupported) *** ### uid [Section titled “uid”](#uid) > `readonly` **uid**: `string` Defined in: [packages/iso-filecoin-wallets/src/types.ts:80](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L80) Unique identifier for this wallet instance *** ### url [Section titled “url”](#url) > **url**: `string` Defined in: [packages/iso-filecoin-wallets/src/types.ts:95](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L95) Wallet homepage URL ## Methods [Section titled “Methods”](#methods) ### addEventListener() [Section titled “addEventListener()”](#addeventlistener) > **addEventListener**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:29 #### Type Parameters [Section titled “Type Parameters”](#type-parameters) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-5) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `AddEventListenerOptions` | #### Returns [Section titled “Returns”](#returns-7) `void` #### Inherit Doc [Section titled “Inherit Doc”](#inherit-doc) #### Inherited from [Section titled “Inherited from”](#inherited-from) `TypedEventTarget.addEventListener` *** ### dispatchEvent() [Section titled “dispatchEvent()”](#dispatchevent) > **dispatchEvent**(`event`): `boolean` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.dom.d.ts:11575 The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent) #### Parameters [Section titled “Parameters”](#parameters-6) | Parameter | Type | | --------- | ----------------------------------------------------------- | | `event` | [`Event`](https://developer.mozilla.org/docs/Web/API/Event) | #### Returns [Section titled “Returns”](#returns-8) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `TypedEventTarget.dispatchEvent` *** ### dispatchTypedEvent() [Section titled “dispatchTypedEvent()”](#dispatchtypedevent) > **dispatchTypedEvent**<`T`>(`_type`, `event`): `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:20 Dispatches a synthetic event to target and returns true if either event’s cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. #### Type Parameters [Section titled “Type Parameters”](#type-parameters-1) | Type Parameter | | ------------------------------------------------------------------------------------------------------ | | `T` *extends* keyof [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/) | #### Parameters [Section titled “Parameters”](#parameters-7) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------- | | `_type` | `T` | | `event` | [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`] | #### Returns [Section titled “Returns”](#returns-9) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `TypedEventTarget.dispatchTypedEvent` *** ### emit() [Section titled “emit()”](#emit) > **emit**<`T`>(…`args`): `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:21 #### Type Parameters [Section titled “Type Parameters”](#type-parameters-2) | Type Parameter | | ------------------------------------------------------------------------------------------------------ | | `T` *extends* keyof [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/) | #### Parameters [Section titled “Parameters”](#parameters-8) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | …`args` | [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`] *extends* `IsAny`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`]> ? \[`T`, `unknown`] : \[`T`, [`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/)\[`T`]\[`"detail"`]] | #### Returns [Section titled “Returns”](#returns-10) `boolean` #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `TypedEventTarget.emit` *** ### off() [Section titled “off()”](#off) > **off**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:55 Alias for [TypedEventTarget.removeEventListener](/reference/iso-filecoin-react/index/interfaces/walletadapter/#removeeventlistener) #### Type Parameters [Section titled “Type Parameters”](#type-parameters-3) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-9) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `EventListenerOptions` | #### Returns [Section titled “Returns”](#returns-11) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `TypedEventTarget.off` *** ### on() [Section titled “on()”](#on) > **on**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:38 Alias for [TypedEventTarget.addEventListener](/reference/iso-filecoin-react/index/interfaces/walletadapter/#addeventlistener) #### Type Parameters [Section titled “Type Parameters”](#type-parameters-4) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-10) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `AddEventListenerOptions` | #### Returns [Section titled “Returns”](#returns-12) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-5) `TypedEventTarget.on` *** ### removeEventListener() [Section titled “removeEventListener()”](#removeeventlistener) > **removeEventListener**<`T`>(`type`, `callback`, `options?`): `void` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/event-target/index.d.ts:46 #### Type Parameters [Section titled “Type Parameters”](#type-parameters-5) | Type Parameter | | ------------------------------------------------------------------------------------------------------------------------ | | `T` *extends* `"accountChanged"` \| `"networkChanged"` \| `"disconnect"` \| `"connect"` \| `"error"` \| `"stateChanged"` | #### Parameters [Section titled “Parameters”](#parameters-11) | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | `T` | | `callback` | `TypedEventListenerOrEventListenerObject`<[`WalletEvents`](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/), `T`> \| `null` | | `options?` | `boolean` \| `EventListenerOptions` | #### Returns [Section titled “Returns”](#returns-13) `void` #### Inherit Doc [Section titled “Inherit Doc”](#inherit-doc-1) #### Inherited from [Section titled “Inherited from”](#inherited-from-6) `TypedEventTarget.removeEventListener` *** ### ~~sign()~~ [Section titled “sign()”](#sign) > **sign**(`data`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> Defined in: [packages/iso-filecoin-wallets/src/types.ts:154](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L154) Sign raw bytes Deprecated Use [personalSign](/reference/iso-filecoin-wallets/local/interfaces/walletadapter/#personalsign) instead #### Parameters [Section titled “Parameters”](#parameters-12) | Parameter | Type | Description | | --------- | ----------------------------------------------------------------------------------------------------- | ----------------- | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | raw bytes to sign | #### Returns [Section titled “Returns”](#returns-14) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Signature`](/reference/iso-filecoin/signature/classes/signature/)> # Index ## Classes [Section titled “Classes”](#classes) | Class | Description | | ----------------------------------------------------------------------------------- | ------------------------- | | [WalletAdapterRaw](/reference/iso-filecoin-wallets/local/classes/walletadapterraw/) | Raw wallet implementation | ## Interfaces [Section titled “Interfaces”](#interfaces) | Interface | Description | | -------------------------------------------------------------------------------- | ------------------------ | | [WalletAdapter](/reference/iso-filecoin-wallets/local/interfaces/walletadapter/) | Wallet adapter interface | ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | ---------------------------------------------------------------------------------- | ----------- | | [SignatureType](/reference/iso-filecoin-wallets/local/type-aliases/signaturetype/) | - | ## References [Section titled “References”](#references) ### IAccount [Section titled “IAccount”](#iaccount) Re-exports [IAccount](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/) *** ### MessageObj [Section titled “MessageObj”](#messageobj) Re-exports [MessageObj](/reference/iso-filecoin-wallets/filsnap/type-aliases/messageobj/) *** ### Network [Section titled “Network”](#network) Re-exports [Network](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) # SignatureType > **SignatureType** = [`SignatureType`](/reference/iso-filecoin/signature/type-aliases/signaturetype/) Defined in: [packages/iso-filecoin-wallets/src/local.js:20](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/local.js#L20) # Index ## Modules [Section titled “Modules”](#modules) | Module | Description | | ---------------------------------------------------------- | ----------- | | [appkit](/reference/iso-filecoin-wallets/appkit/readme/) | - | | [filsnap](/reference/iso-filecoin-wallets/filsnap/readme/) | - | | [hd](/reference/iso-filecoin-wallets/hd/readme/) | - | | [ledger](/reference/iso-filecoin-wallets/ledger/readme/) | - | | [local](/reference/iso-filecoin-wallets/local/readme/) | - | | [types](/reference/iso-filecoin-wallets/types/readme/) | - | # AccountNetwork Defined in: [packages/iso-filecoin-wallets/src/types.ts:68](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L68) ## Properties [Section titled “Properties”](#properties) ### account [Section titled “account”](#account) > **account**: [`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/) Defined in: [packages/iso-filecoin-wallets/src/types.ts:70](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L70) *** ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) Defined in: [packages/iso-filecoin-wallets/src/types.ts:69](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L69) # WalletConfig Defined in: [packages/iso-filecoin-wallets/src/types.ts:26](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L26) ## Extended by [Section titled “Extended by”](#extended-by) * [`WalletHDConfig`](/reference/iso-filecoin-wallets/types/interfaces/wallethdconfig/) * [`WalletLedgerConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletledgerconfig/) ## Properties [Section titled “Properties”](#properties) ### name? [Section titled “name?”](#name) > `optional` **name**: `string` Defined in: [packages/iso-filecoin-wallets/src/types.ts:41](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L41) Wallet name *** ### network? [Section titled “network?”](#network) > `optional` **network**: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) Defined in: [packages/iso-filecoin-wallets/src/types.ts:31](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L31) Network #### Default [Section titled “Default”](#default) ```ts mainnet ``` *** ### signatureType? [Section titled “signatureType?”](#signaturetype) > `optional` **signatureType**: `"SECP256K1"` | `"BLS"` Defined in: [packages/iso-filecoin-wallets/src/types.ts:36](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L36) Signature type #### Default [Section titled “Default”](#default-1) ```ts SECP256K1 ``` # WalletHDConfig Defined in: [packages/iso-filecoin-wallets/src/types.ts:43](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L43) ## Extends [Section titled “Extends”](#extends) * [`WalletConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/) ## Properties [Section titled “Properties”](#properties) ### index? [Section titled “index?”](#index) > `optional` **index**: `number` Defined in: [packages/iso-filecoin-wallets/src/types.ts:48](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L48) Derivation path address index #### Default [Section titled “Default”](#default) ```ts 0 ``` *** ### name? [Section titled “name?”](#name) > `optional` **name**: `string` Defined in: [packages/iso-filecoin-wallets/src/types.ts:41](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L41) Wallet name #### Inherited from [Section titled “Inherited from”](#inherited-from) [`WalletConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/).[`name`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/#name) *** ### network? [Section titled “network?”](#network) > `optional` **network**: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) Defined in: [packages/iso-filecoin-wallets/src/types.ts:31](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L31) Network #### Default [Section titled “Default”](#default-1) ```ts mainnet ``` #### Inherited from [Section titled “Inherited from”](#inherited-from-1) [`WalletConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/).[`network`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/#network) *** ### seed? [Section titled “seed?”](#seed) > `optional` **seed**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin-wallets/src/types.ts:49](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L49) *** ### signatureType? [Section titled “signatureType?”](#signaturetype) > `optional` **signatureType**: `"SECP256K1"` | `"BLS"` Defined in: [packages/iso-filecoin-wallets/src/types.ts:36](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L36) Signature type #### Default [Section titled “Default”](#default-2) ```ts SECP256K1 ``` #### Inherited from [Section titled “Inherited from”](#inherited-from-2) [`WalletConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/).[`signatureType`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/#signaturetype) # WalletHDMnemonicConfig Defined in: [packages/iso-filecoin-wallets/src/types.ts:51](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L51) ## Extends [Section titled “Extends”](#extends) * [`Omit`](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys)<[`WalletHDConfig`](/reference/iso-filecoin-wallets/types/interfaces/wallethdconfig/), `"seed"`> ## Properties [Section titled “Properties”](#properties) ### index? [Section titled “index?”](#index) > `optional` **index**: `number` Defined in: [packages/iso-filecoin-wallets/src/types.ts:48](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L48) Derivation path address index #### Default [Section titled “Default”](#default) ```ts 0 ``` #### Inherited from [Section titled “Inherited from”](#inherited-from) [`WalletHDConfig`](/reference/iso-filecoin-wallets/types/interfaces/wallethdconfig/).[`index`](/reference/iso-filecoin-wallets/types/interfaces/wallethdconfig/#index) *** ### mnemonic [Section titled “mnemonic”](#mnemonic) > **mnemonic**: `string` Defined in: [packages/iso-filecoin-wallets/src/types.ts:52](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L52) *** ### name? [Section titled “name?”](#name) > `optional` **name**: `string` Defined in: [packages/iso-filecoin-wallets/src/types.ts:41](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L41) Wallet name #### Inherited from [Section titled “Inherited from”](#inherited-from-1) [`WalletConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/).[`name`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/#name) *** ### network? [Section titled “network?”](#network) > `optional` **network**: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) Defined in: [packages/iso-filecoin-wallets/src/types.ts:31](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L31) Network #### Default [Section titled “Default”](#default-1) ```ts mainnet ``` #### Inherited from [Section titled “Inherited from”](#inherited-from-2) [`WalletConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/).[`network`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/#network) *** ### password? [Section titled “password?”](#password) > `optional` **password**: `string` Defined in: [packages/iso-filecoin-wallets/src/types.ts:53](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L53) *** ### signatureType? [Section titled “signatureType?”](#signaturetype) > `optional` **signatureType**: `"SECP256K1"` | `"BLS"` Defined in: [packages/iso-filecoin-wallets/src/types.ts:36](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L36) Signature type #### Default [Section titled “Default”](#default-2) ```ts SECP256K1 ``` #### Inherited from [Section titled “Inherited from”](#inherited-from-3) [`WalletConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/).[`signatureType`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/#signaturetype) # WalletLedgerConfig Defined in: [packages/iso-filecoin-wallets/src/types.ts:56](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L56) ## Extends [Section titled “Extends”](#extends) * [`WalletConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/) ## Properties [Section titled “Properties”](#properties) ### index? [Section titled “index?”](#index) > `optional` **index**: `number` Defined in: [packages/iso-filecoin-wallets/src/types.ts:61](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L61) Derivation path address index #### Default [Section titled “Default”](#default) ```ts 0 ``` *** ### name? [Section titled “name?”](#name) > `optional` **name**: `string` Defined in: [packages/iso-filecoin-wallets/src/types.ts:41](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L41) Wallet name #### Inherited from [Section titled “Inherited from”](#inherited-from) [`WalletConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/).[`name`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/#name) *** ### network? [Section titled “network?”](#network) > `optional` **network**: [`Network`](/reference/iso-filecoin-wallets/filsnap/type-aliases/network/) Defined in: [packages/iso-filecoin-wallets/src/types.ts:31](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L31) Network #### Default [Section titled “Default”](#default-1) ```ts mainnet ``` #### Inherited from [Section titled “Inherited from”](#inherited-from-1) [`WalletConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/).[`network`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/#network) *** ### signatureType? [Section titled “signatureType?”](#signaturetype) > `optional` **signatureType**: `"SECP256K1"` | `"BLS"` Defined in: [packages/iso-filecoin-wallets/src/types.ts:36](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L36) Signature type #### Default [Section titled “Default”](#default-2) ```ts SECP256K1 ``` #### Inherited from [Section titled “Inherited from”](#inherited-from-2) [`WalletConfig`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/).[`signatureType`](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/#signaturetype) *** ### transport [Section titled “transport”](#transport) > **transport**: `object` Defined in: [packages/iso-filecoin-wallets/src/types.ts:62](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L62) #### create() [Section titled “create()”](#create) > **create**: () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`Transport`> ##### Returns [Section titled “Returns”](#returns) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`Transport`> #### isSupported() [Section titled “isSupported()”](#issupported) > **isSupported**: () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`boolean`> ##### Returns [Section titled “Returns”](#returns-1) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`boolean`> # Index ## Interfaces [Section titled “Interfaces”](#interfaces) | Interface | Description | | -------------------------------------------------------------------------------------------------- | ----------- | | [AccountNetwork](/reference/iso-filecoin-wallets/types/interfaces/accountnetwork/) | - | | [WalletConfig](/reference/iso-filecoin-wallets/types/interfaces/walletconfig/) | - | | [WalletHDConfig](/reference/iso-filecoin-wallets/types/interfaces/wallethdconfig/) | - | | [WalletHDMnemonicConfig](/reference/iso-filecoin-wallets/types/interfaces/wallethdmnemonicconfig/) | - | | [WalletLedgerConfig](/reference/iso-filecoin-wallets/types/interfaces/walletledgerconfig/) | - | ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | ------------------------------------------------------------------------------------------ | ----------- | | [Transport](/reference/iso-filecoin-wallets/types/type-aliases/transport/) | - | | [TransportImpl](/reference/iso-filecoin-wallets/types/type-aliases/transportimpl/) | - | | [WalletEvents](/reference/iso-filecoin-wallets/types/type-aliases/walletevents/) | - | | [WalletSupportType](/reference/iso-filecoin-wallets/types/type-aliases/walletsupporttype/) | - | ## References [Section titled “References”](#references) ### WalletAdapter [Section titled “WalletAdapter”](#walletadapter) Re-exports [WalletAdapter](/reference/iso-filecoin-wallets/local/interfaces/walletadapter/) # Transport > **Transport** = `_LedgerTransport` Defined in: [packages/iso-filecoin-wallets/src/types.ts:12](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L12) # TransportImpl > **TransportImpl** = *typeof* `_LedgerTransport` Defined in: [packages/iso-filecoin-wallets/src/types.ts:13](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L13) # WalletEvents > **WalletEvents** = `object` Defined in: [packages/iso-filecoin-wallets/src/types.ts:17](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L17) ## Properties [Section titled “Properties”](#properties) ### accountChanged [Section titled “accountChanged”](#accountchanged) > **accountChanged**: [`CustomEvent`](https://developer.mozilla.org/docs/Web/API/CustomEvent)<[`IAccount`](/reference/iso-filecoin-wallets/ledger/interfaces/iaccount/)> Defined in: [packages/iso-filecoin-wallets/src/types.ts:18](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L18) *** ### connect [Section titled “connect”](#connect) > **connect**: [`CustomEvent`](https://developer.mozilla.org/docs/Web/API/CustomEvent)<[`AccountNetwork`](/reference/iso-filecoin-wallets/types/interfaces/accountnetwork/)> Defined in: [packages/iso-filecoin-wallets/src/types.ts:21](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L21) *** ### disconnect [Section titled “disconnect”](#disconnect) > **disconnect**: [`CustomEvent`](https://developer.mozilla.org/docs/Web/API/CustomEvent) Defined in: [packages/iso-filecoin-wallets/src/types.ts:20](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L20) *** ### error [Section titled “error”](#error) > **error**: [`CustomEvent`](https://developer.mozilla.org/docs/Web/API/CustomEvent)<[`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error)> Defined in: [packages/iso-filecoin-wallets/src/types.ts:22](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L22) *** ### networkChanged [Section titled “networkChanged”](#networkchanged) > **networkChanged**: [`CustomEvent`](https://developer.mozilla.org/docs/Web/API/CustomEvent)<[`AccountNetwork`](/reference/iso-filecoin-wallets/types/interfaces/accountnetwork/)> Defined in: [packages/iso-filecoin-wallets/src/types.ts:19](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L19) *** ### stateChanged [Section titled “stateChanged”](#statechanged) > **stateChanged**: [`CustomEvent`](https://developer.mozilla.org/docs/Web/API/CustomEvent)<[`WalletSupportType`](/reference/iso-filecoin-wallets/types/type-aliases/walletsupporttype/)> Defined in: [packages/iso-filecoin-wallets/src/types.ts:23](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L23) # WalletSupportType > **WalletSupportType** = keyof *typeof* [`WalletSupport`](/reference/iso-filecoin-wallets/ledger/variables/walletsupport/) Defined in: [packages/iso-filecoin-wallets/src/types.ts:15](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin-wallets/src/types.ts#L15) # AddressActor Defined in: [packages/iso-filecoin/src/address.js:686](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L686) Actor Address f2.. Protocol 2 addresses representing an Actor. The payload field contains the SHA256 hash of meaningful data produced as a result of creating the actor. ## See [Section titled “See”](#see) ## Implements [Section titled “Implements”](#implements) ## Extends [Section titled “Extends”](#extends) * `Address` ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new AddressActor**(`payload`, `network`): `AddressActor` Defined in: [packages/iso-filecoin/src/address.js:692](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L692) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------ | | `payload` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns) `AddressActor` #### Overrides [Section titled “Overrides”](#overrides) `Address.constructor` ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` = `true` Defined in: [packages/iso-filecoin/src/address.js:308](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L308) #### Inherited from [Section titled “Inherited from”](#inherited-from) `Address.[symbol]` *** ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin/types/type-aliases/network/) Defined in: [packages/iso-filecoin/src/address.js:317](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L317) #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `Address.network` *** ### networkPrefix [Section titled “networkPrefix”](#networkprefix) > **networkPrefix**: `"f"` | `"t"` Defined in: [packages/iso-filecoin/src/address.js:318](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L318) #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `Address.networkPrefix` *** ### payload [Section titled “payload”](#payload) > **payload**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/address.js:316](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L316) #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `Address.payload` *** ### protocol [Section titled “protocol”](#protocol) > **protocol**: `2` Defined in: [packages/iso-filecoin/src/address.js:694](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L694) #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `Address.protocol` ## Methods [Section titled “Methods”](#methods) ### checksum() [Section titled “checksum()”](#checksum) > **checksum**(): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/address.js:337](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L337) #### Returns [Section titled “Returns”](#returns-1) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> #### Inherited from [Section titled “Inherited from”](#inherited-from-5) `Address.checksum` *** ### to0x() [Section titled “to0x()”](#to0x) > **to0x**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`string`> Defined in: [packages/iso-filecoin/src/address.js:399](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L399) Converts any address to a 0x address, either id masked address or eth address depending on the address type. Delegated addresses convert to eth address and f1, f2, f3 convert to id masked address and f0 depends on the underline address type #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------------- | | `options` | [`AddressRpcSafetyOptions`](/reference/iso-filecoin/types/interfaces/addressrpcsafetyoptions/) | #### Returns [Section titled “Returns”](#returns-2) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`string`> #### Inherited from [Section titled “Inherited from”](#inherited-from-6) `Address.to0x` *** ### toBytes() [Section titled “toBytes()”](#tobytes) > **toBytes**(): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)> Defined in: [packages/iso-filecoin/src/address.js:329](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L329) #### Returns [Section titled “Returns”](#returns-3) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)> #### Inherited from [Section titled “Inherited from”](#inherited-from-7) `Address.toBytes` *** ### toContractDestination() [Section titled “toContractDestination()”](#tocontractdestination) > **toContractDestination**(): `` `0x${string}` `` Defined in: [packages/iso-filecoin/src/address.js:333](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L333) #### Returns [Section titled “Returns”](#returns-4) `` `0x${string}` `` #### Inherited from [Section titled “Inherited from”](#inherited-from-8) `Address.toContractDestination` *** ### toIdAddress() [Section titled “toIdAddress()”](#toidaddress) > **toIdAddress**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AddressId`](/reference/iso-filecoin/address/classes/addressid/)> Defined in: [packages/iso-filecoin/src/address.js:348](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L348) Convert to ID address #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------------- | | `options` | [`AddressRpcSafetyOptions`](/reference/iso-filecoin/types/interfaces/addressrpcsafetyoptions/) | #### Returns [Section titled “Returns”](#returns-5) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AddressId`](/reference/iso-filecoin/address/classes/addressid/)> #### Inherited from [Section titled “Inherited from”](#inherited-from-9) `Address.toIdAddress` *** ### toString() [Section titled “toString()”](#tostring) > **toString**(): `string` Defined in: [packages/iso-filecoin/src/address.js:323](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L323) #### Returns [Section titled “Returns”](#returns-6) `string` #### Inherited from [Section titled “Inherited from”](#inherited-from-10) `Address.toString` *** ### fromBytes() [Section titled “fromBytes()”](#frombytes) > `static` **fromBytes**(`bytes`, `network`): `AddressActor` Defined in: [packages/iso-filecoin/src/address.js:735](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L735) Create address from bytes #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------ | | `bytes` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-7) `AddressActor` *** ### fromString() [Section titled “fromString()”](#fromstring) > `static` **fromString**(`address`): `AddressActor` Defined in: [packages/iso-filecoin/src/address.js:705](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L705) Create address from string #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | | --------- | -------- | | `address` | `string` | #### Returns [Section titled “Returns”](#returns-8) `AddressActor` # AddressBLS Defined in: [packages/iso-filecoin/src/address.js:752](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L752) BLS Address f3.. Protocol 3 addresses represent BLS public encryption keys. The payload field contains the BLS public key. ## See [Section titled “See”](#see) ## Implements [Section titled “Implements”](#implements) ## Extends [Section titled “Extends”](#extends) * `Address` ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new AddressBLS**(`payload`, `network`): `AddressBLS` Defined in: [packages/iso-filecoin/src/address.js:758](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L758) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------ | | `payload` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns) `AddressBLS` #### Overrides [Section titled “Overrides”](#overrides) `Address.constructor` ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` = `true` Defined in: [packages/iso-filecoin/src/address.js:308](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L308) #### Inherited from [Section titled “Inherited from”](#inherited-from) `Address.[symbol]` *** ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin/types/type-aliases/network/) Defined in: [packages/iso-filecoin/src/address.js:317](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L317) #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `Address.network` *** ### networkPrefix [Section titled “networkPrefix”](#networkprefix) > **networkPrefix**: `"f"` | `"t"` Defined in: [packages/iso-filecoin/src/address.js:318](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L318) #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `Address.networkPrefix` *** ### payload [Section titled “payload”](#payload) > **payload**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/address.js:316](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L316) #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `Address.payload` *** ### protocol [Section titled “protocol”](#protocol) > **protocol**: `3` Defined in: [packages/iso-filecoin/src/address.js:760](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L760) #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `Address.protocol` ## Methods [Section titled “Methods”](#methods) ### checksum() [Section titled “checksum()”](#checksum) > **checksum**(): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/address.js:337](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L337) #### Returns [Section titled “Returns”](#returns-1) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> #### Inherited from [Section titled “Inherited from”](#inherited-from-5) `Address.checksum` *** ### to0x() [Section titled “to0x()”](#to0x) > **to0x**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`string`> Defined in: [packages/iso-filecoin/src/address.js:399](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L399) Converts any address to a 0x address, either id masked address or eth address depending on the address type. Delegated addresses convert to eth address and f1, f2, f3 convert to id masked address and f0 depends on the underline address type #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------------- | | `options` | [`AddressRpcSafetyOptions`](/reference/iso-filecoin/types/interfaces/addressrpcsafetyoptions/) | #### Returns [Section titled “Returns”](#returns-2) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`string`> #### Inherited from [Section titled “Inherited from”](#inherited-from-6) `Address.to0x` *** ### toBytes() [Section titled “toBytes()”](#tobytes) > **toBytes**(): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)> Defined in: [packages/iso-filecoin/src/address.js:329](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L329) #### Returns [Section titled “Returns”](#returns-3) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)> #### Inherited from [Section titled “Inherited from”](#inherited-from-7) `Address.toBytes` *** ### toContractDestination() [Section titled “toContractDestination()”](#tocontractdestination) > **toContractDestination**(): `` `0x${string}` `` Defined in: [packages/iso-filecoin/src/address.js:333](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L333) #### Returns [Section titled “Returns”](#returns-4) `` `0x${string}` `` #### Inherited from [Section titled “Inherited from”](#inherited-from-8) `Address.toContractDestination` *** ### toIdAddress() [Section titled “toIdAddress()”](#toidaddress) > **toIdAddress**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AddressId`](/reference/iso-filecoin/address/classes/addressid/)> Defined in: [packages/iso-filecoin/src/address.js:348](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L348) Convert to ID address #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------------- | | `options` | [`AddressRpcSafetyOptions`](/reference/iso-filecoin/types/interfaces/addressrpcsafetyoptions/) | #### Returns [Section titled “Returns”](#returns-5) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AddressId`](/reference/iso-filecoin/address/classes/addressid/)> #### Inherited from [Section titled “Inherited from”](#inherited-from-9) `Address.toIdAddress` *** ### toString() [Section titled “toString()”](#tostring) > **toString**(): `string` Defined in: [packages/iso-filecoin/src/address.js:323](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L323) #### Returns [Section titled “Returns”](#returns-6) `string` #### Inherited from [Section titled “Inherited from”](#inherited-from-10) `Address.toString` *** ### fromBytes() [Section titled “fromBytes()”](#frombytes) > `static` **fromBytes**(`bytes`, `network`): `AddressBLS` Defined in: [packages/iso-filecoin/src/address.js:803](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L803) Create address from bytes #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------ | | `bytes` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-7) `AddressBLS` *** ### fromPublicKey() [Section titled “fromPublicKey()”](#frompublickey) > `static` **fromPublicKey**(`publicKey`, `network`): `AddressBLS` Defined in: [packages/iso-filecoin/src/address.js:815](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L815) #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | | ----------- | ------------------------------------------------------------------------------------------------------------------------ | | `publicKey` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-8) `AddressBLS` *** ### fromString() [Section titled “fromString()”](#fromstring) > `static` **fromString**(`address`): `AddressBLS` Defined in: [packages/iso-filecoin/src/address.js:771](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L771) Create address from string #### Parameters [Section titled “Parameters”](#parameters-5) | Parameter | Type | | --------- | -------- | | `address` | `string` | #### Returns [Section titled “Returns”](#returns-9) `AddressBLS` # AddressDelegated Defined in: [packages/iso-filecoin/src/address.js:832](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L832) Delegated address f4.. ## See [Section titled “See”](#see) ## Implements [Section titled “Implements”](#implements) ## Extends [Section titled “Extends”](#extends) * `Address` ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new AddressDelegated**(`namespace`, `payload`, `network`): `AddressDelegated` Defined in: [packages/iso-filecoin/src/address.js:838](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L838) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ----------- | ------------------------------------------------------------------------------------------------------------------------ | | `namespace` | `number` | | `payload` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns) `AddressDelegated` #### Overrides [Section titled “Overrides”](#overrides) `Address.constructor` ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` = `true` Defined in: [packages/iso-filecoin/src/address.js:308](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L308) #### Inherited from [Section titled “Inherited from”](#inherited-from) `Address.[symbol]` *** ### namespace [Section titled “namespace”](#namespace) > **namespace**: `number` Defined in: [packages/iso-filecoin/src/address.js:841](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L841) *** ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin/types/type-aliases/network/) Defined in: [packages/iso-filecoin/src/address.js:317](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L317) #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `Address.network` *** ### networkPrefix [Section titled “networkPrefix”](#networkprefix) > **networkPrefix**: `"f"` | `"t"` Defined in: [packages/iso-filecoin/src/address.js:318](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L318) #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `Address.networkPrefix` *** ### payload [Section titled “payload”](#payload) > **payload**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/address.js:316](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L316) #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `Address.payload` *** ### protocol [Section titled “protocol”](#protocol) > **protocol**: `4` Defined in: [packages/iso-filecoin/src/address.js:840](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L840) #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `Address.protocol` ## Methods [Section titled “Methods”](#methods) ### checksum() [Section titled “checksum()”](#checksum) > **checksum**(): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/address.js:337](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L337) #### Returns [Section titled “Returns”](#returns-1) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> #### Inherited from [Section titled “Inherited from”](#inherited-from-5) `Address.checksum` *** ### to0x() [Section titled “to0x()”](#to0x) > **to0x**(`_rpc`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`string`> Defined in: [packages/iso-filecoin/src/address.js:944](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L944) Convert address to ethereum address #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------- | | `_rpc` | [`AddressRpcOptions`](/reference/iso-filecoin/types/interfaces/addressrpcoptions/) | #### Returns [Section titled “Returns”](#returns-2) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`string`> #### Overrides [Section titled “Overrides”](#overrides-1) `Address.to0x` *** ### toBytes() [Section titled “toBytes()”](#tobytes) > **toBytes**(): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)> Defined in: [packages/iso-filecoin/src/address.js:969](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L969) #### Returns [Section titled “Returns”](#returns-3) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)> #### Overrides [Section titled “Overrides”](#overrides-2) `Address.toBytes` *** ### toContractDestination() [Section titled “toContractDestination()”](#tocontractdestination) > **toContractDestination**(): `` `0x${string}` `` Defined in: [packages/iso-filecoin/src/address.js:333](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L333) #### Returns [Section titled “Returns”](#returns-4) `` `0x${string}` `` #### Inherited from [Section titled “Inherited from”](#inherited-from-6) `Address.toContractDestination` *** ### toEthAddress() [Section titled “toEthAddress()”](#toethaddress) > **toEthAddress**(): `string` Defined in: [packages/iso-filecoin/src/address.js:953](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L953) Converts to 0x eth address, it’s similar to [to0x](/reference/iso-filecoin/address/classes/addressdelegated/#to0x) but sync because f4s dont need to check the chain to get the address #### Returns [Section titled “Returns”](#returns-5) `string` *** ### toIdAddress() [Section titled “toIdAddress()”](#toidaddress) > **toIdAddress**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AddressId`](/reference/iso-filecoin/address/classes/addressid/)> Defined in: [packages/iso-filecoin/src/address.js:348](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L348) Convert to ID address #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------------- | | `options` | [`AddressRpcSafetyOptions`](/reference/iso-filecoin/types/interfaces/addressrpcsafetyoptions/) | #### Returns [Section titled “Returns”](#returns-6) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AddressId`](/reference/iso-filecoin/address/classes/addressid/)> #### Inherited from [Section titled “Inherited from”](#inherited-from-7) `Address.toIdAddress` *** ### toString() [Section titled “toString()”](#tostring) > **toString**(): `string` Defined in: [packages/iso-filecoin/src/address.js:963](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L963) #### Returns [Section titled “Returns”](#returns-7) `string` #### Overrides [Section titled “Overrides”](#overrides-3) `Address.toString` *** ### fromBytes() [Section titled “fromBytes()”](#frombytes) > `static` **fromBytes**(`bytes`, `network`): `AddressDelegated` Defined in: [packages/iso-filecoin/src/address.js:899](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L899) Create address from bytes #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------ | | `bytes` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-8) `AddressDelegated` *** ### fromEthAddress() [Section titled “fromEthAddress()”](#fromethaddress) > `static` **fromEthAddress**(`address`, `network`): `AddressDelegated` Defined in: [packages/iso-filecoin/src/address.js:919](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L919) Create delegated address from ethereum address #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `address` | `string` | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-9) `AddressDelegated` *** ### fromString() [Section titled “fromString()”](#fromstring) > `static` **fromString**(`address`): `AddressDelegated` Defined in: [packages/iso-filecoin/src/address.js:860](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L860) Create address from string #### Parameters [Section titled “Parameters”](#parameters-5) | Parameter | Type | | --------- | -------- | | `address` | `string` | #### Returns [Section titled “Returns”](#returns-10) `AddressDelegated` # AddressId Defined in: [packages/iso-filecoin/src/address.js:444](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L444) ID Address f0.. Protocol 0 addresses are simple IDs. All actors have a numeric ID even if they don’t have public keys. The payload of an ID address is base10 encoded. IDs are not hashed and do not have a checksum. ## See [Section titled “See”](#see) ## Implements [Section titled “Implements”](#implements) ## Extends [Section titled “Extends”](#extends) * `Address` ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new AddressId**(`payload`, `network`): `AddressId` Defined in: [packages/iso-filecoin/src/address.js:450](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L450) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------ | | `payload` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns) `AddressId` #### Overrides [Section titled “Overrides”](#overrides) `Address.constructor` ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` = `true` Defined in: [packages/iso-filecoin/src/address.js:308](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L308) #### Inherited from [Section titled “Inherited from”](#inherited-from) `Address.[symbol]` *** ### id [Section titled “id”](#id) > **id**: `bigint` Defined in: [packages/iso-filecoin/src/address.js:453](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L453) *** ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin/types/type-aliases/network/) Defined in: [packages/iso-filecoin/src/address.js:317](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L317) #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `Address.network` *** ### networkPrefix [Section titled “networkPrefix”](#networkprefix) > **networkPrefix**: `"f"` | `"t"` Defined in: [packages/iso-filecoin/src/address.js:318](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L318) #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `Address.networkPrefix` *** ### payload [Section titled “payload”](#payload) > **payload**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/address.js:316](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L316) #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `Address.payload` *** ### protocol [Section titled “protocol”](#protocol) > **protocol**: `0` Defined in: [packages/iso-filecoin/src/address.js:452](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L452) #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `Address.protocol` ## Methods [Section titled “Methods”](#methods) ### checksum() [Section titled “checksum()”](#checksum) > **checksum**(): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/address.js:337](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L337) #### Returns [Section titled “Returns”](#returns-1) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> #### Inherited from [Section titled “Inherited from”](#inherited-from-5) `Address.checksum` *** ### to0x() [Section titled “to0x()”](#to0x) > **to0x**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`string`> Defined in: [packages/iso-filecoin/src/address.js:571](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L571) #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------- | | `options` | [`AddressRpcOptions`](/reference/iso-filecoin/types/interfaces/addressrpcoptions/) | #### Returns [Section titled “Returns”](#returns-2) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`string`> #### Overrides [Section titled “Overrides”](#overrides-1) `Address.to0x` *** ### toBytes() [Section titled “toBytes()”](#tobytes) > **toBytes**(): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)> Defined in: [packages/iso-filecoin/src/address.js:329](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L329) #### Returns [Section titled “Returns”](#returns-3) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)> #### Inherited from [Section titled “Inherited from”](#inherited-from-6) `Address.toBytes` *** ### toContractDestination() [Section titled “toContractDestination()”](#tocontractdestination) > **toContractDestination**(): `` `0x${string}` `` Defined in: [packages/iso-filecoin/src/address.js:333](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L333) #### Returns [Section titled “Returns”](#returns-4) `` `0x${string}` `` #### Inherited from [Section titled “Inherited from”](#inherited-from-7) `Address.toContractDestination` *** ### toIdAddress() [Section titled “toIdAddress()”](#toidaddress) > **toIdAddress**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`AddressId`> Defined in: [packages/iso-filecoin/src/address.js:348](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L348) Convert to ID address #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------------- | | `options` | [`AddressRpcSafetyOptions`](/reference/iso-filecoin/types/interfaces/addressrpcsafetyoptions/) | #### Returns [Section titled “Returns”](#returns-5) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`AddressId`> #### Inherited from [Section titled “Inherited from”](#inherited-from-8) `Address.toIdAddress` *** ### toIdMaskAddress() [Section titled “toIdMaskAddress()”](#toidmaskaddress) > **toIdMaskAddress**(): `string` Defined in: [packages/iso-filecoin/src/address.js:524](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L524) Convert address to ID masked 0x address To convert to an eth address you probably should use [to0x](/reference/iso-filecoin/address/classes/addressid/#to0x) #### Returns [Section titled “Returns”](#returns-6) `string` *** ### toRobust() [Section titled “toRobust()”](#torobust) > **toRobust**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/)> Defined in: [packages/iso-filecoin/src/address.js:541](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L541) Get robust address from public key address #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------- | | `options` | [`AddressRpcOptions`](/reference/iso-filecoin/types/interfaces/addressrpcoptions/) | #### Returns [Section titled “Returns”](#returns-7) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/)> *** ### toString() [Section titled “toString()”](#tostring) > **toString**(): `string` Defined in: [packages/iso-filecoin/src/address.js:532](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L532) #### Returns [Section titled “Returns”](#returns-8) `string` #### Overrides [Section titled “Overrides”](#overrides-2) `Address.toString` *** ### fromBytes() [Section titled “fromBytes()”](#frombytes) > `static` **fromBytes**(`bytes`, `network`): `AddressId` Defined in: [packages/iso-filecoin/src/address.js:487](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L487) Create address from bytes #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------ | | `bytes` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-9) `AddressId` *** ### fromIdMaskAddress() [Section titled “fromIdMaskAddress()”](#fromidmaskaddress) > `static` **fromIdMaskAddress**(`address`, `network`): `AddressId` Defined in: [packages/iso-filecoin/src/address.js:500](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L500) Create ID address from ID masked 0x address #### Parameters [Section titled “Parameters”](#parameters-5) | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `address` | `string` | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-10) `AddressId` *** ### fromString() [Section titled “fromString()”](#fromstring) > `static` **fromString**(`address`): `AddressId` Defined in: [packages/iso-filecoin/src/address.js:461](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L461) Create address from string #### Parameters [Section titled “Parameters”](#parameters-6) | Parameter | Type | | --------- | -------- | | `address` | `string` | #### Returns [Section titled “Returns”](#returns-11) `AddressId` # AddressSecp256k1 Defined in: [packages/iso-filecoin/src/address.js:601](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L601) Secp256k1 address f1.. ## See [Section titled “See”](#see) ## Implements [Section titled “Implements”](#implements) ## Extends [Section titled “Extends”](#extends) * `Address` ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new AddressSecp256k1**(`payload`, `network`): `AddressSecp256k1` Defined in: [packages/iso-filecoin/src/address.js:607](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L607) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------ | | `payload` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns) `AddressSecp256k1` #### Overrides [Section titled “Overrides”](#overrides) `Address.constructor` ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` = `true` Defined in: [packages/iso-filecoin/src/address.js:308](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L308) #### Inherited from [Section titled “Inherited from”](#inherited-from) `Address.[symbol]` *** ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin/types/type-aliases/network/) Defined in: [packages/iso-filecoin/src/address.js:317](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L317) #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `Address.network` *** ### networkPrefix [Section titled “networkPrefix”](#networkprefix) > **networkPrefix**: `"f"` | `"t"` Defined in: [packages/iso-filecoin/src/address.js:318](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L318) #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `Address.networkPrefix` *** ### payload [Section titled “payload”](#payload) > **payload**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/address.js:316](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L316) #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `Address.payload` *** ### protocol [Section titled “protocol”](#protocol) > **protocol**: `1` Defined in: [packages/iso-filecoin/src/address.js:609](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L609) #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `Address.protocol` ## Methods [Section titled “Methods”](#methods) ### checksum() [Section titled “checksum()”](#checksum) > **checksum**(): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/address.js:337](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L337) #### Returns [Section titled “Returns”](#returns-1) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> #### Inherited from [Section titled “Inherited from”](#inherited-from-5) `Address.checksum` *** ### to0x() [Section titled “to0x()”](#to0x) > **to0x**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`string`> Defined in: [packages/iso-filecoin/src/address.js:399](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L399) Converts any address to a 0x address, either id masked address or eth address depending on the address type. Delegated addresses convert to eth address and f1, f2, f3 convert to id masked address and f0 depends on the underline address type #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------------- | | `options` | [`AddressRpcSafetyOptions`](/reference/iso-filecoin/types/interfaces/addressrpcsafetyoptions/) | #### Returns [Section titled “Returns”](#returns-2) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`string`> #### Inherited from [Section titled “Inherited from”](#inherited-from-6) `Address.to0x` *** ### toBytes() [Section titled “toBytes()”](#tobytes) > **toBytes**(): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)> Defined in: [packages/iso-filecoin/src/address.js:329](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L329) #### Returns [Section titled “Returns”](#returns-3) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)> #### Inherited from [Section titled “Inherited from”](#inherited-from-7) `Address.toBytes` *** ### toContractDestination() [Section titled “toContractDestination()”](#tocontractdestination) > **toContractDestination**(): `` `0x${string}` `` Defined in: [packages/iso-filecoin/src/address.js:333](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L333) #### Returns [Section titled “Returns”](#returns-4) `` `0x${string}` `` #### Inherited from [Section titled “Inherited from”](#inherited-from-8) `Address.toContractDestination` *** ### toIdAddress() [Section titled “toIdAddress()”](#toidaddress) > **toIdAddress**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AddressId`](/reference/iso-filecoin/address/classes/addressid/)> Defined in: [packages/iso-filecoin/src/address.js:348](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L348) Convert to ID address #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------------------- | | `options` | [`AddressRpcSafetyOptions`](/reference/iso-filecoin/types/interfaces/addressrpcsafetyoptions/) | #### Returns [Section titled “Returns”](#returns-5) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AddressId`](/reference/iso-filecoin/address/classes/addressid/)> #### Inherited from [Section titled “Inherited from”](#inherited-from-9) `Address.toIdAddress` *** ### toString() [Section titled “toString()”](#tostring) > **toString**(): `string` Defined in: [packages/iso-filecoin/src/address.js:323](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L323) #### Returns [Section titled “Returns”](#returns-6) `string` #### Inherited from [Section titled “Inherited from”](#inherited-from-10) `Address.toString` *** ### fromBytes() [Section titled “fromBytes()”](#frombytes) > `static` **fromBytes**(`bytes`, `network`): `AddressSecp256k1` Defined in: [packages/iso-filecoin/src/address.js:653](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L653) Create address from bytes #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------ | | `bytes` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-7) `AddressSecp256k1` *** ### fromPublicKey() [Section titled “fromPublicKey()”](#frompublickey) > `static` **fromPublicKey**(`publicKey`, `network`): `AddressSecp256k1` Defined in: [packages/iso-filecoin/src/address.js:664](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L664) #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | | ----------- | ------------------------------------------------------------------------------------------------------------------------ | | `publicKey` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | #### Returns [Section titled “Returns”](#returns-8) `AddressSecp256k1` *** ### fromString() [Section titled “fromString()”](#fromstring) > `static` **fromString**(`address`): `AddressSecp256k1` Defined in: [packages/iso-filecoin/src/address.js:621](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L621) Create address from string #### Parameters [Section titled “Parameters”](#parameters-5) | Parameter | Type | | --------- | -------- | | `address` | `string` | #### Returns [Section titled “Returns”](#returns-9) `AddressSecp256k1` # from > **from**(`value`, `network?`): [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) Defined in: [packages/iso-filecoin/src/address.js:176](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L176) ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Default value | Description | | ---------- | ---------------------------------------------------------------- | ------------- | --------------------------- | | `value` | [`Value`](/reference/iso-filecoin/address/type-aliases/value/) | `undefined` | Value to convert to address | | `network?` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | `'mainnet'` | Network | ## Returns [Section titled “Returns”](#returns) [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) # fromBytes > **fromBytes**(`bytes`, `network`): [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) Defined in: [packages/iso-filecoin/src/address.js:237](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L237) Create address from bytes ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------ | | `bytes` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | ## Returns [Section titled “Returns”](#returns) [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) # fromContractDestination > **fromContractDestination**(`address`, `network`): [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) Defined in: [packages/iso-filecoin/src/address.js:294](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L294) Create an `Address` instance from a 0x-prefixed hex string address returned by `Address.toContractDestination()`. ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Description | | --------- | ---------------------------------------------------------------- | ----------------------------------- | | `address` | `` `0x${string}` `` | The 0x-prefixed hex string address. | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | The network the address is on. | ## Returns [Section titled “Returns”](#returns) [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) # fromEthAddress > **fromEthAddress**(`address`, `network`): [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) Defined in: [packages/iso-filecoin/src/address.js:146](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L146) Address from Ethereum address ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `address` | `string` | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | ## Returns [Section titled “Returns”](#returns) [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) # fromPublicKey > **fromPublicKey**(`bytes`, `network`, `type`): [`AddressSecp256k1`](/reference/iso-filecoin/address/classes/addresssecp256k1/) | [`AddressBLS`](/reference/iso-filecoin/address/classes/addressbls/) Defined in: [packages/iso-filecoin/src/address.js:272](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L272) Create address from public key bytes Only for f1 SECP256K1 and f3 BLS ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------ | | `bytes` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | | `type` | `"SECP256K1"` \| `"BLS"` | ## Returns [Section titled “Returns”](#returns) [`AddressSecp256k1`](/reference/iso-filecoin/address/classes/addresssecp256k1/) | [`AddressBLS`](/reference/iso-filecoin/address/classes/addressbls/) IAddress # fromString > **fromString**(`address`): [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) Defined in: [packages/iso-filecoin/src/address.js:200](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L200) Address from string ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | -------- | | `address` | `string` | ## Returns [Section titled “Returns”](#returns) [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) # isAddress > **isAddress**(`val`): `val is IAddress` Defined in: [packages/iso-filecoin/src/address.js:58](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L58) Asserts that the given value is an [IAddress](/reference/iso-filecoin/address/interfaces/iaddress/) instance. ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ----- | | `val` | `any` | ## Returns [Section titled “Returns”](#returns) `val is IAddress` ## Example [Section titled “Example”](#example) ```ts import { function isAddress(val: any): val is IAddress Asserts that the given value is an IAddress instance. @example import { isAddress, fromString } from 'iso-filecoin/address' const address = isAddress(fromString('f1...')) // true const notAddress = isAddress('f1...') // falseeeeeee @param ― val @returns isAddress, function fromString(address: string): IAddress Address from string @param ― address @returns fromString } from 'iso-filecoin/address' const const address: boolean address = function isAddress(val: any): val is IAddress Asserts that the given value is an IAddress instance. @example import { isAddress, fromString } from 'iso-filecoin/address' const address = isAddress(fromString('f1...')) // true const notAddress = isAddress('f1...') // falseeeeeee @param ― val @returns isAddress( function fromString(address: string): IAddress Address from string @param ― address @returns fromString('f1...')) // true const const notAddress: boolean notAddress = function isAddress(val: any): val is IAddress Asserts that the given value is an IAddress instance. @example import { isAddress, fromString } from 'iso-filecoin/address' const address = isAddress(fromString('f1...')) // true const notAddress = isAddress('f1...') // falseeeeeee @param ― val @returns isAddress('f1...') // falseeeeeee ``` # isAddressBls > **isAddressBls**(`val`): `val is AddressBLS` Defined in: [packages/iso-filecoin/src/address.js:78](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L78) Check if object is a [AddressBLS](/reference/iso-filecoin/address/classes/addressbls/) instance ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ----- | | `val` | `any` | ## Returns [Section titled “Returns”](#returns) `val is AddressBLS` # isAddressDelegated > **isAddressDelegated**(`val`): `val is AddressDelegated` Defined in: [packages/iso-filecoin/src/address.js:98](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L98) Check if object is a [AddressDelegated](/reference/iso-filecoin/address/classes/addressdelegated/) instance ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ----- | | `val` | `any` | ## Returns [Section titled “Returns”](#returns) `val is AddressDelegated` # isAddressId > **isAddressId**(`val`): `val is AddressId` Defined in: [packages/iso-filecoin/src/address.js:88](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L88) Check if object is a [AddressId](/reference/iso-filecoin/address/classes/addressid/) instance ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ----- | | `val` | `any` | ## Returns [Section titled “Returns”](#returns) `val is AddressId` # isAddressSecp256k1 > **isAddressSecp256k1**(`val`): `val is AddressSecp256k1` Defined in: [packages/iso-filecoin/src/address.js:68](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L68) Check if object is a [AddressSecp256k1](/reference/iso-filecoin/address/classes/addresssecp256k1/) instance ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ----- | | `val` | `any` | ## Returns [Section titled “Returns”](#returns) `val is AddressSecp256k1` # isEthAddress > **isEthAddress**(`address`): `boolean` Defined in: [packages/iso-filecoin/src/address.js:119](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L119) Check if string is valid Ethereum address Based on viem implementation ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | -------- | | `address` | `string` | ## Returns [Section titled “Returns”](#returns) `boolean` # isIdMaskAddress > **isIdMaskAddress**(`address`): `boolean` Defined in: [packages/iso-filecoin/src/address.js:130](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L130) Checks if address is an Ethereum ID mask address ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | -------- | | `address` | `string` | ## Returns [Section titled “Returns”](#returns) `boolean` # toEthAddress > **toEthAddress**(`address`): `string` Defined in: [packages/iso-filecoin/src/address.js:158](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L158) Ethereum address from f0 or f4 addresses ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------ | | `address` | [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) | ## Returns [Section titled “Returns”](#returns) `string` # IAddress Defined in: [packages/iso-filecoin/src/types.ts:96](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L96) Address interface ## Properties [Section titled “Properties”](#properties) ### checksum() [Section titled “checksum()”](#checksum) > **checksum**: () => [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) Defined in: [packages/iso-filecoin/src/types.ts:103](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L103) #### Returns [Section titled “Returns”](#returns) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) *** ### id? [Section titled “id?”](#id) > `optional` **id**: `bigint` Defined in: [packages/iso-filecoin/src/types.ts:102](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L102) *** ### namespace? [Section titled “namespace?”](#namespace) > `optional` **namespace**: `number` Defined in: [packages/iso-filecoin/src/types.ts:101](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L101) *** ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin/types/type-aliases/network/) Defined in: [packages/iso-filecoin/src/types.ts:99](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L99) *** ### networkPrefix [Section titled “networkPrefix”](#networkprefix) > **networkPrefix**: [`NetworkPrefix`](/reference/iso-filecoin/utils/type-aliases/networkprefix/) Defined in: [packages/iso-filecoin/src/types.ts:100](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L100) *** ### payload [Section titled “payload”](#payload) > **payload**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) Defined in: [packages/iso-filecoin/src/types.ts:98](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L98) *** ### protocol [Section titled “protocol”](#protocol) > **protocol**: [`ProtocolIndicatorCode`](/reference/iso-filecoin/types/type-aliases/protocolindicatorcode/) Defined in: [packages/iso-filecoin/src/types.ts:97](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L97) *** ### to0x() [Section titled “to0x()”](#to0x) > **to0x**: (`options`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`string`> Defined in: [packages/iso-filecoin/src/types.ts:116](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L116) Converts any address to a 0x address, either id masked address or eth address depending on the address type. Delegated addresses convert to eth address and f1, f2, f3 convert to id masked address and f0 depends on the underline address type #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------- | | `options` | [`AddressRpcOptions`](/reference/iso-filecoin/types/interfaces/addressrpcoptions/) | #### Returns [Section titled “Returns”](#returns-1) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`string`> *** ### toBytes() [Section titled “toBytes()”](#tobytes) > **toBytes**: () => [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) Defined in: [packages/iso-filecoin/src/types.ts:106](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L106) #### Returns [Section titled “Returns”](#returns-2) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) *** ### toContractDestination() [Section titled “toContractDestination()”](#tocontractdestination) > **toContractDestination**: () => `` `0x${string}` `` Defined in: [packages/iso-filecoin/src/types.ts:104](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L104) #### Returns [Section titled “Returns”](#returns-3) `` `0x${string}` `` *** ### toIdAddress() [Section titled “toIdAddress()”](#toidaddress) > **toIdAddress**: (`options`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AddressId`](/reference/iso-filecoin/address/classes/addressid/)> Defined in: [packages/iso-filecoin/src/types.ts:110](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L110) Convert to ID address #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | --------- | ---------------------------------------------------------------------------------- | | `options` | [`AddressRpcOptions`](/reference/iso-filecoin/types/interfaces/addressrpcoptions/) | #### Returns [Section titled “Returns”](#returns-4) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`AddressId`](/reference/iso-filecoin/address/classes/addressid/)> *** ### toString() [Section titled “toString()”](#tostring) > **toString**: () => `string` Defined in: [packages/iso-filecoin/src/types.ts:105](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L105) #### Returns [Section titled “Returns”](#returns-5) `string` # Index Filecoin address ## Classes [Section titled “Classes”](#classes) | Class | Description | | ----------------------------------------------------------------------------- | ---------------------- | | [AddressActor](/reference/iso-filecoin/address/classes/addressactor/) | Actor Address f2.. | | [AddressBLS](/reference/iso-filecoin/address/classes/addressbls/) | BLS Address f3.. | | [AddressDelegated](/reference/iso-filecoin/address/classes/addressdelegated/) | Delegated address f4.. | | [AddressId](/reference/iso-filecoin/address/classes/addressid/) | ID Address f0.. | | [AddressSecp256k1](/reference/iso-filecoin/address/classes/addresssecp256k1/) | Secp256k1 address f1.. | ## Interfaces [Section titled “Interfaces”](#interfaces) | Interface | Description | | ---------------------------------------------------------------- | ----------------- | | [IAddress](/reference/iso-filecoin/address/interfaces/iaddress/) | Address interface | ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | ------------------------------------------------------------ | ----------- | | [Value](/reference/iso-filecoin/address/type-aliases/value/) | - | ## Variables [Section titled “Variables”](#variables) | Variable | Description | | ------------------------------------------------------------------------------------ | ------------------ | | [PROTOCOL\_INDICATOR](/reference/iso-filecoin/address/variables/protocol_indicator/) | Protocol indicator | ## Functions [Section titled “Functions”](#functions) | Function | Description | | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | [from](/reference/iso-filecoin/address/functions/from/) | - | | [fromBytes](/reference/iso-filecoin/address/functions/frombytes/) | Create address from bytes | | [fromContractDestination](/reference/iso-filecoin/address/functions/fromcontractdestination/) | Create an `Address` instance from a 0x-prefixed hex string address returned by `Address.toContractDestination()`. | | [fromEthAddress](/reference/iso-filecoin/address/functions/fromethaddress/) | Address from Ethereum address | | [fromPublicKey](/reference/iso-filecoin/address/functions/frompublickey/) | Create address from public key bytes Only for f1 SECP256K1 and f3 BLS | | [fromString](/reference/iso-filecoin/address/functions/fromstring/) | Address from string | | [isAddress](/reference/iso-filecoin/address/functions/isaddress/) | Asserts that the given value is an [IAddress](/reference/iso-filecoin/address/interfaces/iaddress/) instance. | | [isAddressBls](/reference/iso-filecoin/address/functions/isaddressbls/) | Check if object is a [AddressBLS](/reference/iso-filecoin/address/classes/addressbls/) instance | | [isAddressDelegated](/reference/iso-filecoin/address/functions/isaddressdelegated/) | Check if object is a [AddressDelegated](/reference/iso-filecoin/address/classes/addressdelegated/) instance | | [isAddressId](/reference/iso-filecoin/address/functions/isaddressid/) | Check if object is a [AddressId](/reference/iso-filecoin/address/classes/addressid/) instance | | [isAddressSecp256k1](/reference/iso-filecoin/address/functions/isaddresssecp256k1/) | Check if object is a [AddressSecp256k1](/reference/iso-filecoin/address/classes/addresssecp256k1/) instance | | [isEthAddress](/reference/iso-filecoin/address/functions/isethaddress/) | Check if string is valid Ethereum address | | [isIdMaskAddress](/reference/iso-filecoin/address/functions/isidmaskaddress/) | Checks if address is an Ethereum ID mask address | | [toEthAddress](/reference/iso-filecoin/address/functions/toethaddress/) | Ethereum address from f0 or f4 addresses | ## References [Section titled “References”](#references) ### checksumEthAddress [Section titled “checksumEthAddress”](#checksumethaddress) Re-exports [checksumEthAddress](/reference/iso-filecoin/utils/functions/checksumethaddress/) # Value > **Value** = `string` | [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) Defined in: [packages/iso-filecoin/src/address.js:27](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L27) # PROTOCOL_INDICATOR > `const` **PROTOCOL\_INDICATOR**: `object` Defined in: [packages/iso-filecoin/src/address.js:33](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/address.js#L33) Protocol indicator ## Type Declaration [Section titled “Type Declaration”](#type-declaration) ### ACTOR [Section titled “ACTOR”](#actor) > `readonly` **ACTOR**: `2` = `2` ### BLS [Section titled “BLS”](#bls) > `readonly` **BLS**: `3` = `3` ### DELEGATED [Section titled “DELEGATED”](#delegated) > `readonly` **DELEGATED**: `4` = `4` ### ID [Section titled “ID”](#id) > `readonly` **ID**: `0` = `0` ### SECP256K1 [Section titled “SECP256K1”](#secp256k1) > `readonly` **SECP256K1**: `1` = `1` # toEthereumChain > **toEthereumChain**(`chain`): [`EthereumChain`](/reference/iso-filecoin/types/type-aliases/ethereumchain/) Defined in: [packages/iso-filecoin/src/chains.js:141](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/chains.js#L141) Converts a Chain to an Ethereum chain (Metamask) ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | -------------------------------------------------------------------- | | `chain` | [`Chain`](/reference/iso-filecoin/types/interfaces/chain/)<`number`> | ## Returns [Section titled “Returns”](#returns) [`EthereumChain`](/reference/iso-filecoin/types/type-aliases/ethereumchain/) # Index ## Variables [Section titled “Variables”](#variables) | Variable | Description | | ------------------------------------------------------------------------------------------------ | -------------------------------------- | | [calibration](/reference/iso-filecoin/chains/variables/calibration/) | Filecoin EVM Calibration testnet chain | | [filecoinNative](/reference/iso-filecoin/chains/variables/filecoinnative/) | Filecoin Native chain | | [filecoinNativeCalibration](/reference/iso-filecoin/chains/variables/filecoinnativecalibration/) | Filecoin Calibration chain | | [mainnet](/reference/iso-filecoin/chains/variables/mainnet/) | Filecoin EVM Mainnet chain | | [testnet](/reference/iso-filecoin/chains/variables/testnet/) | Filecoin EVM Calibration testnet chain | ## Functions [Section titled “Functions”](#functions) | Function | Description | | ---------------------------------------------------------------------------- | ------------------------------------------------ | | [toEthereumChain](/reference/iso-filecoin/chains/functions/toethereumchain/) | Converts a Chain to an Ethereum chain (Metamask) | # calibration > `const` **calibration**: [`Chain`](/reference/iso-filecoin/types/interfaces/chain/)<`number`> = `testnet` Defined in: [packages/iso-filecoin/src/chains.js:105](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/chains.js#L105) Filecoin EVM Calibration testnet chain # filecoinNative > `const` **filecoinNative**: [`Chain`](/reference/iso-filecoin/types/interfaces/chain/)<`string`> Defined in: [packages/iso-filecoin/src/chains.js:112](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/chains.js#L112) Filecoin Native chain # filecoinNativeCalibration > `const` **filecoinNativeCalibration**: [`Chain`](/reference/iso-filecoin/types/interfaces/chain/)<`string`> Defined in: [packages/iso-filecoin/src/chains.js:126](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/chains.js#L126) Filecoin Calibration chain # mainnet > `const` **mainnet**: [`Chain`](/reference/iso-filecoin/types/interfaces/chain/)<`number`> Defined in: [packages/iso-filecoin/src/chains.js:6](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/chains.js#L6) Filecoin EVM Mainnet chain # testnet > `const` **testnet**: [`Chain`](/reference/iso-filecoin/types/interfaces/chain/)<`number`> Defined in: [packages/iso-filecoin/src/chains.js:55](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/chains.js#L55) Filecoin EVM Calibration testnet chain # Index ## Variables [Section titled “Variables”](#variables) | Variable | Description | | ------------------------------------------------------------------------------------------------------ | ----------- | | [filForwarderMetadata](/reference/iso-filecoin/contracts/filforwarder/variables/filforwardermetadata/) | - | # filForwarderMetadata > `const` **filForwarderMetadata**: `object` Defined in: [packages/iso-filecoin/src/contracts/filforwarder.js:93](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/contracts/filforwarder.js#L93) ## Type Declaration [Section titled “Type Declaration”](#type-declaration) ### abi [Section titled “abi”](#abi) > **abi**: ({ `inputs`: `object`\[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; } | { `inputs`: `object`\[]; `name`: `string`; `outputs`: `never`\[]; `stateMutability`: `string`; `type`: `string`; })\[] ### chainIds [Section titled “chainIds”](#chainids) > **chainIds**: `object` #### chainIds.filecoinCalibrationTestnet [Section titled “chainIds.filecoinCalibrationTestnet”](#chainidsfilecoincalibrationtestnet) > **filecoinCalibrationTestnet**: `string` = `'eip155:314159'` #### chainIds.filecoinMainnet [Section titled “chainIds.filecoinMainnet”](#chainidsfilecoinmainnet) > **filecoinMainnet**: `string` = `'eip155:314'` ### contractAddress [Section titled “contractAddress”](#contractaddress) > **contractAddress**: `` `0x${string}` `` # FilecoinAppError Defined in: [packages/iso-filecoin/src/ledger.js:149](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L149) Filecoin app error ## Extends [Section titled “Extends”](#extends) * [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new FilecoinAppError**(`statusCode`, `data?`): `FilecoinAppError` Defined in: [packages/iso-filecoin/src/ledger.js:158](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L158) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Description | | ------------ | -------- | ------------------------------------------------------------ | | `statusCode` | `number` | The error status code coming from a Transport implementation | | `data?` | `string` | The error message coming from a instruction call | #### Returns [Section titled “Returns”](#returns) `FilecoinAppError` #### Overrides [Section titled “Overrides”](#overrides) `Error.constructor` ## Properties [Section titled “Properties”](#properties) ### cause? [Section titled “cause?”](#cause) > `optional` **cause**: `unknown` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 #### Inherited from [Section titled “Inherited from”](#inherited-from) `Error.cause` *** ### message [Section titled “message”](#message) > **message**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `Error.message` *** ### name [Section titled “name”](#name) > **name**: `string` = `'FilecoinAppError'` Defined in: [packages/iso-filecoin/src/ledger.js:150](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L150) #### Overrides [Section titled “Overrides”](#overrides-1) `Error.name` *** ### stack? [Section titled “stack?”](#stack) > `optional` **stack**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `Error.stack` *** ### statusCode [Section titled “statusCode”](#statuscode) > **statusCode**: `number` Defined in: [packages/iso-filecoin/src/ledger.js:152](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L152) *** ### stackTraceLimit [Section titled “stackTraceLimit”](#stacktracelimit) > `static` **stackTraceLimit**: `number` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:68 The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `Error.stackTraceLimit` ## Methods [Section titled “Methods”](#methods) ### captureStackTrace() [Section titled “captureStackTrace()”](#capturestacktrace) > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:52 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------- | | `targetObject` | `object` | | `constructorOpt?` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) | #### Returns [Section titled “Returns”](#returns-1) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `Error.captureStackTrace` *** ### prepareStackTrace() [Section titled “prepareStackTrace()”](#preparestacktrace) > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:56 #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | ------------- | ------------------------------------------------------------------------------------------- | | `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) | | `stackTraces` | `CallSite`\[] | #### Returns [Section titled “Returns”](#returns-2) `any` #### See [Section titled “See”](#see) #### Inherited from [Section titled “Inherited from”](#inherited-from-5) `Error.prepareStackTrace` # LedgerFilecoin Defined in: [packages/iso-filecoin/src/ledger.js:271](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L271) Ledger Filecoin app client ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new LedgerFilecoin**(`transport`): `LedgerFilecoin` Defined in: [packages/iso-filecoin/src/ledger.js:276](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L276) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Description | | ----------- | ----------- | ---------------- | | `transport` | `Transport` | Ledger transport | #### Returns [Section titled “Returns”](#returns) `LedgerFilecoin` ## Properties [Section titled “Properties”](#properties) ### transport [Section titled “transport”](#transport) > **transport**: `Transport` Defined in: [packages/iso-filecoin/src/ledger.js:277](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L277) ## Methods [Section titled “Methods”](#methods) ### close() [Section titled “close()”](#close) > **close**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> Defined in: [packages/iso-filecoin/src/ledger.js:424](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L424) Close the transport #### Returns [Section titled “Returns”](#returns-1) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`> *** ### getAddress() [Section titled “getAddress()”](#getaddress) > **getAddress**(`path`, `showOnDevice?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`IAccount`](/reference/iso-filecoin/types/interfaces/iaccount/)> Defined in: [packages/iso-filecoin/src/ledger.js:326](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L326) Get the secp256k1 address for a given derivation path #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | Default value | Description | | --------------- | --------- | ------------- | ----------------------------------------- | | `path` | `string` | `undefined` | Derivation path | | `showOnDevice?` | `boolean` | `false` | Whether to show the address on the device | #### Returns [Section titled “Returns”](#returns-2) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`IAccount`](/reference/iso-filecoin/types/interfaces/iaccount/)> #### See [Section titled “See”](#see) *** ### getVersion() [Section titled “getVersion()”](#getversion) > **getVersion**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`string`> Defined in: [packages/iso-filecoin/src/ledger.js:300](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L300) Get the version of the Filecoin app #### Returns [Section titled “Returns”](#returns-3) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`string`> #### See [Section titled “See”](#see-1) #### Example [Section titled “Example”](#example) ```ts import { class LedgerFilecoin Ledger Filecoin app client LedgerFilecoin } from 'iso-filecoin/ledger' import class TransportWebUSB WebUSB Transport implementation @example import TransportWebUSB from "@ledgerhq/hw-transport-webusb"; ... TransportWebUSB.create().then(transport => ...) TransportWebUSB from '@ledgerhq/hw-transport-webusb' const const transport: Transport transport = await class TransportWebUSB WebUSB Transport implementation @example import TransportWebUSB from "@ledgerhq/hw-transport-webusb"; ... TransportWebUSB.create().then(transport => ...) TransportWebUSB. Transport.create(openTimeout?: number, listenTimeout?: number): Promise create() allows to open the first descriptor available or throw if there is none or if timeout is reached. This is a light helper, alternative to using listen() and open() (that you may need for any more advanced usecase) @example TransportFoo.create().then(transport => ...) create() const const ledger: LedgerFilecoin ledger = new new LedgerFilecoin(transport: Transport): LedgerFilecoin @param ― transport - Ledger transport LedgerFilecoin( const transport: Transport transport) const const version: string version = await const ledger: LedgerFilecoin ledger. LedgerFilecoin.getVersion(): Promise Get the version of the Filecoin app @see ― https://github.com/LedgerHQ/app-filecoin/blob/develop/docs/APDUSPEC.md#get_version @example import { LedgerFilecoin } from 'iso-filecoin/ledger' import TransportWebUSB from '@ledgerhq/hw-transport-webusb' const transport = await TransportWebUSB.create() const ledger = new LedgerFilecoin(transport) const version = await ledger.getVersion() // => '1.0.0' getVersion() // => '1.0.0' ``` *** ### personalSign() [Section titled “personalSign()”](#personalsign) > **personalSign**(`path`, `message`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>> Defined in: [packages/iso-filecoin/src/ledger.js:412](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L412) Sign a message using FRC-102 #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | Description | | --------- | ------------------------------------------------------------------------------------------------------------------------ | --------------- | | `path` | `string` | Derivation path | | `message` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | Message to sign | #### Returns [Section titled “Returns”](#returns-4) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>> *** ### sign() [Section titled “sign()”](#sign) > **sign**(`path`, `message`, `type?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>> Defined in: [packages/iso-filecoin/src/ledger.js:361](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L361) Sign a message #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | Default value | Description | | --------- | ------------------------------------------------------------------------------------------------------------------------ | ------------- | ------------------------ | | `path` | `string` | `undefined` | Derivation path | | `message` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | `undefined` | Message to sign in bytes | | `type?` | `"SECP256K1"` \| `"DATA_CAP"` \| `"CLIENT_DEAL"` \| `"RAW_BYTES"` \| `"PERSONAL_MESSAGE"` | `'SECP256K1'` | Signature type | #### Returns [Section titled “Returns”](#returns-5) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>> *** ### signRaw() [Section titled “signRaw()”](#signraw) > **signRaw**(`path`, `message`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>> Defined in: [packages/iso-filecoin/src/ledger.js:398](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L398) Sign raw bytes using prefixed message similar to EIP-191 #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | Description | | --------- | ------------------------------------------------------------------------------------------------------------------------ | --------------- | | `path` | `string` | Derivation path | | `message` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | Message to sign | #### Returns [Section titled “Returns”](#returns-6) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>> # verifyRaw > **verifyRaw**(`signature`, `data`, `publicKey`): `boolean` Defined in: [packages/iso-filecoin/src/ledger.js:251](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L251) Verify raw signature ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ----------- | ------------------------------------------------------------------------------------------------------------------------ | | `signature` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `publicKey` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | ## Returns [Section titled “Returns”](#returns) `boolean` ## Example [Section titled “Example”](#example) ```ts import { function verifyRaw(signature: Uint8Array, data: Uint8Array, publicKey: Uint8Array): boolean Verify raw signature @param ― signature @param ― data @param ― publicKey @returns @example import { verifyRaw } from 'iso-filecoin/ledger' const signature = new Uint8Array([1, 2, 3]) const data = new Uint8Array([4, 5, 6]) const publicKey = new Uint8Array([7, 8, 9]) const isValid = verifyRaw(signature, data, publicKey) // => true verifyRaw } from 'iso-filecoin/ledger' const const signature: Uint8Array signature = new var Uint8Array: Uint8ArrayConstructor new (elements: Iterable) => Uint8Array (+6 overloads) Uint8Array([1, 2, 3]) const const data: Uint8Array data = new var Uint8Array: Uint8ArrayConstructor new (elements: Iterable) => Uint8Array (+6 overloads) Uint8Array([4, 5, 6]) const const publicKey: Uint8Array publicKey = new var Uint8Array: Uint8ArrayConstructor new (elements: Iterable) => Uint8Array (+6 overloads) Uint8Array([7, 8, 9]) const const isValid: boolean isValid = function verifyRaw(signature: Uint8Array, data: Uint8Array, publicKey: Uint8Array): boolean Verify raw signature @param ― signature @param ― data @param ― publicKey @returns @example import { verifyRaw } from 'iso-filecoin/ledger' const signature = new Uint8Array([1, 2, 3]) const data = new Uint8Array([4, 5, 6]) const publicKey = new Uint8Array([7, 8, 9]) const isValid = verifyRaw(signature, data, publicKey) // => true verifyRaw( const signature: Uint8Array signature, const data: Uint8Array data, const publicKey: Uint8Array publicKey) // => true ``` # Index ## Classes [Section titled “Classes”](#classes) | Class | Description | | ---------------------------------------------------------------------------- | -------------------------- | | [FilecoinAppError](/reference/iso-filecoin/ledger/classes/filecoinapperror/) | Filecoin app error | | [LedgerFilecoin](/reference/iso-filecoin/ledger/classes/ledgerfilecoin/) | Ledger Filecoin app client | ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | --------------------------------------------------------------------------- | ----------- | | [SignatureType](/reference/iso-filecoin/ledger/type-aliases/signaturetype/) | - | | [Transport](/reference/iso-filecoin/ledger/type-aliases/transport/) | - | ## Variables [Section titled “Variables”](#variables) | Variable | Description | | -------------------------------------------------------------------------------- | ----------- | | [APDU\_CODES](/reference/iso-filecoin/ledger/variables/apdu_codes/) | APDU codes | | [EIP191\_PREFIX](/reference/iso-filecoin/ledger/variables/eip191_prefix/) | - | | [IS\_HID\_SUPPORTED](/reference/iso-filecoin/ledger/variables/is_hid_supported/) | - | ## Functions [Section titled “Functions”](#functions) | Function | Description | | ---------------------------------------------------------------- | -------------------- | | [verifyRaw](/reference/iso-filecoin/ledger/functions/verifyraw/) | Verify raw signature | # SignatureType > **SignatureType** = keyof *typeof* `SIGNATURE_TYPE` Defined in: [packages/iso-filecoin/src/ledger.js:13](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L13) # Transport > **Transport** = `_LedgerTransport` Defined in: [packages/iso-filecoin/src/types.ts:13](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L13) # APDU_CODES > `const` **APDU\_CODES**: `object` Defined in: [packages/iso-filecoin/src/ledger.js:47](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L47) APDU codes ## Type Declaration [Section titled “Type Declaration”](#type-declaration) ### APP\_NOT\_OPEN [Section titled “APP\_NOT\_OPEN”](#app_not_open) > **APP\_NOT\_OPEN**: `number` = `0x6e01` ### BAD\_KEY\_HANDLE [Section titled “BAD\_KEY\_HANDLE”](#bad_key_handle) > **BAD\_KEY\_HANDLE**: `number` = `0x6a80` Ledger name is INCORRECT\_DATA #### See [Section titled “See”](#see) ### BUSY [Section titled “BUSY”](#busy) > **BUSY**: `number` = `0x9001` ### CLA\_NOT\_SUPPORTED [Section titled “CLA\_NOT\_SUPPORTED”](#cla_not_supported) > **CLA\_NOT\_SUPPORTED**: `number` = `0x6e00` ### COMMAND\_NOT\_ALLOWED [Section titled “COMMAND\_NOT\_ALLOWED”](#command_not_allowed) > **COMMAND\_NOT\_ALLOWED**: `number` = `0x6986` ### CONDITIONS\_NOT\_SATISFIED [Section titled “CONDITIONS\_NOT\_SATISFIED”](#conditions_not_satisfied) > **CONDITIONS\_NOT\_SATISFIED**: `number` = `0x6985` ledger supports #### See [Section titled “See”](#see-1) ### DATA\_INVALID [Section titled “DATA\_INVALID”](#data_invalid) > **DATA\_INVALID**: `number` = `0x6984` ### EMPTY\_BUFFER [Section titled “EMPTY\_BUFFER”](#empty_buffer) > **EMPTY\_BUFFER**: `number` = `0x6982` Ledger name is SECURITY\_STATUS\_NOT\_SATISFIED #### See [Section titled “See”](#see-2) ### EXECUTION\_ERROR [Section titled “EXECUTION\_ERROR”](#execution_error) > **EXECUTION\_ERROR**: `number` = `0x6400` ### INS\_NOT\_SUPPORTED [Section titled “INS\_NOT\_SUPPORTED”](#ins_not_supported) > **INS\_NOT\_SUPPORTED**: `number` = `0x6d00` ### INVALIDP1P2 [Section titled “INVALIDP1P2”](#invalidp1p2) > **INVALIDP1P2**: `number` = `0x6b00` ledger supports #### See [Section titled “See”](#see-3) ### OK [Section titled “OK”](#ok) > **OK**: `number` = `0x9000` ### OUTPUT\_BUFFER\_TOO\_SMALL [Section titled “OUTPUT\_BUFFER\_TOO\_SMALL”](#output_buffer_too_small) > **OUTPUT\_BUFFER\_TOO\_SMALL**: `number` = `0x6983` ### SIGN\_VERIFY\_ERROR [Section titled “SIGN\_VERIFY\_ERROR”](#sign_verify_error) > **SIGN\_VERIFY\_ERROR**: `number` = `0x6f01` ### UNKNOWN [Section titled “UNKNOWN”](#unknown) > **UNKNOWN**: `number` = `0x6f00` ### WRONG\_LENGTH [Section titled “WRONG\_LENGTH”](#wrong_length) > **WRONG\_LENGTH**: `number` = `0x6700` ## See [Section titled “See”](#see-4) # EIP191_PREFIX > `const` **EIP191\_PREFIX**: “Filecoin Sign Bytes:\n” = `'Filecoin Sign Bytes:\n'` Defined in: [packages/iso-filecoin/src/ledger.js:99](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L99) # IS_HID_SUPPORTED > `const` **IS\_HID\_SUPPORTED**: `boolean` Defined in: [packages/iso-filecoin/src/ledger.js:101](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/ledger.js#L101) # Message Defined in: [packages/iso-filecoin/src/message.js:59](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L59) Filecoin Message class ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new Message**(`msg`): `Message` Defined in: [packages/iso-filecoin/src/message.js:70](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L70) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Description | | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | | `msg` | { `from`: `string`; `gasFeeCap?`: `string`; `gasLimit?`: `number`; `gasPremium?`: `string`; `method?`: `number`; `nonce?`: `number`; `params?`: `string`; `to`: `string`; `value`: `string`; `version?`: `0`; } | - | | `msg.from` | `string` | - | | `msg.gasFeeCap?` | `string` | - | | `msg.gasLimit?` | `number` | - | | `msg.gasPremium?` | `string` | - | | `msg.method?` | `number` | - | | `msg.nonce?` | `number` | - | | `msg.params?` | `string` | Params encoded as base64pad | | `msg.to` | `string` | - | | `msg.value` | `string` | Value in attoFIL | | `msg.version?` | `0` | - | #### Returns [Section titled “Returns”](#returns) `Message` ## Properties [Section titled “Properties”](#properties) ### from [Section titled “from”](#from) > **from**: `string` Defined in: [packages/iso-filecoin/src/message.js:74](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L74) *** ### gasFeeCap [Section titled “gasFeeCap”](#gasfeecap) > **gasFeeCap**: `string` Defined in: [packages/iso-filecoin/src/message.js:78](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L78) *** ### gasLimit [Section titled “gasLimit”](#gaslimit) > **gasLimit**: `number` Defined in: [packages/iso-filecoin/src/message.js:77](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L77) *** ### gasPremium [Section titled “gasPremium”](#gaspremium) > **gasPremium**: `string` Defined in: [packages/iso-filecoin/src/message.js:79](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L79) *** ### method [Section titled “method”](#method) > **method**: `number` Defined in: [packages/iso-filecoin/src/message.js:80](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L80) *** ### nonce [Section titled “nonce”](#nonce) > **nonce**: `number` Defined in: [packages/iso-filecoin/src/message.js:75](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L75) *** ### params [Section titled “params”](#params) > **params**: `string` Defined in: [packages/iso-filecoin/src/message.js:81](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L81) *** ### to [Section titled “to”](#to) > **to**: `string` Defined in: [packages/iso-filecoin/src/message.js:73](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L73) *** ### value [Section titled “value”](#value) > **value**: `string` Defined in: [packages/iso-filecoin/src/message.js:76](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L76) *** ### version [Section titled “version”](#version) > **version**: `0` Defined in: [packages/iso-filecoin/src/message.js:72](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L72) ## Methods [Section titled “Methods”](#methods) ### cidBytes() [Section titled “cidBytes()”](#cidbytes) > **cidBytes**(): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/message.js:200](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L200) CID bytes of the filecoin message #### Returns [Section titled “Returns”](#returns-1) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> *** ### prepare() [Section titled “prepare()”](#prepare) > **prepare**(`rpc`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`Message`> Defined in: [packages/iso-filecoin/src/message.js:130](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L130) Prepare message for signing with nonce and gas estimation #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | --------- | ------------------------------------------------- | | `rpc` | [`RPC`](/reference/iso-filecoin/rpc/classes/rpc/) | #### Returns [Section titled “Returns”](#returns-2) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`Message`> *** ### serialize() [Section titled “serialize()”](#serialize) > **serialize**(): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/message.js:175](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L175) Serialize message using dag-cbor #### Returns [Section titled “Returns”](#returns-3) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> *** ### toLotus() [Section titled “toLotus()”](#tolotus) > **toLotus**(): `object` Defined in: [packages/iso-filecoin/src/message.js:87](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L87) Convert message to Lotus message #### Returns [Section titled “Returns”](#returns-4) `object` ##### From [Section titled “From”](#from-1) > **From**: `string` ##### GasFeeCap [Section titled “GasFeeCap”](#gasfeecap-1) > **GasFeeCap**: `string` ##### GasLimit [Section titled “GasLimit”](#gaslimit-1) > **GasLimit**: `number` ##### GasPremium [Section titled “GasPremium”](#gaspremium-1) > **GasPremium**: `string` ##### Method [Section titled “Method”](#method-1) > **Method**: `number` ##### Nonce [Section titled “Nonce”](#nonce-1) > **Nonce**: `number` ##### Params [Section titled “Params”](#params-1) > **Params**: `string` ##### To [Section titled “To”](#to-1) > **To**: `string` ##### Value [Section titled “Value”](#value-1) > **Value**: `string` ##### Version [Section titled “Version”](#version-1) > **Version**: `0` *** ### fromLotus() [Section titled “fromLotus()”](#fromlotus) > `static` **fromLotus**(`json`): `Message` Defined in: [packages/iso-filecoin/src/message.js:107](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L107) Create message from Lotus message #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | ------------------------------------------------------------------------ | | `json` | [`LotusMessage`](/reference/iso-filecoin/types/interfaces/lotusmessage/) | #### Returns [Section titled “Returns”](#returns-5) `Message` # Index ## Classes [Section titled “Classes”](#classes) | Class | Description | | ----------------------------------------------------------- | ---------------------- | | [Message](/reference/iso-filecoin/message/classes/message/) | Filecoin Message class | ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | ------------------------------------------------------------------------------------ | ----------- | | [MessageObj](/reference/iso-filecoin/message/type-aliases/messageobj/) | - | | [PartialMessageObj](/reference/iso-filecoin/message/type-aliases/partialmessageobj/) | - | ## Variables [Section titled “Variables”](#variables) | Variable | Description | | ------------------------------------------------------------------------- | ------------------------- | | [MessageSchema](/reference/iso-filecoin/message/variables/messageschema/) | Message validation schema | | [Schemas](/reference/iso-filecoin/message/variables/schemas/) | - | # MessageObj > **MessageObj** = `z.infer`<*typeof* [`MessageSchema`](/reference/iso-filecoin/message/variables/messageschema/)> Defined in: [packages/iso-filecoin/src/types.ts:27](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L27) # PartialMessageObj > **PartialMessageObj** = `SetOptional`<[`MessageObj`](/reference/iso-filecoin/message/type-aliases/messageobj/), `"version"` | `"nonce"` | `"gasLimit"` | `"gasFeeCap"` | `"gasPremium"` | `"method"` | `"params"`> Defined in: [packages/iso-filecoin/src/types.ts:28](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L28) # MessageSchema > `const` **MessageSchema**: `ZodObject`<{ `from`: `ZodString`; `gasFeeCap`: `ZodDefault`<`ZodString`>; `gasLimit`: `ZodDefault`<`ZodInt`>; `gasPremium`: `ZodDefault`<`ZodString`>; `method`: `ZodDefault`<`ZodInt`>; `nonce`: `ZodDefault`<`ZodInt`>; `params`: `ZodDefault`<`ZodBase64`>; `to`: `ZodString`; `value`: `ZodString`; `version`: `ZodDefault`<`ZodLiteral`<`0`>>; }, `$strip`> Defined in: [packages/iso-filecoin/src/message.js:17](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L17) Message validation schema # Schemas > `const` **Schemas**: `object` Defined in: [packages/iso-filecoin/src/message.js:51](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/message.js#L51) ## Type Declaration [Section titled “Type Declaration”](#type-declaration) ### message [Section titled “message”](#message) > **message**: `ZodObject`<{ `from`: `ZodString`; `gasFeeCap`: `ZodDefault`<`ZodString`>; `gasLimit`: `ZodDefault`<`ZodInt`>; `gasPremium`: `ZodDefault`<`ZodString`>; `method`: `ZodDefault`<`ZodInt`>; `nonce`: `ZodDefault`<`ZodInt`>; `params`: `ZodDefault`<`ZodBase64`>; `to`: `ZodString`; `value`: `ZodString`; `version`: `ZodDefault`<`ZodLiteral`<`0`>>; }, `$strip`> = `MessageSchema` ### messagePartial [Section titled “messagePartial”](#messagepartial) > **messagePartial**: `ZodObject`<{ `from`: `ZodString`; `gasFeeCap`: `ZodOptional`<`ZodDefault`<`ZodString`>>; `gasLimit`: `ZodOptional`<`ZodDefault`<`ZodInt`>>; `gasPremium`: `ZodOptional`<`ZodDefault`<`ZodString`>>; `method`: `ZodOptional`<`ZodDefault`<`ZodInt`>>; `nonce`: `ZodOptional`<`ZodDefault`<`ZodInt`>>; `params`: `ZodOptional`<`ZodDefault`<`ZodBase64`>>; `to`: `ZodString`; `value`: `ZodString`; `version`: `ZodOptional`<`ZodDefault`<`ZodLiteral`<`0`>>>; }, `$strip`> = `MessageSchemaPartial` # Index ## Modules [Section titled “Modules”](#modules) | Module | Description | | -------------------------------------------------------------------------------- | ---------------- | | [address](/reference/iso-filecoin/address/readme/) | Filecoin address | | [chains](/reference/iso-filecoin/chains/readme/) | - | | [contracts/filforwarder](/reference/iso-filecoin/contracts/filforwarder/readme/) | - | | [ledger](/reference/iso-filecoin/ledger/readme/) | - | | [message](/reference/iso-filecoin/message/readme/) | - | | [rpc](/reference/iso-filecoin/rpc/readme/) | - | | [signature](/reference/iso-filecoin/signature/readme/) | - | | [token](/reference/iso-filecoin/token/readme/) | - | | [types](/reference/iso-filecoin/types/readme/) | - | | [utils](/reference/iso-filecoin/utils/readme/) | - | | [wallet](/reference/iso-filecoin/wallet/readme/) | - | # AbortError Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:217 ## Extends [Section titled “Extends”](#extends) * [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/) ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new AbortError**(`signal`, `options?`): `AbortError` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:230 #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ---------- | ----------------------------------------------------------------------- | | `signal` | [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal) | | `options?` | `ErrorOptions` | #### Returns [Section titled “Returns”](#returns) `AbortError` #### Overrides [Section titled “Overrides”](#overrides) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`constructor`](/reference/iso-filecoin/rpc/classes/requesterror/#constructor) ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:187 #### Inherited from [Section titled “Inherited from”](#inherited-from) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`[symbol]`](/reference/iso-filecoin/rpc/classes/requesterror/#symbol) *** ### cause [Section titled “cause”](#cause) > **cause**: `unknown` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:185 #### Inherited from [Section titled “Inherited from”](#inherited-from-1) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`cause`](/reference/iso-filecoin/rpc/classes/requesterror/#cause) *** ### message [Section titled “message”](#message) > **message**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 #### Inherited from [Section titled “Inherited from”](#inherited-from-2) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`message`](/reference/iso-filecoin/rpc/classes/requesterror/#message) *** ### name [Section titled “name”](#name) > **name**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from [Section titled “Inherited from”](#inherited-from-3) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`name`](/reference/iso-filecoin/rpc/classes/requesterror/#name) *** ### signal [Section titled “signal”](#signal) > **signal**: [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal) Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:232 *** ### stack? [Section titled “stack?”](#stack) > `optional` **stack**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 #### Inherited from [Section titled “Inherited from”](#inherited-from-4) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`stack`](/reference/iso-filecoin/rpc/classes/requesterror/#stack) *** ### stackTraceLimit [Section titled “stackTraceLimit”](#stacktracelimit) > `static` **stackTraceLimit**: `number` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:68 The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from [Section titled “Inherited from”](#inherited-from-5) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`stackTraceLimit`](/reference/iso-filecoin/rpc/classes/requesterror/#stacktracelimit) ## Methods [Section titled “Methods”](#methods) ### captureStackTrace() [Section titled “captureStackTrace()”](#capturestacktrace) > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:52 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------- | | `targetObject` | `object` | | `constructorOpt?` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) | #### Returns [Section titled “Returns”](#returns-1) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-6) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`captureStackTrace`](/reference/iso-filecoin/rpc/classes/requesterror/#capturestacktrace) *** ### is() [Section titled “is()”](#is) > `static` **is**(`value`): `value is AbortError` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:224 Check if a value is a AbortError #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | --------- | | `value` | `unknown` | #### Returns [Section titled “Returns”](#returns-2) `value is AbortError` #### Overrides [Section titled “Overrides”](#overrides-1) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`is`](/reference/iso-filecoin/rpc/classes/requesterror/#is) *** ### prepareStackTrace() [Section titled “prepareStackTrace()”](#preparestacktrace) > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:56 #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | ------------- | ------------------------------------------------------------------------------------------- | | `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) | | `stackTraces` | `CallSite`\[] | #### Returns [Section titled “Returns”](#returns-3) `any` #### See [Section titled “See”](#see) #### Inherited from [Section titled “Inherited from”](#inherited-from-7) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`prepareStackTrace`](/reference/iso-filecoin/rpc/classes/requesterror/#preparestacktrace) # HttpError Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:234 ## Extends [Section titled “Extends”](#extends) * [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/) ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new HttpError**(`options`): `HttpError` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:246 #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------- | | `options` | `ErrorOptions` & `object` | #### Returns [Section titled “Returns”](#returns) `HttpError` #### Overrides [Section titled “Overrides”](#overrides) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`constructor`](/reference/iso-filecoin/rpc/classes/requesterror/#constructor) ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:187 #### Inherited from [Section titled “Inherited from”](#inherited-from) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`[symbol]`](/reference/iso-filecoin/rpc/classes/requesterror/#symbol) *** ### cause [Section titled “cause”](#cause) > **cause**: `unknown` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:185 #### Inherited from [Section titled “Inherited from”](#inherited-from-1) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`cause`](/reference/iso-filecoin/rpc/classes/requesterror/#cause) *** ### code [Section titled “code”](#code) > **code**: `number` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:252 *** ### message [Section titled “message”](#message) > **message**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 #### Inherited from [Section titled “Inherited from”](#inherited-from-2) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`message`](/reference/iso-filecoin/rpc/classes/requesterror/#message) *** ### name [Section titled “name”](#name) > **name**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from [Section titled “Inherited from”](#inherited-from-3) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`name`](/reference/iso-filecoin/rpc/classes/requesterror/#name) *** ### options [Section titled “options”](#options) > **options**: [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:258 *** ### request [Section titled “request”](#request) > **request**: [`Request`](https://developer.mozilla.org/docs/Web/API/Request) Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:256 *** ### response [Section titled “response”](#response) > **response**: [`Response`](https://developer.mozilla.org/docs/Web/API/Response) Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:254 *** ### stack? [Section titled “stack?”](#stack) > `optional` **stack**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 #### Inherited from [Section titled “Inherited from”](#inherited-from-4) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`stack`](/reference/iso-filecoin/rpc/classes/requesterror/#stack) *** ### stackTraceLimit [Section titled “stackTraceLimit”](#stacktracelimit) > `static` **stackTraceLimit**: `number` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:68 The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from [Section titled “Inherited from”](#inherited-from-5) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`stackTraceLimit`](/reference/iso-filecoin/rpc/classes/requesterror/#stacktracelimit) ## Methods [Section titled “Methods”](#methods) ### captureStackTrace() [Section titled “captureStackTrace()”](#capturestacktrace) > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:52 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------- | | `targetObject` | `object` | | `constructorOpt?` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) | #### Returns [Section titled “Returns”](#returns-1) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-6) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`captureStackTrace`](/reference/iso-filecoin/rpc/classes/requesterror/#capturestacktrace) *** ### is() [Section titled “is()”](#is) > `static` **is**(`value`): `value is HttpError` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:241 Check if a value is a HttpError #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | --------- | | `value` | `unknown` | #### Returns [Section titled “Returns”](#returns-2) `value is HttpError` #### Overrides [Section titled “Overrides”](#overrides-1) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`is`](/reference/iso-filecoin/rpc/classes/requesterror/#is) *** ### prepareStackTrace() [Section titled “prepareStackTrace()”](#preparestacktrace) > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:56 #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | ------------- | ------------------------------------------------------------------------------------------- | | `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) | | `stackTraces` | `CallSite`\[] | #### Returns [Section titled “Returns”](#returns-3) `any` #### See [Section titled “See”](#see) #### Inherited from [Section titled “Inherited from”](#inherited-from-7) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`prepareStackTrace`](/reference/iso-filecoin/rpc/classes/requesterror/#preparestacktrace) # JsonError Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:189 ## Extends [Section titled “Extends”](#extends) * [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/) ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new JsonError**(`options`): `JsonError` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:201 #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------------- | ------------------------- | | `options` | { `cause`: `JsonValue`; } | | `options.cause` | `JsonValue` | #### Returns [Section titled “Returns”](#returns) `JsonError` #### Overrides [Section titled “Overrides”](#overrides) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`constructor`](/reference/iso-filecoin/rpc/classes/requesterror/#constructor) ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:187 #### Inherited from [Section titled “Inherited from”](#inherited-from) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`[symbol]`](/reference/iso-filecoin/rpc/classes/requesterror/#symbol) *** ### cause [Section titled “cause”](#cause) > **cause**: `JsonValue` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:205 #### Overrides [Section titled “Overrides”](#overrides-1) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`cause`](/reference/iso-filecoin/rpc/classes/requesterror/#cause) *** ### message [Section titled “message”](#message) > **message**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 #### Inherited from [Section titled “Inherited from”](#inherited-from-1) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`message`](/reference/iso-filecoin/rpc/classes/requesterror/#message) *** ### name [Section titled “name”](#name) > **name**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from [Section titled “Inherited from”](#inherited-from-2) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`name`](/reference/iso-filecoin/rpc/classes/requesterror/#name) *** ### stack? [Section titled “stack?”](#stack) > `optional` **stack**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 #### Inherited from [Section titled “Inherited from”](#inherited-from-3) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`stack`](/reference/iso-filecoin/rpc/classes/requesterror/#stack) *** ### stackTraceLimit [Section titled “stackTraceLimit”](#stacktracelimit) > `static` **stackTraceLimit**: `number` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:68 The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from [Section titled “Inherited from”](#inherited-from-4) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`stackTraceLimit`](/reference/iso-filecoin/rpc/classes/requesterror/#stacktracelimit) ## Methods [Section titled “Methods”](#methods) ### captureStackTrace() [Section titled “captureStackTrace()”](#capturestacktrace) > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:52 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------- | | `targetObject` | `object` | | `constructorOpt?` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) | #### Returns [Section titled “Returns”](#returns-1) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-5) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`captureStackTrace`](/reference/iso-filecoin/rpc/classes/requesterror/#capturestacktrace) *** ### is() [Section titled “is()”](#is) > `static` **is**(`value`): `value is JsonError` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:196 Check if a value is a JsonError #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | --------- | | `value` | `unknown` | #### Returns [Section titled “Returns”](#returns-2) `value is JsonError` #### Overrides [Section titled “Overrides”](#overrides-2) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`is`](/reference/iso-filecoin/rpc/classes/requesterror/#is) *** ### prepareStackTrace() [Section titled “prepareStackTrace()”](#preparestacktrace) > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:56 #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | ------------- | ------------------------------------------------------------------------------------------- | | `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) | | `stackTraces` | `CallSite`\[] | #### Returns [Section titled “Returns”](#returns-3) `any` #### See [Section titled “See”](#see) #### Inherited from [Section titled “Inherited from”](#inherited-from-6) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`prepareStackTrace`](/reference/iso-filecoin/rpc/classes/requesterror/#preparestacktrace) # JsonRpcError Defined in: [packages/iso-filecoin/src/rpc.js:70](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L70) ## Extends [Section titled “Extends”](#extends) * [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new JsonRpcError**(`cause`): `JsonRpcError` Defined in: [packages/iso-filecoin/src/rpc.js:80](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L80) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------------ | | `cause` | [`JsonRpcError`](/reference/iso-filecoin/types/interfaces/jsonrpcerror/) | #### Returns [Section titled “Returns”](#returns) `JsonRpcError` #### Overrides [Section titled “Overrides”](#overrides) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`constructor`](/reference/iso-filecoin/rpc/classes/rpcerror/#constructor) ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` = `true` Defined in: [packages/iso-filecoin/src/rpc.js:42](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L42) #### Inherited from [Section titled “Inherited from”](#inherited-from) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`[symbol]`](/reference/iso-filecoin/rpc/classes/rpcerror/#symbol) *** ### cause [Section titled “cause”](#cause) > **cause**: [`JsonRpcError`](/reference/iso-filecoin/types/interfaces/jsonrpcerror/) Defined in: [packages/iso-filecoin/src/rpc.js:74](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L74) #### Overrides [Section titled “Overrides”](#overrides-1) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`cause`](/reference/iso-filecoin/rpc/classes/rpcerror/#cause) *** ### message [Section titled “message”](#message) > **message**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 #### Inherited from [Section titled “Inherited from”](#inherited-from-1) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`message`](/reference/iso-filecoin/rpc/classes/rpcerror/#message) *** ### name [Section titled “name”](#name) > **name**: `string` = `'JsonRpcError'` Defined in: [packages/iso-filecoin/src/rpc.js:71](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L71) #### Overrides [Section titled “Overrides”](#overrides-2) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`name`](/reference/iso-filecoin/rpc/classes/rpcerror/#name) *** ### stack? [Section titled “stack?”](#stack) > `optional` **stack**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 #### Inherited from [Section titled “Inherited from”](#inherited-from-2) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`stack`](/reference/iso-filecoin/rpc/classes/rpcerror/#stack) *** ### stackTraceLimit [Section titled “stackTraceLimit”](#stacktracelimit) > `static` **stackTraceLimit**: `number` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:68 The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from [Section titled “Inherited from”](#inherited-from-3) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`stackTraceLimit`](/reference/iso-filecoin/rpc/classes/rpcerror/#stacktracelimit) ## Methods [Section titled “Methods”](#methods) ### captureStackTrace() [Section titled “captureStackTrace()”](#capturestacktrace) > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:52 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------- | | `targetObject` | `object` | | `constructorOpt?` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) | #### Returns [Section titled “Returns”](#returns-1) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-4) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`captureStackTrace`](/reference/iso-filecoin/rpc/classes/rpcerror/#capturestacktrace) *** ### is() [Section titled “is()”](#is) > `static` **is**(`value`): `value is JsonRpcError` Defined in: [packages/iso-filecoin/src/rpc.js:90](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L90) Check if a value is a JsonRpcError #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | --------- | | `value` | `unknown` | #### Returns [Section titled “Returns”](#returns-2) `value is JsonRpcError` #### Overrides [Section titled “Overrides”](#overrides-3) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`is`](/reference/iso-filecoin/rpc/classes/rpcerror/#is) *** ### prepareStackTrace() [Section titled “prepareStackTrace()”](#preparestacktrace) > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:56 #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | ------------- | ------------------------------------------------------------------------------------------- | | `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) | | `stackTraces` | `CallSite`\[] | #### Returns [Section titled “Returns”](#returns-3) `any` #### See [Section titled “See”](#see) #### Inherited from [Section titled “Inherited from”](#inherited-from-5) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`prepareStackTrace`](/reference/iso-filecoin/rpc/classes/rpcerror/#preparestacktrace) # NetworkError Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:207 ## Extends [Section titled “Extends”](#extends) * [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/) ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new NetworkError**(`message`, `options?`): `NetworkError` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:183 #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ---------- | -------------- | | `message` | `string` | | `options?` | `ErrorOptions` | #### Returns [Section titled “Returns”](#returns) `NetworkError` #### Inherited from [Section titled “Inherited from”](#inherited-from) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`constructor`](/reference/iso-filecoin/rpc/classes/requesterror/#constructor) ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:187 #### Inherited from [Section titled “Inherited from”](#inherited-from-1) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`[symbol]`](/reference/iso-filecoin/rpc/classes/requesterror/#symbol) *** ### cause [Section titled “cause”](#cause) > **cause**: `unknown` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:185 #### Inherited from [Section titled “Inherited from”](#inherited-from-2) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`cause`](/reference/iso-filecoin/rpc/classes/requesterror/#cause) *** ### message [Section titled “message”](#message) > **message**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 #### Inherited from [Section titled “Inherited from”](#inherited-from-3) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`message`](/reference/iso-filecoin/rpc/classes/requesterror/#message) *** ### name [Section titled “name”](#name) > **name**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from [Section titled “Inherited from”](#inherited-from-4) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`name`](/reference/iso-filecoin/rpc/classes/requesterror/#name) *** ### stack? [Section titled “stack?”](#stack) > `optional` **stack**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 #### Inherited from [Section titled “Inherited from”](#inherited-from-5) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`stack`](/reference/iso-filecoin/rpc/classes/requesterror/#stack) *** ### stackTraceLimit [Section titled “stackTraceLimit”](#stacktracelimit) > `static` **stackTraceLimit**: `number` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:68 The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from [Section titled “Inherited from”](#inherited-from-6) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`stackTraceLimit`](/reference/iso-filecoin/rpc/classes/requesterror/#stacktracelimit) ## Methods [Section titled “Methods”](#methods) ### captureStackTrace() [Section titled “captureStackTrace()”](#capturestacktrace) > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:52 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------- | | `targetObject` | `object` | | `constructorOpt?` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) | #### Returns [Section titled “Returns”](#returns-1) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-7) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`captureStackTrace`](/reference/iso-filecoin/rpc/classes/requesterror/#capturestacktrace) *** ### is() [Section titled “is()”](#is) > `static` **is**(`value`): `value is RequestError` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:177 Check if a value is a RequestError #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | --------- | | `value` | `unknown` | #### Returns [Section titled “Returns”](#returns-2) `value is RequestError` #### Inherited from [Section titled “Inherited from”](#inherited-from-8) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`is`](/reference/iso-filecoin/rpc/classes/requesterror/#is) *** ### prepareStackTrace() [Section titled “prepareStackTrace()”](#preparestacktrace) > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:56 #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | ------------- | ------------------------------------------------------------------------------------------- | | `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) | | `stackTraces` | `CallSite`\[] | #### Returns [Section titled “Returns”](#returns-3) `any` #### See [Section titled “See”](#see) #### Inherited from [Section titled “Inherited from”](#inherited-from-9) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`prepareStackTrace`](/reference/iso-filecoin/rpc/classes/requesterror/#preparestacktrace) # RequestError Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:170 ## Extends [Section titled “Extends”](#extends) * [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) ## Extended by [Section titled “Extended by”](#extended-by) * [`AbortError`](/reference/iso-filecoin/rpc/classes/aborterror/) * [`HttpError`](/reference/iso-filecoin/rpc/classes/httperror/) * [`JsonError`](/reference/iso-filecoin/rpc/classes/jsonerror/) * [`NetworkError`](/reference/iso-filecoin/rpc/classes/networkerror/) * [`TimeoutError`](/reference/iso-filecoin/rpc/classes/timeouterror/) ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new RequestError**(`message`, `options?`): `RequestError` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:183 #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ---------- | -------------- | | `message` | `string` | | `options?` | `ErrorOptions` | #### Returns [Section titled “Returns”](#returns) `RequestError` #### Overrides [Section titled “Overrides”](#overrides) `Error.constructor` ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:187 *** ### cause [Section titled “cause”](#cause) > **cause**: `unknown` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:185 #### Overrides [Section titled “Overrides”](#overrides-1) `Error.cause` *** ### message [Section titled “message”](#message) > **message**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 #### Inherited from [Section titled “Inherited from”](#inherited-from) `Error.message` *** ### name [Section titled “name”](#name) > **name**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `Error.name` *** ### stack? [Section titled “stack?”](#stack) > `optional` **stack**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `Error.stack` *** ### stackTraceLimit [Section titled “stackTraceLimit”](#stacktracelimit) > `static` **stackTraceLimit**: `number` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:68 The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `Error.stackTraceLimit` ## Methods [Section titled “Methods”](#methods) ### captureStackTrace() [Section titled “captureStackTrace()”](#capturestacktrace) > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:52 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------- | | `targetObject` | `object` | | `constructorOpt?` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) | #### Returns [Section titled “Returns”](#returns-1) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `Error.captureStackTrace` *** ### is() [Section titled “is()”](#is) > `static` **is**(`value`): `value is RequestError` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:177 Check if a value is a RequestError #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | --------- | | `value` | `unknown` | #### Returns [Section titled “Returns”](#returns-2) `value is RequestError` *** ### prepareStackTrace() [Section titled “prepareStackTrace()”](#preparestacktrace) > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:56 #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | ------------- | ------------------------------------------------------------------------------------------- | | `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) | | `stackTraces` | `CallSite`\[] | #### Returns [Section titled “Returns”](#returns-3) `any` #### See [Section titled “See”](#see) #### Inherited from [Section titled “Inherited from”](#inherited-from-5) `Error.prepareStackTrace` # RPC Defined in: [packages/iso-filecoin/src/rpc.js:124](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L124) RPC ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new RPC**(`options`, `fetchOptions?`): `RPC` Defined in: [packages/iso-filecoin/src/rpc.js:133](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L133) TODO: remove fetch from Options and use fetch from RequestOptions TODO: either remove token or merge this.headers with fetchOptions.headers #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------------- | -------------------------------------------------------------------------- | | `options` | [`Options`](/reference/iso-filecoin/types/interfaces/options/) | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns) `RPC` ## Properties [Section titled “Properties”](#properties) ### api [Section titled “api”](#api) > **api**: [`URL`](https://developer.mozilla.org/docs/Web/API/URL) Defined in: [packages/iso-filecoin/src/rpc.js:143](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L143) *** ### fetch() [Section titled “fetch()”](#fetch) > **fetch**: {(`input`, `init?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)>; (`input`, `init?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)>; } Defined in: [packages/iso-filecoin/src/rpc.js:142](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L142) #### Call Signature [Section titled “Call Signature”](#call-signature) > (`input`, `init?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)> [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) ##### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | --------- | ------------------------------------------------------------------------ | | `input` | [`URL`](https://developer.mozilla.org/docs/Web/API/URL) \| `RequestInfo` | | `init?` | `RequestInit` | ##### Returns [Section titled “Returns”](#returns-1) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)> #### Call Signature [Section titled “Call Signature”](#call-signature-1) > (`input`, `init?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)> [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) ##### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `input` | `string` \| [`URL`](https://developer.mozilla.org/docs/Web/API/URL) \| [`Request`](https://developer.mozilla.org/docs/Web/API/Request) | | `init?` | `RequestInit` | ##### Returns [Section titled “Returns”](#returns-2) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)> *** ### fetchOptions [Section titled “fetchOptions”](#fetchoptions) > **fetchOptions**: [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) Defined in: [packages/iso-filecoin/src/rpc.js:150](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L150) *** ### headers [Section titled “headers”](#headers) > **headers**: `object` Defined in: [packages/iso-filecoin/src/rpc.js:145](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L145) #### Authorization? [Section titled “Authorization?”](#authorization) > `optional` **Authorization**: `string` #### Content-Type [Section titled “Content-Type”](#content-type) > **Content-Type**: `string` = `'application/json'` *** ### network [Section titled “network”](#network) > **network**: [`Network`](/reference/iso-filecoin/types/type-aliases/network/) Defined in: [packages/iso-filecoin/src/rpc.js:144](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L144) ## Methods [Section titled “Methods”](#methods) ### balance() [Section titled “balance()”](#balance) > **balance**(`address`, `fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`string`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:230](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L230) WalletBalance returns the balance of the given address at the current head of the chain. #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | --------------- | -------------------------------------------------------------------------- | | `address` | `string` | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-3) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`string`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> #### See [Section titled “See”](#see) *** ### call() [Section titled “call()”](#call) > **call**<`R`>(`rpcOptions`, `fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`R`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:589](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L589) Generic method to call any method on the lotus rpc api. #### Type Parameters [Section titled “Type Parameters”](#type-parameters) | Type Parameter | | -------------- | | `R` | #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | | --------------- | -------------------------------------------------------------------------- | | `rpcOptions` | [`RpcOptions`](/reference/iso-filecoin/types/interfaces/rpcoptions/) | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-4) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`R`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> *** ### chainHead() [Section titled “chainHead()”](#chainhead) > **chainHead**(`fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`TipSet`](/reference/iso-filecoin/types/interfaces/tipset/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:470](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L470) The current head of the chain. #### Parameters [Section titled “Parameters”](#parameters-5) | Parameter | Type | | --------------- | -------------------------------------------------------------------------- | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-5) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`TipSet`](/reference/iso-filecoin/types/interfaces/tipset/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> #### See [Section titled “See”](#see-1) *** ### filecoinAddressToEthAddress() [Section titled “filecoinAddressToEthAddress()”](#filecoinaddresstoethaddress) > **filecoinAddressToEthAddress**(`params`, `fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`string`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:339](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L339) Converts any Filecoin address to an EthAddress. #### Parameters [Section titled “Parameters”](#parameters-6) | Parameter | Type | | --------------- | ------------------------------------------------------------------------------------------------------------------ | | `params` | [`FilecoinAddressToEthAddressParams`](/reference/iso-filecoin/types/interfaces/filecoinaddresstoethaddressparams/) | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-6) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`string`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> #### See [Section titled “See”](#see-2) *** ### gasEstimate() [Section titled “gasEstimate()”](#gasestimate) > **gasEstimate**(`params`, `fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`LotusMessage`](/reference/iso-filecoin/types/interfaces/lotusmessage/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/) | [`ValidationRpcError`](/reference/iso-filecoin/rpc/classes/validationrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:185](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L185) GasEstimateMessageGas estimates gas values for unset message gas fields #### Parameters [Section titled “Parameters”](#parameters-7) | Parameter | Type | | --------------- | ---------------------------------------------------------------------------------- | | `params` | [`GasEstimateParams`](/reference/iso-filecoin/types/interfaces/gasestimateparams/) | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-7) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`LotusMessage`](/reference/iso-filecoin/types/interfaces/lotusmessage/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/) | [`ValidationRpcError`](/reference/iso-filecoin/rpc/classes/validationrpcerror/)>> #### See [Section titled “See”](#see-3) *** ### getIDAddress() [Section titled “getIDAddress()”](#getidaddress) > **getIDAddress**(`params`, `fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`string`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:551](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L551) Get the ID address for an address with different safety guarantees #### Parameters [Section titled “Parameters”](#parameters-8) | Parameter | Type | | ---------------- | --------------------------------------------------------------------------------------------------- | | `params` | { `address`: `string`; `safety?`: [`Safety`](/reference/iso-filecoin/types/type-aliases/safety/); } | | `params.address` | `string` | | `params.safety?` | [`Safety`](/reference/iso-filecoin/types/type-aliases/safety/) | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-8) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`string`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> *** ### getTipSetByHeight() [Section titled “getTipSetByHeight()”](#gettipsetbyheight) > **getTipSetByHeight**(`params`, `fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`TipSet`](/reference/iso-filecoin/types/interfaces/tipset/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:490](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L490) Get tipset at the specified epoch (height). If there are no blocks at the specified epoch, a tipset at an earlier epoch will be returned. #### Parameters [Section titled “Parameters”](#parameters-9) | Parameter | Type | | --------------- | -------------------------------------------------------------------------------------------------------- | | `params` | [`ChainGetTipSetByHeightParams`](/reference/iso-filecoin/types/interfaces/chaingettipsetbyheightparams/) | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-9) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`TipSet`](/reference/iso-filecoin/types/interfaces/tipset/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> #### See [Section titled “See”](#see-4) *** ### lookBackTipSet() [Section titled “lookBackTipSet()”](#lookbacktipset) > **lookBackTipSet**(`lookback`, `fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`TipSet`](/reference/iso-filecoin/types/interfaces/tipset/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:512](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L512) Looks back from latest height for a tipset #### Parameters [Section titled “Parameters”](#parameters-10) | Parameter | Type | Description | | --------------- | -------------------------------------------------------------------------- | --------------------------- | | `lookback` | `number` | Chain epoch to look back to | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | - | #### Returns [Section titled “Returns”](#returns-10) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`TipSet`](/reference/iso-filecoin/types/interfaces/tipset/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> *** ### networkName() [Section titled “networkName()”](#networkname) > **networkName**(`fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`Network`](/reference/iso-filecoin/types/type-aliases/network/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:170](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L170) NetworkName returns the name of the network the node is synced to. #### Parameters [Section titled “Parameters”](#parameters-11) | Parameter | Type | | --------------- | -------------------------------------------------------------------------- | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-11) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`Network`](/reference/iso-filecoin/types/type-aliases/network/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> *** ### nonce() [Section titled “nonce()”](#nonce) > **nonce**(`address`, `fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`number`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:248](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L248) MpoolGetNonce gets next nonce for the specified sender. Note that this method may not be atomic. Use MpoolPushMessage instead. #### Parameters [Section titled “Parameters”](#parameters-12) | Parameter | Type | | --------------- | -------------------------------------------------------------------------- | | `address` | `string` | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-12) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`number`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> #### See [Section titled “See”](#see-5) *** ### pushMessage() [Section titled “pushMessage()”](#pushmessage) > **pushMessage**(`params`, `fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`CID`](/reference/iso-filecoin/types/type-aliases/cid/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/) | [`ValidationRpcError`](/reference/iso-filecoin/rpc/classes/validationrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:267](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L267) MpoolPush pushes a signed message to mempool. #### Parameters [Section titled “Parameters”](#parameters-13) | Parameter | Type | | --------------- | ---------------------------------------------------------------------------------- | | `params` | [`PushMessageParams`](/reference/iso-filecoin/types/interfaces/pushmessageparams/) | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-13) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`CID`](/reference/iso-filecoin/types/type-aliases/cid/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/) | [`ValidationRpcError`](/reference/iso-filecoin/rpc/classes/validationrpcerror/)>> #### See [Section titled “See”](#see-6) *** ### stateAccountKey() [Section titled “stateAccountKey()”](#stateaccountkey) > **stateAccountKey**(`params`, `fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`string`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:364](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L364) Public key address of the given ID address. #### Parameters [Section titled “Parameters”](#parameters-14) | Parameter | Type | | --------------- | ------------------------------------------------------------------------------------------ | | `params` | [`StateAccountKeyParams`](/reference/iso-filecoin/types/interfaces/stateaccountkeyparams/) | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-14) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`string`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> #### See [Section titled “See”](#see-7) *** ### stateLookupID() [Section titled “stateLookupID()”](#statelookupid) > **stateLookupID**(`params`, `fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`string`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:439](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L439) Retrieves the ID address of the given address for a tipset. If you dont have a specific tipset in mind, better to use [getIDAddress](/reference/iso-filecoin/rpc/classes/rpc/#getidaddress). #### Parameters [Section titled “Parameters”](#parameters-15) | Parameter | Type | | --------------- | ------------------------------------------------------------------------------------------ | | `params` | [`StateAccountKeyParams`](/reference/iso-filecoin/types/interfaces/stateaccountkeyparams/) | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-15) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`string`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> #### See [Section titled “See”](#see-8) *** ### stateLookupRobustAddress() [Section titled “stateLookupRobustAddress()”](#statelookuprobustaddress) > **stateLookupRobustAddress**(`params`, `fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`string`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:401](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L401) Public key address of the given non-account ID address. #### Parameters [Section titled “Parameters”](#parameters-16) | Parameter | Type | | --------------- | ------------------------------------------------------------------------------------------ | | `params` | [`StateAccountKeyParams`](/reference/iso-filecoin/types/interfaces/stateaccountkeyparams/) | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-16) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<`string`, [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> #### See [Section titled “See”](#see-9) *** ### version() [Section titled “version()”](#version) > **version**(`fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`VersionResponse`](/reference/iso-filecoin/types/type-aliases/versionresponse/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:158](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L158) Version returns the version of the Filecoin node. #### Parameters [Section titled “Parameters”](#parameters-17) | Parameter | Type | | --------------- | -------------------------------------------------------------------------- | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-17) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`VersionResponse`](/reference/iso-filecoin/types/type-aliases/versionresponse/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> *** ### waitMsg() [Section titled “waitMsg()”](#waitmsg) > **waitMsg**(`params`, `fetchOptions?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`CID`](/reference/iso-filecoin/types/type-aliases/cid/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> Defined in: [packages/iso-filecoin/src/rpc.js:316](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L316) StateWaitMsg looks back in the chain for a message. If not found, it blocks until the message arrives on chain, and gets to the indicated confidence depth. Timeout is increased to 60s instead of the default 5s. #### Parameters [Section titled “Parameters”](#parameters-18) | Parameter | Type | | --------------- | -------------------------------------------------------------------------- | | `params` | [`waitMsgParams`](/reference/iso-filecoin/types/interfaces/waitmsgparams/) | | `fetchOptions?` | [`RequestOptions`](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | #### Returns [Section titled “Returns”](#returns-18) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`MaybeResult`](/reference/iso-filecoin/types/type-aliases/mayberesult/)<[`CID`](/reference/iso-filecoin/types/type-aliases/cid/), [`RequestErrors`](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/)>> #### See [Section titled “See”](#see-10) # RpcError Defined in: [packages/iso-filecoin/src/rpc.js:40](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L40) ## Extends [Section titled “Extends”](#extends) * [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) ## Extended by [Section titled “Extended by”](#extended-by) * [`JsonRpcError`](/reference/iso-filecoin/rpc/classes/jsonrpcerror/) * [`ValidationRpcError`](/reference/iso-filecoin/rpc/classes/validationrpcerror/) ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new RpcError**(`message`, `options?`): `RpcError` Defined in: [packages/iso-filecoin/src/rpc.js:54](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L54) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ---------- | -------------- | | `message` | `string` | | `options?` | `ErrorOptions` | #### Returns [Section titled “Returns”](#returns) `RpcError` #### Overrides [Section titled “Overrides”](#overrides) `Error.constructor` ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` = `true` Defined in: [packages/iso-filecoin/src/rpc.js:42](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L42) *** ### cause [Section titled “cause”](#cause) > **cause**: `unknown` Defined in: [packages/iso-filecoin/src/rpc.js:47](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L47) #### Overrides [Section titled “Overrides”](#overrides-1) `Error.cause` *** ### message [Section titled “message”](#message) > **message**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 #### Inherited from [Section titled “Inherited from”](#inherited-from) `Error.message` *** ### name [Section titled “name”](#name) > **name**: `string` = `'RpcError'` Defined in: [packages/iso-filecoin/src/rpc.js:44](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L44) #### Overrides [Section titled “Overrides”](#overrides-2) `Error.name` *** ### stack? [Section titled “stack?”](#stack) > `optional` **stack**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 #### Inherited from [Section titled “Inherited from”](#inherited-from-1) `Error.stack` *** ### stackTraceLimit [Section titled “stackTraceLimit”](#stacktracelimit) > `static` **stackTraceLimit**: `number` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:68 The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from [Section titled “Inherited from”](#inherited-from-2) `Error.stackTraceLimit` ## Methods [Section titled “Methods”](#methods) ### captureStackTrace() [Section titled “captureStackTrace()”](#capturestacktrace) > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:52 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------- | | `targetObject` | `object` | | `constructorOpt?` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) | #### Returns [Section titled “Returns”](#returns-1) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-3) `Error.captureStackTrace` *** ### is() [Section titled “is()”](#is) > `static` **is**(`value`): `value is RpcError` Defined in: [packages/iso-filecoin/src/rpc.js:65](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L65) Check if a value is a RequestError #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | --------- | | `value` | `unknown` | #### Returns [Section titled “Returns”](#returns-2) `value is RpcError` *** ### prepareStackTrace() [Section titled “prepareStackTrace()”](#preparestacktrace) > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:56 #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | ------------- | ------------------------------------------------------------------------------------------- | | `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) | | `stackTraces` | `CallSite`\[] | #### Returns [Section titled “Returns”](#returns-3) `any` #### See [Section titled “See”](#see) #### Inherited from [Section titled “Inherited from”](#inherited-from-4) `Error.prepareStackTrace` # TimeoutError Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:209 ## Extends [Section titled “Extends”](#extends) * [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/) ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new TimeoutError**(`timeout`, `options?`): `TimeoutError` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:215 #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ---------- | -------------- | | `timeout` | `number` | | `options?` | `ErrorOptions` | #### Returns [Section titled “Returns”](#returns) `TimeoutError` #### Overrides [Section titled “Overrides”](#overrides) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`constructor`](/reference/iso-filecoin/rpc/classes/requesterror/#constructor) ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:187 #### Inherited from [Section titled “Inherited from”](#inherited-from) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`[symbol]`](/reference/iso-filecoin/rpc/classes/requesterror/#symbol) *** ### cause [Section titled “cause”](#cause) > **cause**: `unknown` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:185 #### Inherited from [Section titled “Inherited from”](#inherited-from-1) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`cause`](/reference/iso-filecoin/rpc/classes/requesterror/#cause) *** ### message [Section titled “message”](#message) > **message**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 #### Inherited from [Section titled “Inherited from”](#inherited-from-2) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`message`](/reference/iso-filecoin/rpc/classes/requesterror/#message) *** ### name [Section titled “name”](#name) > **name**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from [Section titled “Inherited from”](#inherited-from-3) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`name`](/reference/iso-filecoin/rpc/classes/requesterror/#name) *** ### stack? [Section titled “stack?”](#stack) > `optional` **stack**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 #### Inherited from [Section titled “Inherited from”](#inherited-from-4) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`stack`](/reference/iso-filecoin/rpc/classes/requesterror/#stack) *** ### stackTraceLimit [Section titled “stackTraceLimit”](#stacktracelimit) > `static` **stackTraceLimit**: `number` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:68 The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from [Section titled “Inherited from”](#inherited-from-5) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`stackTraceLimit`](/reference/iso-filecoin/rpc/classes/requesterror/#stacktracelimit) ## Methods [Section titled “Methods”](#methods) ### captureStackTrace() [Section titled “captureStackTrace()”](#capturestacktrace) > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:52 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------- | | `targetObject` | `object` | | `constructorOpt?` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) | #### Returns [Section titled “Returns”](#returns-1) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-6) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`captureStackTrace`](/reference/iso-filecoin/rpc/classes/requesterror/#capturestacktrace) *** ### is() [Section titled “is()”](#is) > `static` **is**(`value`): `value is RequestError` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/http.d.ts:177 Check if a value is a RequestError #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | --------- | | `value` | `unknown` | #### Returns [Section titled “Returns”](#returns-2) `value is RequestError` #### Inherited from [Section titled “Inherited from”](#inherited-from-7) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`is`](/reference/iso-filecoin/rpc/classes/requesterror/#is) *** ### prepareStackTrace() [Section titled “prepareStackTrace()”](#preparestacktrace) > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:56 #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | ------------- | ------------------------------------------------------------------------------------------- | | `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) | | `stackTraces` | `CallSite`\[] | #### Returns [Section titled “Returns”](#returns-3) `any` #### See [Section titled “See”](#see) #### Inherited from [Section titled “Inherited from”](#inherited-from-8) [`RequestError`](/reference/iso-filecoin/rpc/classes/requesterror/).[`prepareStackTrace`](/reference/iso-filecoin/rpc/classes/requesterror/#preparestacktrace) # ValidationRpcError Defined in: [packages/iso-filecoin/src/rpc.js:95](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L95) ## Extends [Section titled “Extends”](#extends) * [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/) ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new ValidationRpcError**(`cause`): `ValidationRpcError` Defined in: [packages/iso-filecoin/src/rpc.js:105](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L105) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ----------------- | | `cause` | `ZodError`<`any`> | #### Returns [Section titled “Returns”](#returns) `ValidationRpcError` #### Overrides [Section titled “Overrides”](#overrides) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`constructor`](/reference/iso-filecoin/rpc/classes/rpcerror/#constructor) ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` = `true` Defined in: [packages/iso-filecoin/src/rpc.js:42](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L42) #### Inherited from [Section titled “Inherited from”](#inherited-from) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`[symbol]`](/reference/iso-filecoin/rpc/classes/rpcerror/#symbol) *** ### cause [Section titled “cause”](#cause) > **cause**: `ZodError`<`any`> Defined in: [packages/iso-filecoin/src/rpc.js:99](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L99) #### Overrides [Section titled “Overrides”](#overrides-1) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`cause`](/reference/iso-filecoin/rpc/classes/rpcerror/#cause) *** ### message [Section titled “message”](#message) > **message**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 #### Inherited from [Section titled “Inherited from”](#inherited-from-1) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`message`](/reference/iso-filecoin/rpc/classes/rpcerror/#message) *** ### name [Section titled “name”](#name) > **name**: `string` = `'ValidationRpcError'` Defined in: [packages/iso-filecoin/src/rpc.js:96](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L96) #### Overrides [Section titled “Overrides”](#overrides-2) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`name`](/reference/iso-filecoin/rpc/classes/rpcerror/#name) *** ### stack? [Section titled “stack?”](#stack) > `optional` **stack**: `string` Defined in: node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 #### Inherited from [Section titled “Inherited from”](#inherited-from-2) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`stack`](/reference/iso-filecoin/rpc/classes/rpcerror/#stack) *** ### stackTraceLimit [Section titled “stackTraceLimit”](#stacktracelimit) > `static` **stackTraceLimit**: `number` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:68 The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from [Section titled “Inherited from”](#inherited-from-3) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`stackTraceLimit`](/reference/iso-filecoin/rpc/classes/rpcerror/#stacktracelimit) ## Methods [Section titled “Methods”](#methods) ### captureStackTrace() [Section titled “captureStackTrace()”](#capturestacktrace) > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:52 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------------------- | | `targetObject` | `object` | | `constructorOpt?` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) | #### Returns [Section titled “Returns”](#returns-1) `void` #### Inherited from [Section titled “Inherited from”](#inherited-from-4) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`captureStackTrace`](/reference/iso-filecoin/rpc/classes/rpcerror/#capturestacktrace) *** ### is() [Section titled “is()”](#is) > `static` **is**(`value`): `value is ValidationRpcError` Defined in: [packages/iso-filecoin/src/rpc.js:116](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L116) Check if a value is a ValidationRpcError #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | --------- | | `value` | `unknown` | #### Returns [Section titled “Returns”](#returns-2) `value is ValidationRpcError` #### Overrides [Section titled “Overrides”](#overrides-3) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`is`](/reference/iso-filecoin/rpc/classes/rpcerror/#is) *** ### prepareStackTrace() [Section titled “prepareStackTrace()”](#preparestacktrace) > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` Defined in: node\_modules/.pnpm/@types+node\@24.10.1/node\_modules/@types/node/globals.d.ts:56 #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | ------------- | ------------------------------------------------------------------------------------------- | | `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) | | `stackTraces` | `CallSite`\[] | #### Returns [Section titled “Returns”](#returns-3) `any` #### See [Section titled “See”](#see) #### Inherited from [Section titled “Inherited from”](#inherited-from-5) [`RpcError`](/reference/iso-filecoin/rpc/classes/rpcerror/).[`prepareStackTrace`](/reference/iso-filecoin/rpc/classes/rpcerror/#preparestacktrace) # isRpcError > **isRpcError**(`value`): `value is RpcError` Defined in: [packages/iso-filecoin/src/rpc.js:36](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L36) Check if a value is a RpcError ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | --------- | | `value` | `unknown` | ## Returns [Section titled “Returns”](#returns) `value is RpcError` # RequestOptions Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/types.d.ts:77 ## Properties [Section titled “Properties”](#properties) ### body? [Section titled “body?”](#body) > `optional` **body**: `BodyInit` | `null` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/types.d.ts:80 *** ### fetch()? [Section titled “fetch()?”](#fetch) > `optional` **fetch**: {(`input`, `init?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)>; (`input`, `init?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)>; } Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/types.d.ts:78 #### Call Signature [Section titled “Call Signature”](#call-signature) > (`input`, `init?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)> [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) ##### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------------ | | `input` | [`URL`](https://developer.mozilla.org/docs/Web/API/URL) \| `RequestInfo` | | `init?` | `RequestInit` | ##### Returns [Section titled “Returns”](#returns) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)> #### Call Signature [Section titled “Call Signature”](#call-signature-1) > (`input`, `init?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)> [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) ##### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | --------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `input` | `string` \| [`URL`](https://developer.mozilla.org/docs/Web/API/URL) \| [`Request`](https://developer.mozilla.org/docs/Web/API/Request) | | `init?` | `RequestInit` | ##### Returns [Section titled “Returns”](#returns-1) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)> *** ### headers? [Section titled “headers?”](#headers) > `optional` **headers**: `HeadersInit` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/types.d.ts:82 *** ### json? [Section titled “json?”](#json) > `optional` **json**: `Jsonifiable` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/types.d.ts:92 *** ### keepalive? [Section titled “keepalive?”](#keepalive) > `optional` **keepalive**: `boolean` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/types.d.ts:84 *** ### method? [Section titled “method?”](#method) > `optional` **method**: `string` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/types.d.ts:81 *** ### onResponse()? [Section titled “onResponse()?”](#onresponse) > `optional` **onResponse**: (`response`, `request`) => `void` | [`Response`](https://developer.mozilla.org/docs/Web/API/Response) | [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void` | [`Response`](https://developer.mozilla.org/docs/Web/API/Response)> Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/types.d.ts:93 #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | ---------- | ----------------------------------------------------------------- | | `response` | [`Response`](https://developer.mozilla.org/docs/Web/API/Response) | | `request` | [`Request`](https://developer.mozilla.org/docs/Web/API/Request) | #### Returns [Section titled “Returns”](#returns-2) `void` | [`Response`](https://developer.mozilla.org/docs/Web/API/Response) | [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void` | [`Response`](https://developer.mozilla.org/docs/Web/API/Response)> *** ### redirect? [Section titled “redirect?”](#redirect) > `optional` **redirect**: `RequestRedirect` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/types.d.ts:79 *** ### retry? [Section titled “retry?”](#retry) > `optional` **retry**: `RetryOptions` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/types.d.ts:91 *** ### signal? [Section titled “signal?”](#signal) > `optional` **signal**: [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal) Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/types.d.ts:83 *** ### timeout? [Section titled “timeout?”](#timeout) > `optional` **timeout**: `number` | `false` Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/types.d.ts:90 Timeout in milliseconds for the request, `false` to disable timeout #### Default [Section titled “Default”](#default) ```ts 5000 ``` # Index ## Classes [Section titled “Classes”](#classes) | Class | Description | | ----------------------------------------------------------------------------- | ----------- | | [AbortError](/reference/iso-filecoin/rpc/classes/aborterror/) | - | | [HttpError](/reference/iso-filecoin/rpc/classes/httperror/) | - | | [JsonError](/reference/iso-filecoin/rpc/classes/jsonerror/) | - | | [JsonRpcError](/reference/iso-filecoin/rpc/classes/jsonrpcerror/) | - | | [NetworkError](/reference/iso-filecoin/rpc/classes/networkerror/) | - | | [RequestError](/reference/iso-filecoin/rpc/classes/requesterror/) | - | | [RPC](/reference/iso-filecoin/rpc/classes/rpc/) | RPC | | [RpcError](/reference/iso-filecoin/rpc/classes/rpcerror/) | - | | [TimeoutError](/reference/iso-filecoin/rpc/classes/timeouterror/) | - | | [ValidationRpcError](/reference/iso-filecoin/rpc/classes/validationrpcerror/) | - | ## Interfaces [Section titled “Interfaces”](#interfaces) | Interface | Description | | ------------------------------------------------------------------------ | ----------- | | [RequestOptions](/reference/iso-filecoin/rpc/interfaces/requestoptions/) | - | ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | ------------------------------------------------------------------------ | ----------- | | [RequestErrors](/reference/iso-filecoin/rpc/type-aliases/requesterrors/) | - | ## Functions [Section titled “Functions”](#functions) | Function | Description | | --------------------------------------------------------------- | ------------------------------ | | [isRpcError](/reference/iso-filecoin/rpc/functions/isrpcerror/) | Check if a value is a RpcError | # RequestErrors > **RequestErrors** = `Errors` | [`JsonError`](/reference/iso-filecoin/rpc/classes/jsonerror/) Defined in: [packages/iso-filecoin/src/rpc.js:22](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/rpc.js#L22) # Signature Defined in: [packages/iso-filecoin/src/signature.js:40](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L40) Signature Class ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new Signature**(`sig`): `Signature` Defined in: [packages/iso-filecoin/src/signature.js:45](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L45) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `sig` | { `data`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>; `type`: `"SECP256K1"` \| `"BLS"`; } | | `sig.data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `sig.type` | `"SECP256K1"` \| `"BLS"` | #### Returns [Section titled “Returns”](#returns) `Signature` ## Properties [Section titled “Properties”](#properties) ### data [Section titled “data”](#data) > **data**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/signature.js:48](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L48) *** ### type [Section titled “type”](#type) > **type**: `"SECP256K1"` | `"BLS"` Defined in: [packages/iso-filecoin/src/signature.js:47](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L47) ## Accessors [Section titled “Accessors”](#accessors) ### code [Section titled “code”](#code) #### Get Signature [Section titled “Get Signature”](#get-signature) > **get** **code**(): `1` | `2` Defined in: [packages/iso-filecoin/src/signature.js:51](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L51) ##### Returns [Section titled “Returns”](#returns-1) `1` | `2` ## Methods [Section titled “Methods”](#methods) ### toLotus() [Section titled “toLotus()”](#tolotus) > **toLotus**(): `object` Defined in: [packages/iso-filecoin/src/signature.js:72](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L72) Encodes the signature as a JSON object in the Lotus RPC format. #### Returns [Section titled “Returns”](#returns-2) `object` ##### Data [Section titled “Data”](#data-1) > **Data**: `string` ##### Type [Section titled “Type”](#type-1) > **Type**: `1` | `2` *** ### toLotusHex() [Section titled “toLotusHex()”](#tolotushex) > **toLotusHex**(): `string` Defined in: [packages/iso-filecoin/src/signature.js:122](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L122) Encodes the signature as a Lotus-style hex encoded string Lotus adds 0x01 or 0x02 to the signature depending on the type. #### Returns [Section titled “Returns”](#returns-3) `string` Hex encoded signature *** ### fromLotus() [Section titled “fromLotus()”](#fromlotus) > `static` **fromLotus**(`json`): `Signature` Defined in: [packages/iso-filecoin/src/signature.js:59](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L59) #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | ----------- | ----------------------------------------- | | `json` | { `Data`: `string`; `Type`: `1` \| `2`; } | | `json.Data` | `string` | | `json.Type` | `1` \| `2` | #### Returns [Section titled “Returns”](#returns-4) `Signature` *** ### fromLotusHex() [Section titled “fromLotusHex()”](#fromlotushex) > `static` **fromLotusHex**(`str`): `Signature` Defined in: [packages/iso-filecoin/src/signature.js:86](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L86) Signature from Lotus-style hex encoded string Lotus adds 0x01 or 0x02 to the signature depending on the type. #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | Description | | --------- | -------- | --------------------- | | `str` | `string` | Hex encoded signature | #### Returns [Section titled “Returns”](#returns-5) `Signature` # Index ## Classes [Section titled “Classes”](#classes) | Class | Description | | ----------------------------------------------------------------- | --------------- | | [Signature](/reference/iso-filecoin/signature/classes/signature/) | Signature Class | ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | -------------------------------------------------------------------------------- | ----------- | | [LotusSignature](/reference/iso-filecoin/signature/type-aliases/lotussignature/) | - | | [SignatureCode](/reference/iso-filecoin/signature/type-aliases/signaturecode/) | - | | [SignatureObj](/reference/iso-filecoin/signature/type-aliases/signatureobj/) | - | | [SignatureType](/reference/iso-filecoin/signature/type-aliases/signaturetype/) | - | ## Variables [Section titled “Variables”](#variables) | Variable | Description | | ------------------------------------------------------------------------------ | ----------- | | [Schemas](/reference/iso-filecoin/signature/variables/schemas/) | - | | [SIGNATURE\_CODE](/reference/iso-filecoin/signature/variables/signature_code/) | - | | [SIGNATURE\_TYPE](/reference/iso-filecoin/signature/variables/signature_type/) | - | # LotusSignature > **LotusSignature** = `z.infer`<*typeof* [`lotusSignature`](/reference/iso-filecoin/signature/variables/schemas/#lotussignature)> Defined in: [packages/iso-filecoin/src/signature.js:33](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L33) # SignatureCode > **SignatureCode** = *typeof* [`SIGNATURE_TYPE`](/reference/iso-filecoin/signature/variables/signature_type/)\[[`SignatureType`](/reference/iso-filecoin/signature/type-aliases/signaturetype/)] Defined in: [packages/iso-filecoin/src/signature.js:32](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L32) # SignatureObj > **SignatureObj** = `z.infer`<*typeof* [`signature`](/reference/iso-filecoin/signature/variables/schemas/#signature)> Defined in: [packages/iso-filecoin/src/signature.js:34](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L34) # SignatureType > **SignatureType** = keyof *typeof* [`SIGNATURE_TYPE`](/reference/iso-filecoin/signature/variables/signature_type/) Defined in: [packages/iso-filecoin/src/signature.js:31](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L31) # Schemas > `const` **Schemas**: `object` Defined in: [packages/iso-filecoin/src/signature.js:19](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L19) ## Type Declaration [Section titled “Type Declaration”](#type-declaration) ### lotusSignature [Section titled “lotusSignature”](#lotussignature) > **lotusSignature**: `ZodObject`<{ `Data`: `ZodString`; `Type`: `ZodUnion`<\[`ZodLiteral`<`1`>, `ZodLiteral`<`2`>]>; }, `$strip`> ### signature [Section titled “signature”](#signature) > **signature**: `ZodObject`<{ `data`: `ZodCustom`<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>, [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`>>; `type`: `ZodEnum`<{ `BLS`: `"BLS"`; `SECP256K1`: `"SECP256K1"`; }>; }, `$strip`> # SIGNATURE_CODE > `const` **SIGNATURE\_CODE**: `object` Defined in: [packages/iso-filecoin/src/signature.js:10](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L10) ## Type Declaration [Section titled “Type Declaration”](#type-declaration) ### 1 [Section titled “1”](#1) > `readonly` **1**: `"SECP256K1"` = `'SECP256K1'` ### 2 [Section titled “2”](#2) > `readonly` **2**: `"BLS"` = `'BLS'` # SIGNATURE_TYPE > `const` **SIGNATURE\_TYPE**: `object` Defined in: [packages/iso-filecoin/src/signature.js:5](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/signature.js#L5) ## Type Declaration [Section titled “Type Declaration”](#type-declaration) ### BLS [Section titled “BLS”](#bls) > `readonly` **BLS**: `2` = `2` ### SECP256K1 [Section titled “SECP256K1”](#secp256k1) > `readonly` **SECP256K1**: `1` = `1` # Token Defined in: [packages/iso-filecoin/src/token.js:70](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L70) Class to work with different Filecoin denominations. ## See [Section titled “See”](#see) ## Constructors [Section titled “Constructors”](#constructors) ### Constructor [Section titled “Constructor”](#constructor) > **new Token**(`val`): `Token` Defined in: [packages/iso-filecoin/src/token.js:76](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L76) #### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------ | | `val` | [`Value`](/reference/iso-filecoin/token/type-aliases/value/) | #### Returns [Section titled “Returns”](#returns) `Token` ## Properties [Section titled “Properties”](#properties) ### \[symbol] [Section titled “\[symbol\]”](#symbol) > **\[symbol]**: `boolean` = `true` Defined in: [packages/iso-filecoin/src/token.js:72](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L72) *** ### val [Section titled “val”](#val) > **val**: `BigNumber` Defined in: [packages/iso-filecoin/src/token.js:78](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L78) ## Methods [Section titled “Methods”](#methods) ### abs() [Section titled “abs()”](#abs) > **abs**(): `Token` Defined in: [packages/iso-filecoin/src/token.js:144](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L144) #### Returns [Section titled “Returns”](#returns-1) `Token` *** ### add() [Section titled “add()”](#add) > **add**(`val`): `Token` Defined in: [packages/iso-filecoin/src/token.js:151](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L151) #### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | --------- | ------------------------------------------------------------ | | `val` | [`Value`](/reference/iso-filecoin/token/type-aliases/value/) | #### Returns [Section titled “Returns”](#returns-2) `Token` *** ### div() [Section titled “div()”](#div) > **div**(`val`): `Token` Defined in: [packages/iso-filecoin/src/token.js:140](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L140) #### Parameters [Section titled “Parameters”](#parameters-2) | Parameter | Type | | --------- | ------------------------------------------------------------ | | `val` | [`Value`](/reference/iso-filecoin/token/type-aliases/value/) | #### Returns [Section titled “Returns”](#returns-3) `Token` *** ### mul() [Section titled “mul()”](#mul) > **mul**(`val`): `Token` Defined in: [packages/iso-filecoin/src/token.js:133](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L133) #### Parameters [Section titled “Parameters”](#parameters-3) | Parameter | Type | | --------- | ------------------------------------------------------------ | | `val` | [`Value`](/reference/iso-filecoin/token/type-aliases/value/) | #### Returns [Section titled “Returns”](#returns-4) `Token` *** ### sub() [Section titled “sub()”](#sub) > **sub**(`val`): `Token` Defined in: [packages/iso-filecoin/src/token.js:158](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L158) #### Parameters [Section titled “Parameters”](#parameters-4) | Parameter | Type | | --------- | ------------------------------------------------------------ | | `val` | [`Value`](/reference/iso-filecoin/token/type-aliases/value/) | #### Returns [Section titled “Returns”](#returns-5) `Token` *** ### toAttoFIL() [Section titled “toAttoFIL()”](#toattofil) > **toAttoFIL**(): `Token` Defined in: [packages/iso-filecoin/src/token.js:197](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L197) #### Returns [Section titled “Returns”](#returns-6) `Token` *** ### toBigInt() [Section titled “toBigInt()”](#tobigint) > **toBigInt**(): `bigint` Defined in: [packages/iso-filecoin/src/token.js:229](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L229) #### Returns [Section titled “Returns”](#returns-7) `bigint` *** ### toBytes() [Section titled “toBytes()”](#tobytes) > **toBytes**(): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)> Defined in: [packages/iso-filecoin/src/token.js:233](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L233) #### Returns [Section titled “Returns”](#returns-8) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)> *** ### toFemtoFIL() [Section titled “toFemtoFIL()”](#tofemtofil) > **toFemtoFIL**(): `Token` Defined in: [packages/iso-filecoin/src/token.js:205](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L205) #### Returns [Section titled “Returns”](#returns-9) `Token` *** ### toFIL() [Section titled “toFIL()”](#tofil) > **toFIL**(): `Token` Defined in: [packages/iso-filecoin/src/token.js:225](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L225) #### Returns [Section titled “Returns”](#returns-10) `Token` *** ### toFormat() [Section titled “toFormat()”](#toformat) > **toFormat**(`options?`): `string` Defined in: [packages/iso-filecoin/src/token.js:177](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L177) Format the number using the given options. #### Parameters [Section titled “Parameters”](#parameters-5) | Parameter | Type | | ---------- | ---------------------------------------------------------------------------- | | `options?` | [`FormatOptions`](/reference/iso-filecoin/types/type-aliases/formatoptions/) | #### Returns [Section titled “Returns”](#returns-11) `string` #### See [Section titled “See”](#see-1) *** ### toMicroFIL() [Section titled “toMicroFIL()”](#tomicrofil) > **toMicroFIL**(): `Token` Defined in: [packages/iso-filecoin/src/token.js:217](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L217) #### Returns [Section titled “Returns”](#returns-12) `Token` *** ### toMilliFIL() [Section titled “toMilliFIL()”](#tomillifil) > **toMilliFIL**(): `Token` Defined in: [packages/iso-filecoin/src/token.js:221](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L221) #### Returns [Section titled “Returns”](#returns-13) `Token` *** ### toNanoFIL() [Section titled “toNanoFIL()”](#tonanofil) > **toNanoFIL**(): `Token` Defined in: [packages/iso-filecoin/src/token.js:213](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L213) #### Returns [Section titled “Returns”](#returns-14) `Token` *** ### toPicoFIL() [Section titled “toPicoFIL()”](#topicofil) > **toPicoFIL**(): `Token` Defined in: [packages/iso-filecoin/src/token.js:209](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L209) #### Returns [Section titled “Returns”](#returns-15) `Token` *** ### toString() [Section titled “toString()”](#tostring) > **toString**(`base?`): `string` Defined in: [packages/iso-filecoin/src/token.js:167](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L167) Serialize the number to a string using the given base. #### Parameters [Section titled “Parameters”](#parameters-6) | Parameter | Type | Default value | | --------- | -------- | ------------- | | `base?` | `number` | `10` | #### Returns [Section titled “Returns”](#returns-16) `string` *** ### fromAttoFIL() [Section titled “fromAttoFIL()”](#fromattofil) > `static` **fromAttoFIL**(`val`): `Token` Defined in: [packages/iso-filecoin/src/token.js:84](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L84) #### Parameters [Section titled “Parameters”](#parameters-7) | Parameter | Type | | --------- | ------------------------------------------------------------ | | `val` | [`Value`](/reference/iso-filecoin/token/type-aliases/value/) | #### Returns [Section titled “Returns”](#returns-17) `Token` *** ### fromFemtoFIL() [Section titled “fromFemtoFIL()”](#fromfemtofil) > `static` **fromFemtoFIL**(`val`): `Token` Defined in: [packages/iso-filecoin/src/token.js:91](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L91) #### Parameters [Section titled “Parameters”](#parameters-8) | Parameter | Type | | --------- | ------------------------------------------------------------ | | `val` | [`Value`](/reference/iso-filecoin/token/type-aliases/value/) | #### Returns [Section titled “Returns”](#returns-18) `Token` *** ### fromFIL() [Section titled “fromFIL()”](#fromfil) > `static` **fromFIL**(`val`): `Token` Defined in: [packages/iso-filecoin/src/token.js:126](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L126) #### Parameters [Section titled “Parameters”](#parameters-9) | Parameter | Type | | --------- | ------------------------------------------------------------ | | `val` | [`Value`](/reference/iso-filecoin/token/type-aliases/value/) | #### Returns [Section titled “Returns”](#returns-19) `Token` *** ### fromMicroFIL() [Section titled “fromMicroFIL()”](#frommicrofil) > `static` **fromMicroFIL**(`val`): `Token` Defined in: [packages/iso-filecoin/src/token.js:112](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L112) #### Parameters [Section titled “Parameters”](#parameters-10) | Parameter | Type | | --------- | ------------------------------------------------------------ | | `val` | [`Value`](/reference/iso-filecoin/token/type-aliases/value/) | #### Returns [Section titled “Returns”](#returns-20) `Token` *** ### fromMilliFIL() [Section titled “fromMilliFIL()”](#frommillifil) > `static` **fromMilliFIL**(`val`): `Token` Defined in: [packages/iso-filecoin/src/token.js:119](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L119) #### Parameters [Section titled “Parameters”](#parameters-11) | Parameter | Type | | --------- | ------------------------------------------------------------ | | `val` | [`Value`](/reference/iso-filecoin/token/type-aliases/value/) | #### Returns [Section titled “Returns”](#returns-21) `Token` *** ### fromNanoFIL() [Section titled “fromNanoFIL()”](#fromnanofil) > `static` **fromNanoFIL**(`val`): `Token` Defined in: [packages/iso-filecoin/src/token.js:105](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L105) #### Parameters [Section titled “Parameters”](#parameters-12) | Parameter | Type | | --------- | ------------------------------------------------------------ | | `val` | [`Value`](/reference/iso-filecoin/token/type-aliases/value/) | #### Returns [Section titled “Returns”](#returns-22) `Token` *** ### fromPicoFIL() [Section titled “fromPicoFIL()”](#frompicofil) > `static` **fromPicoFIL**(`val`): `Token` Defined in: [packages/iso-filecoin/src/token.js:98](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L98) #### Parameters [Section titled “Parameters”](#parameters-13) | Parameter | Type | | --------- | ------------------------------------------------------------ | | `val` | [`Value`](/reference/iso-filecoin/token/type-aliases/value/) | #### Returns [Section titled “Returns”](#returns-23) `Token` # isToken > **isToken**(`val`): `val is Token` Defined in: [packages/iso-filecoin/src/token.js:39](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L39) Check if object is a [Token](/reference/iso-filecoin/token/classes/token/) instance ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ----- | | `val` | `any` | ## Returns [Section titled “Returns”](#returns) `val is Token` # Index ## Classes [Section titled “Classes”](#classes) | Class | Description | | ----------------------------------------------------- | ---------------------------------------------------- | | [Token](/reference/iso-filecoin/token/classes/token/) | Class to work with different Filecoin denominations. | ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | ---------------------------------------------------------- | ----------- | | [Value](/reference/iso-filecoin/token/type-aliases/value/) | - | ## Variables [Section titled “Variables”](#variables) | Variable | Description | | -------------------------------------------------------------------------- | ----------- | | [ATTO\_DECIMALS](/reference/iso-filecoin/token/variables/atto_decimals/) | - | | [FEMTO\_DECIMALS](/reference/iso-filecoin/token/variables/femto_decimals/) | - | | [MICRO\_DECIMALS](/reference/iso-filecoin/token/variables/micro_decimals/) | - | | [MILLI\_DECIMALS](/reference/iso-filecoin/token/variables/milli_decimals/) | - | | [NANO\_DECIMALS](/reference/iso-filecoin/token/variables/nano_decimals/) | - | | [PICO\_DECIMALS](/reference/iso-filecoin/token/variables/pico_decimals/) | - | | [WHOLE\_DECIMALS](/reference/iso-filecoin/token/variables/whole_decimals/) | - | ## Functions [Section titled “Functions”](#functions) | Function | Description | | ----------------------------------------------------------- | ----------------------------------------------------------------------------------- | | [isToken](/reference/iso-filecoin/token/functions/istoken/) | Check if object is a [Token](/reference/iso-filecoin/token/classes/token/) instance | # Value > **Value** = `number` | `string` | `BigNumber.Instance` | `bigint` | [`Token`](/reference/iso-filecoin/token/classes/token/) Defined in: [packages/iso-filecoin/src/token.js:30](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L30) # ATTO_DECIMALS > `const` **ATTO\_DECIMALS**: `18` = `18` Defined in: [packages/iso-filecoin/src/token.js:5](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L5) # FEMTO_DECIMALS > `const` **FEMTO\_DECIMALS**: `15` = `15` Defined in: [packages/iso-filecoin/src/token.js:6](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L6) # MICRO_DECIMALS > `const` **MICRO\_DECIMALS**: `6` = `6` Defined in: [packages/iso-filecoin/src/token.js:9](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L9) # MILLI_DECIMALS > `const` **MILLI\_DECIMALS**: `3` = `3` Defined in: [packages/iso-filecoin/src/token.js:10](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L10) # NANO_DECIMALS > `const` **NANO\_DECIMALS**: `9` = `9` Defined in: [packages/iso-filecoin/src/token.js:8](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L8) # PICO_DECIMALS > `const` **PICO\_DECIMALS**: `12` = `12` Defined in: [packages/iso-filecoin/src/token.js:7](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L7) # WHOLE_DECIMALS > `const` **WHOLE\_DECIMALS**: `0` = `0` Defined in: [packages/iso-filecoin/src/token.js:11](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/token.js#L11) # AddressRpcOptions Defined in: [packages/iso-filecoin/src/types.ts:79](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L79) Options for RPC-based address methods ## Extended by [Section titled “Extended by”](#extended-by) * [`AddressRpcSafetyOptions`](/reference/iso-filecoin/types/interfaces/addressrpcsafetyoptions/) ## Properties [Section titled “Properties”](#properties) ### cache? [Section titled “cache?”](#cache) > `optional` **cache**: [`Cache`](/reference/iso-filecoin/types/type-aliases/cache/) Defined in: [packages/iso-filecoin/src/types.ts:81](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L81) *** ### rpc [Section titled “rpc”](#rpc) > **rpc**: [`RPC`](/reference/iso-filecoin/rpc/classes/rpc/) Defined in: [packages/iso-filecoin/src/types.ts:80](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L80) # AddressRpcSafetyOptions Defined in: [packages/iso-filecoin/src/types.ts:89](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L89) Options for RPC-based address methods with safety ## Extends [Section titled “Extends”](#extends) * [`AddressRpcOptions`](/reference/iso-filecoin/types/interfaces/addressrpcoptions/) ## Properties [Section titled “Properties”](#properties) ### cache? [Section titled “cache?”](#cache) > `optional` **cache**: [`Cache`](/reference/iso-filecoin/types/type-aliases/cache/) Defined in: [packages/iso-filecoin/src/types.ts:81](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L81) #### Inherited from [Section titled “Inherited from”](#inherited-from) [`AddressRpcOptions`](/reference/iso-filecoin/types/interfaces/addressrpcoptions/).[`cache`](/reference/iso-filecoin/types/interfaces/addressrpcoptions/#cache) *** ### rpc [Section titled “rpc”](#rpc) > **rpc**: [`RPC`](/reference/iso-filecoin/rpc/classes/rpc/) Defined in: [packages/iso-filecoin/src/types.ts:80](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L80) #### Inherited from [Section titled “Inherited from”](#inherited-from-1) [`AddressRpcOptions`](/reference/iso-filecoin/types/interfaces/addressrpcoptions/).[`rpc`](/reference/iso-filecoin/types/interfaces/addressrpcoptions/#rpc) *** ### safety? [Section titled “safety?”](#safety) > `optional` **safety**: [`Safety`](/reference/iso-filecoin/types/type-aliases/safety/) Defined in: [packages/iso-filecoin/src/types.ts:90](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L90) # Block Defined in: [packages/iso-filecoin/src/types.ts:261](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L261) ## Properties [Section titled “Properties”](#properties) ### BeaconEntries [Section titled “BeaconEntries”](#beaconentries) > **BeaconEntries**: `object`\[] Defined in: [packages/iso-filecoin/src/types.ts:266](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L266) #### Data [Section titled “Data”](#data) > **Data**: `string` #### Round [Section titled “Round”](#round) > **Round**: `number` *** ### BlockSig [Section titled “BlockSig”](#blocksig) > **BlockSig**: `object` Defined in: [packages/iso-filecoin/src/types.ts:270](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L270) #### Data [Section titled “Data”](#data-1) > **Data**: `string` #### Type [Section titled “Type”](#type) > **Type**: `2` *** ### BLSAggregate [Section titled “BLSAggregate”](#blsaggregate) > **BLSAggregate**: `object` Defined in: [packages/iso-filecoin/src/types.ts:262](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L262) #### Data [Section titled “Data”](#data-2) > **Data**: `string` #### Type [Section titled “Type”](#type-1) > **Type**: `2` *** ### ElectionProof [Section titled “ElectionProof”](#electionproof) > **ElectionProof**: `object` Defined in: [packages/iso-filecoin/src/types.ts:274](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L274) #### VRFProof [Section titled “VRFProof”](#vrfproof) > **VRFProof**: `string` #### WinCount [Section titled “WinCount”](#wincount) > **WinCount**: `number` *** ### ForkSignaling [Section titled “ForkSignaling”](#forksignaling) > **ForkSignaling**: `number` Defined in: [packages/iso-filecoin/src/types.ts:278](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L278) *** ### Height [Section titled “Height”](#height) > **Height**: `number` Defined in: [packages/iso-filecoin/src/types.ts:279](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L279) *** ### Messages [Section titled “Messages”](#messages) > **Messages**: [`CID`](/reference/iso-filecoin/types/type-aliases/cid/) Defined in: [packages/iso-filecoin/src/types.ts:280](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L280) *** ### Miner [Section titled “Miner”](#miner) > **Miner**: `string` Defined in: [packages/iso-filecoin/src/types.ts:284](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L284) The miner address of the block. *** ### ParentBaseFee [Section titled “ParentBaseFee”](#parentbasefee) > **ParentBaseFee**: `string` Defined in: [packages/iso-filecoin/src/types.ts:285](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L285) *** ### ParentMessageReceipts [Section titled “ParentMessageReceipts”](#parentmessagereceipts) > **ParentMessageReceipts**: [`CID`](/reference/iso-filecoin/types/type-aliases/cid/) Defined in: [packages/iso-filecoin/src/types.ts:286](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L286) *** ### Parents [Section titled “Parents”](#parents) > **Parents**: [`CID`](/reference/iso-filecoin/types/type-aliases/cid/)\[] Defined in: [packages/iso-filecoin/src/types.ts:292](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L292) *** ### ParentStateRoot [Section titled “ParentStateRoot”](#parentstateroot) > **ParentStateRoot**: [`CID`](/reference/iso-filecoin/types/type-aliases/cid/) Defined in: [packages/iso-filecoin/src/types.ts:287](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L287) *** ### ParentWeight [Section titled “ParentWeight”](#parentweight) > **ParentWeight**: `string` Defined in: [packages/iso-filecoin/src/types.ts:291](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L291) BitInt as a string *** ### Ticket [Section titled “Ticket”](#ticket) > **Ticket**: `object` Defined in: [packages/iso-filecoin/src/types.ts:293](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L293) #### VRFProof [Section titled “VRFProof”](#vrfproof-1) > **VRFProof**: `string` *** ### Timestamp [Section titled “Timestamp”](#timestamp) > **Timestamp**: `number` Defined in: [packages/iso-filecoin/src/types.ts:296](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L296) *** ### WinPoStProof [Section titled “WinPoStProof”](#winpostproof) > **WinPoStProof**: `object`\[] Defined in: [packages/iso-filecoin/src/types.ts:297](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L297) #### PoStProof [Section titled “PoStProof”](#postproof) > **PoStProof**: `number` #### ProofBytes [Section titled “ProofBytes”](#proofbytes) > **ProofBytes**: `string` # Chain Defined in: [packages/iso-filecoin/src/types.ts:146](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L146) ## Type Parameters [Section titled “Type Parameters”](#type-parameters) | Type Parameter | Default type | | ----------------------------------- | ------------ | | `Id` *extends* `number` \| `string` | `number` | ## Properties [Section titled “Properties”](#properties) ### blockExplorers? [Section titled “blockExplorers?”](#blockexplorers) > `optional` **blockExplorers**: `object` Defined in: [packages/iso-filecoin/src/types.ts:159](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L159) #### Index Signature [Section titled “Index Signature”](#index-signature) \[`key`: `string`]: [`ChainBlockExplorer`](/reference/iso-filecoin/types/type-aliases/chainblockexplorer/) #### default [Section titled “default”](#default) > **default**: [`ChainBlockExplorer`](/reference/iso-filecoin/types/type-aliases/chainblockexplorer/) *** ### caipNetworkId [Section titled “caipNetworkId”](#caipnetworkid) > **caipNetworkId**: `` `${string}:${string}` `` Defined in: [packages/iso-filecoin/src/types.ts:170](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L170) CAIP-2 ID *** ### chainId [Section titled “chainId”](#chainid) > **chainId**: `string` Defined in: [packages/iso-filecoin/src/types.ts:174](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L174) Chain ID 0x prefixed hex string *** ### chainNamespace [Section titled “chainNamespace”](#chainnamespace) > **chainNamespace**: `string` Defined in: [packages/iso-filecoin/src/types.ts:166](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L166) *** ### contracts? [Section titled “contracts?”](#contracts) > `optional` **contracts**: `object` Defined in: [packages/iso-filecoin/src/types.ts:163](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L163) #### Index Signature [Section titled “Index Signature”](#index-signature-1) \[`key`: `string`]: [`ChainContract`](/reference/iso-filecoin/types/type-aliases/chaincontract/) *** ### iconUrls? [Section titled “iconUrls?”](#iconurls) > `optional` **iconUrls**: `string`\[] Defined in: [packages/iso-filecoin/src/types.ts:175](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L175) *** ### id [Section titled “id”](#id) > **id**: `Id` Defined in: [packages/iso-filecoin/src/types.ts:147](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L147) *** ### name [Section titled “name”](#name) > **name**: `string` Defined in: [packages/iso-filecoin/src/types.ts:148](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L148) *** ### nativeCurrency [Section titled “nativeCurrency”](#nativecurrency) > **nativeCurrency**: `object` Defined in: [packages/iso-filecoin/src/types.ts:150](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L150) #### decimals [Section titled “decimals”](#decimals) > **decimals**: `number` #### name [Section titled “name”](#name-1) > **name**: `string` #### symbol [Section titled “symbol”](#symbol) > **symbol**: `string` *** ### rpcUrls [Section titled “rpcUrls”](#rpcurls) > **rpcUrls**: `object` Defined in: [packages/iso-filecoin/src/types.ts:155](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L155) #### Index Signature [Section titled “Index Signature”](#index-signature-2) \[`key`: `string`]: [`ChainRpcUrls`](/reference/iso-filecoin/types/type-aliases/chainrpcurls/) #### default [Section titled “default”](#default-1) > **default**: [`ChainRpcUrls`](/reference/iso-filecoin/types/type-aliases/chainrpcurls/) *** ### testnet? [Section titled “testnet?”](#testnet) > `optional` **testnet**: `boolean` Defined in: [packages/iso-filecoin/src/types.ts:149](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L149) # ChainGetTipSetByHeightParams Defined in: [packages/iso-filecoin/src/types.ts:406](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L406) ## Properties [Section titled “Properties”](#properties) ### height [Section titled “height”](#height) > **height**: `number` Defined in: [packages/iso-filecoin/src/types.ts:407](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L407) *** ### tipSetKey? [Section titled “tipSetKey?”](#tipsetkey) > `optional` **tipSetKey**: [`TipSetKey`](/reference/iso-filecoin/types/type-aliases/tipsetkey/) | `null` Defined in: [packages/iso-filecoin/src/types.ts:408](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L408) # DerivationPathComponents Defined in: [packages/iso-filecoin/src/types.ts:119](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L119) ## Properties [Section titled “Properties”](#properties) ### account [Section titled “account”](#account) > **account**: `number` Defined in: [packages/iso-filecoin/src/types.ts:122](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L122) *** ### addressIndex [Section titled “addressIndex”](#addressindex) > **addressIndex**: `number` Defined in: [packages/iso-filecoin/src/types.ts:124](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L124) *** ### change [Section titled “change”](#change) > **change**: `number` Defined in: [packages/iso-filecoin/src/types.ts:123](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L123) *** ### coinType [Section titled “coinType”](#cointype) > **coinType**: `number` Defined in: [packages/iso-filecoin/src/types.ts:121](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L121) *** ### purpose [Section titled “purpose”](#purpose) > **purpose**: `number` Defined in: [packages/iso-filecoin/src/types.ts:120](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L120) # FilecoinAddressToEthAddressParams Defined in: [packages/iso-filecoin/src/types.ts:393](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L393) ## Properties [Section titled “Properties”](#properties) ### address [Section titled “address”](#address) > **address**: `string` Defined in: [packages/iso-filecoin/src/types.ts:397](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L397) The Filecoin address to convert. *** ### blockNumber? [Section titled “blockNumber?”](#blocknumber) > `optional` **blockNumber**: `"pending"` | `"latest"` | `"finalized"` | `"safe"` | `"0x${string}"` Defined in: [packages/iso-filecoin/src/types.ts:403](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L403) The block number or state for the conversion. Defaults to “finalized” for maximum safety. Possible values: “pending”, “latest”, “finalized”, “safe”, or a specific block number represented as hex. # GasEstimateParams Defined in: [packages/iso-filecoin/src/types.ts:352](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L352) ## Properties [Section titled “Properties”](#properties) ### maxFee? [Section titled “maxFee?”](#maxfee) > `optional` **maxFee**: `string` Defined in: [packages/iso-filecoin/src/types.ts:364](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L364) Max fee to pay for gas (attoFIL/gas units) #### Default [Section titled “Default”](#default) ```ts '0' ``` *** ### msg [Section titled “msg”](#msg) > **msg**: `object` Defined in: [packages/iso-filecoin/src/types.ts:358](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L358) Message to estimate gas for #### from [Section titled “from”](#from) > **from**: `string` #### gasFeeCap? [Section titled “gasFeeCap?”](#gasfeecap) > `optional` **gasFeeCap**: `string` #### gasLimit? [Section titled “gasLimit?”](#gaslimit) > `optional` **gasLimit**: `number` #### gasPremium? [Section titled “gasPremium?”](#gaspremium) > `optional` **gasPremium**: `string` #### method? [Section titled “method?”](#method) > `optional` **method**: `number` #### nonce? [Section titled “nonce?”](#nonce) > `optional` **nonce**: `number` #### params? [Section titled “params?”](#params) > `optional` **params**: `string` Params encoded as base64pad #### to [Section titled “to”](#to) > **to**: `string` #### value [Section titled “value”](#value) > **value**: `string` Value in attoFIL #### version? [Section titled “version?”](#version) > `optional` **version**: `0` #### See [Section titled “See”](#see) # IAccount Defined in: [packages/iso-filecoin/src/types.ts:57](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L57) Account interface ## Properties [Section titled “Properties”](#properties) ### address [Section titled “address”](#address) > **address**: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) Defined in: [packages/iso-filecoin/src/types.ts:59](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L59) *** ### path? [Section titled “path?”](#path) > `optional` **path**: `string` Defined in: [packages/iso-filecoin/src/types.ts:64](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L64) Derivation path - only for HD wallets *** ### privateKey? [Section titled “privateKey?”](#privatekey) > `optional` **privateKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/types.ts:68](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L68) Private key - only for RAW and HD wallets *** ### publicKey [Section titled “publicKey”](#publickey) > **publicKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) Defined in: [packages/iso-filecoin/src/types.ts:60](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L60) *** ### type [Section titled “type”](#type) > **type**: `"SECP256K1"` | `"BLS"` Defined in: [packages/iso-filecoin/src/types.ts:58](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L58) # JsonRpcError Defined in: [packages/iso-filecoin/src/types.ts:203](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L203) JSON-RPC 2.0 ## Properties [Section titled “Properties”](#properties) ### code [Section titled “code”](#code) > **code**: `number` Defined in: [packages/iso-filecoin/src/types.ts:204](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L204) *** ### data? [Section titled “data?”](#data) > `optional` **data**: `JsonValue` Defined in: [packages/iso-filecoin/src/types.ts:206](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L206) *** ### message [Section titled “message”](#message) > **message**: `string` Defined in: [packages/iso-filecoin/src/types.ts:205](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L205) # JsonRpcRequest Defined in: [packages/iso-filecoin/src/types.ts:208](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L208) ## Properties [Section titled “Properties”](#properties) ### id? [Section titled “id?”](#id) > `optional` **id**: `string` | `number` | `null` Defined in: [packages/iso-filecoin/src/types.ts:210](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L210) *** ### jsonrpc [Section titled “jsonrpc”](#jsonrpc) > **jsonrpc**: `"2.0"` Defined in: [packages/iso-filecoin/src/types.ts:209](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L209) *** ### method [Section titled “method”](#method) > **method**: `string` Defined in: [packages/iso-filecoin/src/types.ts:214](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L214) A String containing the name of the method to be invoked. Method names that begin with the word rpc followed by a period character (U+002E or ASCII 46) are reserved for rpc-internal methods and extensions and MUST NOT be used for anything else. *** ### params? [Section titled “params?”](#params) > `optional` **params**: `JsonValue` Defined in: [packages/iso-filecoin/src/types.ts:215](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L215) # LotusMessage Defined in: [packages/iso-filecoin/src/types.ts:318](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L318) Lotus message ## Properties [Section titled “Properties”](#properties) ### CID? [Section titled “CID?”](#cid) > `optional` **CID**: [`CID`](/reference/iso-filecoin/types/type-aliases/cid/) Defined in: [packages/iso-filecoin/src/types.ts:329](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L329) *** ### From [Section titled “From”](#from) > **From**: `string` Defined in: [packages/iso-filecoin/src/types.ts:321](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L321) *** ### GasFeeCap [Section titled “GasFeeCap”](#gasfeecap) > **GasFeeCap**: `string` Defined in: [packages/iso-filecoin/src/types.ts:325](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L325) *** ### GasLimit [Section titled “GasLimit”](#gaslimit) > **GasLimit**: `number` Defined in: [packages/iso-filecoin/src/types.ts:324](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L324) *** ### GasPremium [Section titled “GasPremium”](#gaspremium) > **GasPremium**: `string` Defined in: [packages/iso-filecoin/src/types.ts:326](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L326) *** ### Method [Section titled “Method”](#method) > **Method**: `number` Defined in: [packages/iso-filecoin/src/types.ts:327](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L327) *** ### Nonce [Section titled “Nonce”](#nonce) > **Nonce**: `number` Defined in: [packages/iso-filecoin/src/types.ts:322](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L322) *** ### Params [Section titled “Params”](#params) > **Params**: `string` Defined in: [packages/iso-filecoin/src/types.ts:328](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L328) *** ### To [Section titled “To”](#to) > **To**: `string` Defined in: [packages/iso-filecoin/src/types.ts:320](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L320) *** ### Value [Section titled “Value”](#value) > **Value**: `string` Defined in: [packages/iso-filecoin/src/types.ts:323](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L323) *** ### Version [Section titled “Version”](#version) > **Version**: `0` Defined in: [packages/iso-filecoin/src/types.ts:319](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L319) # MsgLookup Defined in: [packages/iso-filecoin/src/types.ts:253](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L253) ## Properties [Section titled “Properties”](#properties) ### Height [Section titled “Height”](#height) > **Height**: `number` Defined in: [packages/iso-filecoin/src/types.ts:254](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L254) *** ### Message [Section titled “Message”](#message) > **Message**: [`CID`](/reference/iso-filecoin/types/type-aliases/cid/) Defined in: [packages/iso-filecoin/src/types.ts:255](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L255) *** ### Receipt [Section titled “Receipt”](#receipt) > **Receipt**: [`MsgReceipt`](/reference/iso-filecoin/types/interfaces/msgreceipt/) Defined in: [packages/iso-filecoin/src/types.ts:256](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L256) *** ### ReturnDec [Section titled “ReturnDec”](#returndec) > **ReturnDec**: `unknown` Defined in: [packages/iso-filecoin/src/types.ts:257](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L257) *** ### TipSet [Section titled “TipSet”](#tipset) > **TipSet**: [`TipSetKey`](/reference/iso-filecoin/types/type-aliases/tipsetkey/) Defined in: [packages/iso-filecoin/src/types.ts:258](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L258) # MsgReceipt Defined in: [packages/iso-filecoin/src/types.ts:245](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L245) ## Properties [Section titled “Properties”](#properties) ### EventsRoot [Section titled “EventsRoot”](#eventsroot) > **EventsRoot**: [`CID`](/reference/iso-filecoin/types/type-aliases/cid/) | `null` Defined in: [packages/iso-filecoin/src/types.ts:249](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L249) *** ### ExitCode [Section titled “ExitCode”](#exitcode) > **ExitCode**: `number` Defined in: [packages/iso-filecoin/src/types.ts:246](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L246) *** ### GasUsed [Section titled “GasUsed”](#gasused) > **GasUsed**: `number` Defined in: [packages/iso-filecoin/src/types.ts:248](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L248) *** ### Return [Section titled “Return”](#return) > **Return**: `string` | `null` Defined in: [packages/iso-filecoin/src/types.ts:247](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L247) # Options Defined in: [packages/iso-filecoin/src/types.ts:233](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L233) ## Properties [Section titled “Properties”](#properties) ### api [Section titled “api”](#api) > **api**: `string` | [`URL`](https://developer.mozilla.org/docs/Web/API/URL) Defined in: [packages/iso-filecoin/src/types.ts:235](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L235) *** ### fetch()? [Section titled “fetch()?”](#fetch) > `optional` **fetch**: {(`input`, `init?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)>; (`input`, `init?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)>; } Defined in: [packages/iso-filecoin/src/types.ts:237](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L237) #### Call Signature [Section titled “Call Signature”](#call-signature) > (`input`, `init?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)> [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) ##### Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------------ | | `input` | [`URL`](https://developer.mozilla.org/docs/Web/API/URL) \| `RequestInfo` | | `init?` | `RequestInit` | ##### Returns [Section titled “Returns”](#returns) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)> #### Call Signature [Section titled “Call Signature”](#call-signature-1) > (`input`, `init?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)> [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) ##### Parameters [Section titled “Parameters”](#parameters-1) | Parameter | Type | | --------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `input` | `string` \| [`URL`](https://developer.mozilla.org/docs/Web/API/URL) \| [`Request`](https://developer.mozilla.org/docs/Web/API/Request) | | `init?` | `RequestInit` | ##### Returns [Section titled “Returns”](#returns-1) [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)> *** ### network? [Section titled “network?”](#network) > `optional` **network**: [`Network`](/reference/iso-filecoin/types/type-aliases/network/) Defined in: [packages/iso-filecoin/src/types.ts:236](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L236) *** ### token? [Section titled “token?”](#token) > `optional` **token**: `string` Defined in: [packages/iso-filecoin/src/types.ts:234](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L234) # PushMessageParams Defined in: [packages/iso-filecoin/src/types.ts:367](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L367) ## Properties [Section titled “Properties”](#properties) ### msg [Section titled “msg”](#msg) > **msg**: `object` Defined in: [packages/iso-filecoin/src/types.ts:368](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L368) #### from [Section titled “from”](#from) > **from**: `string` #### gasFeeCap [Section titled “gasFeeCap”](#gasfeecap) > **gasFeeCap**: `string` #### gasLimit [Section titled “gasLimit”](#gaslimit) > **gasLimit**: `number` #### gasPremium [Section titled “gasPremium”](#gaspremium) > **gasPremium**: `string` #### method [Section titled “method”](#method) > **method**: `number` #### nonce [Section titled “nonce”](#nonce) > **nonce**: `number` #### params [Section titled “params”](#params) > **params**: `string` Params encoded as base64pad #### to [Section titled “to”](#to) > **to**: `string` #### value [Section titled “value”](#value) > **value**: `string` Value in attoFIL #### version [Section titled “version”](#version) > **version**: `0` *** ### signature [Section titled “signature”](#signature) > **signature**: `object` Defined in: [packages/iso-filecoin/src/types.ts:369](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L369) #### data [Section titled “data”](#data) > **data**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> = `zU8` #### type [Section titled “type”](#type) > **type**: `"SECP256K1"` | `"BLS"` # RpcOptions Defined in: [packages/iso-filecoin/src/types.ts:240](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L240) ## Properties [Section titled “Properties”](#properties) ### method [Section titled “method”](#method) > **method**: `` `Filecoin.${string}` `` Defined in: [packages/iso-filecoin/src/types.ts:241](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L241) *** ### params? [Section titled “params?”](#params) > `optional` **params**: `JsonValue` Defined in: [packages/iso-filecoin/src/types.ts:242](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L242) # StateAccountKeyParams Defined in: [packages/iso-filecoin/src/types.ts:388](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L388) ## Properties [Section titled “Properties”](#properties) ### address [Section titled “address”](#address) > **address**: `string` Defined in: [packages/iso-filecoin/src/types.ts:389](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L389) *** ### tipSetKey? [Section titled “tipSetKey?”](#tipsetkey) > `optional` **tipSetKey**: [`TipSetKey`](/reference/iso-filecoin/types/type-aliases/tipsetkey/) | `null` Defined in: [packages/iso-filecoin/src/types.ts:390](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L390) # TipSet Defined in: [packages/iso-filecoin/src/types.ts:303](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L303) ## Properties [Section titled “Properties”](#properties) ### Blocks [Section titled “Blocks”](#blocks) > **Blocks**: [`Block`](/reference/iso-filecoin/types/interfaces/block/)\[] Defined in: [packages/iso-filecoin/src/types.ts:306](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L306) *** ### Cids [Section titled “Cids”](#cids) > **Cids**: [`CID`](/reference/iso-filecoin/types/type-aliases/cid/)\[] Defined in: [packages/iso-filecoin/src/types.ts:304](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L304) *** ### Height [Section titled “Height”](#height) > **Height**: `number` Defined in: [packages/iso-filecoin/src/types.ts:305](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L305) # waitMsgParams Defined in: [packages/iso-filecoin/src/types.ts:372](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L372) ## Properties [Section titled “Properties”](#properties) ### cid [Section titled “cid”](#cid) > **cid**: [`CID`](/reference/iso-filecoin/types/type-aliases/cid/) Defined in: [packages/iso-filecoin/src/types.ts:373](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L373) *** ### confidence? [Section titled “confidence?”](#confidence) > `optional` **confidence**: `number` Defined in: [packages/iso-filecoin/src/types.ts:379](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L379) Confidence depth to wait for #### Default [Section titled “Default”](#default) ```ts 2 ``` *** ### lookback? [Section titled “lookback?”](#lookback) > `optional` **lookback**: `number` Defined in: [packages/iso-filecoin/src/types.ts:385](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L385) How chain epochs to look back to find the message #### Default [Section titled “Default”](#default-1) ```ts 100 ``` # Index ## Interfaces [Section titled “Interfaces”](#interfaces) | Interface | Description | | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | | [AddressRpcOptions](/reference/iso-filecoin/types/interfaces/addressrpcoptions/) | Options for RPC-based address methods | | [AddressRpcSafetyOptions](/reference/iso-filecoin/types/interfaces/addressrpcsafetyoptions/) | Options for RPC-based address methods with safety | | [Block](/reference/iso-filecoin/types/interfaces/block/) | - | | [Chain](/reference/iso-filecoin/types/interfaces/chain/) | - | | [ChainGetTipSetByHeightParams](/reference/iso-filecoin/types/interfaces/chaingettipsetbyheightparams/) | - | | [DerivationPathComponents](/reference/iso-filecoin/types/interfaces/derivationpathcomponents/) | - | | [FilecoinAddressToEthAddressParams](/reference/iso-filecoin/types/interfaces/filecoinaddresstoethaddressparams/) | - | | [GasEstimateParams](/reference/iso-filecoin/types/interfaces/gasestimateparams/) | - | | [IAccount](/reference/iso-filecoin/types/interfaces/iaccount/) | Account interface | | [JsonRpcError](/reference/iso-filecoin/types/interfaces/jsonrpcerror/) | JSON-RPC 2.0 | | [JsonRpcRequest](/reference/iso-filecoin/types/interfaces/jsonrpcrequest/) | - | | [LotusMessage](/reference/iso-filecoin/types/interfaces/lotusmessage/) | Lotus message | | [MsgLookup](/reference/iso-filecoin/types/interfaces/msglookup/) | - | | [MsgReceipt](/reference/iso-filecoin/types/interfaces/msgreceipt/) | - | | [Options](/reference/iso-filecoin/types/interfaces/options/) | - | | [PushMessageParams](/reference/iso-filecoin/types/interfaces/pushmessageparams/) | - | | [RpcOptions](/reference/iso-filecoin/types/interfaces/rpcoptions/) | - | | [StateAccountKeyParams](/reference/iso-filecoin/types/interfaces/stateaccountkeyparams/) | - | | [TipSet](/reference/iso-filecoin/types/interfaces/tipset/) | - | | [waitMsgParams](/reference/iso-filecoin/types/interfaces/waitmsgparams/) | - | ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | ---------------------------------------------------------------------------------------------------------- | ------------------------------ | | [BlockNumber](/reference/iso-filecoin/types/type-aliases/blocknumber/) | - | | [Cache](/reference/iso-filecoin/types/type-aliases/cache/) | - | | [ChainBlockExplorer](/reference/iso-filecoin/types/type-aliases/chainblockexplorer/) | - | | [ChainContract](/reference/iso-filecoin/types/type-aliases/chaincontract/) | - | | [ChainRpcUrls](/reference/iso-filecoin/types/type-aliases/chainrpcurls/) | - | | [CID](/reference/iso-filecoin/types/type-aliases/cid/) | - | | [EthereumChain](/reference/iso-filecoin/types/type-aliases/ethereumchain/) | Ethereum chain type (Metamask) | | [FormatOptions](/reference/iso-filecoin/types/type-aliases/formatoptions/) | - | | [GasEstimateMessageGasResponse](/reference/iso-filecoin/types/type-aliases/gasestimatemessagegasresponse/) | - | | [HexAddress](/reference/iso-filecoin/types/type-aliases/hexaddress/) | - | | [IAccountWithPath](/reference/iso-filecoin/types/type-aliases/iaccountwithpath/) | - | | [JsonRpcResponse](/reference/iso-filecoin/types/type-aliases/jsonrpcresponse/) | - | | [MaybeResult](/reference/iso-filecoin/types/type-aliases/mayberesult/) | Generic result with error | | [MpoolGetNonceResponse](/reference/iso-filecoin/types/type-aliases/mpoolgetnonceresponse/) | - | | [MpoolPushResponse](/reference/iso-filecoin/types/type-aliases/mpoolpushresponse/) | - | | [Network](/reference/iso-filecoin/types/type-aliases/network/) | - | | [ProtocolIndicator](/reference/iso-filecoin/types/type-aliases/protocolindicator/) | - | | [ProtocolIndicatorCode](/reference/iso-filecoin/types/type-aliases/protocolindicatorcode/) | - | | [Safety](/reference/iso-filecoin/types/type-aliases/safety/) | - | | [StateNetworkNameResponse](/reference/iso-filecoin/types/type-aliases/statenetworknameresponse/) | - | | [TipSetKey](/reference/iso-filecoin/types/type-aliases/tipsetkey/) | - | | [TransportImpl](/reference/iso-filecoin/types/type-aliases/transportimpl/) | - | | [VersionResponse](/reference/iso-filecoin/types/type-aliases/versionresponse/) | - | | [WaitMsgResponse](/reference/iso-filecoin/types/type-aliases/waitmsgresponse/) | - | | [WalletBalanceResponse](/reference/iso-filecoin/types/type-aliases/walletbalanceresponse/) | Wallet balance in attoFIL | ## References [Section titled “References”](#references) ### IAddress [Section titled “IAddress”](#iaddress) Re-exports [IAddress](/reference/iso-filecoin/address/interfaces/iaddress/) *** ### LotusSignature [Section titled “LotusSignature”](#lotussignature) Re-exports [LotusSignature](/reference/iso-filecoin/signature/type-aliases/lotussignature/) *** ### Message [Section titled “Message”](#message) Re-exports [Message](/reference/iso-filecoin/message/classes/message/) *** ### MessageObj [Section titled “MessageObj”](#messageobj) Re-exports [MessageObj](/reference/iso-filecoin/message/type-aliases/messageobj/) *** ### MessageSchema [Section titled “MessageSchema”](#messageschema) Re-exports [MessageSchema](/reference/iso-filecoin/message/variables/messageschema/) *** ### NetworkPrefix [Section titled “NetworkPrefix”](#networkprefix) Re-exports [NetworkPrefix](/reference/iso-filecoin/utils/type-aliases/networkprefix/) *** ### PartialMessageObj [Section titled “PartialMessageObj”](#partialmessageobj) Re-exports [PartialMessageObj](/reference/iso-filecoin/message/type-aliases/partialmessageobj/) *** ### Schemas [Section titled “Schemas”](#schemas) Re-exports [Schemas](/reference/iso-filecoin/message/variables/schemas/) *** ### Signature [Section titled “Signature”](#signature) Re-exports [Signature](/reference/iso-filecoin/signature/classes/signature/) *** ### SignatureCode [Section titled “SignatureCode”](#signaturecode) Re-exports [SignatureCode](/reference/iso-filecoin/signature/type-aliases/signaturecode/) *** ### SignatureObj [Section titled “SignatureObj”](#signatureobj) Re-exports [SignatureObj](/reference/iso-filecoin/signature/type-aliases/signatureobj/) *** ### SignatureType [Section titled “SignatureType”](#signaturetype) Re-exports [SignatureType](/reference/iso-filecoin/signature/type-aliases/signaturetype/) *** ### Transport [Section titled “Transport”](#transport) Re-exports [Transport](/reference/iso-filecoin/ledger/type-aliases/transport/) # BlockNumber > **BlockNumber** = `"0x${string}"` Defined in: [packages/iso-filecoin/src/types.ts:392](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L392) # Cache > **Cache** = `boolean` | `Driver` | `undefined` Defined in: [packages/iso-filecoin/src/types.ts:47](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L47) # ChainBlockExplorer > **ChainBlockExplorer** = `object` Defined in: [packages/iso-filecoin/src/types.ts:134](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L134) ## Properties [Section titled “Properties”](#properties) ### apiUrl? [Section titled “apiUrl?”](#apiurl) > `optional` **apiUrl**: `string` Defined in: [packages/iso-filecoin/src/types.ts:137](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L137) *** ### name [Section titled “name”](#name) > **name**: `string` Defined in: [packages/iso-filecoin/src/types.ts:135](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L135) *** ### url [Section titled “url”](#url) > **url**: `string` Defined in: [packages/iso-filecoin/src/types.ts:136](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L136) # ChainContract > **ChainContract** = `object` Defined in: [packages/iso-filecoin/src/types.ts:140](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L140) ## Properties [Section titled “Properties”](#properties) ### abi? [Section titled “abi?”](#abi) > `optional` **abi**: `Abi` Defined in: [packages/iso-filecoin/src/types.ts:143](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L143) *** ### address [Section titled “address”](#address) > **address**: [`HexAddress`](/reference/iso-filecoin/types/type-aliases/hexaddress/) Defined in: [packages/iso-filecoin/src/types.ts:141](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L141) *** ### blockCreated? [Section titled “blockCreated?”](#blockcreated) > `optional` **blockCreated**: `number` Defined in: [packages/iso-filecoin/src/types.ts:142](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L142) # ChainRpcUrls > **ChainRpcUrls** = `object` Defined in: [packages/iso-filecoin/src/types.ts:130](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L130) ## Properties [Section titled “Properties”](#properties) ### http [Section titled “http”](#http) > **http**: `string`\[] Defined in: [packages/iso-filecoin/src/types.ts:131](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L131) *** ### webSocket? [Section titled “webSocket?”](#websocket) > `optional` **webSocket**: `string`\[] Defined in: [packages/iso-filecoin/src/types.ts:132](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L132) # CID > **CID** = `object` Defined in: [packages/iso-filecoin/src/types.ts:43](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L43) ## Properties [Section titled “Properties”](#properties) ### / > **/**: `string` Defined in: [packages/iso-filecoin/src/types.ts:44](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L44) # EthereumChain > **EthereumChain** = `object` Defined in: [packages/iso-filecoin/src/types.ts:181](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L181) Ethereum chain type (Metamask) ## Properties [Section titled “Properties”](#properties) ### blockExplorerUrls? [Section titled “blockExplorerUrls?”](#blockexplorerurls) > `optional` **blockExplorerUrls**: `string`\[] Defined in: [packages/iso-filecoin/src/types.ts:195](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L195) *** ### chainId [Section titled “chainId”](#chainid) > **chainId**: `string` Defined in: [packages/iso-filecoin/src/types.ts:183](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L183) A 0x-prefixed hexadecimal string *** ### chainName [Section titled “chainName”](#chainname) > **chainName**: `string` Defined in: [packages/iso-filecoin/src/types.ts:185](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L185) The chain name. *** ### iconUrls? [Section titled “iconUrls?”](#iconurls) > `optional` **iconUrls**: `string`\[] Defined in: [packages/iso-filecoin/src/types.ts:196](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L196) *** ### nativeCurrency? [Section titled “nativeCurrency?”](#nativecurrency) > `optional` **nativeCurrency**: `object` Defined in: [packages/iso-filecoin/src/types.ts:187](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L187) Native currency for the chain. #### decimals [Section titled “decimals”](#decimals) > **decimals**: `number` #### name [Section titled “name”](#name) > **name**: `string` #### symbol [Section titled “symbol”](#symbol) > **symbol**: `string` *** ### rpcUrls [Section titled “rpcUrls”](#rpcurls) > **rpcUrls**: `string`\[] Defined in: [packages/iso-filecoin/src/types.ts:194](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L194) # FormatOptions > **FormatOptions** = `BigNumber.Format` & `object` Defined in: [packages/iso-filecoin/src/types.ts:412](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L412) ## Type Declaration [Section titled “Type Declaration”](#type-declaration) ### decimalPlaces? [Section titled “decimalPlaces?”](#decimalplaces) > `optional` **decimalPlaces**: `number` #### Default [Section titled “Default”](#default) ```ts 18 ``` #### See [Section titled “See”](#see) ### roundingMode? [Section titled “roundingMode?”](#roundingmode) > `optional` **roundingMode**: `BigNumber.RoundingMode` #### Default [Section titled “Default”](#default-1) ```ts BigNumber.ROUND_HALF_DOWN ``` #### See [Section titled “See”](#see-1) # GasEstimateMessageGasResponse > **GasEstimateMessageGasResponse** = [`LotusMessage`](/reference/iso-filecoin/types/interfaces/lotusmessage/) Defined in: [packages/iso-filecoin/src/types.ts:339](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L339) # HexAddress > **HexAddress** = `` `0x${string}` `` Defined in: [packages/iso-filecoin/src/types.ts:42](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L42) # IAccountWithPath > **IAccountWithPath** = `SetRequired`<[`IAccount`](/reference/iso-filecoin/types/interfaces/iaccount/), `"path"`> Defined in: [packages/iso-filecoin/src/types.ts:70](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L70) # JsonRpcResponse > **JsonRpcResponse** = { `error?`: `undefined`; `id`: `number` | `string` | `null`; `jsonrpc`: `"2.0"`; `result`: `JsonValue`; } | { `error`: [`JsonRpcError`](/reference/iso-filecoin/types/interfaces/jsonrpcerror/); `id`: `number` | `string` | `null`; `jsonrpc`: `"2.0"`; `result?`: `undefined`; } Defined in: [packages/iso-filecoin/src/types.ts:218](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L218) # MaybeResult > **MaybeResult**<`ResultType`, `ErrorType`> = { `error`: `ErrorType`; `result?`: `undefined`; } | { `error?`: `undefined`; `result`: `ResultType`; } Defined in: node\_modules/.pnpm/iso-web\@2.1.0/node\_modules/iso-web/dist/src/types.d.ts:115 Generic result with error ## Type Parameters [Section titled “Type Parameters”](#type-parameters) | Type Parameter | Default type | | -------------- | ------------------------------------------------------------------------------------------- | | `ResultType` | `unknown` | | `ErrorType` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) | # MpoolGetNonceResponse > **MpoolGetNonceResponse** = `number` Defined in: [packages/iso-filecoin/src/types.ts:338](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L338) # MpoolPushResponse > **MpoolPushResponse** = [`CID`](/reference/iso-filecoin/types/type-aliases/cid/) Defined in: [packages/iso-filecoin/src/types.ts:347](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L347) # Network > **Network** = `"mainnet"` | `"testnet"` Defined in: [packages/iso-filecoin/src/types.ts:127](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L127) # ProtocolIndicator > **ProtocolIndicator** = *typeof* [`PROTOCOL_INDICATOR`](/reference/iso-filecoin/address/variables/protocol_indicator/) Defined in: [packages/iso-filecoin/src/types.ts:39](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L39) # ProtocolIndicatorCode > **ProtocolIndicatorCode** = [`ProtocolIndicator`](/reference/iso-filecoin/types/type-aliases/protocolindicator/)\[keyof [`ProtocolIndicator`](/reference/iso-filecoin/types/type-aliases/protocolindicator/)] Defined in: [packages/iso-filecoin/src/types.ts:40](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L40) # Safety > **Safety** = `"safe"` | `"finalized"` | `"latest"` Defined in: [packages/iso-filecoin/src/types.ts:84](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L84) # StateNetworkNameResponse > **StateNetworkNameResponse** = [`Network`](/reference/iso-filecoin/types/type-aliases/network/) Defined in: [packages/iso-filecoin/src/types.ts:337](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L337) # TipSetKey > **TipSetKey** = [`CID`](/reference/iso-filecoin/types/type-aliases/cid/)\[] Defined in: [packages/iso-filecoin/src/types.ts:252](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L252) # TransportImpl > **TransportImpl** = *typeof* `_LedgerTransport` Defined in: [packages/iso-filecoin/src/types.ts:14](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L14) # VersionResponse > **VersionResponse** = `object` Defined in: [packages/iso-filecoin/src/types.ts:332](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L332) ## Properties [Section titled “Properties”](#properties) ### APIVersion [Section titled “APIVersion”](#apiversion) > **APIVersion**: `number` Defined in: [packages/iso-filecoin/src/types.ts:334](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L334) *** ### BlockDelay [Section titled “BlockDelay”](#blockdelay) > **BlockDelay**: `number` Defined in: [packages/iso-filecoin/src/types.ts:335](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L335) *** ### Version [Section titled “Version”](#version) > **Version**: `string` Defined in: [packages/iso-filecoin/src/types.ts:333](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L333) # WaitMsgResponse > **WaitMsgResponse** = [`MsgLookup`](/reference/iso-filecoin/types/interfaces/msglookup/) Defined in: [packages/iso-filecoin/src/types.ts:348](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L348) # WalletBalanceResponse > **WalletBalanceResponse** = `string` Defined in: [packages/iso-filecoin/src/types.ts:346](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L346) Wallet balance in attoFIL ## Example [Section titled “Example”](#example) ```ts '99999927137190925849' ``` # checkNetworkPrefix > **checkNetworkPrefix**(`prefix`): `prefix is NetworkPrefix` Defined in: [packages/iso-filecoin/src/utils.js:141](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/utils.js#L141) Checks if the prefix is a valid network prefix ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | -------- | | `prefix` | `string` | ## Returns [Section titled “Returns”](#returns) `prefix is NetworkPrefix` ## Example [Section titled “Example”](#example) ```ts import { function checkNetworkPrefix(prefix: string): prefix is NetworkPrefix Checks if the prefix is a valid network prefix @param ― prefix @returns @example import { checkNetworkPrefix } from 'iso-filecoin/utils' checkNetworkPrefix('f') // true checkNetworkPrefix('t') // true checkNetworkPrefix('x') // false checkNetworkPrefix } from 'iso-filecoin/utils' function checkNetworkPrefix(prefix: string): prefix is NetworkPrefix Checks if the prefix is a valid network prefix @param ― prefix @returns @example import { checkNetworkPrefix } from 'iso-filecoin/utils' checkNetworkPrefix('f') // true checkNetworkPrefix('t') // true checkNetworkPrefix('x') // false checkNetworkPrefix('f') // true function checkNetworkPrefix(prefix: string): prefix is NetworkPrefix Checks if the prefix is a valid network prefix @param ― prefix @returns @example import { checkNetworkPrefix } from 'iso-filecoin/utils' checkNetworkPrefix('f') // true checkNetworkPrefix('t') // true checkNetworkPrefix('x') // false checkNetworkPrefix('t') // true function checkNetworkPrefix(prefix: string): prefix is NetworkPrefix Checks if the prefix is a valid network prefix @param ― prefix @returns @example import { checkNetworkPrefix } from 'iso-filecoin/utils' checkNetworkPrefix('f') // true checkNetworkPrefix('t') // true checkNetworkPrefix('x') // false checkNetworkPrefix('x') // false ``` # checksumEthAddress > **checksumEthAddress**(`address`): `string` Defined in: [packages/iso-filecoin/src/utils.js:243](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/utils.js#L243) Checksum ethereum address ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Description | | --------- | -------- | ---------------- | | `address` | `string` | Ethereum address | ## Returns [Section titled “Returns”](#returns) `string` Checksummed ethereum address ## Example [Section titled “Example”](#example) ```ts import { function checksumEthAddress(address: string): string Checksum ethereum address @param ― address - Ethereum address @returns ― Checksummed ethereum address @example import { checksumEthAddress } from 'iso-filecoin/utils' const address = '0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359' const checksummed = checksumEthAddress(address) // => '0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359' checksumEthAddress } from 'iso-filecoin/utils' const const address: "0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359" address = '0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359' const const checksummed: string checksummed = function checksumEthAddress(address: string): string Checksum ethereum address @param ― address - Ethereum address @returns ― Checksummed ethereum address @example import { checksumEthAddress } from 'iso-filecoin/utils' const address = '0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359' const checksummed = checksumEthAddress(address) // => '0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359' checksumEthAddress( const address: "0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359" address) // => '0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359' ``` # getCache > **getCache**(`cache`): `KV` Defined in: [packages/iso-filecoin/src/utils.js:280](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/utils.js#L280) Get cache instance from cache config ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Description | | --------- | ------------------------------------------------------------ | ------------ | | `cache` | [`Cache`](/reference/iso-filecoin/types/type-aliases/cache/) | Cache config | ## Returns [Section titled “Returns”](#returns) `KV` ## Example [Section titled “Example”](#example) ```js import { getCache } from 'iso-filecoin' import { MemoryDriver } from 'iso-kv/drivers/memory.js' // use default memory driver const cache = getCache(true) // use custom driver const customCache = getCache(new MemoryDriver()) ``` # getNetwork > **getNetwork**(`networkPrefix`): [`Network`](/reference/iso-filecoin/types/type-aliases/network/) Defined in: [packages/iso-filecoin/src/utils.js:56](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/utils.js#L56) Get network from prefix ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------------- | ---------------------------------------------------------------------------- | | `networkPrefix` | [`NetworkPrefix`](/reference/iso-filecoin/utils/type-aliases/networkprefix/) | ## Returns [Section titled “Returns”](#returns) [`Network`](/reference/iso-filecoin/types/type-aliases/network/) ## Example [Section titled “Example”](#example) ```ts import { function getNetwork(networkPrefix: NetworkPrefix): import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network Get network from prefix @param ― networkPrefix @returns @example import { getNetwork } from 'iso-filecoin/utils' const network = getNetwork('f') // => 'mainnet' getNetwork } from 'iso-filecoin/utils' const const network: Network network = function getNetwork(networkPrefix: NetworkPrefix): import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network Get network from prefix @param ― networkPrefix @returns @example import { getNetwork } from 'iso-filecoin/utils' const network = getNetwork('f') // => 'mainnet' getNetwork('f') // => 'mainnet' ``` # getNetworkFromChainId > **getNetworkFromChainId**(`chainId`): `"mainnet"` | `"testnet"` Defined in: [packages/iso-filecoin/src/utils.js:85](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/utils.js#L85) Get network from any chain designation ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | -------------------- | | `chainId` | `string` \| `number` | ## Returns [Section titled “Returns”](#returns) `"mainnet"` | `"testnet"` # getNetworkFromPath > **getNetworkFromPath**(`path`): [`Network`](/reference/iso-filecoin/types/type-aliases/network/) Defined in: [packages/iso-filecoin/src/utils.js:72](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/utils.js#L72) Returns the third position from derivation path ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Description | | --------- | -------- | ------------- | | `path` | `string` | path to parse | ## Returns [Section titled “Returns”](#returns) [`Network`](/reference/iso-filecoin/types/type-aliases/network/) ## Example [Section titled “Example”](#example) ```ts import { function getNetworkFromPath(path: string): import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network Returns the third position from derivation path @param ― path - path to parse @returns @example import { getNetworkFromPath } from 'iso-filecoin/utils' const network = getNetworkFromPath("m/44'/461'/0'/0/0") // => 'testnet' getNetworkFromPath } from 'iso-filecoin/utils' const const network: Network network = function getNetworkFromPath(path: string): import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network Returns the third position from derivation path @param ― path - path to parse @returns @example import { getNetworkFromPath } from 'iso-filecoin/utils' const network = getNetworkFromPath("m/44'/461'/0'/0/0") // => 'testnet' getNetworkFromPath("m/44'/461'/0'/0/0") // => 'testnet' ``` # getNetworkPrefix > **getNetworkPrefix**(`network`): `"f"` | `"t"` Defined in: [packages/iso-filecoin/src/utils.js:40](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/utils.js#L40) Get network prefix from network ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | ## Returns [Section titled “Returns”](#returns) `"f"` | `"t"` ## Example [Section titled “Example”](#example) ```ts import { function getNetworkPrefix(network: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network): "f" | "t" Get network prefix from network @param ― network @example import { getNetworkPrefix } from 'iso-filecoin/utils' const prefix = getNetworkPrefix('mainnet') // => 'f' getNetworkPrefix } from 'iso-filecoin/utils' const const prefix: "f" | "t" prefix = function getNetworkPrefix(network: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network): "f" | "t" Get network prefix from network @param ― network @example import { getNetworkPrefix } from 'iso-filecoin/utils' const prefix = getNetworkPrefix('mainnet') // => 'f' getNetworkPrefix('mainnet') // => 'f' ``` # isZodErrorLike > **isZodErrorLike**(`err`): `err is ZodError` Defined in: [packages/iso-filecoin/src/utils.js:326](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/utils.js#L326) Check if an error is a ZodError ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | --------- | | `err` | `unknown` | ## Returns [Section titled “Returns”](#returns) `err is ZodError` # lotusCid > **lotusCid**(`data`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)> Defined in: [packages/iso-filecoin/src/utils.js:310](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/utils.js#L310) Create a Lotus CID from a Uint8Array ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------ | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | ## Returns [Section titled “Returns”](#returns) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)> ## Example [Section titled “Example”](#example) ```js import { lotusCid } from 'iso-filecoin/utils' const data = new Uint8Array([1, 2, 3]) const cid = lotusCid(data) ``` # parseDerivationPath > **parseDerivationPath**(`path`): [`DerivationPathComponents`](/reference/iso-filecoin/types/interfaces/derivationpathcomponents/) Defined in: [packages/iso-filecoin/src/utils.js:167](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/utils.js#L167) Parse a derivation path into its components ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Description | | --------- | -------- | ---------------------------- | | `path` | `string` | The derivation path to parse | ## Returns [Section titled “Returns”](#returns) [`DerivationPathComponents`](/reference/iso-filecoin/types/interfaces/derivationpathcomponents/) An object containing the derivation path components ## See [Section titled “See”](#see) ## Example [Section titled “Example”](#example) ```ts import { function parseDerivationPath(path: string): import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").DerivationPathComponents Parse a derivation path into its components @see ― https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#path-levels @param ― path - The derivation path to parse @returns ― An object containing the derivation path components @example import { parseDerivationPath } from 'iso-filecoin/utils' const components = parseDerivationPath("m/44'/461'/0'/0/0") // { // purpose: 44, // coinType: 461, // account: 0, // change: 0, // addressIndex: 0 // } parseDerivationPath } from 'iso-filecoin/utils' const const components: DerivationPathComponents components = function parseDerivationPath(path: string): import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").DerivationPathComponents Parse a derivation path into its components @see ― https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#path-levels @param ― path - The derivation path to parse @returns ― An object containing the derivation path components @example import { parseDerivationPath } from 'iso-filecoin/utils' const components = parseDerivationPath("m/44'/461'/0'/0/0") // { // purpose: 44, // coinType: 461, // account: 0, // change: 0, // addressIndex: 0 // } parseDerivationPath("m/44'/461'/0'/0/0") // { // purpose: 44, // coinType: 461, // account: 0, // change: 0, // addressIndex: 0 // } ``` # pathFromNetwork > **pathFromNetwork**(`network`, `index?`): `string` Defined in: [packages/iso-filecoin/src/utils.js:114](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/utils.js#L114) Derivation path from chain ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Default value | Description | | --------- | ---------------------------------------------------------------- | ------------- | ------------------------- | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | `undefined` | - | | `index?` | `number` | `0` | Account index (default 0) | ## Returns [Section titled “Returns”](#returns) `string` ## Example [Section titled “Example”](#example) ```ts import { function pathFromNetwork(network: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network, index?: number): string Derivation path from chain @param ― network @param ― index - Account index (default 0) @example import { pathFromNetwork } from 'iso-filecoin/utils' const path = pathFromNetwork('mainnet') // => 'm/44'/461'/0'/0/0' pathFromNetwork } from 'iso-filecoin/utils' const const path: string path = function pathFromNetwork(network: import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network, index?: number): string Derivation path from chain @param ― network @param ― index - Account index (default 0) @example import { pathFromNetwork } from 'iso-filecoin/utils' const path = pathFromNetwork('mainnet') // => 'm/44'/461'/0'/0/0' pathFromNetwork('mainnet') // => 'm/44'/461'/0'/0/0' ``` # Index ## Type Aliases [Section titled “Type Aliases”](#type-aliases) | Type Alias | Description | | -------------------------------------------------------------------------- | ----------- | | [NetworkPrefix](/reference/iso-filecoin/utils/type-aliases/networkprefix/) | - | ## Variables [Section titled “Variables”](#variables) | Variable | Description | | ---------------------------------------------------------------------------------- | --------------------------------------------------------- | | [BIP\_32\_PATH\_REGEX](/reference/iso-filecoin/utils/variables/bip_32_path_regex/) | - | | [NETWORKS](/reference/iso-filecoin/utils/variables/networks/) | Filecoin network prefixes | | [SIGNATURES](/reference/iso-filecoin/utils/variables/signatures/) | Signature types filecoin network has to sign transactions | ## Functions [Section titled “Functions”](#functions) | Function | Description | | --------------------------------------------------------------------------------------- | ----------------------------------------------- | | [checkNetworkPrefix](/reference/iso-filecoin/utils/functions/checknetworkprefix/) | Checks if the prefix is a valid network prefix | | [checksumEthAddress](/reference/iso-filecoin/utils/functions/checksumethaddress/) | Checksum ethereum address | | [getCache](/reference/iso-filecoin/utils/functions/getcache/) | Get cache instance from cache config | | [getNetwork](/reference/iso-filecoin/utils/functions/getnetwork/) | Get network from prefix | | [getNetworkFromChainId](/reference/iso-filecoin/utils/functions/getnetworkfromchainid/) | Get network from any chain designation | | [getNetworkFromPath](/reference/iso-filecoin/utils/functions/getnetworkfrompath/) | Returns the third position from derivation path | | [getNetworkPrefix](/reference/iso-filecoin/utils/functions/getnetworkprefix/) | Get network prefix from network | | [isZodErrorLike](/reference/iso-filecoin/utils/functions/iszoderrorlike/) | Check if an error is a ZodError | | [lotusCid](/reference/iso-filecoin/utils/functions/lotuscid/) | Create a Lotus CID from a Uint8Array | | [parseDerivationPath](/reference/iso-filecoin/utils/functions/parsederivationpath/) | Parse a derivation path into its components | | [pathFromNetwork](/reference/iso-filecoin/utils/functions/pathfromnetwork/) | Derivation path from chain | # NetworkPrefix > **NetworkPrefix** = `"f"` | `"t"` Defined in: [packages/iso-filecoin/src/types.ts:128](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/types.ts#L128) # BIP_32_PATH_REGEX > `const` **BIP\_32\_PATH\_REGEX**: [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp) Defined in: [packages/iso-filecoin/src/utils.js:145](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/utils.js#L145) # NETWORKS > `const` **NETWORKS**: `object` Defined in: [packages/iso-filecoin/src/utils.js:24](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/utils.js#L24) Filecoin network prefixes ## Type Declaration [Section titled “Type Declaration”](#type-declaration) ### mainnet [Section titled “mainnet”](#mainnet) > `readonly` **mainnet**: `"f"` = `'f'` ### testnet [Section titled “testnet”](#testnet) > `readonly` **testnet**: `"t"` = `'t'` # SIGNATURES > `const` **SIGNATURES**: `object` Defined in: [packages/iso-filecoin/src/utils.js:16](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/utils.js#L16) Signature types filecoin network has to sign transactions ## Type Declaration [Section titled “Type Declaration”](#type-declaration) ### BLS [Section titled “BLS”](#bls) > `readonly` **BLS**: `3` = `3` ### SECP256K1 [Section titled “SECP256K1”](#secp256k1) > `readonly` **SECP256K1**: `1` = `1` # accountFromLotus > **accountFromLotus**(`lotusHex`, `network`): [`IAccount`](/reference/iso-filecoin/types/interfaces/iaccount/) Defined in: [packages/iso-filecoin/src/wallet.js:138](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L138) Get account from lotus private key export ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Description | | ---------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | | `lotusHex` | `string` | Lotus hex encoded private key .ie `hex({"Type":"bls","PrivateKey":"base64pad(private-key)"})` | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | Network | ## Returns [Section titled “Returns”](#returns) [`IAccount`](/reference/iso-filecoin/types/interfaces/iaccount/) # accountFromMnemonic > **accountFromMnemonic**(`mnemonic`, `type`, `path`, `password?`, `network?`): `object` Defined in: [packages/iso-filecoin/src/wallet.js:67](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L67) Get HD account from mnemonic ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ----------- | ---------------------------------------------------------------- | | `mnemonic` | `string` | | `type` | `"SECP256K1"` \| `"BLS"` | | `path` | `string` | | `password?` | `string` | | `network?` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | ## Returns [Section titled “Returns”](#returns) ### address [Section titled “address”](#address) > **address**: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) ### path [Section titled “path”](#path) > **path**: `string` Derivation path - only for HD wallets ### privateKey [Section titled “privateKey”](#privatekey) > **privateKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) Private key - only for RAW and HD wallets ### publicKey [Section titled “publicKey”](#publickey) > **publicKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) ### type [Section titled “type”](#type) > **type**: `"SECP256K1"` | `"BLS"` # accountFromPrivateKey > **accountFromPrivateKey**(`privateKey`, `type`, `network`, `path?`): `object` Defined in: [packages/iso-filecoin/src/wallet.js:115](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L115) Get account from private key Lotus BLS private key is little endian so you need to reverse the byte order. Use `lotusBlsPrivateKeyToBytes` to convert. ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ------------ | ------------------------------------------------------------------------------------------------------------------------ | | `privateKey` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `type` | `"SECP256K1"` \| `"BLS"` | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | | `path?` | `string` | ## Returns [Section titled “Returns”](#returns) ### address [Section titled “address”](#address) > **address**: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) ### path? [Section titled “path?”](#path) > `optional` **path**: `string` Derivation path - only for HD wallets ### privateKey [Section titled “privateKey”](#privatekey) > **privateKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) Private key - only for RAW and HD wallets ### publicKey [Section titled “publicKey”](#publickey) > **publicKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) ### type [Section titled “type”](#type) > **type**: `"SECP256K1"` | `"BLS"` # accountFromSeed > **accountFromSeed**(`seed`, `type`, `path`, `network?`): `object` Defined in: [packages/iso-filecoin/src/wallet.js:81](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L81) Get HD account from seed ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ---------- | ------------------------------------------------------------------------------------------------------------------------ | | `seed` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `type` | `"SECP256K1"` \| `"BLS"` | | `path` | `string` | | `network?` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | ## Returns [Section titled “Returns”](#returns) ### address [Section titled “address”](#address) > **address**: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) ### path [Section titled “path”](#path) > **path**: `string` Derivation path - only for HD wallets ### privateKey [Section titled “privateKey”](#privatekey) > **privateKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) Private key - only for RAW and HD wallets ### publicKey [Section titled “publicKey”](#publickey) > **publicKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) ### type [Section titled “type”](#type) > **type**: `"SECP256K1"` | `"BLS"` # accountToLotus > **accountToLotus**(`account`): `string` Defined in: [packages/iso-filecoin/src/wallet.js:381](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L381) Export account to lotus private key export format (hex) ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `account` | [`IAccount`](/reference/iso-filecoin/types/interfaces/iaccount/) | ## Returns [Section titled “Returns”](#returns) `string` # create > **create**(`type`, `network`): `object` Defined in: [packages/iso-filecoin/src/wallet.js:163](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L163) Create account ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `type` | `"SECP256K1"` \| `"BLS"` | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | ## Returns [Section titled “Returns”](#returns) ### address [Section titled “address”](#address) > **address**: [`IAddress`](/reference/iso-filecoin/address/interfaces/iaddress/) ### path? [Section titled “path?”](#path) > `optional` **path**: `string` Derivation path - only for HD wallets ### privateKey [Section titled “privateKey”](#privatekey) > **privateKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) Private key - only for RAW and HD wallets ### publicKey [Section titled “publicKey”](#publickey) > **publicKey**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) ### type [Section titled “type”](#type) > **type**: `"SECP256K1"` | `"BLS"` # generateMnemonic > **generateMnemonic**(): `string` Defined in: [packages/iso-filecoin/src/wallet.js:44](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L44) Generate mnemonic ## Returns [Section titled “Returns”](#returns) `string` # getPublicKey > **getPublicKey**(`privateKey`, `network`, `type`): [`IAccount`](/reference/iso-filecoin/types/interfaces/iaccount/) Defined in: [packages/iso-filecoin/src/wallet.js:188](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L188) Get public key from private key ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ------------ | ------------------------------------------------------------------------------------------------------------------------ | | `privateKey` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | | `type` | `"SECP256K1"` \| `"BLS"` | ## Returns [Section titled “Returns”](#returns) [`IAccount`](/reference/iso-filecoin/types/interfaces/iaccount/) # lotusBlsPrivateKeyToBytes > **lotusBlsPrivateKeyToBytes**(`priv`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/wallet.js:342](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L342) Lotus BLS base64 private key to bytes Lotus BLS private key is little endian so you need to reverse the byte order. ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | --------- | -------- | | `priv` | `string` | ## Returns [Section titled “Returns”](#returns) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> # mnemonicToSeed > **mnemonicToSeed**(`mnemonic`, `password?`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/wallet.js:54](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L54) Get seed from mnemonic ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ----------- | -------- | | `mnemonic` | `string` | | `password?` | `string` | ## Returns [Section titled “Returns”](#returns) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> # personalSign > **personalSign**(`privateKey`, `type`, `data`): [`Signature`](/reference/iso-filecoin/signature/classes/signature/) Defined in: [packages/iso-filecoin/src/wallet.js:283](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L283) Personal sign using FRC-102 ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ------------ | ------------------------------------------------------------------------------------------------------------------------ | | `privateKey` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `type` | `"SECP256K1"` \| `"BLS"` | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | ## Returns [Section titled “Returns”](#returns) [`Signature`](/reference/iso-filecoin/signature/classes/signature/) ## See [Section titled “See”](#see) # personalVerify > **personalVerify**(`signature`, `data`, `publicKey`): `boolean` Defined in: [packages/iso-filecoin/src/wallet.js:297](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L297) Personal verify using FRC-102 ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ----------- | ------------------------------------------------------------------------------------------------------------------------ | | `signature` | [`Signature`](/reference/iso-filecoin/signature/classes/signature/) | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `publicKey` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | ## Returns [Section titled “Returns”](#returns) `boolean` ## See [Section titled “See”](#see) # recoverAddress > **recoverAddress**(`signature`, `data`, `network`): [`AddressSecp256k1`](/reference/iso-filecoin/address/classes/addresssecp256k1/) | [`AddressBLS`](/reference/iso-filecoin/address/classes/addressbls/) Defined in: [packages/iso-filecoin/src/wallet.js:371](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L371) ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ----------- | ------------------------------------------------------------------------------------------------------------------------ | | `signature` | [`Signature`](/reference/iso-filecoin/signature/classes/signature/) | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `network` | [`Network`](/reference/iso-filecoin/types/type-aliases/network/) | ## Returns [Section titled “Returns”](#returns) [`AddressSecp256k1`](/reference/iso-filecoin/address/classes/addresssecp256k1/) | [`AddressBLS`](/reference/iso-filecoin/address/classes/addressbls/) # recoverPublicKey > **recoverPublicKey**(`signature`, `data`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> Defined in: [packages/iso-filecoin/src/wallet.js:351](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L351) ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ----------- | ------------------------------------------------------------------------------------------------------------------------ | | `signature` | [`Signature`](/reference/iso-filecoin/signature/classes/signature/) | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | ## Returns [Section titled “Returns”](#returns) [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> # sign > **sign**(`privateKey`, `type`, `data`): [`Signature`](/reference/iso-filecoin/signature/classes/signature/) Defined in: [packages/iso-filecoin/src/wallet.js:241](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L241) Sign arbitary bytes similar to `lotus wallet sign` Lotus BLS private key is little endian so you need to reverse the byte order. Use `lotusBlsPrivateKeyToBytes` to convert. ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ------------ | ------------------------------------------------------------------------------------------------------------------------ | | `privateKey` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `type` | `"SECP256K1"` \| `"BLS"` | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | ## Returns [Section titled “Returns”](#returns) [`Signature`](/reference/iso-filecoin/signature/classes/signature/) # signMessage > **signMessage**(`privateKey`, `type`, `message`): [`Signature`](/reference/iso-filecoin/signature/classes/signature/) Defined in: [packages/iso-filecoin/src/wallet.js:226](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L226) Sign filecoin message ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | Description | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | | `privateKey` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | - | | `type` | `"SECP256K1"` \| `"BLS"` | - | | `message` | { `from`: `string`; `gasFeeCap`: `string`; `gasLimit`: `number`; `gasPremium`: `string`; `method`: `number`; `nonce`: `number`; `params`: `string`; `to`: `string`; `value`: `string`; `version`: `0`; } | - | | `message.from` | `string` | - | | `message.gasFeeCap` | `string` | - | | `message.gasLimit` | `number` | - | | `message.gasPremium` | `string` | - | | `message.method` | `number` | - | | `message.nonce` | `number` | - | | `message.params` | `string` | Params encoded as base64pad | | `message.to` | `string` | - | | `message.value` | `string` | Value in attoFIL | | `message.version` | `0` | - | ## Returns [Section titled “Returns”](#returns) [`Signature`](/reference/iso-filecoin/signature/classes/signature/) # verify > **verify**(`signature`, `data`, `publicKey`): `boolean` Defined in: [packages/iso-filecoin/src/wallet.js:309](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L309) Verify signatures ## Parameters [Section titled “Parameters”](#parameters) | Parameter | Type | | ----------- | ------------------------------------------------------------------------------------------------------------------------ | | `signature` | [`Signature`](/reference/iso-filecoin/signature/classes/signature/) | | `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | | `publicKey` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)<`ArrayBufferLike`> | ## Returns [Section titled “Returns”](#returns) `boolean` # Index ## Variables [Section titled “Variables”](#variables) | Variable | Description | | ------------------------------------------------------------ | ----------- | | [Schemas](/reference/iso-filecoin/wallet/variables/schemas/) | Schemas | ## Functions [Section titled “Functions”](#functions) | Function | Description | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- | | [accountFromLotus](/reference/iso-filecoin/wallet/functions/accountfromlotus/) | Get account from lotus private key export | | [accountFromMnemonic](/reference/iso-filecoin/wallet/functions/accountfrommnemonic/) | Get HD account from mnemonic | | [accountFromPrivateKey](/reference/iso-filecoin/wallet/functions/accountfromprivatekey/) | Get account from private key | | [accountFromSeed](/reference/iso-filecoin/wallet/functions/accountfromseed/) | Get HD account from seed | | [accountToLotus](/reference/iso-filecoin/wallet/functions/accounttolotus/) | Export account to lotus private key export format (hex) | | [create](/reference/iso-filecoin/wallet/functions/create/) | Create account | | [generateMnemonic](/reference/iso-filecoin/wallet/functions/generatemnemonic/) | Generate mnemonic | | [getPublicKey](/reference/iso-filecoin/wallet/functions/getpublickey/) | Get public key from private key | | [lotusBlsPrivateKeyToBytes](/reference/iso-filecoin/wallet/functions/lotusblsprivatekeytobytes/) | Lotus BLS base64 private key to bytes Lotus BLS private key is little endian so you need to reverse the byte order. | | [mnemonicToSeed](/reference/iso-filecoin/wallet/functions/mnemonictoseed/) | Get seed from mnemonic | | [personalSign](/reference/iso-filecoin/wallet/functions/personalsign/) | Personal sign using FRC-102 | | [personalVerify](/reference/iso-filecoin/wallet/functions/personalverify/) | Personal verify using FRC-102 | | [recoverAddress](/reference/iso-filecoin/wallet/functions/recoveraddress/) | - | | [recoverPublicKey](/reference/iso-filecoin/wallet/functions/recoverpublickey/) | - | | [sign](/reference/iso-filecoin/wallet/functions/sign/) | Sign arbitary bytes similar to `lotus wallet sign` | | [signMessage](/reference/iso-filecoin/wallet/functions/signmessage/) | Sign filecoin message | | [verify](/reference/iso-filecoin/wallet/functions/verify/) | Verify signatures | # Schemas > `const` **Schemas**: `object` Defined in: [packages/iso-filecoin/src/wallet.js:30](https://github.com/hugomrdias/filecoin/blob/af0b0fcf03ae42ecbead534eee5e29ba21f7b925/packages/iso-filecoin/src/wallet.js#L30) Schemas ## Type Declaration [Section titled “Type Declaration”](#type-declaration) ### lotusPrivateKey [Section titled “lotusPrivateKey”](#lotusprivatekey) > **lotusPrivateKey**: `ZodObject`<{ `PrivateKey`: `ZodString`; `Type`: `ZodUnion`\, `ZodLiteral`<`"secp256k1"`>]>; }, `$strip`> # Index ## Packages [Section titled “Packages”](#packages) | Package | Description | | --------------------------------------------------------------- | ------------------------------------------------------------------------------- | | [iso-filecoin](/reference/iso-filecoin/readme/) | Isomorphic filecoin abstractions for RPC, signatures, address, token and wallet | | [iso-filecoin-react](/reference/iso-filecoin-react/readme/) | Context and hooks for Filecoin wallets. | | [iso-filecoin-wallets](/reference/iso-filecoin-wallets/readme/) | Filecoin Wallet Adapters. |