### Setup and Run Kupmios Example Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/examples/kupmios/README.md Follow these steps to set up the environment and run the Kupmios example query. Ensure you replace placeholder values with your actual endpoints and mnemonic. ```bash $ bun run build && bun run test $ cd examples/kupmios # Add your test mnemonic, kupo and ogmios endpoints $ vi index.js ... // Tested with Kupo v2.8.0 const kupoUrl = ""; // Tested with Ogmios v6.3.0 const ogmiosUrl = ""; ... const mnemonic = ""; ... $ npm i && npm run query > kupmios@1.0.0 query > node index.js Transaction with ID 250e0e34fdb3d15014b0c4558b51f51c8e11f19ec33b64dc98b1b0b323e5dfe6 has been successfully submitted to the blockchain. Transaction is confirmed and accepted on the blockchain. ``` -------------------------------- ### Install SDK with Bun Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/examples/README.md Demonstrates how to install the `@blaze-cardano/sdk` package using the `bun` package manager. ```bash bun install @blaze-cardano/sdk ``` -------------------------------- ### Install Blaze Cardano SDK Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/README.md Install the Blaze Cardano SDK using npm. This is the first step to using the library. ```bash npm i @blaze-cardano/sdk ``` -------------------------------- ### Setup Blaze Emulator Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-emulator/docs/guides/testing-a-transaction.md Initializes the Blaze Emulator with an empty ledger. This is the starting point for testing transaction logic. ```typescript import { Emulator } from "@blaze-cardano/emulator" const emulator = new Emulator( [], // a List of outputs for the ledger. ); ``` -------------------------------- ### Install and Run Deployment Script Locally Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/examples/script-deploy-ci/README.md Installs project dependencies and runs the deployment script locally. The script will output the deployment plan and update the deployment cache. ```sh bun install bun run deploy ``` -------------------------------- ### Install Dependencies with Bun Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/CLAUDE.md Installs project dependencies using the Bun package manager. ```bash bun install ``` -------------------------------- ### Start RPC Server Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-emulator/docs/guides/rpc-server.md Starts the emulator's JSON RPC server. It can be embedded into test runners or standalone scripts. The server defaults to `0.0.0.0:8787` and is ready to respond immediately after `startRpcServer` returns. ```APIDOC ## Start RPC Server ### Description Starts the emulator's JSON RPC server. It can be embedded into test runners or standalone scripts. The server defaults to `0.0.0.0:8787` and is ready to respond immediately after `startRpcServer` returns. ### Method POST ### Endpoint /rpc/start ### Request Body - **port** (number) - Optional - The port to run the server on. - **hostname** (string) - Optional - The hostname to bind the server to. ### Response #### Success Response (200) - **server** (object) - An object representing the running server with a `stop` method. ### Request Example ```typescript import { startRpcServer } from "@blaze-cardano/emulator/rpc"; const server = startRpcServer({ port: 8787, hostname: "127.0.0.1", }); // ... run your flow ... server.stop(); ``` ``` -------------------------------- ### Start the RPC Server Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-emulator/docs/guides/rpc-server.md Use this helper to start the RPC server. It wraps Hono's request handler and can be embedded in test runners or standalone scripts. The server defaults to 0.0.0.0:8787 if not specified. ```typescript import { startRpcServer } from "@blaze-cardano/emulator/rpc"; const server = startRpcServer({ port: 8787, hostname: "127.0.0.1", }); // ... run your flow ... server.stop(); ``` -------------------------------- ### Query Network Start Time Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-ogmios_versioned_docs/version-0.0.7/api/ogmios.unwrapped.ogmios.querynetworkstarttime.md This snippet shows how to call the queryNetworkStartTime method to get the network's start time. It returns a Promise that resolves to the network start time result. ```typescript queryNetworkStartTime(): Promise; ``` -------------------------------- ### Run All Packages in Watch Mode Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/CLAUDE.md Starts all packages in watch mode for development. ```bash bun run dev ``` -------------------------------- ### Basic RoutedProvider Setup Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-query/docs/guides/provider-routing.md Instantiate RoutedProvider with default, query, evaluation, and submission providers. Ensure all providers target the same Cardano network. ```typescript import { Blockfrost, Kupmios, Maestro, RoutedProvider } from "@blaze-cardano/query"; const provider = new RoutedProvider({ defaultProvider: blockfrost, queryProvider: blockfrost, evaluationProvider: kupmios, submissionProvider: maestro, }); ``` -------------------------------- ### queryNetworkStartTime Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-ogmios_versioned_docs/version-0.0.7/api/ogmios.unwrapped.ogmios.md Queries the start time of the network. ```APIDOC ## queryNetworkStartTime ### Description Queries the start time of the network. ### Method (Not specified, likely an internal SDK method) ### Endpoint (Not applicable for SDK methods) ### Parameters #### Path Parameters (None) #### Query Parameters (None) #### Request Body (None) ### Request Example (Not applicable for SDK methods) ### Response #### Success Response (Details not provided in source) #### Response Example (Not applicable for SDK methods) ``` -------------------------------- ### Install Blaze Emulator with Bun Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-emulator/docs/guides/introduction.mdx Use this command to add the Blaze Emulator package to your project via Bun. ```bash bun add @blaze-cardano/emulator ``` -------------------------------- ### Install Blaze Emulator with Yarn Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-emulator/docs/guides/introduction.mdx Use this command to add the Blaze Emulator package to your project via Yarn. ```bash yarn add @blaze-cardano/emulator ``` -------------------------------- ### Setup Emulator for Governance Testing Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-emulator/docs/guides/governance-testing.md Configures emulator protocol parameters for governance testing, such as setting deposits to zero and adjusting voting thresholds. It also initializes the committee state and registers a wallet for governance operations. ```typescript import { describe, beforeEach, it, expect } from "bun:test"; import { Credential, CredentialType, DRep, Ed25519KeyHashHex, EpochNo, GovernanceActionId, Hash28ByteBase16, Hash32ByteBase16, NetworkId, ProposalProcedure, RewardAccount, Transaction, TransactionId, Vote, Voter, VotingProcedure, VotingProcedures, hardCodedProtocolParams, type CommitteeMember, type CredentialCore, } from "@blaze-cardano/core"; import { Blaze, Provider, makeValue } from "@blaze-cardano/sdk"; import { HotWallet } from "@blaze-cardano/wallet"; import { Emulator } from "@blaze-cardano/emulator"; const ZERO_HASH32 = Hash32ByteBase16("".padStart(64, "0")); // We'll use this helper function to sign and submit transactions async function signAndSubmit( tx: Transaction, blaze: Blaze, signWithStakeKey = false, ) { const signed = await blaze.wallet.signTransaction(tx, true, signWithStakeKey); const witnesses = tx.witnessSet(); witnesses.setVkeys(signed.vkeys()!); tx.setWitnessSet(witnesses); return await blaze.provider.postTransactionToChain(tx); } describe("governance examples", () => { let emulator: Emulator; let blaze: Blaze; let rewardAccount: RewardAccount; let stakeCred: CredentialCore; beforeEach(async () => { const params = structuredClone(hardCodedProtocolParams); params.governanceActionDeposit = 0; params.delegateRepresentativeDeposit = 0; params.delegateRepresentativeMaxIdleTime = 2; params.stakePoolVotingThresholds!.committeeNormal = { numerator: 0, denominator: 1, }; params.stakePoolVotingThresholds!.securityRelevantParamVotingThreshold = { numerator: 0, denominator: 1, }; params.delegateRepresentativeVotingThresholds!.ppEconomicGroup = { numerator: 1, denominator: 1, }; emulator = new Emulator([], { params }); emulator.bootstrapMode = false; emulator.params.constitutionalCommitteeMinSize = 1; const committeeMember: CommitteeMember = { coldCredential: { type: CredentialType.KeyHash, hash: Hash28ByteBase16("aa".repeat(28)), }, epoch: EpochNo(200), }; emulator.setCommitteeState( { members: [committeeMember], quorumThreshold: { numerator: 0, denominator: 1 }, }, { hotCredentials: { [committeeMember.coldCredential.hash]: undefined } }, ); await emulator.register("gov-wallet", makeValue(1_000_000_000n)); await emulator.as("gov-wallet", async (instance, address) => { blaze = instance as Blaze; stakeCred = address.getProps().delegationPart!; rewardAccount = RewardAccount.fromCredential(stakeCred, NetworkId.Testnet); }); }); ``` -------------------------------- ### Install Blaze Emulator with PNPM Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-emulator/docs/guides/introduction.mdx Use this command to add the Blaze Emulator package to your project via PNPM. ```bash pnpm install @blaze-cardano/emulator ``` -------------------------------- ### Basic Cardano Transaction Creation Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/README.md This example demonstrates how to prepare a provider (Maestro), wallet, and Blaze instance to build a transaction that pays 5 Ada to an external wallet and then outputs the transaction CBOR. ```typescript // In this example we: // - prepare the provider (Maestro), wallet, blaze, // - build a transaction paying out 5 ada to an external wallet // - dump the transaction cbor import { ColdWallet, Core, Blaze, Maestro } from "@blaze-cardano/sdk"; import * as readline from "node:readline/promises"; import { stdin, stdout } from "node:process"; const rl = readline.createInterface({ input: stdin, output: stdout }); await setTimeout(() => {}, 1000); let address = Core.addressFromBech32( await rl.question("Please enter your bech32 cardano address: "), ); // $butane wallet can collect donations for us const blazeWallet = Core.addressFromBech32( "addr1qye93uefq8r6ezk0kzq443u9zht7ylu5nelvw8eracd200ylzvhpxn9c4g2fyxe5rlmn6z5qmm3dtjqfjn2vvy58l88szlpjw4", ); const provider = new Maestro({ network: "mainnet", apiKey: await rl.question("Please enter your mainnet maestro key: "), }); const wallet = new ColdWallet(address, 0, provider); console.log("Your blaze address: ", wallet.address.toBech32()); const blaze = await Blaze.from(provider, wallet); //Use the awesome transaction builder const tx = await blaze .newTransaction() .payLovelace(blazeWallet, 5n * 1_000_000n) .complete(); // Dump the transaction for you to submit securely console.log(`Please sign and submit this transaction: ${tx.toCbor()}`); ``` -------------------------------- ### Install Blaze Emulator with NPM Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-emulator/docs/guides/introduction.mdx Use this command to add the Blaze Emulator package to your project via NPM. ```bash npm i @blaze-cardano/emulator ``` -------------------------------- ### queryNetworkStartTime Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-ogmios_versioned_docs/version-0.0.7/api/ogmios.unwrapped.ogmios.querynetworkstarttime.md Retrieves the network start time from the Ogmios API. This method returns a Promise that resolves with the result of the query. ```APIDOC ## Unwrapped.Ogmios.queryNetworkStartTime() ### Description Retrieves the network start time from the Ogmios API. This method returns a Promise that resolves with the result of the query. ### Method queryNetworkStartTime ### Returns Promise ``` -------------------------------- ### Core.TimelockStart Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.core.timelockstart.md Represents the TimelockStart type from the C.Serialization module, providing access to its functionalities for handling timelock start data. ```APIDOC ## Core.TimelockStart ### Description This variable provides access to the `TimelockStart` type from the `C.Serialization` module. It is used for handling timelock start data within the Blaze Cardano SDK. ### Type `typeof C.Serialization.TimelockStart` ### Usage This is a type definition and is typically used for type annotations or when working with serialization and deserialization of timelock start structures. ``` -------------------------------- ### Emulator.startEventLoop() Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-emulator_versioned_docs/version-0.3.30/api/emulator.emulator.starteventloop.md Starts the event loop for the ledger. If the event loop is already running, it is cleared and restarted. The event loop calls the stepForwardBlock method every 20 slots. ```APIDOC ## Emulator.startEventLoop() ### Description Starts the event loop for the ledger. If the event loop is already running, it is cleared and restarted. The event loop calls the stepForwardBlock method every 20 slots. ### Method void ### Returns void ``` -------------------------------- ### Query Ledger State Era Start Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-ogmios_versioned_docs/version-0.0.7/api/ogmios.unwrapped.ogmios.queryledgerstateerastart.md This TypeScript snippet demonstrates how to call the queryLedgerStateEraStart method to get the ledger state era start. It returns a Promise that resolves to the result of the query. ```typescript queryLedgerStateEraStart(): Promise; ``` -------------------------------- ### Starting the Event Loop Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-emulator_versioned_docs/version-0.3.30/api/emulator.emulator.starteventloop.md Call this method to begin the event loop. If it's already active, it will be reset. The loop advances the ledger by calling `stepForwardBlock` every 20 slots. ```typescript emulator.startEventLoop(); ``` -------------------------------- ### Create a New Transaction Builder Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.blaze.newtransaction.md Use this method to get an instance of TxBuilder for constructing a new transaction. This is the starting point for any transaction operation. ```typescript newTransaction(): TxBuilder; ``` -------------------------------- ### Initialize Deployment Planner Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-deploy/etc/deploy.api.md Instantiate a DeploymentPlanner with a provider and an optional cache. This planner is used to reconcile script deployments. ```typescript export class DeploymentPlanner { constructor( provider: Provider, cache?: ScriptDeploymentCache | undefined); readonly cache?: ScriptDeploymentCache | undefined; readonly provider: Provider; reconcile(manifest: ScriptDeploymentManifest): Promise; } ``` -------------------------------- ### Run Governance Demo Scenario Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/catalyst/1200040/m2.md This command executes a controlled emulator scenario demonstrating wallet funding, transaction submission, block advancement, proposal submission, DRep voting, epoch advancement, proposal status inspection, and enacted protocol-parameter state. ```sh bun docs/catalyst/1200040/governance-demo.ts ``` -------------------------------- ### Get Change Address Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.wallet.getchangeaddress.md Use this method to get a wallet-owned address for transaction change. It returns a Promise resolving to an Address object. ```typescript abstract getChangeAddress(): Promise
; ``` -------------------------------- ### Get Transaction CBOR Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.txbuilder.tocbor.md Call `toCbor()` on a `TxBuilder` instance to get the CBOR string of the current transaction state. This method does not modify the transaction. ```typescript txBuilder.toCbor() ``` -------------------------------- ### Emulator Class Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-emulator_versioned_docs/version-0.3.30/api/emulator.md The Emulator class simulates ledger behavior, managing UTxOs, reward accounts, protocol parameters, and a clock. It supports starting and stopping an event loop. ```APIDOC ## Emulator ### Description The Emulator class is used to simulate the behavior of a ledger. It maintains a ledger of unspent transaction outputs, reward accounts, protocol parameters, and a clock. It also provides methods to start and stop an event loop for the ledger. ### Methods - **start()**: Starts the event loop for the ledger. - **stop()**: Stops the event loop for the ledger. ### Properties - **utxos**: Ledger of unspent transaction outputs. - **rewardAccounts**: Reward accounts. - **protocolParameters**: Current protocol parameters. - **clock**: The ledger clock. ``` -------------------------------- ### new Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-ogmios_versioned_docs/version-0.0.7/api/ogmios.unwrapped.ogmios.md Creates a new Ogmios instance, likely connecting to a specified URL. ```APIDOC ## new ### Description Creates a new Ogmios instance, likely connecting to a specified URL. ### Method `static` (Not specified, likely an internal SDK method) ### Endpoint (Not applicable for SDK methods) ### Parameters #### Path Parameters (None) #### Query Parameters (None) #### Request Body - **url** (type) - Required - The URL of the Ogmios service to connect to. ``` -------------------------------- ### Initialize Blaze SDK Instance Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-sdk/etc/sdk.api.md Creates a new instance of the Blaze SDK, connecting to a specified provider and wallet. This is the entry point for interacting with the SDK. ```typescript export class Blaze { static from(provider: ProviderType, wallet: WalletType): Promise>; } ``` -------------------------------- ### Kupmios.getParameters() Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.kupmios.getparameters.md Gets the protocol parameters from the blockchain. ```APIDOC ## Kupmios.getParameters() ### Description Gets the protocol parameters from the blockchain. ### Method Promise ### Endpoint N/A ### Returns Promise #### Success Response - **ProtocolParameters** (object) - The protocol parameters. ### Response Example { "example": "Promise" } ``` -------------------------------- ### Script Deployment Documentation Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/catalyst/1200042/m1.md Documentation for script deployment functionality, specifically for the TxBuilder.deployScript method, provided for both the SDK and tx packages. ```markdown docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.txbuilder.deployscript.md ``` ```markdown docs/blaze-tx_versioned_docs/version-0.13.0/api/tx.txbuilder.deployscript.md ``` -------------------------------- ### Set Transaction Validity Start Time Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.txbuilder.setvalidfrom.md Use this method to define the earliest slot at which a transaction can be considered valid. It's crucial for time-sensitive operations. Ensure the validity start interval hasn't been set previously to avoid errors. ```typescript setValidFrom(validFrom: Slot): TxBuilder; ``` -------------------------------- ### Kupmios.getUnspentOutputs() Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.kupmios.getunspentoutputs.md Gets unspent outputs for a given address. ```APIDOC ## Kupmios.getUnspentOutputs() ### Description Gets unspent outputs for a given address. ### Method ```typescript getUnspentOutputs(address: Address): Promise; ``` ### Parameters #### Path Parameters - **address** (Address) - Required - Address to fetch unspent outputs for. ### Returns Promise<[TransactionUnspentOutput](./sdk.core.transactionunspentoutput.md)[]> A promise that resolves to an array of unspent outputs. ``` -------------------------------- ### Running Cache Benchmark Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-query/docs/guides/advanced-querying.md Execute the cache benchmark using the provided Bun command. This benchmark is useful for measuring deterministic key generation, cache hits, and writes, serving as a regression baseline. ```shell bun --filter @blaze-cardano/query bench ``` -------------------------------- ### Kupmios.getUnspentOutputByNFT Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-query_versioned_docs/version-0.5.2/api/query.kupmios.getunspentoutputbynft.md Gets an unspent output containing a specific NFT. ```APIDOC ## Kupmios.getUnspentOutputByNFT ### Description Gets an unspent output containing a specific NFT. ### Method (Not specified, likely SDK method) ### Endpoint (Not applicable for SDK methods) ### Parameters #### Path Parameters (None) #### Query Parameters (None) #### Request Body (None) ### Parameters #### Path Parameters (None) #### Query Parameters (None) #### Request Body (None) ### Parameters #### Path Parameters - **unit** (AssetId) - Required - Asset ID of the NFT. #### Query Parameters (None) #### Request Body (None) ### Response #### Success Response - **TransactionUnspentOutput** - A promise that resolves to the unspent output. #### Response Example (Not specified) ``` -------------------------------- ### Get Auxiliary Data Hash Function Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-tx/etc/tx.api.md Computes the hash of AuxiliaryData. ```typescript export const getAuxiliaryDataHash: (data: AuxiliaryData) => Hash32ByteBase16; ``` -------------------------------- ### TxBuilder.deployScript() Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-tx_versioned_docs/version-0.13.1/api/tx.txbuilder.deployscript.md Deploys a script by creating a new UTxO with the script as its reference. ```APIDOC ## TxBuilder.deployScript() ### Description Deploys a script by creating a new UTxO with the script as its reference. ### Method Signature ```typescript deployScript(script: Script, address?: Address): TxBuilder; ``` ### Parameters #### Parameters - **script** (Script) - Required - The script to be deployed. - **address** (Address) - Optional - The address to lock the script to. Defaults to a burn address where the UTxO will be unspendable. ### Returns - **TxBuilder** - The same transaction builder. ### Example ```typescript const myScript = Script.newPlutusV2Script(new PlutusV2Script("...")); txBuilder.deployScript(myScript); // or txBuilder.deployScript(myScript, someAddress); ``` ``` -------------------------------- ### Blockfrost.getParameters() Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.blockfrost.getparameters.md Fetches the protocol parameters from the Blockfrost API. This method constructs the query URL, sends a GET request with the appropriate headers, and processes the response. The response is parsed into a ProtocolParameters object, which is then returned. If the response is not in the expected format, an error is thrown. ```APIDOC ## getParameters() ### Description Fetches the protocol parameters from the Blockfrost API. ### Method GET ### Endpoint /api/v0/metadata/txs/protocol-parameters ### Parameters None ### Response #### Success Response (200) - **json** (ProtocolParameters) - A ProtocolParameters object containing the network's protocol parameters. ### Response Example { "min_fee_a": 433, "min_fee_b": 10000, "max_block_size": 216000, "max_tx_size": 16384, "max_block_header_size": 112, "decentralisation_param": 0.95, "entropy_limit": null, "key_deposit": 2000000, "pool_deposit": 500000000, "e_max": 100, "n_opt": 200, "a_a0": 0.0001, "rho": 0.0001, "tau": 0.0001, "plutus_ratio": 0.0001, "cost_cdot": 0.0001, "cost_mem": 0.0577, "cost_step": 0.000000001, "price_mem": 0.000000001, "price_step": 0.000000001, "max_val_size": 1000000, "collateral_percent": 150, "script_size_limit": 16384, "slot_coeff": 0.05, "update_final_epoch": 0, "protocol_major_version": 1, "protocol_minor_version": 0, "min_pool_cost": 340000000 } ``` -------------------------------- ### Deploy Script References Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-deploy/etc/deploy.api.md Asynchronously deploy script references using the provided manifest, provider, wallet, and an optional cache. ```typescript export const deployScriptRefs: (input: DeployScriptRefsInput) => Promise; ``` -------------------------------- ### Get Script Size Function Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-tx/etc/tx.api.md Calculates the size of a given script in bytes. ```typescript // @public (undocumented) export function getScriptSize(script: Script): number; ``` -------------------------------- ### Deploy Script with TxBuilder Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/catalyst/1200042/m1.md Creates a reference-script UTxO and calculates minimum ADA using the TxBuilder.deployScript utility. This is a type-safe approach to script deployment. ```typescript TxBuilder.deployScript ``` -------------------------------- ### Get Unspent Outputs Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.coldwallet.getunspentoutputs.md Call this method on a ColdWallet instance to retrieve an array of TransactionUnspentOutput objects. ```typescript getUnspentOutputs(): Promise; ``` -------------------------------- ### Kupmios.getParameters Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-query_versioned_docs/version-0.5.2/api/query.kupmios.getparameters.md Gets the protocol parameters from the blockchain. This method returns a promise that resolves to the ProtocolParameters object. ```APIDOC ## Kupmios.getParameters() ### Description Gets the protocol parameters from the blockchain. ### Method N/A (SDK Method) ### Endpoint N/A (SDK Method) ### Parameters This method does not accept any parameters. ### Response #### Success Response - **ProtocolParameters** - An object containing the protocol parameters. ### Response Example ```json { "example": "ProtocolParameters object" } ``` ``` -------------------------------- ### Deploy Script References Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-deploy/etc/deploy.api.md Initiates the deployment of script references based on a provided input object. This is the primary function for executing a deployment plan. ```APIDOC ## deployScriptRefs ### Description Executes the deployment of script references. This function takes a `DeployScriptRefsInput` object, which includes the deployment manifest, provider, wallet, and an optional cache, and returns the result of the deployment process. ### Signature ```typescript deployScriptRefs(input: DeployScriptRefsInput): Promise ``` ### Parameters * **input** (`DeployScriptRefsInput`) * **manifest** (`ScriptDeploymentManifest`) - The manifest defining the scripts to deploy. * **provider** (`Provider`) - The network provider to interact with. * **wallet** (`Wallet`) - The wallet to use for signing and submitting transactions. * **cache** (`ScriptDeploymentCache`, optional) - An optional cache for deployment records. ### Returns A `Promise` that resolves to a `ScriptDeploymentResult` containing the manifest hash, transaction IDs, and deployed records. ``` -------------------------------- ### Kupmios Constructor Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-query_versioned_docs/version-0.5.2/api/query.kupmios._constructor_.md Initializes a new Kupmios instance with the provided Kupo service URL and Ogmios instance. ```APIDOC ## Kupmios.(constructor) ### Description Constructor to initialize Kupmios instance. ### Signature ```typescript constructor(kupoUrl: string, ogmios: Unwrapped.Ogmios); ``` ### Parameters #### Path Parameters * **kupoUrl** (string) - Required - URL of the Kupo service. * **ogmios** (Unwrapped.Ogmios) - Required - ``` -------------------------------- ### Get Next Patch Version Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-deploy/etc/deploy.api.md Calculate the next patch version based on the current version string. ```typescript export const nextPatchVersion: (version: string) => string; ``` -------------------------------- ### Ogmios Client Initialization Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-ogmios/etc/ogmios.api.md Provides methods to initialize an Ogmios client instance, either by connecting to a local URL or using a Demeter-based connection. ```APIDOC ## Ogmios.new ### Description Creates a new Ogmios client instance by connecting to a specified WebSocket URL. ### Method `static new(url: string): Promise` ### Parameters - **url** (string) - The WebSocket URL of the Ogmios instance. ## Ogmios.fromDemeter ### Description Creates a new Ogmios client instance using Demeter, connecting to a specific network and region with an API key. ### Method `static fromDemeter(network: 'mainnet' | 'preview', apiKey: `dmtr_ogmios${string}`, region: 'ogmios-m1'): Promise` ### Parameters - **network** ('mainnet' | 'preview') - The Cardano network to connect to. - **apiKey** (`dmtr_ogmios${string}`) - The API key for Demeter. - **region** ('ogmios-m1') - The region for the Ogmios instance. ``` -------------------------------- ### Get Message Hash Hex String Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-plutus/conformance/tests/builtin/semantics/verifyEcdsaSecp256k1Signature/README.md Converts a message file into its hex-encoded SHA2-256 hash representation. ```bash xxd -p msg.txt ``` -------------------------------- ### complete Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.txbuilder.md Completes the transaction by performing several key operations: - Verifies the presence of a change address. - Gathers inputs and performs coin selection if necessary. - Balances the change output. - Builds the transaction witness set. - Calculates the script data hash. - Estimates and sets the transaction fee. - Merges the fee value with the excess value and rebalances the change. ```APIDOC ## complete({ useCoinSelection }) ### Description Completes the transaction by performing several key operations: - Verifies the presence of a change address. - Gathers inputs and performs coin selection if necessary. - Balances the change output. - Builds the transaction witness set. - Calculates the script data hash. - Estimates and sets the transaction fee. - Merges the fee value with the excess value and rebalances the change. ### Method complete ``` -------------------------------- ### Unwrapped.Ogmios.new() Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-ogmios_versioned_docs/version-0.0.7/api/ogmios.unwrapped.ogmios.new.md Creates a new instance of Ogmios by connecting to the specified URL. ```APIDOC ## Unwrapped.Ogmios.new() ### Description Creates a new instance of Ogmios by connecting to the specified URL. ### Method static new ### Parameters #### Path Parameters - **url** (string) - Required - The URL to connect to. ### Returns Promise ``` -------------------------------- ### Initialize Blockfrost Provider Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-query/etc/query.api.md Instantiate the Blockfrost provider with network and project ID. Optionally enable script reference caching. ```typescript new Blockfrost({ network: "mainnet", projectId: "YOUR_PROJECT_ID", withScriptRefCaching: true }) ``` -------------------------------- ### queryLedgerStateEraStart Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-ogmios_versioned_docs/version-0.0.7/api/ogmios.unwrapped.ogmios.queryledgerstateerastart.md Retrieves the start of the ledger state for a given era. This method returns a Promise that resolves to the result of the query. ```APIDOC ## Unwrapped.Ogmios.queryLedgerStateEraStart() ### Description Retrieves the start of the ledger state for a given era. This method returns a Promise that resolves to the result of the query. ### Method queryLedgerStateEraStart ### Returns Promise ``` -------------------------------- ### Emulator.as() Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-emulator_versioned_docs/version-0.3.30/api/emulator.emulator.as.md The `as` method on the Emulator class allows you to execute a callback function within the emulator's context, providing access to the Blaze instance and a specific address. This is useful for simulating operations that require an address, such as sending or receiving assets. ```APIDOC ## Emulator.as() ### Description Executes a callback function within the emulator's context, providing the Blaze instance and a specific address. This is useful for simulating operations that require an address. ### Method ```typescript as(label: string, callback: (blaze: Blaze, address: Address) => Promise): Promise; ``` ### Parameters #### Path Parameters - **label** (string) - Required - A label to identify the operation. - **callback** ((blaze: Blaze, address: Address) => Promise) - Required - The function to execute. It receives the Blaze instance and an Address. ### Returns - **Promise** - A promise that resolves with the return value of the callback function. ``` -------------------------------- ### Build All Packages with Turbo Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/CLAUDE.md Builds all packages within the monorepo using the Turbo build tool. ```bash bun run build ``` -------------------------------- ### ColdWallet Constructor Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.coldwallet._constructor_.md Constructs a new instance of the ColdWallet class. ```APIDOC ## ColdWallet.(constructor) ### Description Constructs a new instance of the ColdWallet class. ### Signature constructor(address: Address, networkId: NetworkId, provider: Provider); ### Parameters #### Parameters - **address** (Address) - Required - The address of the wallet. - **networkId** (NetworkId) - Required - The network ID of the wallet. - **provider** (Provider) - Required - The provider of the wallet. ``` -------------------------------- ### Kupmios Constructor Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-query_versioned_docs/version-0.5.2/api/query.kupmios.md Initializes a new instance of the Kupmios class with the provided Kupmios URL and Ogmios instance. ```APIDOC ## Kupmios Constructor ### Description Constructor to initialize Kupmios instance. ### Parameters #### Path Parameters - **kupoUrl** (string) - The URL of the Kupmios service. - **ogmios** (Unwrapped.Ogmios) - An instance of the Ogmios provider. ``` -------------------------------- ### Get Change Address Signature Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.coldwallet.getchangeaddress.md This is the TypeScript signature for the getChangeAddress method. It returns a Promise that resolves to an Address type. ```typescript getChangeAddress(): Promise
; ``` -------------------------------- ### Get Protocol Parameters Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-emulator_versioned_docs/version-0.3.31/api/emulator.emulatorprovider.getparameters.md Fetches the current protocol parameters from the emulator. Ensure the emulator is running before calling this method. ```typescript import { Emulator, EmulatorProvider } from "@blaze-cardano/emulator"; const emulator = new Emulator(); const provider = new EmulatorProvider(emulator); async function getParams() { const params = await provider.getParameters(); console.log(params); } getParams(); ``` -------------------------------- ### TxBuilder.deployScript() Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.txbuilder.deployscript.md Deploys a script by creating a new UTxO with the script as its reference. It takes the script to be deployed and an optional address as parameters and returns the transaction builder. ```APIDOC ## TxBuilder.deployScript() ### Description Deploys a script by creating a new UTxO with the script as its reference. ### Method ```typescript deployScript(script: Script, address?: Address): TxBuilder; ``` ### Parameters #### Path Parameters - **script** (Script) - Required - The script to be deployed. - **address** (Address) - Optional - The address to lock the script to. Defaults to a burn address where the UTxO will be unspendable. ### Response #### Success Response - **TxBuilder** - The same transaction builder. ### Example ```typescript const myScript = Script.newPlutusV2Script(new PlutusV2Script("...")); txBuilder.deployScript(myScript); // or txBuilder.deployScript(myScript, someAddress); ``` ``` -------------------------------- ### Get Wallet Balance Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.coldwallet.getbalance.md Retrieves the total available balance of the wallet, encoded in CBOR. This method is part of the ColdWallet class. ```typescript getBalance(): Promise; ``` -------------------------------- ### Register Wallets for Testing Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-emulator/docs/guides/testing-a-transaction.md Registers wallets with initial assets for use in emulator tests. Uses `makeValue` for easy asset creation. ```typescript import { describe, beforeAll, it, expect } from "bun:test" import { Emulator } from "@blaze-cardano/emulator" import { makeValue } from "@blaze-cardano/sdk" const emulator = new Emulator( [], // a List of outputs for the ledger. ) describe("my Emulator test", () => { beforeAll(() => { // We will just give each wallet the same assets. const walletAssets = makeValue( 10_000_000n, // Lovelace amount ["policyId.assetName", 5n] // Native token amount ); emulator.register("WalletOne", walletAssets); emulator.register("WalletTwo", walletAssets); }); }); ``` -------------------------------- ### Get Mempool Size Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-ogmios_versioned_docs/version-0.0.7/api/ogmios.unwrapped.ogmios.sizeofmempool.md Use this method to retrieve the current size of the mempool. It returns a Promise that resolves to the mempool size. ```typescript sizeOfMempool(): Promise; ``` -------------------------------- ### Run Simple Blueprint Tests Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/CLAUDE.md Navigates to the blaze-blueprint package and runs its simple code generation test suite. ```bash cd packages/blaze-blueprint && bun run test:simple ``` -------------------------------- ### Get Protocol Parameters Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-emulator_versioned_docs/version-0.3.30/api/emulator.emulatorprovider.getparameters.md Call `getParameters()` to asynchronously retrieve the current protocol parameters. Ensure you have an instance of `EmulatorProvider` initialized. ```typescript const params = await emulatorProvider.getParameters(); console.log(params); ``` -------------------------------- ### Manage Wallets via RPC Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-emulator/docs/guides/rpc-server.md These endpoints allow for bootstrapping addresses, querying UTxOs, and funding wallets using labels. Resetting the emulator or registering a new wallet requires a POST request with a JSON payload. ```typescript await fetch("http://127.0.0.1:8787/emulator/reset", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({}), }); await fetch("http://127.0.0.1:8787/emulator/register", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ label: "carol", lovelace: "2000000" }), }); const address = await fetch("http://127.0.0.1:8787/emulator/address/carol") .then((res) => res.json()) .then((json) => json.address); const utxos = await fetch("http://127.0.0.1:8787/emulator/wallets/carol/utxos") .then((res) => res.json()); // Array of CBOR-encoded UTxOs ``` -------------------------------- ### Blaze Class - newTransaction Method Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.39/api/sdk.blaze.md Creates a new transaction using the configured provider and wallet. This is the starting point for building a transaction. ```typescript newTransaction() ``` -------------------------------- ### Get Unused Addresses Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-wallet_versioned_docs/version-0.4.9/api/wallet.coldwallet.getunusedaddresses.md This method retrieves all unused addresses controlled by the wallet. It returns a promise that resolves to an array of Address objects. ```APIDOC ## ColdWallet.getUnusedAddresses() ### Description Retrieves all unused addresses controlled by the wallet. ### Method ```typescript getUnusedAddresses(): Promise; ``` ### Returns - **Promise** - The unused addresses controlled by the wallet. ``` -------------------------------- ### Get Wallet Collateral Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.wallet.getcollateral.md Use this method to fetch the collateral UnspentOutputs for the wallet. It returns a Promise that resolves to an array of TransactionUnspentOutput objects. ```typescript abstract getCollateral(): Promise; ``` -------------------------------- ### connect Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-ogmios_versioned_docs/version-0.0.7/api/ogmios.unwrapped.ogmios.md Establishes a connection to the Ogmios service. ```APIDOC ## connect ### Description Establishes a connection to the Ogmios service. ### Method (Not specified, likely an internal SDK method) ### Endpoint (Not applicable for SDK methods) ### Parameters #### Path Parameters (None) #### Query Parameters (None) #### Request Body (None) ### Request Example (Not applicable for SDK methods) ### Response #### Success Response (Details not provided in source) #### Response Example (Not applicable for SDK methods) ``` -------------------------------- ### Get Transaction Outputs Count Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.txbuilder.outputscount.md Retrieve the number of outputs currently in the transaction builder. This is useful for checking the size of the transaction before submission. ```typescript const txBuilder = new TxBuilder(); // ... add outputs to txBuilder ... const count = txBuilder.outputsCount; console.log(`Number of outputs: ${count}`); ``` -------------------------------- ### Emulator Constructor Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-emulator_versioned_docs/version-0.3.30/api/emulator.emulator._constructor_.md Constructs a new instance of the Emulator class. Initializes the ledger with the provided genesis outputs and parameters. ```APIDOC ## Emulator.(constructor) ### Description Constructs a new instance of the Emulator class. Initializes the ledger with the provided genesis outputs and parameters. ### Signature constructor(genesisOutputs: TransactionOutput[], params?: ProtocolParameters, { evaluator, slotConfig }?: EmulatorOptions) ### Parameters #### Path Parameters * **genesisOutputs** (TransactionOutput[]) - Required - The genesis outputs to initialize the ledger with. * **params** (ProtocolParameters) - Optional - The parameters to initialize the emulator with. * **{ evaluator, slotConfig }** (EmulatorOptions) - Optional - Options for the emulator, including evaluator and slot configuration. ``` -------------------------------- ### Get Reward Addresses Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.hotsinglewallet.getrewardaddresses.md Call this method to fetch all reward addresses managed by the HotSingleWallet instance. Ensure the wallet is initialized before calling. ```typescript getRewardAddresses(): Promise; ``` -------------------------------- ### Emulator.mockedWallets Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-emulator_versioned_docs/version-0.3.30/api/emulator.emulator.mockedwallets.md Provides a map where keys are string labels and values are Wallet instances, representing mocked wallets available in the emulator. ```APIDOC ## Emulator.mockedWallets ### Description A map from label to blaze instance for that wallet. ### Property `mockedWallets: Map` ### Type `Map` ### Details This property allows developers to access and potentially manipulate mocked wallet instances by their string labels within the emulator environment. This is useful for setting up specific test scenarios or debugging. ``` -------------------------------- ### Get Script Size Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.getscriptsize.md Calculates the size of a script in bytes. This function takes a Script object as input and returns its size as a number. ```typescript declare function getScriptSize(script: Script): number; ``` -------------------------------- ### Get Network ID Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.coldwallet.getnetworkid.md Retrieves the network ID of the currently connected account. This method returns a Promise that resolves to a NetworkId type. ```typescript getNetworkId(): Promise; ``` -------------------------------- ### HotSingleWallet.(constructor) Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-wallet_versioned_docs/version-0.4.10/api/wallet.hotsinglewallet._constructor_.md Constructs a new instance of the HotSingleWallet class. ```APIDOC ## HotSingleWallet.(constructor) ### Description Constructs a new instance of the HotSingleWallet class. ### Signature ```typescript constructor(paymentSigningKey: Ed25519PrivateNormalKeyHex, networkId: NetworkId, provider: Provider, stakeSigningKey?: Ed25519PrivateNormalKeyHex); ``` ### Parameters #### Path Parameters * **paymentSigningKey** (Ed25519PrivateNormalKeyHex) - Required - * **networkId** (NetworkId) - Required - The network ID for the wallet. * **provider** (Provider) - Required - The provider for the wallet. * **stakeSigningKey** (Ed25519PrivateNormalKeyHex) - Optional - An optional private signing key for the delegation part of the wallet. If not provided, the wallet will have an enterprise address. ``` -------------------------------- ### Get All UTxOs Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-emulator_versioned_docs/version-0.3.30/api/emulator.emulator.utxos.md Call the `utxos()` method on an Emulator instance to retrieve all available UTxOs. This method returns an array of `TransactionUnspentOutput` objects. ```typescript utxos(): TransactionUnspentOutput[]; ``` -------------------------------- ### Resolve Datum Example Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-query_versioned_docs/version-0.5.2/api/query.maestro.resolvedatum.md Demonstrates how to use the `resolveDatum` method to fetch PlutusData from a DatumHash. This method returns a Promise that resolves to the PlutusData. ```typescript import { DatumHash, PlutusData } from "@blaze-cardano/query"; async function getDatum(datumHash: DatumHash): Promise { // Assuming 'maestro' is an instance of the Maestro class const datum = await maestro.resolveDatum(datumHash); return datum; } ``` -------------------------------- ### deployScript Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.txbuilder.md Deploys a script by creating a new UTxO with the script as its reference. ```APIDOC ## deployScript(script, address) ### Description Deploys a script by creating a new UTxO with the script as its reference. ### Method deployScript ``` -------------------------------- ### EmulatorProvider Methods Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-emulator_versioned_docs/version-0.3.30/api/emulator.emulatorprovider.md This section details the methods available on the EmulatorProvider class for interacting with the emulator. ```APIDOC ## EmulatorProvider Class The EmulatorProvider class implements the Provider interface and provides methods to interact with the Emulator. ### Methods * **awaitTransactionConfirmation(txId, _timeout)**: Waits for a transaction to be confirmed. * **evaluateTransaction(tx, additionalUtxos)**: Evaluates a given transaction. * **getParameters()**: Retrieves the emulator's parameters. * **getSlotConfig()**: Retrieves the emulator's slot configuration. * **getUnspentOutputByNFT(unit)**: Fetches an unspent output associated with a specific NFT unit. * **getUnspentOutputs(address)**: Retrieves all unspent outputs for a given address. * **getUnspentOutputsWithAsset(address, unit)**: Fetches unspent outputs for an address that include a specific asset unit. * **postTransactionToChain(tx)**: Submits a transaction to the emulator's chain. * **resolveDatum(datumHash)**: Resolves a datum by its hash. * **resolveUnspentOutputs(txIns)**: Resolves a list of unspent outputs based on transaction inputs. ``` -------------------------------- ### Get Deployment Address from Bech32 Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-deploy/docs/guides/script-deployment.md Obtain the deployment address by decoding a Bech32 encoded string. Ensure the environment variable SCRIPT_DEPLOYMENT_ADDRESS is set. ```typescript import { Core } from "@blaze-cardano/sdk"; const deploymentAddress = Core.addressFromBech32(process.env.SCRIPT_DEPLOYMENT_ADDRESS!); ``` -------------------------------- ### Get Burn Address Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-tx_versioned_docs/version-0.13.0/api/tx.txbuilder.burnaddress.md Retrieves the predefined burn address from the TxBuilder instance. This address is used for specific transaction types, such as burning tokens. ```typescript import { TxBuilder } from "@blaze-cardano/tx"; import { Address } from "@blaze-cardano/core"; // Assuming txBuilder is an initialized instance of TxBuilder const txBuilder: TxBuilder = new TxBuilder(...); const burnAddr: Address = txBuilder.burnAddress; console.log(burnAddr.toString()); ``` -------------------------------- ### Creating a HotWallet from Masterkey Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-wallet_versioned_docs/version-0.4.9/api/wallet.hotwallet.frommasterkey.md Instantiate a HotWallet using a master key and provider. Optional parameters for network ID and address type can be provided. ```typescript static fromMasterkey(masterkey: Bip32PrivateKeyHex, provider: Provider, networkId?: NetworkId, addressType?: AddressType): Promise ``` -------------------------------- ### Version Comparison and Incrementing Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/packages/blaze-deploy/docs/guides/script-management.md Demonstrates how to use utility functions for comparing and incrementing semantic deployment versions. ```typescript import { compareDeploymentVersions, nextPatchVersion } from "@blaze-cardano/deploy"; const nextVersion = nextPatchVersion("1.2.3"); // "1.2.4" const order = compareDeploymentVersions("1.2.4", "1.2.3"); // 1 ``` -------------------------------- ### Get Unspent Outputs Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.webwallet.getunspentoutputs.md Call this method to retrieve an array of unspent transaction outputs controlled by the wallet. Ensure the wallet is connected before calling. ```typescript const utxos = await wallet.getUnspentOutputs(); ``` -------------------------------- ### Kupmios Constructor Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.kupmios.md Initializes a new instance of the Kupmios class with the specified Kupo URL and Ogmios instance. ```APIDOC ## Kupmios Constructor ### Description Constructor to initialize Kupmios instance. ### Parameters #### Path Parameters * **kupoUrl** (string) - Required - The URL of the Kupo service. * **ogmios** (Unwrapped.Ogmios) - Required - An instance of the Ogmios provider. ``` -------------------------------- ### Get Unused Addresses Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.webwallet.getunusedaddresses.md Call this method to fetch all unused addresses associated with the WebWallet. It returns a Promise that resolves to an array of Address objects. ```typescript getUnusedAddresses(): Promise; ``` -------------------------------- ### Get Network ID Source: https://github.com/butaneprotocol/blaze-cardano/blob/main/docs/blaze-sdk_versioned_docs/version-0.2.38/api/sdk.cip30interface.getnetworkid.md Call this method to obtain the network ID of the connected wallet. This is useful for verifying network compatibility before performing transactions. ```typescript getNetworkId(): Promise; ```