PageSourceSearch

https://firodocs.pages.dev/assets/js/463c0acc.1fb77b68.js

js firodocs.pages.dev collected 2026-10-03 05:13:24 UTC 25,476 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmy_docs=self.webpackChunkmy_docs||[]).push([["2641"],{3771(e,n,s){s.r(n),s.d(n,{metadata:()=>t,default:()=>h,frontMatter:()=>c,contentTitle:()=>d,toc:()=>l,assets:()=>r});var t=JSON.parse('{"id":"wallet","title":"Wallet","description":"These methods interact with the wallet built into your Firo node. They let you check balances, look up transactions, generate addresses, and send FIRO to other addresses.","source":"@site/docs/wallet.mdx","sourceDirName":".","slug":"/wallet","permalink":"/docs/wallet","draft":false,"unlisted":false,"editUrl":"https://github.com/firoorg/docs/wallet.mdx","tags":[],"version":"current","sidebarPosition":4,"frontMatter":{"sidebar_position":4,"title":"Wallet"},"sidebar":"tutorialSidebar","previous":{"title":"Network","permalink":"/docs/network"},"next":{"title":"Spark (Privacy)","permalink":"/docs/spark"}}'),a=s(4848),i=s(8453);let c={sidebar_position:4,title:"Wallet"},d="Wallet",r={},l=[{value:"Balances",id:"balances",level:2},{value:"<code>getWalletInfo()</code>",id:"getwalletinfo",level:3},{value:"<code>getBalance(minconf?)</code>",id:"getbalanceminconf",level:3},{value:"<code>getUnconfirmedBalance()</code>",id:"getunconfirmedbalance",level:3},{value:"<code>getReceivedByAddress(address, minconf?)</code>",id:"getreceivedbyaddressaddress-minconf",level:3},{value:"Addresses",id:"addresses",level:2},{value:"<code>getNewAddress(label?)</code>",id:"getnewaddresslabel",level:3},{value:"<code>validateAddress(address)</code>",id:"validateaddressaddress",level:3},{value:"<code>importAddress(address, label?, rescan?, p2sh?)</code>",id:"importaddressaddress-label-rescan-p2sh",level:3},{value:"Transactions",id:"transactions",level:2},{value:"<code>getTransaction(txid)</code>",id:"gettransactiontxid",level:3},{value:"<code>listTransactions(label?, count?, skip?)</code>",id:"listtransactionslabel-count-skip",level:3},{value:"<code>listSinceBlock(blockhash?, targetConfirmations?, includeWatchOnly?)</code>",id:"listsinceblockblockhash-targetconfirmations-includewatchonly",level:3},{value:"<code>listUnspent(minconf?, maxconf?, addresses?, includeUnsafe?)</code>",id:"listunspentminconf-maxconf-addresses-includeunsafe",level:3},{value:"<code>getRawChangeAddress()</code>",id:"getrawchangeaddress",level:3},{value:"<code>listAddressBalances(minAmount?)</code>",id:"listaddressbalancesminamount",level:3},{value:"<code>listAddressGroupings()</code>",id:"listaddressgroupings",level:3},{value:"<code>listReceivedByAddress(minconf?, includeEmpty?, includeWatchOnly?)</code>",id:"listreceivedbyaddressminconf-includeempty-includewatchonly",level:3},{value:"<code>listLockUnspent()</code>",id:"listlockunspent",level:3},{value:"<code>lockUnspent(unlock, transactions?)</code>",id:"lockunspentunlock-transactions",level:3},{value:"Keys &amp; Signing",id:"keys--signing",level:2},{value:"<code>signMessage(address, message)</code>",id:"signmessageaddress-message",level:3},{value:"<code>signMessageWithSparkAddress(sparkAddress, message)</code>",id:"signmessagewithsparkaddresssparkaddress-message",level:3},{value:"<code>dumpPrivKey(address, code?)</code>",id:"dumpprivkeyaddress-code",level:3},{value:"<code>importPrivKey(privKey, label?, rescan?)</code>",id:"importprivkeyprivkey-label-rescan",level:3},{value:"<code>importPubKey(pubKey, label?, rescan?)</code>",id:"importpubkeypubkey-label-rescan",level:3},{value:"<code>importMulti(requests, options?)</code>",id:"importmultirequests-options",level:3},{value:"Sending",id:"sending",level:2},{value:"<code>sendToAddress(address, amount, comment?, commentTo?, subtractFeeFromAmount?)</code>",id:"sendtoaddressaddress-amount-comment-commentto-subtractfeefromamount",level:3},{value:"<code>sendTransparent(address, amount, comment?, commentTo?, subtractFeeFromAmount?)</code>",id:"sendtransparentaddress-amount-comment-commentto-subtractfeefromamount",level:3},{value:"<code>sendTransparentMany(recipients)</code>",id:"sendtransparentmanyrecipients",level:3},{value:"<code>sendMany(recipients, minconf?, comment?, subtractFeeFrom?)</code>",id:"sendmanyrecipients-minconf-comment-subtractfeefrom",level:3},{value:"<code>sendSparkMany(recipients, comment?, subtractFeeFrom?)</code>
1",id:"sendsparkmanyrecipients-comment-subtractfeefrom",level:3},{value:"<code>spendSpark(recipients)</code>",id:"spendsparkrecipients",level:3},{value:"<code>bumpFee(txid, options?)</code>",id:"bumpfeetxid-options",level:3},{value:"<code>abandonTransaction(txid)</code>",id:"abandontransactiontxid",level:3},{value:"Fee Configuration",id:"fee-configuration",level:2},{value:"<code>setTxFee(amount)</code>",id:"settxfeeamount",level:3},{value:"<code>setMinInput(amount)</code>",id:"setmininputamount",level:3}];function o(e){let n={admonition:"admonition",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",mermaid:"mermaid",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"wallet",children:"Wallet"})}),"\n",(0,a.jsx)(n.p,{children:"These methods interact with the wallet built into your Firo node. They let you check balances, look up transactions, generate addresses, and send FIRO to other addresses."}),"\n",(0,a.jsx)(n.p,{children:"Use them when you want to:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Check how much FIRO is in your node's wallet"}),"\n",(0,a.jsx)(n.li,{children:"List past transactions"}),"\n",(0,a.jsx)(n.li,{children:"Generate a new address for receiving funds"}),"\n",(0,a.jsx)(n.li,{children:"Send FIRO to someone else"}),"\n",(0,a.jsx)(n.li,{children:"Watch an external address without controlling its private key"}),"\n"]}),"\n",(0,a.jsx)(n.mermaid,{value:"sequenceDiagram\n    participant App\n    participant Client\n    participant Node\n\n    App->>Client: getBalance()\n    Client->>Node: getbalance\n    Node--\x3e>Client: balance (number)\n    Client--\x3e>App: FIRO amount\n\n    App->>Client: sendToAddress(addr, amount)\n    Client->>Node: sendtoaddress\n    Node--\x3e>Client: txid\n    Client--\x3e>App: transaction ID"}),"\n",(0,a.jsx)(n.h2,{id:"balances",children:"Balances"}),"\n",(0,a.jsx)(n.h3,{id:"getwalletinfo",children:(0,a.jsx)(n.code,{children:"getWalletInfo()"})}),"\n",(0,a.jsx)(n.p,{children:"Returns a summary of your wallet's state: balance, number of transactions, key pool size, and whether the wallet is locked."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const info = await client.getWalletInfo();\n\nconsole.log(`Balance: ${info.balance} FIRO`);\nconsole.log(`Unconfirmed: ${info.unconfirmed_balance} FIRO`);\nconsole.log(`Tx count: ${info.txcount}`);\n"})}),"\n",(0,a.jsx)(n.h3,{id:"getbalanceminconf",children:(0,a.jsx)(n.code,{children:"getBalance(minconf?)"})}),"\n",(0,a.jsxs)(n.p,{children:["Returns your wallet's confirmed balance. The optional ",(0,a.jsx)(n.code,{children:"minconf"})," parameter sets the minimum number of confirmations required (default: 1)."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const balance = await client.getBalance();\n// Only count funds with 6+ confirmations\nconst safeBalance = await client.getBalance(6);\n"})}),"\n",(0,a.jsx)(n.h3,{id:"getunconfirmedbalance",children:(0,a.jsx)(n.code,{children:"getUnconfirmedBalance()"})}),"\n",(0,a.jsx)(n.p,{children:"Returns the total value of incoming transactions that haven't been confirmed in a block yet."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const pending = await client.getUnconfirmedBalance();\nconsole.log(`Pending: ${pending} FIRO`);\n"})}),"\n",(0,a.jsx)(n.h3,{id:"getreceivedbyaddressaddress-minconf",children:(0,a.jsx)(n.code,{children:"getReceivedByAddress(address, minconf?)"})}),"\n",(0,a.jsxs)(n.p,{children:["Returns the total amount received by a specific address, counting only transactions with at least ",(0,a.jsx)(n.code,{children:"minconf"})," confirmations."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const received = await client.getReceivedByAddress('a1B2c3...', 1);\n"})}),"\n",(0,a.jsx)(n.h2,{id:"addresses",children:"Addresses"}),"\n",(0,a.jsx)(n.h3,{id:"getnewaddresslabel",children:(0,a.jsx)(n.code,{children:"getNewAddress(label?)"})}),"\n",(0,a.jsx)(n.p,{children:"Generates a new Firo address from your wallet. You can optionally attach a label to help you remember what it's for."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const address = await client.getNewAddress();\nconst labeledAddress = await client.getNewAddress('donations');\n"})}),"\n",(0,a.jsx)(n.h3,{id:"validateaddressaddress",children:(0,a.jsx)(n.code,{children:"val
1idateAddress(address)"})}),"\n",(0,a.jsx)(n.p,{children:"Checks whether an address is valid and, if it belongs to your wallet, returns extra details about it."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const result = await client.validateAddress('a1B2c3...');\n\nif (!result.isvalid) {\n  console.log('Invalid address!');\n} else {\n  console.log(`Belongs to my wallet: ${result.ismine}`);\n}\n"})}),"\n",(0,a.jsx)(n.h3,{id:"importaddressaddress-label-rescan-p2sh",children:(0,a.jsx)(n.code,{children:"importAddress(address, label?, rescan?, p2sh?)"})}),"\n",(0,a.jsx)(n.p,{children:"Adds an external address to your wallet as a watch-only address. Your node will track its balance and transactions but cannot spend from it."}),"\n",(0,a.jsxs)(n.blockquote,{children:["\n",(0,a.jsxs)(n.p,{children:["Note: setting ",(0,a.jsx)(n.code,{children:"rescan: true"})," (the default) causes the node to re-scan the entire blockchain, which can take a long time."]}),"\n"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"await client.importAddress('a1B2c3...', 'partner-wallet', false);\n"})}),"\n",(0,a.jsx)(n.h2,{id:"transactions",children:"Transactions"}),"\n",(0,a.jsx)(n.h3,{id:"gettransactiontxid",children:(0,a.jsx)(n.code,{children:"getTransaction(txid)"})}),"\n",(0,a.jsxs)(n.p,{children:["Fetches a transaction from your wallet's history. This works even without ",(0,a.jsx)(n.code,{children:"txindex"})," because it only looks in your wallet."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const tx = await client.getTransaction(txid);\n\nconsole.log(`Amount: ${tx.amount} FIRO`);\nconsole.log(`Confirmations: ${tx.confirmations}`);\nconsole.log(`Fee: ${tx.fee} FIRO`);\n"})}),"\n",(0,a.jsx)(n.h3,{id:"listtransactionslabel-count-skip",children:(0,a.jsx)(n.code,{children:"listTransactions(label?, count?, skip?)"})}),"\n",(0,a.jsx)(n.p,{children:"Lists recent wallet transactions. You can filter by label, limit how many results come back, and skip past older ones for pagination."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"// Last 10 transactions\nconst txs = await client.listTransactions();\n\n// Page 2: skip the first 10, get the next 10\nconst page2 = await client.listTransactions('*', 10, 10);\n\nfor (const tx of txs) {\n  console.log(`${tx.category}: ${tx.amount} FIRO (${tx.confirmations} confs)`);\n}\n"})}),"\n",(0,a.jsx)(n.h3,{id:"listsinceblockblockhash-targetconfirmations-includewatchonly",children:(0,a.jsx)(n.code,{children:"listSinceBlock(blockhash?, targetConfirmations?, includeWatchOnly?)"})}),"\n",(0,a.jsxs)(n.p,{children:["Returns all wallet transactions that occurred after a specific block. Useful for polling \u2014 store the ",(0,a.jsx)(n.code,{children:"lastblock"})," from each response and pass it back next time to get only new transactions."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"// All transactions since genesis\nconst result = await client.listSinceBlock();\n\n// All transactions since a known block\nconst result2 = await client.listSinceBlock(lastKnownBlockHash);\n\nconsole.log(`New transactions: ${result2.transactions.length}`);\nconsole.log(`Next checkpoint: ${result2.lastblock}`);\n"})}),"\n",(0,a.jsx)(n.h3,{id:"listunspentminconf-maxconf-addresses-includeunsafe",children:(0,a.jsx)(n.code,{children:"listUnspent(minconf?, maxconf?, addresses?, includeUnsafe?)"})}),"\n",(0,a.jsx)(n.p,{children:'Lists unspent transaction outputs (UTXOs) in your wallet. These are the "coins" you can spend.'}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const utxos = await client.listUnspent();\nconst total = utxos.reduce((sum, u) => sum + u.amount, 0);\n\nconsole.log(`${utxos.length} UTXOs totaling ${total} FIRO`);\n"})}),"\n",(0,a.jsx)(n.h3,{id:"getrawchangeaddress",children:(0,a.jsx)(n.code,{children:"getRawChangeAddress()"})}),"\n",(0,a.jsx)(n.p,{children:"Generates a new change address from your wallet. Typically used when constructing raw transactions manually."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const changeAddr = await client.getRawChangeAddress();\n"})}),"\n",(0,a.jsx)(n.h3,{id:"listaddressbalancesminamount",children:(0,a.jsx)(n.code,{children:"listAddressBalances(minAmount?)"})}),"\n",(0,a.jsxs)(n.p,{children:["Returns a map of ",(0,a.jsx)(n.code,{children:"address \u2192 balance"})," for all wallet addresses with a balance above ",(0,a.jsx)(n.code,{children:"minAmount"})," (default 0)."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const balances = await client.listAddressBalances();\nfor (const [address, balance] of Object.entries(balances)) {\n  console.log(`${address}: ${balance} FIRO`);\n}\n"})}),"\n",(0,a.jsx)(n.h3,{id:"listaddressgroupings",children:(0,a.jsx)(n.code,{children:"listAddressGroupings()"})}),"\n",(0,a.jsxs)(n.p,{children:["Returns groups of addresses that share a common wallet history \u2014 addresses that have been inputs in the same transaction are grouped together. Each entry is ",(0,a.jsx)(n.code,{children:"[address, balance, label?]"}),"."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const groupings = await client.listAddressGroupings();\nfor (const group of groupings) {\n  for (const [address, balance] of group) {\n    console.log(`${address}: ${balance} FIRO`);\n  }\n}\n"})}),"\n",(0,a.jsx)(n.h3,{id:"listreceivedbyaddressminconf-includeempty-includewatchonly",children:(0,a.jsx)(n.code,{children:"listReceivedByAddress(minconf?, includeEmpty?, includeWatchOnly?)"})}),"\n",(0,a.jsx)(n.p,{children:"Lists all addresses that have received funds, with their totals and associated txids."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const entries = await client.listReceivedByAddress(1, false);
1\nfor (const entry of entries) {\n  console.log(`${entry.address}: ${entry.amount} FIRO (${entry.txids?.length} txs)`);\n}\n"})}),"\n",(0,a.jsx)(n.h3,{id:"listlockunspent",children:(0,a.jsx)(n.code,{children:"listLockUnspent()"})}),"\n",(0,a.jsx)(n.p,{children:"Returns the list of temporarily locked (unspendable) UTXOs in your wallet."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const locked = await client.listLockUnspent();\nfor (const utxo of locked) {\n  console.log(`Locked: ${utxo.txid}:${utxo.vout}`);\n}\n"})}),"\n",(0,a.jsx)(n.h3,{id:"lockunspentunlock-transactions",children:(0,a.jsx)(n.code,{children:"lockUnspent(unlock, transactions?)"})}),"\n",(0,a.jsxs)(n.p,{children:["Locks or unlocks specific UTXOs to prevent them from being spent automatically. Pass ",(0,a.jsx)(n.code,{children:"unlock: false"})," to lock, ",(0,a.jsx)(n.code,{children:"true"})," to unlock."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"// Lock a UTXO\nawait client.lockUnspent(false, [{ txid, vout: 0 }]);\n\n// Unlock all locked UTXOs\nawait client.lockUnspent(true);\n"})}),"\n",(0,a.jsx)(n.h2,{id:"keys--signing",children:"Keys & Signing"}),"\n",(0,a.jsx)(n.h3,{id:"signmessageaddress-message",children:(0,a.jsx)(n.code,{children:"signMessage(address, message)"})}),"\n",(0,a.jsx)(n.p,{children:"Signs a message with the private key of a wallet address. Returns a base64-encoded signature."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const signature = await client.signMessage('a1B2c3...', 'hello world');\n"})}),"\n",(0,a.jsx)(n.h3,{id:"signmessagewithsparkaddresssparkaddress-message",children:(0,a.jsx)(n.code,{children:"signMessageWithSparkAddress(sparkAddress, message)"})}),"\n",(0,a.jsx)(n.p,{children:"Signs a message using the key associated with a Spark address in your wallet."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const signature = await client.signMessageWithSparkAddress(mySparkAddress, 'hello');\n"})}),"\n",(0,a.jsx)(n.h3,{id:"dumpprivkeyaddress-code",children:(0,a.jsx)(n.code,{children:"dumpPrivKey(address, code?)"})}),"\n",(0,a.jsx)(n.p,{children:"Exports the private key for a wallet address."}),"\n",(0,a.jsxs)(n.admonition,{type:"caution",children:[(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"dumpprivkey"})," requires a two-step confirmation unique to Firo's daemon. The first call (address only) always errors and returns a one-time confirmation code in the error message. Pass that code as the second argument to complete the export."]}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"// Step 1 \u2014 will throw; extract the code from error.message\ntry {\n  await client.dumpPrivKey('a1B2c3...');\n} catch (e) {\n  const code = extractCodeFromError(e);\n  // Step 2 \u2014 returns the WIF private key\n  const wif = await client.dumpPrivKey('a1B2c3...', code);\n}\n"})})]}),"\n",(0,a.jsx)(n.h3,{id:"importprivkeyprivkey-label-rescan",children:(0,a.jsx)(n.code,{children:"importPrivKey(privKey, label?, rescan?)"})}),"\n",(0,a.jsxs)(n.p,{children:["Imports a WIF private key into the wallet. Set ",(0,a.jsx)(n.code,{children:"rescan: false"})," to skip the blockchain rescan (faster but balance won't update until the next rescan)."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"await client.importPrivKey(wifKey, 'imported', false);\n"})}),"\n",(0,a.jsx)(n.h3,{id:"importpubkeypubkey-label-rescan",children:(0,a.jsx)(n.code,{children:"importPubKey(pubKey, label?, rescan?)"})}),"\n",(0,a.jsx)(n.p,{children:"Imports a public key as a watch-only entry. The wallet tracks transactions for the derived address without being able to spend."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"await client.importPubKey(hexPubKey, 'watch-only', false);\n"})}),"\n",(0,a.jsx)(n.h3,{id:"importmultirequests-options",children:(0,a.jsx)(n.code,{children:"importMulti(requests, options?)"})}),"\n",(0,a.jsxs)(n.p,{children:["Batch-imports a list of scripts, addresses, or keys with flexible options. Set ",(0,a.jsx)(n.code,{children:"options.rescan: false"})," to skip the rescan."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const results = await client.importMulti(\n  [{ scriptPubKey: { address: 'a1B2c3...' }, timestamp: 'now', watchonly: true }],\n  { rescan: false },\n);\n"})}),"\n",(0,a.jsx)(n.h2,{id:"sending",children:"Sending"}),"\n",(0,a.jsx)(n.h3,{id:"sendtoaddressaddress-amount-comment-commentto-subtractfeefromamount",children:(0,a.jsx)(n.code,{children:"sendToAddress(address, amount, comment?, commentTo?, subtractFeeFromAmount?)"})}),"\n",(0,a.jsx)(n.p,{children:"Sends FIRO to a Firo address. Returns the transaction ID of the broadcast transaction."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const txid = await client.sendToAddress('a1B2c3...', 1.5);\nconsole.log(`Sent! txid: ${txid}`);\n\n// Subtract the fee from the amount being sent (recipient pays fee)\nconst txid2 = await client.sendToAddress('a1B2c3...', 1.5, '', '', true);\n"})}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsx)(n.p,{children:"This immediately broadcasts the transaction to the network. Always double-check the address before calling."})}),"\n",(0,a.jsx)(n.h3,{id:"sendtransparentaddress-amount-comment-commentto-subtractfeefromamount",children:(0,a.jsx)(n.code,{children:"sendTransparent
1(address, amount, comment?, commentTo?, subtractFeeFromAmount?)"})}),"\n",(0,a.jsxs)(n.p,{children:["Sends transparent FIRO \u2014 functionally identical to ",(0,a.jsx)(n.code,{children:"sendToAddress"})," but uses the ",(0,a.jsx)(n.code,{children:"sendtransparent"})," RPC, which is the preferred method going forward."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const txid = await client.sendTransparent('a1B2c3...', 1.5);\n"})}),"\n",(0,a.jsx)(n.h3,{id:"sendtransparentmanyrecipients",children:(0,a.jsx)(n.code,{children:"sendTransparentMany(recipients)"})}),"\n",(0,a.jsxs)(n.p,{children:["Sends transparent FIRO to multiple recipients in a single transaction. Each key is an address; the value specifies the ",(0,a.jsx)(n.code,{children:"amount"})," and optional ",(0,a.jsx)(n.code,{children:"subtractFee"}),"/",(0,a.jsx)(n.code,{children:"memo"}),"."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const txid = await client.sendTransparentMany({\n  ['a1B2c3...']: { amount: 1.0 },\n  ['b4D5e6...']: { amount: 0.5, subtractFee: true },\n});\n"})}),"\n",(0,a.jsx)(n.h3,{id:"sendmanyrecipients-minconf-comment-subtractfeefrom",children:(0,a.jsx)(n.code,{children:"sendMany(recipients, minconf?, comment?, subtractFeeFrom?)"})}),"\n",(0,a.jsxs)(n.p,{children:["Sends to multiple transparent addresses in one transaction. ",(0,a.jsx)(n.code,{children:"recipients"})," is a ",(0,a.jsx)(n.code,{children:"Record<address, amount>"})," map."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const txid = await client.sendMany({\n  'a1B2c3...': 1.0,\n  'b4D5e6...': 0.5,\n});\n"})}),"\n",(0,a.jsx)(n.h3,{id:"sendsparkmanyrecipients-comment-subtractfeefrom",children:(0,a.jsx)(n.code,{children:"sendSparkMany(recipients, comment?, subtractFeeFrom?)"})}),"\n",(0,a.jsxs)(n.p,{children:["Sends Spark (private) FIRO to multiple addresses in one transaction. ",(0,a.jsx)(n.code,{children:"recipients"})," is a ",(0,a.jsx)(n.code,{children:"Record<sparkAddress, amount>"})," map."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const txid = await client.sendSparkMany({\n  [sparkAddress1]: 1.0,\n  [sparkAddress2]: 0.5,\n});\n"})}),"\n",(0,a.jsx)(n.h3,{id:"spendsparkrecipients",children:(0,a.jsx)(n.code,{children:"spendSpark(recipients)"})}),"\n",(0,a.jsxs)(n.p,{children:["Spends from private Spark coins to one or more Spark recipients. Uses the ",(0,a.jsx)(n.code,{children:"spendspark"})," RPC (distinct from ",(0,a.jsx)(n.code,{children:"sendspark"}),")."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const txid = await client.spendSpark({\n  [recipientSparkAddress]: { amount: 1.0, subtractFee: false },\n});\n"})}),"\n",(0,a.jsx)(n.h3,{id:"bumpfeetxid-options",children:(0,a.jsx)(n.code,{children:"bumpFee(txid, options?)"})}),"\n",(0,a.jsx)(n.p,{children:"Bumps the fee on an unconfirmed, opt-in RBF transaction. Returns the new txid and fee information."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const result = await client.bumpFee(originalTxid, { confTarget: 2 });\nconsole.log(`New txid: ${result.txid}`);\nconsole.log(`Old fee: ${result.origfee}, new fee: ${result.fee}`);\n"})}),"\n",(0,a.jsx)(n.h3,{id:"abandontransactiontxid",children:(0,a.jsx)(n.code,{children:"abandonTransaction(txid)"})}),"\n",(0,a.jsx)(n.p,{children:"Marks an unconfirmed transaction as abandoned, removing it from your wallet's pending list. Only works if the transaction has not been broadcast or is no longer in the mempool."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"await client.abandonTransaction(txid);\n"})}),"\n",(0,a.jsx)(n.h2,{id:"fee-configuration",children:"Fee Configuration"}),"\n",(0,a.jsx)(n.h3,{id:"settxfeeamount",children:(0,a.jsx)(n.code,{children:"setTxFee(amount)"})}),"\n",(0,a.jsxs)(n.p,{children:["Sets the default transaction fee rate (in FIRO per kB) used when no explicit fee is given. Returns ",(0,a.jsx)(n.code,{children:"true"})," on success."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const ok = await client.setTxFee(0.0001);\n"})}),"\n",(0,a.jsx)(n.h3,{id:"setmininputamount",children:(0,a.jsx)(n.code,{children:"setMinInput(amount)"})}),"\n",(0,a.jsxs)(n.p,{children:["Sets the minimum input amount that the wallet will use when building transactions. Returns ",(0,a.jsx)(n.code,{children:"true"})," on success."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"const ok = await client.setMinInput(0.001);\n"})})]})}function h(e={}){let{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(o,{...e})}):o(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.