From f420814df4c21ccc702400ded1c25a227f0017b1 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Fri, 16 Jan 2026 14:10:46 -0500 Subject: [PATCH 01/29] updo --- package.json | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 59d4ebd..c1762dc 100644 --- a/package.json +++ b/package.json @@ -25,27 +25,27 @@ "updo": "npx npm-check-updates -i" }, "dependencies": { - "@xylabs/assert": "5.0.33", - "@xylabs/delay": "5.0.33", - "@xylabs/typeof": "5.0.33", - "@xylabs/tsconfig": "7.2.8", - "@xyo-network/payload-builder": "5.1.22", - "@xyo-network/wallet": "5.1.22", - "@xyo-network/xl1-protocol": "1.13.11", - "@xyo-network/xl1-protocol-sdk": "1.16.12", - "@xyo-network/xl1-rpc": "1.16.12", + "@xylabs/assert": "5.0.61", + "@xylabs/delay": "5.0.61", + "@xylabs/typeof": "5.0.61", + "@xylabs/tsconfig": "7.2.32", + "@xyo-network/payload-builder": "5.2.24", + "@xyo-network/wallet": "5.2.24", + "@xyo-network/xl1-protocol": "1.18.14", + "@xyo-network/xl1-protocol-sdk": "1.18.14", + "@xyo-network/xl1-rpc": "1.18.14", "dotenv": "17.2.3" }, "devDependencies": { - "@types/node": "24.10.1", - "@xylabs/eslint-config-flat": "7.2.8", - "@xyo-network/payload-model": "5.1.22", - "@xyo-network/xl1-cli": "1.16.12", - "eslint": "9.39.1", + "@types/node": "25.0.9", + "@xylabs/eslint-config-flat": "7.2.32", + "@xyo-network/payload-model": "5.2.24", + "@xyo-network/xl1-cli": "1.18.1", + "eslint": "9.39.2", "eslint-import-resolver-typescript": "4.4.4", - "npm-check-updates": "19.1.2", - "tsx": "4.20.6", - "typedoc": "0.28.14", + "npm-check-updates": "19.3.1", + "tsx": "4.21.0", + "typedoc": "0.28.16", "typedoc-plugin-markdown": "4.9.0", "typescript": "5.9.3" }, From 8ad3e349ae7bb30c27b3dab5c0fc79e1a2a75b63 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Fri, 16 Jan 2026 15:17:27 -0500 Subject: [PATCH 02/29] clean up example envs --- .env.example | 1 - 1 file changed, 1 deletion(-) diff --git a/.env.example b/.env.example index 7368d7b..8ee6dc6 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,5 @@ # Wallet mnemonic (seed phrase) # Ensure default account has sufficient funds for transactions -# This is my seed phrase for sequence XYO_WALLET_MNEMONIC="orbit torch boil interest warrior spoon lounge ecology knock cereal mango habit" # RPC URL for the XYO network [Localhost] From 389db9cd08125a350969e1fcfead600c6b4a73b7 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Fri, 16 Jan 2026 15:17:46 -0500 Subject: [PATCH 03/29] working debugger launch task --- .vscode/launch.json | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index d1c01b0..2b2a4f0 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,26 +4,22 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ - { + { "type": "node", "request": "launch", - "name": "Node Hello World Sample", - "program": "${workspaceFolder}/dist/index.js", - "args": [], - "outFiles": [ - "${workspaceFolder}/dist/**" - ], + "name": "Node Hello World Runner", + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/tsx", "runtimeArgs": [ "--max-old-space-size=8192" ], + "program": "${workspaceFolder}/src/index.ts", + "args": [], "envFile": "${workspaceFolder}/.env", "sourceMaps": true, - "resolveSourceMapLocations": [ - "!**/node_modules/**", - ], - "pauseForSourceMap": true, "cwd": "${workspaceFolder}", - "preLaunchTask": "build", + "skipFiles": [ + "/**" + ], }, { "type": "node", From 846fdfcb76e3c72f8698589623db5f47c0f76d90 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Fri, 16 Jan 2026 15:18:04 -0500 Subject: [PATCH 04/29] use barrel sdk package --- package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index c1762dc..e083a81 100644 --- a/package.json +++ b/package.json @@ -31,9 +31,7 @@ "@xylabs/tsconfig": "7.2.32", "@xyo-network/payload-builder": "5.2.24", "@xyo-network/wallet": "5.2.24", - "@xyo-network/xl1-protocol": "1.18.14", - "@xyo-network/xl1-protocol-sdk": "1.18.14", - "@xyo-network/xl1-rpc": "1.18.14", + "@xyo-network/xl1-sdk": "~1.18.2", "dotenv": "17.2.3" }, "devDependencies": { From 6366eeaf48b342626d1575fd7745df5bf17562ac Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Fri, 16 Jan 2026 15:18:18 -0500 Subject: [PATCH 05/29] helper for getting a gateway and locator singleton --- src/getGateway.ts | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/getGateway.ts diff --git a/src/getGateway.ts b/src/getGateway.ts new file mode 100644 index 0000000..bcb7835 --- /dev/null +++ b/src/getGateway.ts @@ -0,0 +1,43 @@ +import { assertEx } from '@xylabs/assert' +import { isDefined } from '@xylabs/typeof' +import type { + CreatableProviderContext, + ProviderFactoryLocator, + RpcSchemaMap, TransportFactory, XyoConnection, +} from '@xyo-network/xl1-sdk' +import { + ADDRESS_INDEX, buildJsonRpcProviderLocator, buildSimpleXyoSigner, generateXyoBaseWalletFromPhrase, + HttpRpcTransport, SimpleXyoGatewayRunner, XyoConnectionMoniker, +} from '@xyo-network/xl1-sdk' + +let locator: ProviderFactoryLocator + +export const getGateway = async (mnemonic?: string, rpcEndpoint = 'http://localhost:8080/rpc') => { + // Load the account to use for the transaction + const walletMnemonic = assertEx(process.env.XYO_WALLET_MNEMONIC ?? mnemonic, () => 'Unable to resolve mnemonic from environment variable or argument') + const account = await (await generateXyoBaseWalletFromPhrase(walletMnemonic)).derivePath(ADDRESS_INDEX.XYO) + console.log('Using account:', account.address) + + // Build the signer + const signer = await buildSimpleXyoSigner({ account }) + + // Get the provider locator + const locator = await getLocator(rpcEndpoint) + + // Get the XyoConnection instance + const connection = await locator.getInstance(XyoConnectionMoniker) + + // Return a new SimpleXyoGatewayRunner instance + return new SimpleXyoGatewayRunner(connection, signer) +} + +export const getLocator = async (rpcEndpoint = 'http://localhost:8080/rpc') => { + if (isDefined(locator)) return locator + // Determine the RPC endpoint to use for the chain connection + const endpoint = process.env.XYO_CHAIN_RPC_URL ?? rpcEndpoint + console.log('Using endpoint:', endpoint) + + const transportFactory: TransportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(endpoint, schemas) + locator = await buildJsonRpcProviderLocator({ transportFactory }) + return locator +} From 647bff05343c7dd8593a84862d5971cf51ff8228 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Fri, 16 Jan 2026 15:18:48 -0500 Subject: [PATCH 06/29] remove logic now in helper --- src/helloWorld.ts | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/src/helloWorld.ts b/src/helloWorld.ts index ec0897f..bca5243 100644 --- a/src/helloWorld.ts +++ b/src/helloWorld.ts @@ -1,42 +1,25 @@ -import { assertEx } from '@xylabs/assert' import { isError } from '@xylabs/typeof' import { PayloadBuilder } from '@xyo-network/payload-builder' import type { Payload } from '@xyo-network/payload-model' import type { HashPayload, SignedHydratedTransaction } from '@xyo-network/xl1-protocol' -import { - ADDRESS_INDEX, generateXyoBaseWalletFromPhrase, - SimpleXyoGatewayRunner, - SimpleXyoSigner, -} from '@xyo-network/xl1-protocol-sdk' -import { HttpRpcXyoConnection } from '@xyo-network/xl1-rpc' import { config } from 'dotenv' +import { getGateway } from './getGateway.ts' + // Load environment variables from .env file config({ quiet: true }) const logger = console -export async function helloWorld(mnemonic?: string, rpcEndpoint = 'http://localhost:8080/rpc'): Promise { +export async function helloWorld(mnemonic?: string): Promise { try { console.log('\n**** Starting XL1 Hello World NodeJs Sample ****\n') - // Load the account to use for the transaction - const walletMnemonic = assertEx(process.env.XYO_WALLET_MNEMONIC ?? mnemonic, () => 'Unable to resolve mnemonic from environment variable or argument') - const account = await (await generateXyoBaseWalletFromPhrase(walletMnemonic)).derivePath(ADDRESS_INDEX.XYO) - console.log('Using account:', account.address) - - // Determine the RPC endpoint to use for the chain connection - const endpoint = process.env.XYO_CHAIN_RPC_URL ?? rpcEndpoint - console.log('Using endpoint:', endpoint) - - // Create a new RPC connection - const connection = new HttpRpcXyoConnection({ endpoint }) - const signer = new SimpleXyoSigner(account) - const gateway = new SimpleXyoGatewayRunner(connection, signer) - // Generate random data to send in the transaction const { onChainData, offChainData } = await getRandomTransactionData() + const gateway = await getGateway(mnemonic) + // Send the transaction to the network const [txHash] = await gateway.addPayloadsToChain(onChainData, offChainData) From 165cfc09327f8811113f44b546a498b3af3922c2 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Fri, 16 Jan 2026 15:19:08 -0500 Subject: [PATCH 07/29] pass viewer instead of creating one --- src/helloWorldRunner.ts | 13 +++++++++++-- src/waitForInitialBlocks.ts | 8 +++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/helloWorldRunner.ts b/src/helloWorldRunner.ts index 69a4b4b..22ea60b 100644 --- a/src/helloWorldRunner.ts +++ b/src/helloWorldRunner.ts @@ -1,8 +1,12 @@ import { type ChildProcess, spawn } from 'node:child_process' import { HDWallet } from '@xyo-network/wallet' -import { ADDRESS_INDEX, generateXyoBaseWalletFromPhrase } from '@xyo-network/xl1-protocol-sdk' +import type { XyoViewer } from '@xyo-network/xl1-protocol-sdk' +import { + ADDRESS_INDEX, generateXyoBaseWalletFromPhrase, XyoViewerMoniker, +} from '@xyo-network/xl1-protocol-sdk' +import { getLocator } from './getGateway.ts' import { helloWorld } from './helloWorld.js' import { waitForInitialBlocks } from './waitForInitialBlocks.js' @@ -83,7 +87,12 @@ async function startXl1(): Promise { throw error }) - await waitForInitialBlocks() + // Get the XyoViewer instance + const locator = await getLocator() + const viewer = await locator.getInstance(XyoViewerMoniker) + + // Wait for the initial blocks to be created + await waitForInitialBlocks(viewer) return mnemonic } catch (error) { diff --git a/src/waitForInitialBlocks.ts b/src/waitForInitialBlocks.ts index 97119ec..40b7819 100644 --- a/src/waitForInitialBlocks.ts +++ b/src/waitForInitialBlocks.ts @@ -1,12 +1,10 @@ import { assertEx } from '@xylabs/assert' import { delay } from '@xylabs/delay' import { isDefined } from '@xylabs/typeof' -import { HttpRpcXyoConnection } from '@xyo-network/xl1-rpc' - -export const waitForInitialBlocks = async (maxAttempts = 10): Promise => { - const connection = new HttpRpcXyoConnection({ endpoint: 'http://localhost:8080/rpc' }) - const viewer = assertEx(connection.viewer, () => 'Connection viewer is undefined') +import type { XyoViewer } from '@xyo-network/xl1-sdk' +export const waitForInitialBlocks = async (viewer: XyoViewer, maxAttempts = 10): Promise => { + assertEx(viewer, () => 'Connection viewer is undefined') console.log('\n⏳ Waiting for genesis block creation...') let attempts = 0 while (attempts < maxAttempts) { From 1a1819b6246171bfa520bf864c011ab54858ad25 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Fri, 16 Jan 2026 15:21:40 -0500 Subject: [PATCH 08/29] extract getLocator helper to new file --- src/getGateway.ts | 25 +++++-------------------- src/getLocator.ts | 18 ++++++++++++++++++ src/helloWorldRunner.ts | 2 +- 3 files changed, 24 insertions(+), 21 deletions(-) create mode 100644 src/getLocator.ts diff --git a/src/getGateway.ts b/src/getGateway.ts index bcb7835..e3e3e6a 100644 --- a/src/getGateway.ts +++ b/src/getGateway.ts @@ -1,16 +1,12 @@ import { assertEx } from '@xylabs/assert' -import { isDefined } from '@xylabs/typeof' -import type { - CreatableProviderContext, - ProviderFactoryLocator, - RpcSchemaMap, TransportFactory, XyoConnection, -} from '@xyo-network/xl1-sdk' +import type { XyoConnection } from '@xyo-network/xl1-sdk' import { - ADDRESS_INDEX, buildJsonRpcProviderLocator, buildSimpleXyoSigner, generateXyoBaseWalletFromPhrase, - HttpRpcTransport, SimpleXyoGatewayRunner, XyoConnectionMoniker, + ADDRESS_INDEX, + buildSimpleXyoSigner, generateXyoBaseWalletFromPhrase, + SimpleXyoGatewayRunner, XyoConnectionMoniker, } from '@xyo-network/xl1-sdk' -let locator: ProviderFactoryLocator +import { getLocator } from './getLocator.ts' export const getGateway = async (mnemonic?: string, rpcEndpoint = 'http://localhost:8080/rpc') => { // Load the account to use for the transaction @@ -30,14 +26,3 @@ export const getGateway = async (mnemonic?: string, rpcEndpoint = 'http://localh // Return a new SimpleXyoGatewayRunner instance return new SimpleXyoGatewayRunner(connection, signer) } - -export const getLocator = async (rpcEndpoint = 'http://localhost:8080/rpc') => { - if (isDefined(locator)) return locator - // Determine the RPC endpoint to use for the chain connection - const endpoint = process.env.XYO_CHAIN_RPC_URL ?? rpcEndpoint - console.log('Using endpoint:', endpoint) - - const transportFactory: TransportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(endpoint, schemas) - locator = await buildJsonRpcProviderLocator({ transportFactory }) - return locator -} diff --git a/src/getLocator.ts b/src/getLocator.ts new file mode 100644 index 0000000..307f23f --- /dev/null +++ b/src/getLocator.ts @@ -0,0 +1,18 @@ +import { isDefined } from '@xylabs/typeof' +import type { + ProviderFactoryLocator, RpcSchemaMap, TransportFactory, +} from '@xyo-network/xl1-sdk' +import { buildJsonRpcProviderLocator, HttpRpcTransport } from '@xyo-network/xl1-sdk' + +let locator: ProviderFactoryLocator + +export const getLocator = async (rpcEndpoint = 'http://localhost:8080/rpc') => { + if (isDefined(locator)) return locator + // Determine the RPC endpoint to use for the chain connection + const endpoint = process.env.XYO_CHAIN_RPC_URL ?? rpcEndpoint + console.log('Using endpoint:', endpoint) + + const transportFactory: TransportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(endpoint, schemas) + locator = await buildJsonRpcProviderLocator({ transportFactory }) + return locator +} diff --git a/src/helloWorldRunner.ts b/src/helloWorldRunner.ts index 22ea60b..08b28d1 100644 --- a/src/helloWorldRunner.ts +++ b/src/helloWorldRunner.ts @@ -6,7 +6,7 @@ import { ADDRESS_INDEX, generateXyoBaseWalletFromPhrase, XyoViewerMoniker, } from '@xyo-network/xl1-protocol-sdk' -import { getLocator } from './getGateway.ts' +import { getLocator } from './getLocator.ts' import { helloWorld } from './helloWorld.js' import { waitForInitialBlocks } from './waitForInitialBlocks.js' From ea6bf14cc87d62bd0bf24579677a8a30458d4f9c Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 14:40:53 -0600 Subject: [PATCH 09/29] Singleton gateway --- package.json | 4 ++-- src/getGateway.ts | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e083a81..7364eb1 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "dependencies": { "@xylabs/assert": "5.0.61", "@xylabs/delay": "5.0.61", - "@xylabs/typeof": "5.0.61", "@xylabs/tsconfig": "7.2.32", + "@xylabs/typeof": "5.0.61", "@xyo-network/payload-builder": "5.2.24", "@xyo-network/wallet": "5.2.24", "@xyo-network/xl1-sdk": "~1.18.2", @@ -58,4 +58,4 @@ "publishConfig": { "access": "restricted" } -} \ No newline at end of file +} diff --git a/src/getGateway.ts b/src/getGateway.ts index e3e3e6a..97aacd0 100644 --- a/src/getGateway.ts +++ b/src/getGateway.ts @@ -1,4 +1,5 @@ import { assertEx } from '@xylabs/assert' +import { isDefined } from '@xylabs/typeof' import type { XyoConnection } from '@xyo-network/xl1-sdk' import { ADDRESS_INDEX, @@ -8,7 +9,11 @@ import { import { getLocator } from './getLocator.ts' +let gateway: SimpleXyoGatewayRunner | undefined + export const getGateway = async (mnemonic?: string, rpcEndpoint = 'http://localhost:8080/rpc') => { + if (isDefined(gateway)) return gateway + // Load the account to use for the transaction const walletMnemonic = assertEx(process.env.XYO_WALLET_MNEMONIC ?? mnemonic, () => 'Unable to resolve mnemonic from environment variable or argument') const account = await (await generateXyoBaseWalletFromPhrase(walletMnemonic)).derivePath(ADDRESS_INDEX.XYO) @@ -24,5 +29,6 @@ export const getGateway = async (mnemonic?: string, rpcEndpoint = 'http://localh const connection = await locator.getInstance(XyoConnectionMoniker) // Return a new SimpleXyoGatewayRunner instance - return new SimpleXyoGatewayRunner(connection, signer) + gateway = new SimpleXyoGatewayRunner(connection, signer) + return gateway } From c00064f67bda3b9dd8260e48367af53f2d617df1 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 14:44:56 -0600 Subject: [PATCH 10/29] Hoist default rpcUrl calculation --- src/getGateway.ts | 1 + src/getLocator.ts | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/getGateway.ts b/src/getGateway.ts index 97aacd0..59e300e 100644 --- a/src/getGateway.ts +++ b/src/getGateway.ts @@ -12,6 +12,7 @@ import { getLocator } from './getLocator.ts' let gateway: SimpleXyoGatewayRunner | undefined export const getGateway = async (mnemonic?: string, rpcEndpoint = 'http://localhost:8080/rpc') => { + // If existing gateway, return it if (isDefined(gateway)) return gateway // Load the account to use for the transaction diff --git a/src/getLocator.ts b/src/getLocator.ts index 307f23f..5176fe3 100644 --- a/src/getLocator.ts +++ b/src/getLocator.ts @@ -6,13 +6,16 @@ import { buildJsonRpcProviderLocator, HttpRpcTransport } from '@xyo-network/xl1- let locator: ProviderFactoryLocator -export const getLocator = async (rpcEndpoint = 'http://localhost:8080/rpc') => { +// Determine the RPC endpoint to use for the chain connection +const DefaultRpcEndpoint = process.env.XYO_CHAIN_RPC_URL ?? 'http://localhost:8080/rpc' + +export const getLocator = async (rpcUrl = DefaultRpcEndpoint) => { + // If existing locator, return it if (isDefined(locator)) return locator - // Determine the RPC endpoint to use for the chain connection - const endpoint = process.env.XYO_CHAIN_RPC_URL ?? rpcEndpoint - console.log('Using endpoint:', endpoint) - const transportFactory: TransportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(endpoint, schemas) + // Build a new locator + console.log('Using endpoint:', rpcUrl) + const transportFactory: TransportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(rpcUrl, schemas) locator = await buildJsonRpcProviderLocator({ transportFactory }) return locator } From a1591028869680a207573a90d9cf32234c7cbe82 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 14:52:47 -0600 Subject: [PATCH 11/29] Signer helper --- src/getSignerAccount.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/getSignerAccount.ts diff --git a/src/getSignerAccount.ts b/src/getSignerAccount.ts new file mode 100644 index 0000000..70e29f6 --- /dev/null +++ b/src/getSignerAccount.ts @@ -0,0 +1,21 @@ +import { assertEx } from '@xylabs/assert' +import { ADDRESS_INDEX, generateXyoBaseWalletFromPhrase } from '@xyo-network/xl1-sdk' + +/** + * Retrieves the signer account derived from the provided mnemonic or environment variable. + * @param walletMnemonic The mnemonic to use for deriving the account. If not provided, it + * will be read from the XYO_WALLET_MNEMONIC environment variable. + * @returns The derived account + */ +export const getSignerAccount = async (walletMnemonic?: string) => { + // Determine the account to use for the transaction + const mnemonic = assertEx( + walletMnemonic ?? process.env.XYO_WALLET_MNEMONIC, + () => 'Wallet mnemonic must be supplied from either XYO_WALLET_MNEMONIC ENV VAR or argument', + ) + const wallet = await generateXyoBaseWalletFromPhrase(mnemonic) + const account = await wallet.derivePath(ADDRESS_INDEX.XYO) + console.log('Using account:', account.address) + + return account +} From aabd7d70f3af8f33c825cdae533d0326f7a92d1e Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 15:00:56 -0600 Subject: [PATCH 12/29] Update signer account helper --- package.json | 1 + src/getSignerAccount.ts | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7364eb1..1fd0b58 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "devDependencies": { "@types/node": "25.0.9", "@xylabs/eslint-config-flat": "7.2.32", + "@xyo-network/account-model": "5.2.24", "@xyo-network/payload-model": "5.2.24", "@xyo-network/xl1-cli": "1.18.1", "eslint": "9.39.2", diff --git a/src/getSignerAccount.ts b/src/getSignerAccount.ts index 70e29f6..c1aec02 100644 --- a/src/getSignerAccount.ts +++ b/src/getSignerAccount.ts @@ -1,6 +1,10 @@ import { assertEx } from '@xylabs/assert' +import { isDefined } from '@xylabs/typeof' +import type { AccountInstance } from '@xyo-network/account-model' import { ADDRESS_INDEX, generateXyoBaseWalletFromPhrase } from '@xyo-network/xl1-sdk' +let signerAccount: AccountInstance | undefined + /** * Retrieves the signer account derived from the provided mnemonic or environment variable. * @param walletMnemonic The mnemonic to use for deriving the account. If not provided, it @@ -8,14 +12,16 @@ import { ADDRESS_INDEX, generateXyoBaseWalletFromPhrase } from '@xyo-network/xl1 * @returns The derived account */ export const getSignerAccount = async (walletMnemonic?: string) => { - // Determine the account to use for the transaction + // If existing signer account, return it + if (isDefined (signerAccount)) return signerAccount + + // Determine the mnemonic for the wallet to use for transactions const mnemonic = assertEx( walletMnemonic ?? process.env.XYO_WALLET_MNEMONIC, () => 'Wallet mnemonic must be supplied from either XYO_WALLET_MNEMONIC ENV VAR or argument', ) const wallet = await generateXyoBaseWalletFromPhrase(mnemonic) - const account = await wallet.derivePath(ADDRESS_INDEX.XYO) - console.log('Using account:', account.address) - - return account + signerAccount = await wallet.derivePath(ADDRESS_INDEX.XYO) + console.log('Using signer account:', signerAccount.address) + return signerAccount } From f9888e1d4b80943d0929a98245edc4a580996a36 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 15:01:05 -0600 Subject: [PATCH 13/29] Use signer account helper --- src/getGateway.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/getGateway.ts b/src/getGateway.ts index 59e300e..3aac2b2 100644 --- a/src/getGateway.ts +++ b/src/getGateway.ts @@ -1,13 +1,11 @@ -import { assertEx } from '@xylabs/assert' import { isDefined } from '@xylabs/typeof' import type { XyoConnection } from '@xyo-network/xl1-sdk' import { - ADDRESS_INDEX, - buildSimpleXyoSigner, generateXyoBaseWalletFromPhrase, - SimpleXyoGatewayRunner, XyoConnectionMoniker, + buildSimpleXyoSigner, SimpleXyoGatewayRunner, XyoConnectionMoniker, } from '@xyo-network/xl1-sdk' import { getLocator } from './getLocator.ts' +import { getSignerAccount } from './getSignerAccount.ts' let gateway: SimpleXyoGatewayRunner | undefined @@ -15,9 +13,7 @@ export const getGateway = async (mnemonic?: string, rpcEndpoint = 'http://localh // If existing gateway, return it if (isDefined(gateway)) return gateway - // Load the account to use for the transaction - const walletMnemonic = assertEx(process.env.XYO_WALLET_MNEMONIC ?? mnemonic, () => 'Unable to resolve mnemonic from environment variable or argument') - const account = await (await generateXyoBaseWalletFromPhrase(walletMnemonic)).derivePath(ADDRESS_INDEX.XYO) + const account = await getSignerAccount(mnemonic) console.log('Using account:', account.address) // Build the signer From 41da0a1f9856c990d2f6b430124cded7de4f6849 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 15:14:04 -0600 Subject: [PATCH 14/29] pin version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1fd0b58..7634edc 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@xylabs/typeof": "5.0.61", "@xyo-network/payload-builder": "5.2.24", "@xyo-network/wallet": "5.2.24", - "@xyo-network/xl1-sdk": "~1.18.2", + "@xyo-network/xl1-sdk": "1.18.2", "dotenv": "17.2.3" }, "devDependencies": { From a94eea86078094df612694cfda9f43f6f041899f Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 15:14:33 -0600 Subject: [PATCH 15/29] Remove duplicate logging --- src/getGateway.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/getGateway.ts b/src/getGateway.ts index 3aac2b2..ed0f9a6 100644 --- a/src/getGateway.ts +++ b/src/getGateway.ts @@ -9,12 +9,12 @@ import { getSignerAccount } from './getSignerAccount.ts' let gateway: SimpleXyoGatewayRunner | undefined -export const getGateway = async (mnemonic?: string, rpcEndpoint = 'http://localhost:8080/rpc') => { +export const getGateway = async (mnemonic?: string, rpcEndpoint?: string) => { // If existing gateway, return it if (isDefined(gateway)) return gateway + // Get the signer account const account = await getSignerAccount(mnemonic) - console.log('Using account:', account.address) // Build the signer const signer = await buildSimpleXyoSigner({ account }) From bb5ab30bc39cfa662eb591d89a7a007a4ddeb22b Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 15:14:45 -0600 Subject: [PATCH 16/29] Add signer to locator --- src/getLocator.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/getLocator.ts b/src/getLocator.ts index 5176fe3..0c6cb60 100644 --- a/src/getLocator.ts +++ b/src/getLocator.ts @@ -2,7 +2,11 @@ import { isDefined } from '@xylabs/typeof' import type { ProviderFactoryLocator, RpcSchemaMap, TransportFactory, } from '@xyo-network/xl1-sdk' -import { buildJsonRpcProviderLocator, HttpRpcTransport } from '@xyo-network/xl1-sdk' +import { + buildJsonRpcProviderLocator, HttpRpcTransport, SimpleXyoSigner, +} from '@xyo-network/xl1-sdk' + +import { getSignerAccount } from './getSignerAccount.ts' let locator: ProviderFactoryLocator @@ -17,5 +21,8 @@ export const getLocator = async (rpcUrl = DefaultRpcEndpoint) => { console.log('Using endpoint:', rpcUrl) const transportFactory: TransportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(rpcUrl, schemas) locator = await buildJsonRpcProviderLocator({ transportFactory }) + + const account = await getSignerAccount() + locator.register(SimpleXyoSigner.factory(SimpleXyoSigner.dependencies, { account })) return locator } From 4ca7be0d76c2095179414b89ada91a5f727e048e Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 15:25:40 -0600 Subject: [PATCH 17/29] Update helpers --- src/getGateway.ts | 20 +++++++------------- src/getLocator.ts | 22 +++++++++------------- src/getTransportFactory.ts | 18 ++++++++++++++++++ 3 files changed, 34 insertions(+), 26 deletions(-) create mode 100644 src/getTransportFactory.ts diff --git a/src/getGateway.ts b/src/getGateway.ts index ed0f9a6..2beea70 100644 --- a/src/getGateway.ts +++ b/src/getGateway.ts @@ -1,31 +1,25 @@ import { isDefined } from '@xylabs/typeof' -import type { XyoConnection } from '@xyo-network/xl1-sdk' +import type { SimpleXyoSigner, XyoConnection } from '@xyo-network/xl1-sdk' import { - buildSimpleXyoSigner, SimpleXyoGatewayRunner, XyoConnectionMoniker, + SimpleXyoGatewayRunner, XyoConnectionMoniker, XyoSignerMoniker, } from '@xyo-network/xl1-sdk' import { getLocator } from './getLocator.ts' -import { getSignerAccount } from './getSignerAccount.ts' let gateway: SimpleXyoGatewayRunner | undefined -export const getGateway = async (mnemonic?: string, rpcEndpoint?: string) => { +export const getGateway = async (walletMnemonic?: string, rpcEndpoint?: string) => { // If existing gateway, return it if (isDefined(gateway)) return gateway - // Get the signer account - const account = await getSignerAccount(mnemonic) - - // Build the signer - const signer = await buildSimpleXyoSigner({ account }) - // Get the provider locator - const locator = await getLocator(rpcEndpoint) + const locator = await getLocator(walletMnemonic, rpcEndpoint) - // Get the XyoConnection instance + // Use locator to get connection and signer const connection = await locator.getInstance(XyoConnectionMoniker) + const signer = await locator.getInstance(XyoSignerMoniker) - // Return a new SimpleXyoGatewayRunner instance + // Create gateway from connection and signer gateway = new SimpleXyoGatewayRunner(connection, signer) return gateway } diff --git a/src/getLocator.ts b/src/getLocator.ts index 0c6cb60..a18d647 100644 --- a/src/getLocator.ts +++ b/src/getLocator.ts @@ -1,28 +1,24 @@ import { isDefined } from '@xylabs/typeof' -import type { - ProviderFactoryLocator, RpcSchemaMap, TransportFactory, -} from '@xyo-network/xl1-sdk' -import { - buildJsonRpcProviderLocator, HttpRpcTransport, SimpleXyoSigner, -} from '@xyo-network/xl1-sdk' +import type { ProviderFactoryLocator } from '@xyo-network/xl1-sdk' +import { buildJsonRpcProviderLocator, SimpleXyoSigner } from '@xyo-network/xl1-sdk' import { getSignerAccount } from './getSignerAccount.ts' +import { getTransportFactory } from './getTransportFactory.ts' let locator: ProviderFactoryLocator -// Determine the RPC endpoint to use for the chain connection -const DefaultRpcEndpoint = process.env.XYO_CHAIN_RPC_URL ?? 'http://localhost:8080/rpc' - -export const getLocator = async (rpcUrl = DefaultRpcEndpoint) => { +export const getLocator = async (walletMnemonic?: string, rpcUrl?: string) => { // If existing locator, return it if (isDefined(locator)) return locator // Build a new locator - console.log('Using endpoint:', rpcUrl) - const transportFactory: TransportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(rpcUrl, schemas) + const transportFactory = getTransportFactory(rpcUrl) locator = await buildJsonRpcProviderLocator({ transportFactory }) - const account = await getSignerAccount() + // Register the signer with the locator + const account = await getSignerAccount(walletMnemonic) locator.register(SimpleXyoSigner.factory(SimpleXyoSigner.dependencies, { account })) + + // Return the locator return locator } diff --git a/src/getTransportFactory.ts b/src/getTransportFactory.ts new file mode 100644 index 0000000..5149cc4 --- /dev/null +++ b/src/getTransportFactory.ts @@ -0,0 +1,18 @@ +import { isDefined } from '@xylabs/typeof' +import type { RpcSchemaMap, TransportFactory } from '@xyo-network/xl1-sdk' +import { HttpRpcTransport } from '@xyo-network/xl1-sdk' + +let transportFactory: TransportFactory | undefined + +// Determine the RPC endpoint to use for the chain connection +const DefaultRpcEndpoint = process.env.XYO_CHAIN_RPC_URL ?? 'http://localhost:8080/rpc' + +export const getTransportFactory = (rpcUrl = DefaultRpcEndpoint) => { + // If existing locator, return it + if (isDefined(transportFactory)) return transportFactory + + // Build a new locator + console.log('Using endpoint:', rpcUrl) + transportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(rpcUrl, schemas) + return transportFactory +} From 3042ba696c8866175e7afb876a67f02f3a9dd62d Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 16:32:12 -0600 Subject: [PATCH 18/29] Push env var parsing to root file --- src/getGateway.ts | 4 ++-- src/getLocator.ts | 2 +- src/getSignerAccount.ts | 14 ++++---------- src/getTransportFactory.ts | 3 +-- src/helloWorld.ts | 4 ++-- src/helloWorldRunner.ts | 13 ++++++------- 6 files changed, 16 insertions(+), 24 deletions(-) diff --git a/src/getGateway.ts b/src/getGateway.ts index 2beea70..70048a0 100644 --- a/src/getGateway.ts +++ b/src/getGateway.ts @@ -8,12 +8,12 @@ import { getLocator } from './getLocator.ts' let gateway: SimpleXyoGatewayRunner | undefined -export const getGateway = async (walletMnemonic?: string, rpcEndpoint?: string) => { +export const getGateway = async (walletMnemonic: string, rpcUrl: string) => { // If existing gateway, return it if (isDefined(gateway)) return gateway // Get the provider locator - const locator = await getLocator(walletMnemonic, rpcEndpoint) + const locator = await getLocator(walletMnemonic, rpcUrl) // Use locator to get connection and signer const connection = await locator.getInstance(XyoConnectionMoniker) diff --git a/src/getLocator.ts b/src/getLocator.ts index a18d647..4fc1945 100644 --- a/src/getLocator.ts +++ b/src/getLocator.ts @@ -7,7 +7,7 @@ import { getTransportFactory } from './getTransportFactory.ts' let locator: ProviderFactoryLocator -export const getLocator = async (walletMnemonic?: string, rpcUrl?: string) => { +export const getLocator = async (walletMnemonic: string, rpcUrl: string) => { // If existing locator, return it if (isDefined(locator)) return locator diff --git a/src/getSignerAccount.ts b/src/getSignerAccount.ts index c1aec02..fe9f4a5 100644 --- a/src/getSignerAccount.ts +++ b/src/getSignerAccount.ts @@ -1,4 +1,3 @@ -import { assertEx } from '@xylabs/assert' import { isDefined } from '@xylabs/typeof' import type { AccountInstance } from '@xyo-network/account-model' import { ADDRESS_INDEX, generateXyoBaseWalletFromPhrase } from '@xyo-network/xl1-sdk' @@ -7,20 +6,15 @@ let signerAccount: AccountInstance | undefined /** * Retrieves the signer account derived from the provided mnemonic or environment variable. - * @param walletMnemonic The mnemonic to use for deriving the account. If not provided, it - * will be read from the XYO_WALLET_MNEMONIC environment variable. + * @param walletMnemonic The mnemonic to use for deriving the account. * @returns The derived account */ -export const getSignerAccount = async (walletMnemonic?: string) => { +export const getSignerAccount = async (walletMnemonic: string) => { // If existing signer account, return it if (isDefined (signerAccount)) return signerAccount - // Determine the mnemonic for the wallet to use for transactions - const mnemonic = assertEx( - walletMnemonic ?? process.env.XYO_WALLET_MNEMONIC, - () => 'Wallet mnemonic must be supplied from either XYO_WALLET_MNEMONIC ENV VAR or argument', - ) - const wallet = await generateXyoBaseWalletFromPhrase(mnemonic) + // Create new signer account + const wallet = await generateXyoBaseWalletFromPhrase(walletMnemonic) signerAccount = await wallet.derivePath(ADDRESS_INDEX.XYO) console.log('Using signer account:', signerAccount.address) return signerAccount diff --git a/src/getTransportFactory.ts b/src/getTransportFactory.ts index 5149cc4..6a8beb8 100644 --- a/src/getTransportFactory.ts +++ b/src/getTransportFactory.ts @@ -5,9 +5,8 @@ import { HttpRpcTransport } from '@xyo-network/xl1-sdk' let transportFactory: TransportFactory | undefined // Determine the RPC endpoint to use for the chain connection -const DefaultRpcEndpoint = process.env.XYO_CHAIN_RPC_URL ?? 'http://localhost:8080/rpc' -export const getTransportFactory = (rpcUrl = DefaultRpcEndpoint) => { +export const getTransportFactory = (rpcUrl: string) => { // If existing locator, return it if (isDefined(transportFactory)) return transportFactory diff --git a/src/helloWorld.ts b/src/helloWorld.ts index bca5243..5085ed8 100644 --- a/src/helloWorld.ts +++ b/src/helloWorld.ts @@ -11,14 +11,14 @@ config({ quiet: true }) const logger = console -export async function helloWorld(mnemonic?: string): Promise { +export async function helloWorld(mnemonic: string, rpcUrl: string): Promise { try { console.log('\n**** Starting XL1 Hello World NodeJs Sample ****\n') // Generate random data to send in the transaction const { onChainData, offChainData } = await getRandomTransactionData() - const gateway = await getGateway(mnemonic) + const gateway = await getGateway(mnemonic, rpcUrl) // Send the transaction to the network const [txHash] = await gateway.addPayloadsToChain(onChainData, offChainData) diff --git a/src/helloWorldRunner.ts b/src/helloWorldRunner.ts index 08b28d1..4f3883f 100644 --- a/src/helloWorldRunner.ts +++ b/src/helloWorldRunner.ts @@ -10,6 +10,9 @@ import { getLocator } from './getLocator.ts' import { helloWorld } from './helloWorld.js' import { waitForInitialBlocks } from './waitForInitialBlocks.js' +const mnemonic = process.env.XYO_WALLET_MNEMONIC ?? HDWallet.generateMnemonic() +const rpcUrl = process.env.XYO_CHAIN_RPC_URL ?? 'http://localhost:8080/rpc' + /** * Starts the XL1 node using command in a child process * The child process will be terminated when the parent process exits @@ -18,8 +21,6 @@ import { waitForInitialBlocks } from './waitForInitialBlocks.js' async function startXl1(): Promise { console.log('Starting XL1...') - const mnemonic = process.env.XYO_WALLET_MNEMONIC ?? HDWallet.generateMnemonic() - // Track the child process let xl1Process: ChildProcess | null = null @@ -88,7 +89,7 @@ async function startXl1(): Promise { }) // Get the XyoViewer instance - const locator = await getLocator() + const locator = await getLocator(mnemonic, rpcUrl) const viewer = await locator.getInstance(XyoViewerMoniker) // Wait for the initial blocks to be created @@ -101,10 +102,8 @@ async function startXl1(): Promise { } } -let mnemonic: string - try { - mnemonic = await startXl1() + await startXl1() } catch (ex) { console.error('Failed to start XL1:', ex) // eslint-disable-next-line unicorn/no-process-exit @@ -114,7 +113,7 @@ try { console.log('XL1 is ready, starting sample...') try { - await helloWorld(mnemonic) + await helloWorld(mnemonic, rpcUrl) } catch (error) { console.error('Error importing application:', error) } From 7204833c7390e32deae32bef6b2fe8792e5f0499 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 16:36:23 -0600 Subject: [PATCH 19/29] Inline gateway creation --- src/getGateway.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/getGateway.ts b/src/getGateway.ts index 70048a0..79d32ca 100644 --- a/src/getGateway.ts +++ b/src/getGateway.ts @@ -1,25 +1,25 @@ -import { isDefined } from '@xylabs/typeof' -import type { SimpleXyoSigner, XyoConnection } from '@xyo-network/xl1-sdk' +import type { RpcSchemaMap, XyoConnection } from '@xyo-network/xl1-sdk' import { - SimpleXyoGatewayRunner, XyoConnectionMoniker, XyoSignerMoniker, + ADDRESS_INDEX, buildJsonRpcProviderLocator, generateXyoBaseWalletFromPhrase, HttpRpcTransport, SimpleXyoGatewayRunner, SimpleXyoSigner, XyoConnectionMoniker, + XyoSignerMoniker, } from '@xyo-network/xl1-sdk' -import { getLocator } from './getLocator.ts' - -let gateway: SimpleXyoGatewayRunner | undefined - export const getGateway = async (walletMnemonic: string, rpcUrl: string) => { - // If existing gateway, return it - if (isDefined(gateway)) return gateway - // Get the provider locator - const locator = await getLocator(walletMnemonic, rpcUrl) + const transportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(rpcUrl, schemas) + const locator = await buildJsonRpcProviderLocator({ transportFactory }) + + // Create new signer account + const wallet = await generateXyoBaseWalletFromPhrase(walletMnemonic) + const account = await wallet.derivePath(ADDRESS_INDEX.XYO) + + // Register the signer with the locator + locator.register(SimpleXyoSigner.factory(SimpleXyoSigner.dependencies, { account })) // Use locator to get connection and signer const connection = await locator.getInstance(XyoConnectionMoniker) const signer = await locator.getInstance(XyoSignerMoniker) // Create gateway from connection and signer - gateway = new SimpleXyoGatewayRunner(connection, signer) - return gateway + return new SimpleXyoGatewayRunner(connection, signer) } From 3112a9177e1481a7493440640671405101b3e8e1 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 16:49:08 -0600 Subject: [PATCH 20/29] Extract tx helper --- src/getRandomTransactionData.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/getRandomTransactionData.ts diff --git a/src/getRandomTransactionData.ts b/src/getRandomTransactionData.ts new file mode 100644 index 0000000..7890277 --- /dev/null +++ b/src/getRandomTransactionData.ts @@ -0,0 +1,22 @@ +import { PayloadBuilder } from '@xyo-network/payload-builder' +import type { Payload } from '@xyo-network/payload-model' +import type { HashPayload } from '@xyo-network/xl1-sdk' + +/** + * Generates random data for a transaction. + * @returns An object containing off-chain and on-chain data for the transaction. + */ +export const getRandomTransactionData = async () => { + // Data to store off-chain + const salt = `Hello from Sample - ${new Date().toISOString()}` + const idPayload: Payload<{ salt: string }> = { schema: 'network.xyo.id', salt } + + // Data to store on-chain (can reference the off-chain data) + const hash = await PayloadBuilder.hash(idPayload) + const hashPayload: HashPayload = { schema: 'network.xyo.hash', hash } + + return { + offChainData: [idPayload], + onChainData: [hashPayload], + } +} From b128869a8f00c3e9e068dc39f29220925e898ed0 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 16:49:27 -0600 Subject: [PATCH 21/29] use locator for deps --- src/getGateway.ts | 26 ++++++++++++++------------ src/getSignerAccount.ts | 2 +- src/getTransportFactory.ts | 13 ++++++++----- src/helloWorld.ts | 31 +++++++++---------------------- src/index.ts | 7 ++++++- 5 files changed, 38 insertions(+), 41 deletions(-) diff --git a/src/getGateway.ts b/src/getGateway.ts index 79d32ca..0fd944d 100644 --- a/src/getGateway.ts +++ b/src/getGateway.ts @@ -1,25 +1,27 @@ -import type { RpcSchemaMap, XyoConnection } from '@xyo-network/xl1-sdk' +import { isDefined } from '@xylabs/typeof' +import type { SimpleXyoSigner, XyoConnection } from '@xyo-network/xl1-sdk' import { - ADDRESS_INDEX, buildJsonRpcProviderLocator, generateXyoBaseWalletFromPhrase, HttpRpcTransport, SimpleXyoGatewayRunner, SimpleXyoSigner, XyoConnectionMoniker, - XyoSignerMoniker, + SimpleXyoGatewayRunner, XyoConnectionMoniker, XyoSignerMoniker, } from '@xyo-network/xl1-sdk' +import { getLocator } from './getLocator.ts' + +let gateway: SimpleXyoGatewayRunner | undefined + export const getGateway = async (walletMnemonic: string, rpcUrl: string) => { - // Get the provider locator - const transportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(rpcUrl, schemas) - const locator = await buildJsonRpcProviderLocator({ transportFactory }) + // If existing gateway, return it + if (isDefined(gateway)) return gateway - // Create new signer account - const wallet = await generateXyoBaseWalletFromPhrase(walletMnemonic) - const account = await wallet.derivePath(ADDRESS_INDEX.XYO) + // Otherwise, build a new gateway - // Register the signer with the locator - locator.register(SimpleXyoSigner.factory(SimpleXyoSigner.dependencies, { account })) + // Get locator + const locator = await getLocator(walletMnemonic, rpcUrl) // Use locator to get connection and signer const connection = await locator.getInstance(XyoConnectionMoniker) const signer = await locator.getInstance(XyoSignerMoniker) // Create gateway from connection and signer - return new SimpleXyoGatewayRunner(connection, signer) + gateway = new SimpleXyoGatewayRunner(connection, signer) + return gateway } diff --git a/src/getSignerAccount.ts b/src/getSignerAccount.ts index fe9f4a5..368835f 100644 --- a/src/getSignerAccount.ts +++ b/src/getSignerAccount.ts @@ -5,7 +5,7 @@ import { ADDRESS_INDEX, generateXyoBaseWalletFromPhrase } from '@xyo-network/xl1 let signerAccount: AccountInstance | undefined /** - * Retrieves the signer account derived from the provided mnemonic or environment variable. + * Retrieves the signer account derived from the provided mnemonic. * @param walletMnemonic The mnemonic to use for deriving the account. * @returns The derived account */ diff --git a/src/getTransportFactory.ts b/src/getTransportFactory.ts index 6a8beb8..d95e3d5 100644 --- a/src/getTransportFactory.ts +++ b/src/getTransportFactory.ts @@ -4,14 +4,17 @@ import { HttpRpcTransport } from '@xyo-network/xl1-sdk' let transportFactory: TransportFactory | undefined -// Determine the RPC endpoint to use for the chain connection - +/** + * Retrieves a transport factory for the given RPC URL. + * @param rpcUrl The RPC endpoint to use for interacting with the chain + * @returns A transport factory for the given RPC URL + */ export const getTransportFactory = (rpcUrl: string) => { - // If existing locator, return it + // If existing transport factory, return it if (isDefined(transportFactory)) return transportFactory - // Build a new locator - console.log('Using endpoint:', rpcUrl) + // Build a new transport factory + console.log('Using rpcUrl:', rpcUrl) transportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(rpcUrl, schemas) return transportFactory } diff --git a/src/helloWorld.ts b/src/helloWorld.ts index 5085ed8..3dbbcde 100644 --- a/src/helloWorld.ts +++ b/src/helloWorld.ts @@ -1,16 +1,21 @@ import { isError } from '@xylabs/typeof' -import { PayloadBuilder } from '@xyo-network/payload-builder' -import type { Payload } from '@xyo-network/payload-model' -import type { HashPayload, SignedHydratedTransaction } from '@xyo-network/xl1-protocol' +import type { SignedHydratedTransaction } from '@xyo-network/xl1-protocol' import { config } from 'dotenv' import { getGateway } from './getGateway.ts' +import { getRandomTransactionData } from './getRandomTransactionData.ts' // Load environment variables from .env file config({ quiet: true }) +// Log to console const logger = console +/** + * Runs a simple "Hello World" transaction on the XL1 network. + * @param mnemonic The mnemonic to use for signing transactions + * @param rpcUrl The RPC URL to connect to the XL1 network + */ export async function helloWorld(mnemonic: string, rpcUrl: string): Promise { try { console.log('\n**** Starting XL1 Hello World NodeJs Sample ****\n') @@ -18,6 +23,7 @@ export async function helloWorld(mnemonic: string, rpcUrl: string): Promise { console.log('1. Install the XYO Layer One Wallet from https://chromewebstore.google.com/detail/xl1-wallet/fblbagcjeigmhakkfgjpdlcapcgmcfbm') console.log('2. In that same browser, go to: https://explore.xyo.network/xl1/local/') } - -/** - * Generates random data for a transaction. - * @returns An object containing off-chain and on-chain data for the transaction. - */ -const getRandomTransactionData = async () => { - // Data to store off-chain - const salt = `Hello from Sample - ${new Date().toISOString()}` - const idPayload: Payload<{ salt: string }> = { schema: 'network.xyo.id', salt } - - // Data to store on-chain (can reference the off-chain data) - const hash = await PayloadBuilder.hash(idPayload) - const hashPayload: HashPayload = { schema: 'network.xyo.hash', hash } - - return { - offChainData: [idPayload], - onChainData: [hashPayload], - } -} diff --git a/src/index.ts b/src/index.ts index 3003bf8..f7a7428 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,8 @@ +import { HDWallet } from '@xyo-network/wallet' + import { helloWorld } from './helloWorld.js' -await helloWorld() +const mnemonic = process.env.XYO_WALLET_MNEMONIC ?? HDWallet.generateMnemonic() +const rpcUrl = process.env.XYO_CHAIN_RPC_URL ?? 'http://localhost:8080/rpc' + +await helloWorld(mnemonic, rpcUrl) From 22655c0e2b995b0cbfd0d3ae58c6297190e47eb7 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 17:07:11 -0600 Subject: [PATCH 22/29] Parse config before using ENV VARs --- src/helloWorldRunner.ts | 20 +++++++++++--------- src/index.ts | 5 +++++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/helloWorldRunner.ts b/src/helloWorldRunner.ts index 4f3883f..5efb3d8 100644 --- a/src/helloWorldRunner.ts +++ b/src/helloWorldRunner.ts @@ -2,14 +2,18 @@ import { type ChildProcess, spawn } from 'node:child_process' import { HDWallet } from '@xyo-network/wallet' import type { XyoViewer } from '@xyo-network/xl1-protocol-sdk' -import { - ADDRESS_INDEX, generateXyoBaseWalletFromPhrase, XyoViewerMoniker, -} from '@xyo-network/xl1-protocol-sdk' +import { XyoViewerMoniker } from '@xyo-network/xl1-protocol-sdk' +import { config } from 'dotenv' import { getLocator } from './getLocator.ts' +import { getSignerAccount } from './getSignerAccount.ts' import { helloWorld } from './helloWorld.js' import { waitForInitialBlocks } from './waitForInitialBlocks.js' +// Load environment variables from .env file +config({ quiet: true }) + +// Parse the relevant ENV VARs or use defaults const mnemonic = process.env.XYO_WALLET_MNEMONIC ?? HDWallet.generateMnemonic() const rpcUrl = process.env.XYO_CHAIN_RPC_URL ?? 'http://localhost:8080/rpc' @@ -50,12 +54,10 @@ async function startXl1(): Promise { }) try { - // log out the mnemonic and wallet address using same steps as producer - const wallet = await generateXyoBaseWalletFromPhrase(mnemonic) - const account = await wallet.derivePath(ADDRESS_INDEX.XYO) - - console.log('Generated mnemonic:', mnemonic) - console.log('Producer Wallet address:', account.address) + // Log out the mnemonic and signer address in case random was generated + const account = await getSignerAccount(mnemonic) + console.log('Using signer mnemonic:', mnemonic) + console.log('Using producer address:', account.address) // Spawn the XL1 process xl1Process = spawn('node', ['./node_modules/@xyo-network/xl1-cli/scripts/xl1.mjs', '--logLevel="warn"', '--producer.mnemonic', JSON.stringify(mnemonic)], { diff --git a/src/index.ts b/src/index.ts index f7a7428..8b02b63 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,12 @@ import { HDWallet } from '@xyo-network/wallet' +import { config } from 'dotenv' import { helloWorld } from './helloWorld.js' +// Load environment variables from .env file +config({ quiet: true }) + +// Parse the relevant ENV VARs or use defaults const mnemonic = process.env.XYO_WALLET_MNEMONIC ?? HDWallet.generateMnemonic() const rpcUrl = process.env.XYO_CHAIN_RPC_URL ?? 'http://localhost:8080/rpc' From 2d9bdad8d2ad1c40e8ee41229adbdf3dda186629 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 17:14:19 -0600 Subject: [PATCH 23/29] ENV Helpers --- src/getMnemonic.ts | 14 ++++++++++++++ src/getRpcUrl.ts | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/getMnemonic.ts create mode 100644 src/getRpcUrl.ts diff --git a/src/getMnemonic.ts b/src/getMnemonic.ts new file mode 100644 index 0000000..5d46652 --- /dev/null +++ b/src/getMnemonic.ts @@ -0,0 +1,14 @@ +import { HDWallet } from '@xyo-network/wallet' +import { config } from 'dotenv' + +// Load environment variables from .env file +config({ quiet: true }) + +// Parse the relevant ENV VARs or use defaults +const mnemonic = process.env.XYO_WALLET_MNEMONIC ?? HDWallet.generateMnemonic() + +/** + * Gets the mnemonic to use for the signer + * @returns The mnemonic to use for the signer + */ +export const getMnemonic = (): string => mnemonic diff --git a/src/getRpcUrl.ts b/src/getRpcUrl.ts new file mode 100644 index 0000000..f88189f --- /dev/null +++ b/src/getRpcUrl.ts @@ -0,0 +1,10 @@ +import { config } from 'dotenv' + +// Load environment variables from .env file +config({ quiet: true }) + +/** + * Gets the rpcUrl to use for interacting with the chain + * @returns The rpcUrl to use for interacting with the chain + */ +export const getRpcUrl = (): string => process.env.XYO_CHAIN_RPC_URL ?? 'http://localhost:8080/rpc' From 40f815ad9b306c653b68a4fdadce26dd13469b26 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 17:15:10 -0600 Subject: [PATCH 24/29] Use ENV helpers --- src/helloWorld.ts | 4 ---- src/helloWorldRunner.ts | 7 ++++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/helloWorld.ts b/src/helloWorld.ts index 3dbbcde..dd69795 100644 --- a/src/helloWorld.ts +++ b/src/helloWorld.ts @@ -1,13 +1,9 @@ import { isError } from '@xylabs/typeof' import type { SignedHydratedTransaction } from '@xyo-network/xl1-protocol' -import { config } from 'dotenv' import { getGateway } from './getGateway.ts' import { getRandomTransactionData } from './getRandomTransactionData.ts' -// Load environment variables from .env file -config({ quiet: true }) - // Log to console const logger = console diff --git a/src/helloWorldRunner.ts b/src/helloWorldRunner.ts index 5efb3d8..41e8b4b 100644 --- a/src/helloWorldRunner.ts +++ b/src/helloWorldRunner.ts @@ -1,11 +1,12 @@ import { type ChildProcess, spawn } from 'node:child_process' -import { HDWallet } from '@xyo-network/wallet' import type { XyoViewer } from '@xyo-network/xl1-protocol-sdk' import { XyoViewerMoniker } from '@xyo-network/xl1-protocol-sdk' import { config } from 'dotenv' import { getLocator } from './getLocator.ts' +import { getMnemonic } from './getMnemonic.ts' +import { getRpcUrl } from './getRpcUrl.ts' import { getSignerAccount } from './getSignerAccount.ts' import { helloWorld } from './helloWorld.js' import { waitForInitialBlocks } from './waitForInitialBlocks.js' @@ -14,8 +15,8 @@ import { waitForInitialBlocks } from './waitForInitialBlocks.js' config({ quiet: true }) // Parse the relevant ENV VARs or use defaults -const mnemonic = process.env.XYO_WALLET_MNEMONIC ?? HDWallet.generateMnemonic() -const rpcUrl = process.env.XYO_CHAIN_RPC_URL ?? 'http://localhost:8080/rpc' +const mnemonic = getMnemonic() +const rpcUrl = getRpcUrl() /** * Starts the XL1 node using command in a child process From 74f23d2b022f3ac0a774f1b42517d8f261e7ac8f Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 17:16:54 -0600 Subject: [PATCH 25/29] Use ENV helpers --- src/helloWorldRunner.ts | 4 ---- src/index.ts | 12 ++++-------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/helloWorldRunner.ts b/src/helloWorldRunner.ts index 41e8b4b..1e6ab7e 100644 --- a/src/helloWorldRunner.ts +++ b/src/helloWorldRunner.ts @@ -2,7 +2,6 @@ import { type ChildProcess, spawn } from 'node:child_process' import type { XyoViewer } from '@xyo-network/xl1-protocol-sdk' import { XyoViewerMoniker } from '@xyo-network/xl1-protocol-sdk' -import { config } from 'dotenv' import { getLocator } from './getLocator.ts' import { getMnemonic } from './getMnemonic.ts' @@ -11,9 +10,6 @@ import { getSignerAccount } from './getSignerAccount.ts' import { helloWorld } from './helloWorld.js' import { waitForInitialBlocks } from './waitForInitialBlocks.js' -// Load environment variables from .env file -config({ quiet: true }) - // Parse the relevant ENV VARs or use defaults const mnemonic = getMnemonic() const rpcUrl = getRpcUrl() diff --git a/src/index.ts b/src/index.ts index 8b02b63..28220ee 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,13 +1,9 @@ -import { HDWallet } from '@xyo-network/wallet' -import { config } from 'dotenv' - +import { getMnemonic } from './getMnemonic.ts' +import { getRpcUrl } from './getRpcUrl.ts' import { helloWorld } from './helloWorld.js' -// Load environment variables from .env file -config({ quiet: true }) - // Parse the relevant ENV VARs or use defaults -const mnemonic = process.env.XYO_WALLET_MNEMONIC ?? HDWallet.generateMnemonic() -const rpcUrl = process.env.XYO_CHAIN_RPC_URL ?? 'http://localhost:8080/rpc' +const mnemonic = getMnemonic() +const rpcUrl = getRpcUrl() await helloWorld(mnemonic, rpcUrl) From 1cce55b884d4a02b7c4be17b64fca94f701ff536 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 18:07:33 -0600 Subject: [PATCH 26/29] Resolve ENV VARs once --- src/getGateway.ts | 4 ++-- src/getLocator.ts | 6 +++--- src/getSignerAccount.ts | 6 ++++-- src/getTransportFactory.ts | 6 ++++-- src/{getMnemonic.ts => getWalletMnemonic.ts} | 2 +- src/helloWorld.ts | 6 ++---- src/helloWorldRunner.ts | 12 +++++------- src/index.ts | 8 +------- 8 files changed, 22 insertions(+), 28 deletions(-) rename src/{getMnemonic.ts => getWalletMnemonic.ts} (87%) diff --git a/src/getGateway.ts b/src/getGateway.ts index 0fd944d..90cf338 100644 --- a/src/getGateway.ts +++ b/src/getGateway.ts @@ -8,14 +8,14 @@ import { getLocator } from './getLocator.ts' let gateway: SimpleXyoGatewayRunner | undefined -export const getGateway = async (walletMnemonic: string, rpcUrl: string) => { +export const getGateway = async () => { // If existing gateway, return it if (isDefined(gateway)) return gateway // Otherwise, build a new gateway // Get locator - const locator = await getLocator(walletMnemonic, rpcUrl) + const locator = await getLocator() // Use locator to get connection and signer const connection = await locator.getInstance(XyoConnectionMoniker) diff --git a/src/getLocator.ts b/src/getLocator.ts index 4fc1945..42943f4 100644 --- a/src/getLocator.ts +++ b/src/getLocator.ts @@ -7,16 +7,16 @@ import { getTransportFactory } from './getTransportFactory.ts' let locator: ProviderFactoryLocator -export const getLocator = async (walletMnemonic: string, rpcUrl: string) => { +export const getLocator = async () => { // If existing locator, return it if (isDefined(locator)) return locator // Build a new locator - const transportFactory = getTransportFactory(rpcUrl) + const transportFactory = getTransportFactory() locator = await buildJsonRpcProviderLocator({ transportFactory }) // Register the signer with the locator - const account = await getSignerAccount(walletMnemonic) + const account = await getSignerAccount() locator.register(SimpleXyoSigner.factory(SimpleXyoSigner.dependencies, { account })) // Return the locator diff --git a/src/getSignerAccount.ts b/src/getSignerAccount.ts index 368835f..72bc6a5 100644 --- a/src/getSignerAccount.ts +++ b/src/getSignerAccount.ts @@ -2,18 +2,20 @@ import { isDefined } from '@xylabs/typeof' import type { AccountInstance } from '@xyo-network/account-model' import { ADDRESS_INDEX, generateXyoBaseWalletFromPhrase } from '@xyo-network/xl1-sdk' +import { getWalletMnemonic } from './getWalletMnemonic.ts' + let signerAccount: AccountInstance | undefined /** * Retrieves the signer account derived from the provided mnemonic. - * @param walletMnemonic The mnemonic to use for deriving the account. * @returns The derived account */ -export const getSignerAccount = async (walletMnemonic: string) => { +export const getSignerAccount = async () => { // If existing signer account, return it if (isDefined (signerAccount)) return signerAccount // Create new signer account + const walletMnemonic = getWalletMnemonic() const wallet = await generateXyoBaseWalletFromPhrase(walletMnemonic) signerAccount = await wallet.derivePath(ADDRESS_INDEX.XYO) console.log('Using signer account:', signerAccount.address) diff --git a/src/getTransportFactory.ts b/src/getTransportFactory.ts index d95e3d5..7700e6f 100644 --- a/src/getTransportFactory.ts +++ b/src/getTransportFactory.ts @@ -2,18 +2,20 @@ import { isDefined } from '@xylabs/typeof' import type { RpcSchemaMap, TransportFactory } from '@xyo-network/xl1-sdk' import { HttpRpcTransport } from '@xyo-network/xl1-sdk' +import { getRpcUrl } from './getRpcUrl.ts' + let transportFactory: TransportFactory | undefined /** * Retrieves a transport factory for the given RPC URL. - * @param rpcUrl The RPC endpoint to use for interacting with the chain * @returns A transport factory for the given RPC URL */ -export const getTransportFactory = (rpcUrl: string) => { +export const getTransportFactory = () => { // If existing transport factory, return it if (isDefined(transportFactory)) return transportFactory // Build a new transport factory + const rpcUrl = getRpcUrl() console.log('Using rpcUrl:', rpcUrl) transportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(rpcUrl, schemas) return transportFactory diff --git a/src/getMnemonic.ts b/src/getWalletMnemonic.ts similarity index 87% rename from src/getMnemonic.ts rename to src/getWalletMnemonic.ts index 5d46652..74cd14b 100644 --- a/src/getMnemonic.ts +++ b/src/getWalletMnemonic.ts @@ -11,4 +11,4 @@ const mnemonic = process.env.XYO_WALLET_MNEMONIC ?? HDWallet.generateMnemonic() * Gets the mnemonic to use for the signer * @returns The mnemonic to use for the signer */ -export const getMnemonic = (): string => mnemonic +export const getWalletMnemonic = (): string => mnemonic diff --git a/src/helloWorld.ts b/src/helloWorld.ts index dd69795..158d3dc 100644 --- a/src/helloWorld.ts +++ b/src/helloWorld.ts @@ -9,10 +9,8 @@ const logger = console /** * Runs a simple "Hello World" transaction on the XL1 network. - * @param mnemonic The mnemonic to use for signing transactions - * @param rpcUrl The RPC URL to connect to the XL1 network */ -export async function helloWorld(mnemonic: string, rpcUrl: string): Promise { +export async function helloWorld(): Promise { try { console.log('\n**** Starting XL1 Hello World NodeJs Sample ****\n') @@ -20,7 +18,7 @@ export async function helloWorld(mnemonic: string, rpcUrl: string): Promise { try { // Log out the mnemonic and signer address in case random was generated - const account = await getSignerAccount(mnemonic) + const account = await getSignerAccount() console.log('Using signer mnemonic:', mnemonic) console.log('Using producer address:', account.address) @@ -88,7 +86,7 @@ async function startXl1(): Promise { }) // Get the XyoViewer instance - const locator = await getLocator(mnemonic, rpcUrl) + const locator = await getLocator() const viewer = await locator.getInstance(XyoViewerMoniker) // Wait for the initial blocks to be created @@ -112,7 +110,7 @@ try { console.log('XL1 is ready, starting sample...') try { - await helloWorld(mnemonic, rpcUrl) + await helloWorld() } catch (error) { console.error('Error importing application:', error) } diff --git a/src/index.ts b/src/index.ts index 28220ee..3003bf8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,3 @@ -import { getMnemonic } from './getMnemonic.ts' -import { getRpcUrl } from './getRpcUrl.ts' import { helloWorld } from './helloWorld.js' -// Parse the relevant ENV VARs or use defaults -const mnemonic = getMnemonic() -const rpcUrl = getRpcUrl() - -await helloWorld(mnemonic, rpcUrl) +await helloWorld() From 5264657c46697a9fbb48f2d8604731f4564a1fd1 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 20 Jan 2026 18:09:55 -0600 Subject: [PATCH 27/29] Update documentation --- src/getSignerAccount.ts | 2 +- src/getTransportFactory.ts | 4 ++-- src/getWalletMnemonic.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/getSignerAccount.ts b/src/getSignerAccount.ts index 72bc6a5..e9ca7ba 100644 --- a/src/getSignerAccount.ts +++ b/src/getSignerAccount.ts @@ -7,7 +7,7 @@ import { getWalletMnemonic } from './getWalletMnemonic.ts' let signerAccount: AccountInstance | undefined /** - * Retrieves the signer account derived from the provided mnemonic. + * Retrieves the signer account derived from the configured mnemonic. * @returns The derived account */ export const getSignerAccount = async () => { diff --git a/src/getTransportFactory.ts b/src/getTransportFactory.ts index 7700e6f..10e3fe0 100644 --- a/src/getTransportFactory.ts +++ b/src/getTransportFactory.ts @@ -7,8 +7,8 @@ import { getRpcUrl } from './getRpcUrl.ts' let transportFactory: TransportFactory | undefined /** - * Retrieves a transport factory for the given RPC URL. - * @returns A transport factory for the given RPC URL + * Retrieves a transport factory for the configured RPC URL. + * @returns A transport factory for the configured RPC URL */ export const getTransportFactory = () => { // If existing transport factory, return it diff --git a/src/getWalletMnemonic.ts b/src/getWalletMnemonic.ts index 74cd14b..fbf1530 100644 --- a/src/getWalletMnemonic.ts +++ b/src/getWalletMnemonic.ts @@ -8,7 +8,7 @@ config({ quiet: true }) const mnemonic = process.env.XYO_WALLET_MNEMONIC ?? HDWallet.generateMnemonic() /** - * Gets the mnemonic to use for the signer - * @returns The mnemonic to use for the signer + * Gets the mnemonic to use for the wallet + * @returns The mnemonic to use for the wallet */ export const getWalletMnemonic = (): string => mnemonic From d26ef8d42bba862a3177aa812174acc548b8ff55 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Wed, 21 Jan 2026 09:17:59 -0500 Subject: [PATCH 28/29] match getter file format --- src/getRpcUrl.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/getRpcUrl.ts b/src/getRpcUrl.ts index f88189f..3d41d3d 100644 --- a/src/getRpcUrl.ts +++ b/src/getRpcUrl.ts @@ -3,8 +3,11 @@ import { config } from 'dotenv' // Load environment variables from .env file config({ quiet: true }) +// Parse the relevant ENV VARs or use defaults +const rpcUrl = process.env.XYO_CHAIN_RPC_URL ?? 'http://localhost:8080/rpc' + /** * Gets the rpcUrl to use for interacting with the chain * @returns The rpcUrl to use for interacting with the chain */ -export const getRpcUrl = (): string => process.env.XYO_CHAIN_RPC_URL ?? 'http://localhost:8080/rpc' +export const getRpcUrl = (): string => rpcUrl From a0f32f1cea6da938ba34dc1c95d0d60909a3accd Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Wed, 21 Jan 2026 09:27:06 -0500 Subject: [PATCH 29/29] updo --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 7634edc..4a4b8c6 100644 --- a/package.json +++ b/package.json @@ -25,20 +25,20 @@ "updo": "npx npm-check-updates -i" }, "dependencies": { - "@xylabs/assert": "5.0.61", - "@xylabs/delay": "5.0.61", + "@xylabs/assert": "5.0.63", + "@xylabs/delay": "5.0.63", "@xylabs/tsconfig": "7.2.32", - "@xylabs/typeof": "5.0.61", - "@xyo-network/payload-builder": "5.2.24", - "@xyo-network/wallet": "5.2.24", - "@xyo-network/xl1-sdk": "1.18.2", + "@xylabs/typeof": "5.0.63", + "@xyo-network/payload-builder": "5.2.25", + "@xyo-network/wallet": "5.2.25", + "@xyo-network/xl1-sdk": "1.18.33", "dotenv": "17.2.3" }, "devDependencies": { "@types/node": "25.0.9", "@xylabs/eslint-config-flat": "7.2.32", - "@xyo-network/account-model": "5.2.24", - "@xyo-network/payload-model": "5.2.24", + "@xyo-network/account-model": "5.2.25", + "@xyo-network/payload-model": "5.2.25", "@xyo-network/xl1-cli": "1.18.1", "eslint": "9.39.2", "eslint-import-resolver-typescript": "4.4.4",