diff --git a/index.js b/index.js deleted file mode 100644 index f0751cada..000000000 --- a/index.js +++ /dev/null @@ -1,31 +0,0 @@ -import { Account, AleoNetworkClient, NetworkRecordProvider, ProgramManager, AleoKeyProvider} from '@provablehq/sdk'; - -// Create a key provider that will be used to find public proving & verifying keys for Aleo programs -const keyProvider = new AleoKeyProvider(); -keyProvider.useCache(true); - -// Create a record provider that will be used to find records and transaction data for Aleo programs -const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1"); - -// Use existing account with funds -const account = new Account({ - privateKey: "user1PrivateKey", -}); - -const recordProvider = new NetworkRecordProvider(account, networkClient); - -// Initialize a program manager to talk to the Aleo network with the configured key and record providers -const programManager = new ProgramManager("https://api.explorer.aleo.org/v1", keyProvider, recordProvider); -programManager.setAccount(account) - -// Define an Aleo program to deploy -const program = "program hello_hello.aleo;\n\nfunction hello:\n input r0 as u32.public;\n input r1 as u32.private;\n add r0 r1 into r2;\n output r2 as u32.private;\n"; - -// Define a fee to pay to deploy the program -const fee = 3.0; // 3.0 Aleo credits - -// Deploy the program to the Aleo network -const tx_id = await programManager.deploy(program, fee); - -// Verify the transaction was successful -const transaction = await programManager.networkClient.getTransaction(tx_id); \ No newline at end of file