-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
81 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
/// START | ||
import { DAppClient } from "../node_modules/beacon-sdk/dist/cjs"; | ||
import Logger from "../Logger"; | ||
/// END | ||
|
||
async () => { | ||
const infoClientBeacon = async (loggerFun: Function) => { | ||
const logger = new Logger(loggerFun); | ||
/// START | ||
const dAppClient = new DAppClient({ name: "Beacon Docs" }); | ||
|
||
console.log(`Connected Accounts:`, await dAppClient.getAccounts()); | ||
console.log(`Connected Peers:`, await dAppClient.getPeers()); | ||
logger.log(`Connected Accounts:`, await dAppClient.getAccounts()); | ||
logger.log(`Connected Peers:`, await dAppClient.getPeers()); | ||
/// END | ||
}; | ||
export default infoClientBeacon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
/// START | ||
import { TezosToolkit } from "@taquito/taquito"; | ||
import { BeaconWallet } from "@taquito/beacon-wallet"; | ||
import Logger from "../Logger"; | ||
/// END | ||
|
||
async () => { | ||
const infoVersionTaquito = async (loggerFun: Function) => { | ||
const logger = new Logger(loggerFun); | ||
/// START | ||
const Tezos = new TezosToolkit("https://mainnet-tezos.giganode.io"); | ||
const wallet = new BeaconWallet({ name: "Beacon Docs Taquito" }); | ||
|
||
Tezos.setWalletProvider(wallet); | ||
|
||
console.log(`Connected Accounts:`, await wallet.client.getAccounts()); | ||
console.log(`Connected Peers:`, await wallet.client.getPeers()); | ||
logger.log(`Connected Accounts:`, await wallet.client.getAccounts()); | ||
logger.log(`Connected Peers:`, await wallet.client.getPeers()); | ||
/// END | ||
}; | ||
export default infoVersionTaquito; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,38 @@ | ||
/// START | ||
import { DAppClient, NetworkType } from "../node_modules/beacon-sdk/dist/cjs"; | ||
import Logger from "../Logger"; | ||
/// END | ||
|
||
async () => { | ||
const infoConnectionBeacon = async (loggerFun: Function) => { | ||
const logger = new Logger(loggerFun); | ||
/// START | ||
const dAppClient = new DAppClient({ name: "Beacon Docs" }); | ||
|
||
const addressLink = await dAppClient.blockExplorer.getAddressLink( | ||
"tz1MJx9vhaNRSimcuXPK2rW4fLccQnDAnVKJ", | ||
{ type: NetworkType.MAINNET }, | ||
); | ||
console.log("Address Link", addressLink); | ||
logger.log("Address Link", addressLink); | ||
|
||
const txLink = await dAppClient.blockExplorer.getTransactionLink( | ||
"onzCRJhQ9zPC38TLGhBTghCW7WAJpfUJ2NpwbbQKbW6LeEL8RfK", | ||
{ type: NetworkType.MAINNET }, | ||
); | ||
console.log("Transaction Link", txLink); | ||
logger.log("Transaction Link", txLink); | ||
|
||
console.log("\n\nConnection Info:\n"); | ||
console.log("Status:", dAppClient.connectionStatus); | ||
logger.log("\n\nConnection Info:\n"); | ||
logger.log("Status:", dAppClient.connectionStatus); | ||
const accounts = await dAppClient.getAccounts(); | ||
console.log("Accounts:", accounts); | ||
logger.log("Accounts:", accounts); | ||
const peers = await dAppClient.getPeers(); | ||
console.log("Peers:", peers); | ||
logger.log("Peers:", peers); | ||
|
||
console.log("\n\nDebug:\n"); | ||
console.log("Local Beacon ID:", await dAppClient.beaconId); | ||
logger.log("\n\nDebug:\n"); | ||
logger.log("Local Beacon ID:", await dAppClient.beaconId); | ||
const colorMode = await dAppClient.getColorMode(); | ||
console.log("Color Mode:", colorMode); | ||
logger.log("Color Mode:", colorMode); | ||
const ownMetadata = await dAppClient.getOwnAppMetadata(); | ||
console.log("Own Metadata:", ownMetadata); | ||
logger.log("Own Metadata:", ownMetadata); | ||
/// END | ||
}; | ||
export default infoConnectionBeacon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters