Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@tronweb3/tronwallet-adapter-tronlink-evm

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tronweb3/tronwallet-adapter-tronlink-evm

Wallet adapter for TronLink wallet extension.

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
110
48.65%
Maintainers
3
Weekly downloads
 
Created
Source

This package provides an adapter to enable DApps to connect to the TronLink Wallet extension.

Demo

import { TronLinkEvmAdapter } from '@tronweb3/tronwallet-adapter-tronlink-evm';

const adapter = new TronLinkEvmAdapter();
// connect
await adapter.connect();

// then you can get address
console.log(adapter.address);

// just use the sendTransaction method to send a transfer transaction.
const transaction = {
    value: '0x' + Number(0.01 * Math.pow(10, 18)).toString(16), // 0.01 is 0.01ETH
    to: 'your target address',
    from: adapter.address,
};
await adapter.sendTransaction(transaction);

Documentation

API

  • Constructor()

    import { TronLinkEvmAdapter } from '@tronweb3/tronwallet-adapter-tronlink-evm';
    const tronLinkEvmAdapter = new TronLinkEvmAdapter();
    

Caveat Currently TronLink wallet does not support addChain() and signTypedData().

More detailed API can be found in Abstract Adapter.

Keywords

EVM

FAQs

Package last updated on 15 Nov 2023

Did you know?

Socket

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.

Install

Related posts