How to use the icon-sdk-js.IconHttpProvider function in icon-sdk-js

To help you get started, we’ve selected a few icon-sdk-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github icon-project / icon-sdk-js / quickstart / example / js / TokenTransactionExample.js View on Github external
constructor() {
		// HttpProvider is used to communicate with http.
		this.provider = new IconHttpProvider(MockData.NODE_URL);
		
		// Create IconService instance
        this.iconService = new IconService(this.provider);
        
        // Load wallet
        const { Wallet } = this.iconService;
        this.wallet = Wallet.loadPrivateKey(MockData.PRIVATE_KEY_1);
        this.txHash = '';

        this.addListener();
        this.getTokenBalance(MockData.WALLET_ADDRESS_1);
        this.getTokenBalance(MockData.WALLET_ADDRESS_2);
    }