diff --git a/sdk/program/package.json b/sdk/program/package.json index f1f074ff2..af690d4eb 100644 --- a/sdk/program/package.json +++ b/sdk/program/package.json @@ -11,4 +11,4 @@ "pretty:fix": "prettier --write 'tests/*.mjs'", "test": "mocha 'tests/*.mjs'" } -} +} \ No newline at end of file diff --git a/sdk/program/src/wasm/mod.rs b/sdk/program/src/wasm/mod.rs index 801142b48..b7939a142 100644 --- a/sdk/program/src/wasm/mod.rs +++ b/sdk/program/src/wasm/mod.rs @@ -9,7 +9,7 @@ pub mod system_instruction; /// Initialize Javascript logging and panic handler #[wasm_bindgen] -pub fn init() { +pub fn solana_program_init() { use std::sync::Once; static INIT: Once = Once::new(); diff --git a/sdk/program/tests/hash.mjs b/sdk/program/tests/hash.mjs index 4b25857a4..b8e9bd30b 100644 --- a/sdk/program/tests/hash.mjs +++ b/sdk/program/tests/hash.mjs @@ -1,6 +1,6 @@ import { expect } from "chai"; -import { init, Hash } from "crate"; -init(); +import { solana_program_init, Hash } from "crate"; +solana_program_init(); // TODO: wasm_bindgen doesn't currently support exporting constants const HASH_BYTES = 32; diff --git a/sdk/program/tests/pubkey.mjs b/sdk/program/tests/pubkey.mjs index 67ee73ba3..342273360 100644 --- a/sdk/program/tests/pubkey.mjs +++ b/sdk/program/tests/pubkey.mjs @@ -1,6 +1,6 @@ import { expect } from "chai"; -import { init, Pubkey } from "crate"; -init(); +import { solana_program_init, Pubkey } from "crate"; +solana_program_init(); // TODO: wasm_bindgen doesn't currently support exporting constants const MAX_SEED_LEN = 32; diff --git a/sdk/tests/keypair.mjs b/sdk/tests/keypair.mjs index 092ba511b..dd815805e 100644 --- a/sdk/tests/keypair.mjs +++ b/sdk/tests/keypair.mjs @@ -1,6 +1,6 @@ import { expect } from "chai"; -import { init, Keypair } from "crate"; -init(); +import { solana_program_init, Keypair } from "crate"; +solana_program_init(); describe("Keypair", function () { it("works", () => { diff --git a/sdk/tests/transaction.mjs b/sdk/tests/transaction.mjs index c672b8c46..74c806d78 100644 --- a/sdk/tests/transaction.mjs +++ b/sdk/tests/transaction.mjs @@ -1,6 +1,6 @@ import { expect } from "chai"; import { - init, + solana_program_init, Pubkey, Keypair, Hash, @@ -8,7 +8,7 @@ import { Instructions, Transaction, } from "crate"; -init(); +solana_program_init(); describe("Transaction", function () { it("SystemInstruction::Transfer", () => {