@@ -4,15 +4,13 @@ import type { XyoViewer } from '@xyo-network/xl1-protocol-sdk'
44import { XyoViewerMoniker } from '@xyo-network/xl1-protocol-sdk'
55
66import { getLocator } from './getLocator.ts'
7- import { getMnemonic } from './getMnemonic.ts'
8- import { getRpcUrl } from './getRpcUrl.ts'
97import { getSignerAccount } from './getSignerAccount.ts'
8+ import { getWalletMnemonic } from './getWalletMnemonic.ts'
109import { helloWorld } from './helloWorld.js'
1110import { waitForInitialBlocks } from './waitForInitialBlocks.js'
1211
1312// Parse the relevant ENV VARs or use defaults
14- const mnemonic = getMnemonic ( )
15- const rpcUrl = getRpcUrl ( )
13+ const mnemonic = getWalletMnemonic ( )
1614
1715/**
1816 * Starts the XL1 node using command in a child process
@@ -52,7 +50,7 @@ async function startXl1(): Promise<string> {
5250
5351 try {
5452 // Log out the mnemonic and signer address in case random was generated
55- const account = await getSignerAccount ( mnemonic )
53+ const account = await getSignerAccount ( )
5654 console . log ( 'Using signer mnemonic:' , mnemonic )
5755 console . log ( 'Using producer address:' , account . address )
5856
@@ -88,7 +86,7 @@ async function startXl1(): Promise<string> {
8886 } )
8987
9088 // Get the XyoViewer instance
91- const locator = await getLocator ( mnemonic , rpcUrl )
89+ const locator = await getLocator ( )
9290 const viewer = await locator . getInstance < XyoViewer > ( XyoViewerMoniker )
9391
9492 // Wait for the initial blocks to be created
@@ -112,7 +110,7 @@ try {
112110console . log ( 'XL1 is ready, starting sample...' )
113111
114112try {
115- await helloWorld ( mnemonic , rpcUrl )
113+ await helloWorld ( )
116114} catch ( error ) {
117115 console . error ( 'Error importing application:' , error )
118116}
0 commit comments