
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@temple-wallet/dapp
Advanced tools
This module is required to provide communication between DApps and Temple Wallet, it exposes unified interface for this interaction.
This module is required to provide communication between DApps and Temple Wallet, it exposes unified interface for this interaction.
yarn add @taquito/taquito @temple-wallet/dapp
import { TempleWallet } from "@temple-wallet/dapp";
(async () => {
try {
const available = await TempleWallet.isAvailable();
if (!available) {
throw new Error("Temple Wallet not installed");
}
// Note:
// use `TempleWallet.isAvailable` method only after web application fully loaded.
// Alternatively, you can use the method `TempleWallet.onAvailabilityChange`
// that tracks availability in real-time .
const wallet = new TempleWallet("My Super DApp");
await wallet.connect("carthagenet");
const tezos = wallet.toTezos();
const accountPkh = await tezos.wallet.pkh();
const accountBalance = await tezos.tz.getBalance(accountPkh);
console.info(`address: ${accountPkh}, balance: ${accountBalance}`);
const counter = await tezos.wallet.at(
"KT1DjYkruvfujfKw6nLYafArqKufcwHuKXvT"
);
const operation = await counter.methods.increment(1).send();
await operation.confirmation();
const counterValue = await counter.storage();
console.info(`count: ${counterValue}`);
} catch (err) {
console.error(err);
}
})();
import { TempleWallet } from "@temple-wallet/dapp";
(async () => {
try {
const available = await TempleWallet.isAvailable();
if (!available) {
throw new Error("Temple Wallet not installed");
}
const permission = await TempleWallet.getCurrentPermission();
// Alternatively, you can use the method `TempleWallet.onPermissionChange`
// that tracks current permission in real-time.
console.info(permission);
// prints "{ rpc: string, pkh: string, publicKey: string }" if permission exists, "null" - if not.
const wallet = new TempleWallet("My Super DApp", permission);
console.info(wallet.connected);
// prints "true" if permission exists, "false" - if not.
if (!wallet.connected) {
await wallet.connect("carthagenet");
}
const tezos = wallet.toTezos();
// ...
} catch (err) {
console.error(err);
}
})();
import { TempleWallet } from "@temple-wallet/dapp";
(async () => {
try {
const wallet = new TempleWallet("My Super DApp");
// ...
// Only hex strings
const signature = await wallet.sign(
Buffer.from("Hello world").toString("hex")
);
} catch (err) {
console.error(err);
}
})();
You can find the example of Counter DApp in this repo.
You can explore auto generated full API Docs here.
Probably you would be most interested in the TempleWallet class methods.
Below is a list of commands you will probably find useful.
Runs the project in development/watch mode. Your project will be rebuilt upon changes.
Your library will be rebuilt if you make edits.
Bundles the package to the dist folder. The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).
FAQs
This module is required to provide communication between DApps and Temple Wallet, it exposes unified interface for this interaction.
The npm package @temple-wallet/dapp receives a total of 321 weekly downloads. As such, @temple-wallet/dapp popularity was classified as not popular.
We found that @temple-wallet/dapp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.