diff --git a/packages/mesh-common/README.md b/packages/mesh-common/README.md index c0afb720..b2299508 100644 --- a/packages/mesh-common/README.md +++ b/packages/mesh-common/README.md @@ -1,5 +1,184 @@ -# mesh-common +# @meshsdk/common -Contains constants, types and interfaces used across the SDK and different serialization libraries +Shared types, interfaces, and utilities for the Mesh SDK. This package defines the common contracts (interfaces) and data types used across all Mesh packages. -[meshjs.dev](https://meshjs.dev/) +## Installation + +```bash +npm install @meshsdk/common +``` + +## Overview + +`@meshsdk/common` is the foundational package of the Mesh SDK. It contains: + +- **Interfaces** — `IFetcher`, `ISubmitter`, `IEvaluator`, `IWallet`, `ISigner` +- **Types** — All Cardano data structure types (`UTxO`, `Asset`, `Protocol`, `PlutusData`, etc.) +- **Constants** — Network IDs, well-known asset unit strings +- **Utilities** — Shared helper functions for data conversion + +## Core Interfaces + +### `IFetcher` + +Interface for providers that can fetch chain data. + +```typescript +import type { IFetcher } from '@meshsdk/common'; + +class MyProvider implements IFetcher { + async fetchAddressUTxOs(address: string, asset?: string): Promise { + // implementation + } + + async fetchProtocolParameters(epoch?: number): Promise { + // implementation + } + + // ... other methods +} +``` + +**Methods:** + +| Method | Description | +|---|---| +| `fetchAddressUTxOs(address, asset?)` | Fetch UTxOs at an address | +| `fetchAssetAddresses(asset)` | Fetch addresses holding an asset | +| `fetchAssetMetadata(asset)` | Fetch on-chain metadata for an asset | +| `fetchBlockInfo(hash)` | Fetch block information | +| `fetchCollectionAssets(policyId, cursor?)` | Paginate assets in a policy | +| `fetchHandleAddress(handle)` | Resolve ADA Handle to address | +| `fetchProtocolParameters(epoch?)` | Fetch protocol parameters | +| `fetchTxInfo(hash)` | Fetch transaction details | +| `fetchUTxOs(hash, index?)` | Fetch UTxOs by tx hash | + +### `ISubmitter` + +Interface for providers that can submit transactions. + +```typescript +import type { ISubmitter } from '@meshsdk/common'; + +class MyProvider implements ISubmitter { + async submitTx(tx: string): Promise { + // Submit CBOR-encoded transaction, return tx hash + } +} +``` + +### `IEvaluator` + +Interface for providers that can evaluate script execution units. + +```typescript +import type { IEvaluator } from '@meshsdk/common'; + +class MyProvider implements IEvaluator { + async evaluateTx(tx: string): Promise[]> { + // Evaluate Plutus script execution units + } +} +``` + +### `IWallet` + +Interface for wallet implementations providing signing and transaction capabilities. + +**Key Methods:** + +| Method | Description | +|---|---| +| `getBalance()` | Get wallet balance as asset list | +| `getChangeAddress()` | Get the change address | +| `getCollateral()` | Get collateral UTxOs | +| `getNetworkId()` | Get network ID (0=testnet, 1=mainnet) | +| `getUtxos()` | Get all wallet UTxOs | +| `signData(address, payload)` | Sign arbitrary data (CIP-8) | +| `signTx(unsignedTx, partialSign?)` | Sign a transaction | +| `submitTx(tx)` | Submit a signed transaction | + +## Common Types + +### `UTxO` + +```typescript +interface UTxO { + input: { + outputIndex: number; + txHash: string; + }; + output: { + address: string; + amount: Asset[]; + dataHash?: string; + plutusData?: string; + scriptRef?: string; + scriptHash?: string; + }; +} +``` + +### `Asset` + +```typescript +interface Asset { + unit: string; // 'lovelace' or concatenation of policyId + assetNameHex + quantity: string; // Amount as string to handle large integers +} +``` + +### `Protocol` + +Represents Cardano protocol parameters including: +- `minFeeA`, `minFeeB` — Fee calculation coefficients +- `maxTxSize` — Maximum transaction size in bytes +- `maxValSize` — Maximum value size +- `keyDeposit` — Key registration deposit in lovelace +- `poolDeposit` — Pool registration deposit in lovelace +- `coinsPerUtxoSize` — Minimum UTxO value calculation +- `priceMem`, `priceStep` — Plutus execution unit prices +- `collateralPercent` — Required collateral percentage +- `maxCollateralInputs` — Maximum collateral inputs + +### `PlutusData` + +Union type representing all Plutus data constructors: +- `ConStr` — Constructor with fields +- `Integer` — Integer value +- `ByteString` — Hex-encoded byte string +- `List` — List of Plutus data +- `Map` — Map of Plutus data key-value pairs + +### `Action` (Redeemer) + +```typescript +interface Action { + index: number; // Script input/mint index + budget: Budget; // Execution units { mem: number, steps: number } + tag: RedeemerTag; // 'SPEND' | 'MINT' | 'CERT' | 'REWARD' + data: Data; // Redeemer data +} +``` + +## Utility Functions + +### Asset Helpers + +- `parseAssetUnit(unit: string): { policyId: string; assetName: string }` — Split an asset unit into policy ID and asset name +- `mergeAssets(assets: Asset[]): Asset[]` — Merge duplicate asset entries by summing quantities + +### Serialization Helpers + +- `fromUTF8(utf8: string): string` — Convert UTF-8 string to hex +- `toUTF8(hex: string): string` — Convert hex string to UTF-8 +- `fromBytes(bytes: Uint8Array): string` — Convert byte array to hex string +- `toBytes(hex: string): Uint8Array` — Convert hex string to byte array + +## Contributing + +Please read the [Contributing Guide](../../CONTRIBUTING.md) before submitting pull requests. + +## License + +[Apache License 2.0](../../LICENSE.md) diff --git a/packages/mesh-core-cst/README.md b/packages/mesh-core-cst/README.md index 7916a071..772874a1 100644 --- a/packages/mesh-core-cst/README.md +++ b/packages/mesh-core-cst/README.md @@ -1,5 +1,97 @@ -# mesh-core-cst +# @meshsdk/core-cst -Types and utilities functions between Mesh and [cardano-js-sdk](https://github.com/input-output-hk/cardano-js-sdk) +Cardano Serialization Tools (CST) package for Mesh SDK, built on top of `@cardano-sdk/*` and `@harmoniclabs/*` libraries. This package provides low-level serialization and deserialization utilities for Cardano blockchain data structures. -[meshjs.dev](https://meshjs.dev/) +## Installation + +```bash +npm install @meshsdk/core-cst +``` + +## Overview + +This package is part of the [Mesh SDK](https://meshjs.dev/) ecosystem and serves as the core serialization layer using the Cardano SDK and HarmonicLabs libraries. It provides: + +- **Type conversions** between Mesh internal types and Cardano SDK types +- **Transaction serialization** and deserialization utilities +- **Address utilities** for Cardano address handling +- **Cryptographic utilities** for key management and signing +- **Plutus data** serialization helpers + +## Usage + +```typescript +import { + deserializeTx, + serializeTx, + toAddress, + fromAddress, + toPlutusData, +} from '@meshsdk/core-cst'; + +// Deserialize a CBOR-encoded transaction +const tx = deserializeTx(cborHex); + +// Convert a bech32 address to Mesh Address type +const address = toAddress('addr1...'); +``` + +## API Reference + +### Transaction Utilities + +#### `deserializeTx(tx: string): Transaction` + +Deserializes a CBOR-encoded transaction hex string into a `Transaction` object. + +**Parameters:** +- `tx` — CBOR hex string of the serialized transaction + +**Returns:** Deserialized `Transaction` object + +#### `serializeTx(tx: Transaction): string` + +Serializes a `Transaction` object into a CBOR-encoded hex string. + +**Parameters:** +- `tx` — The `Transaction` object to serialize + +**Returns:** CBOR hex string + +### Address Utilities + +#### `toAddress(address: string): MeshAddress` + +Converts a bech32 or hex-encoded Cardano address into a Mesh `Address` object. + +**Parameters:** +- `address` — bech32 or hex address string + +**Returns:** Mesh `Address` object + +#### `fromAddress(address: MeshAddress): string` + +Converts a Mesh `Address` object back to a bech32 string. + +**Parameters:** +- `address` — Mesh `Address` object + +**Returns:** bech32 address string + +### Plutus Data Utilities + +#### `toPlutusData(data: PlutusData): CstPlutusData` + +Converts Mesh `PlutusData` into the Cardano SDK `PlutusData` format. + +#### `fromPlutusData(data: CstPlutusData): PlutusData` + +Converts Cardano SDK `PlutusData` into the Mesh `PlutusData` format. + +## Contributing + +Please read the [Contributing Guide](../../CONTRIBUTING.md) before submitting pull requests. + +## License + +[Apache License 2.0](../../LICENSE.md) diff --git a/packages/mesh-provider/README.md b/packages/mesh-provider/README.md new file mode 100644 index 00000000..e5d843bf --- /dev/null +++ b/packages/mesh-provider/README.md @@ -0,0 +1,118 @@ +# @meshsdk/provider + +Blockchain data providers for the Mesh SDK. This package offers ready-to-use integrations with popular Cardano blockchain data providers, enabling seamless interaction with the Cardano network. + +## Installation + +```bash +npm install @meshsdk/provider +``` + +## Overview + +The `@meshsdk/provider` package implements the `IFetcher`, `ISubmitter`, and `IEvaluator` interfaces from `@meshsdk/common`, providing a unified API regardless of which underlying provider you choose. + +## Supported Providers + +| Provider | Fetcher | Submitter | Evaluator | +|---|---|---|---| +| [Blockfrost](https://blockfrost.io/) | ✅ | ✅ | ✅ | +| [Maestro](https://www.gomaestro.org/) | ✅ | ✅ | ✅ | +| [Koios](https://www.koios.rest/) | ✅ | ✅ | ❌ | +| [U5C (UTxO RPC)](https://utxorpc.org/) | ✅ | ✅ | ✅ | +| [Yaci](https://github.com/bloxbean/yaci-devkit) | ✅ | ✅ | ✅ | + +## Usage + +### Blockfrost + +```typescript +import { BlockfrostProvider } from '@meshsdk/provider'; + +const provider = new BlockfrostProvider('YOUR_BLOCKFROST_PROJECT_ID'); + +// Fetch UTxOs at an address +const utxos = await provider.fetchAddressUTxOs('addr1...'); + +// Submit a signed transaction +const txHash = await provider.submitTx(signedTxCbor); +``` + +### Maestro + +```typescript +import { MaestroProvider } from '@meshsdk/provider'; + +const provider = new MaestroProvider({ + network: 'Mainnet', + apiKey: 'YOUR_MAESTRO_API_KEY', + turboSubmit: false, +}); + +const utxos = await provider.fetchAddressUTxOs('addr1...'); +``` + +### Koios + +```typescript +import { KoiosProvider } from '@meshsdk/provider'; + +const provider = new KoiosProvider('api', 'YOUR_KOIOS_API_TOKEN'); + +const utxos = await provider.fetchAddressUTxOs('addr1...'); +``` + +### U5C (UTxO RPC) + +```typescript +import { U5CProvider } from '@meshsdk/provider'; + +const provider = new U5CProvider({ + url: 'https://your-utxorpc-endpoint', + headers: { + 'dmtr-api-key': 'YOUR_API_KEY', + }, +}); +``` + +### Yaci (Local Devnet) + +```typescript +import { YaciProvider } from '@meshsdk/provider'; + +const provider = new YaciProvider('http://localhost:8080/api/v1'); +``` + +## API Reference + +### Common Interface Methods + +All providers implement a common set of methods: + +#### Fetcher Methods + +- `fetchAddressUTxOs(address: string, asset?: string): Promise` — Fetch UTxOs at an address, optionally filtered by asset +- `fetchAssetAddresses(asset: string): Promise<{ address: string; quantity: string }[]>` — Fetch addresses holding a specific asset +- `fetchAssetMetadata(asset: string): Promise` — Fetch metadata for an asset +- `fetchBlockInfo(hash: string): Promise` — Fetch block information by hash +- `fetchCollectionAssets(policyId: string, cursor?: string | number): Promise<{ assets: Asset[]; next?: string | number }>` — Fetch assets in a policy collection +- `fetchHandleAddress(handle: string): Promise` — Resolve an ADA Handle to an address +- `fetchProtocolParameters(epoch?: number): Promise` — Fetch current protocol parameters +- `fetchTxInfo(hash: string): Promise` — Fetch transaction information +- `fetchUTxOs(hash: string, index?: number): Promise` — Fetch UTxOs by transaction hash + +#### Submitter Methods + +- `submitTx(tx: string): Promise` — Submit a signed CBOR transaction, returns tx hash + +#### Evaluator Methods + +- `evaluateTx(tx: string): Promise[]>` — Evaluate script execution units for a transaction + +## Contributing + +Please read the [Contributing Guide](../../CONTRIBUTING.md) before submitting pull requests. + +## License + +[Apache License 2.0](../../LICENSE.md) diff --git a/packages/mesh-transaction/README.md b/packages/mesh-transaction/README.md index ebc0028c..0ea787ca 100644 --- a/packages/mesh-transaction/README.md +++ b/packages/mesh-transaction/README.md @@ -1,5 +1,175 @@ -# mesh-transaction +# @meshsdk/transaction -Transactions - [meshjs.dev/apis/transaction](https://meshjs.dev/apis/transaction) +Transaction building utilities for the Mesh SDK. This package provides a high-level API for constructing, signing, and managing Cardano transactions. -[meshjs.dev](https://meshjs.dev/) +## Installation + +```bash +npm install @meshsdk/transaction +``` + +## Overview + +The `@meshsdk/transaction` package exposes the primary transaction builder classes used to compose Cardano transactions: + +- **MeshTxBuilder** — Lower-level, composable transaction builder with full control +- **Transaction** — Higher-level, fluent API for common transaction patterns + +## Usage + +### MeshTxBuilder + +`MeshTxBuilder` provides a composable, lower-level API for building transactions with full control over inputs, outputs, scripts, and metadata. + +```typescript +import { MeshTxBuilder } from '@meshsdk/transaction'; +import { BlockfrostProvider } from '@meshsdk/provider'; + +const provider = new BlockfrostProvider('YOUR_PROJECT_ID'); + +const txBuilder = new MeshTxBuilder({ + fetcher: provider, + submitter: provider, + evaluator: provider, +}); + +// Build a simple ADA transfer +const unsignedTx = await txBuilder + .txIn( + 'TX_HASH', + 0, // tx output index + [{ unit: 'lovelace', quantity: '5000000' }], + 'addr1...' // input address + ) + .txOut('addr1_recipient...', [{ unit: 'lovelace', quantity: '2000000' }]) + .changeAddress('addr1_change...') + .complete(); + +console.log(unsignedTx); // CBOR hex of unsigned transaction +``` + +#### Minting Tokens + +```typescript +const unsignedTx = await txBuilder + .txIn(txHash, 0, inputValue, address) + .mint([{ assetName: 'MeshToken', quantity: '1' }], policyId) + .mintingScript(nativeScriptCbor) + .txOut(recipientAddress, [{ unit: policyId + assetNameHex, quantity: '1' }]) + .changeAddress(changeAddress) + .complete(); +``` + +#### Using Plutus Scripts + +```typescript +const unsignedTx = await txBuilder + .txIn(collateralTxHash, 0, collateralValue, walletAddress) + .txInCollateral(collateralTxHash, 0, collateralValue, walletAddress) + .spendingPlutusScriptV2() + .txIn(scriptTxHash, 0, scriptUtxoValue, scriptAddress) + .txInInlineDatumPresent() + .txInRedeemerValue(redeemer) + .txOut(recipientAddress, outputValue) + .changeAddress(walletAddress) + .requiredSignerHash(pubKeyHash) + .complete(); +``` + +### Transaction (High-Level API) + +The `Transaction` class provides a simpler, fluent API for the most common transaction patterns. + +```typescript +import { Transaction } from '@meshsdk/transaction'; + +const tx = new Transaction({ initiator: wallet }); + +// Send ADA +await tx + .sendLovelace('addr1_recipient...', '5000000') + .setChangeAddress('addr1_change...') + .build(); + +// Send assets +await tx + .sendAssets('addr1_recipient...', [ + { unit: 'lovelace', quantity: '2000000' }, + { unit: 'policyId.assetName', quantity: '1' }, + ]) + .build(); +``` + +## API Reference + +### MeshTxBuilder + +#### Constructor Options + +```typescript +interface MeshTxBuilderOptions { + fetcher?: IFetcher; // For resolving inputs + submitter?: ISubmitter; // For submitting transactions + evaluator?: IEvaluator; // For evaluating Plutus scripts + serializer?: IMeshTxSerializer; // Custom serializer (defaults to CSL or CST) + isHydra?: boolean; // Enable Hydra head mode + params?: Partial; // Override protocol parameters + verbose?: boolean; // Enable verbose logging +} +``` + +#### Input Methods + +- `txIn(txHash, txIndex, amount, address)` — Add a transaction input +- `txInCollateral(txHash, txIndex, amount, address)` — Add a collateral input +- `readOnlyTxInReference(txHash, txIndex)` — Add a read-only reference input +- `spendingPlutusScriptV1()` / `spendingPlutusScriptV2()` / `spendingPlutusScriptV3()` — Set Plutus version for next input +- `txInScript(scriptCbor)` — Attach inline spending script +- `txInDatumValue(datum)` — Set datum value for script input +- `txInInlineDatumPresent()` — Use inline datum from UTxO +- `txInRedeemerValue(redeemer, exUnits?)` — Set redeemer for script input + +#### Output Methods + +- `txOut(address, amount)` — Add a transaction output +- `txOutDatumHashValue(datum)` — Attach datum hash to output +- `txOutInlineDatumValue(datum)` — Attach inline datum to output +- `txOutReferenceScript(scriptCbor, version?)` — Attach reference script to output + +#### Minting Methods + +- `mint(amount, policy)` — Add minting entry +- `mintingScript(scriptCbor)` — Attach native/Plutus minting script +- `mintRedeemerValue(redeemer, exUnits?)` — Set minting redeemer +- `mintTxInReference(txHash, txIndex)` — Use reference script for minting + +#### Certificate & Staking Methods + +- `registerStakeCertificate(rewardAddress)` — Register a stake address +- `deregisterStakeCertificate(rewardAddress)` — Deregister a stake address +- `delegateStakeCertificate(rewardAddress, poolId)` — Delegate stake to a pool +- `withdrawal(rewardAddress, lovelace)` — Add a reward withdrawal + +#### Metadata + +- `metadataValue(tag, metadata)` — Attach transaction metadata + +#### Finalization + +- `changeAddress(address)` — Set the change output address +- `validFrom(slot)` — Set transaction validity start slot +- `invalidBefore(slot)` — Alias for `validFrom` +- `validTo(slot)` — Set transaction validity end slot (TTL) +- `invalidHereafter(slot)` — Alias for `validTo` +- `requiredSignerHash(pubKeyHash)` — Add required signer +- `signingKey(skeyHex)` — Add signing key for auto-signing +- `complete(options?)` — Finalize and serialize the transaction +- `completeSigning()` — Apply any attached signing keys + +## Contributing + +Please read the [Contributing Guide](../../CONTRIBUTING.md) before submitting pull requests. + +## License + +[Apache License 2.0](../../LICENSE.md) diff --git a/packages/mesh-wallet/README.md b/packages/mesh-wallet/README.md index 7748b497..e8cb5208 100644 --- a/packages/mesh-wallet/README.md +++ b/packages/mesh-wallet/README.md @@ -1,5 +1,177 @@ -# mesh-wallet +# @meshsdk/wallet -Wallets - [meshjs.dev/apis/wallets](https://meshjs.dev/apis/wallets) +Wallet utilities and implementations for the Mesh SDK. This package provides browser wallet integrations, embedded wallet support, and read-only wallet capabilities for Cardano dApps. -[meshjs.dev](https://meshjs.dev/) +## Installation + +```bash +npm install @meshsdk/wallet +``` + +## Overview + +The `@meshsdk/wallet` package provides three main wallet implementations: + +- **BrowserWallet** — Integrates with CIP-30 compliant browser extension wallets (Eternl, Nami, Flint, etc.) +- **MeshWallet** — A fully-featured embedded wallet with mnemonic/private key support +- **ReadOnlyWallet** — A read-only wallet for monitoring addresses without signing capability + +## Usage + +### BrowserWallet + +Connect to a browser extension wallet that implements the [CIP-30](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0030) standard. + +```typescript +import { BrowserWallet } from '@meshsdk/wallet'; + +// Get list of installed wallets +const wallets = await BrowserWallet.getInstalledWallets(); + +// Connect to a specific wallet +const wallet = await BrowserWallet.enable('eternl'); + +// Get wallet addresses +const address = await wallet.getChangeAddress(); +const addresses = await wallet.getUsedAddresses(); + +// Get balance +const balance = await wallet.getBalance(); + +// Get UTxOs +const utxos = await wallet.getUtxos(); + +// Sign and submit a transaction +const signedTx = await wallet.signTx(unsignedTxCbor); +const txHash = await wallet.submitTx(signedTx); +``` + +### MeshWallet + +A full-featured, embedded wallet that can be used in Node.js or browser environments without requiring a browser extension. + +```typescript +import { MeshWallet } from '@meshsdk/wallet'; +import { BlockfrostProvider } from '@meshsdk/provider'; + +const provider = new BlockfrostProvider('YOUR_PROJECT_ID'); + +// Initialize from mnemonic phrase +const wallet = new MeshWallet({ + networkId: 0, // 0 = testnet, 1 = mainnet + fetcher: provider, + submitter: provider, + key: { + type: 'mnemonic', + words: ['word1', 'word2', '...'], // 24-word mnemonic + }, +}); + +// Initialize from private key +const walletFromKey = new MeshWallet({ + networkId: 1, + fetcher: provider, + submitter: provider, + key: { + type: 'root', + bech32: 'xprv1...', + }, +}); + +// Generate a new mnemonic +const mnemonic = MeshWallet.brew(); +console.log(mnemonic); // ['word1', 'word2', ...] + +// Get wallet address +const address = await wallet.getChangeAddress(); + +// Get UTxOs +const utxos = await wallet.getUtxos(); + +// Sign a transaction +const signedTx = await wallet.signTx(unsignedTxCbor); + +// Submit a transaction +const txHash = await wallet.submitTx(signedTx); +``` + +### ReadOnlyWallet + +A wallet for read-only access — useful for querying balances and UTxOs without private key access. + +```typescript +import { ReadOnlyWallet } from '@meshsdk/wallet'; +import { BlockfrostProvider } from '@meshsdk/provider'; + +const provider = new BlockfrostProvider('YOUR_PROJECT_ID'); + +const wallet = new ReadOnlyWallet({ + address: 'addr1...', + fetcher: provider, +}); + +const utxos = await wallet.getUtxos(); +const balance = await wallet.getBalance(); +``` + +## API Reference + +### BrowserWallet + +#### Static Methods + +- `BrowserWallet.getInstalledWallets(): Promise` — Returns list of available browser wallet extensions +- `BrowserWallet.enable(walletName: string, extensions?: number[]): Promise` — Enables and connects to a wallet by name + +#### Instance Methods + +- `getBalance(): Promise` — Returns the full balance as a list of assets +- `getChangeAddress(): Promise` — Returns the wallet's change address +- `getCollateral(): Promise` — Returns UTxOs designated as collateral +- `getNetworkId(): Promise` — Returns the network ID (0=testnet, 1=mainnet) +- `getRewardAddresses(): Promise` — Returns staking/reward addresses +- `getUnusedAddresses(): Promise` — Returns unused payment addresses +- `getUsedAddresses(): Promise` — Returns used payment addresses +- `getUtxos(): Promise` — Returns all UTxOs controlled by the wallet +- `signData(address: string, payload: string): Promise` — Signs arbitrary data +- `signTx(unsignedTx: string, partialSign?: boolean): Promise` — Signs a transaction +- `submitTx(tx: string): Promise` — Submits a signed transaction + +### MeshWallet + +#### Static Methods + +- `MeshWallet.brew(strength?: number): string[]` — Generates a new BIP39 mnemonic phrase + +#### Constructor Options + +```typescript +interface MeshWalletOptions { + networkId: number; // 0 for testnet, 1 for mainnet + fetcher?: IFetcher; // Provider for fetching chain data + submitter?: ISubmitter; // Provider for submitting transactions + evaluator?: IEvaluator; // Provider for evaluating scripts + key: { + type: 'mnemonic'; // Use BIP39 mnemonic + words: string[]; // 24-word mnemonic array + } | { + type: 'root'; // Use root private key + bech32: string; // bech32-encoded xprv key + } | { + type: 'cli'; // Use cardano-cli key format + payment: string; // Payment signing key (hex or bech32) + stake?: string; // Stake signing key (optional) + } | { + type: 'address'; // Read-only mode from address + address: string[]; // Array of addresses to track + }; +} +``` + +## Contributing + +Please read the [Contributing Guide](../../CONTRIBUTING.md) before submitting pull requests. + +## License + +[Apache License 2.0](../../LICENSE.md)