Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ton-watcher

Package Overview
Dependencies
Maintainers
0
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ton-watcher - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

src/modules/txs/tonTxWatcherV4.ts

2

package.json
{
"name": "ton-watcher",
"version": "1.1.3",
"version": "1.1.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -1,2 +0,2 @@

import { Address, JettonMaster, JettonWallet, OpenedContract, TonClient } from "@ton/ton";
import { Address, JettonMaster, JettonWallet, OpenedContract, TonClient, TonClient4 } from "@ton/ton";
import { Cell } from '@ton/core';

@@ -54,3 +54,3 @@

export const getJettonsInfo = async (client: TonClient, deposit_address: string, jettons_config: Record<string, JetonSettings>, is_testnet?: boolean): Promise<Record<string, JettonsDepo>> => {
export const getJettonsInfo = async (client: TonClient|TonClient4, deposit_address: string, jettons_config: Record<string, JetonSettings>, is_testnet?: boolean): Promise<Record<string, JettonsDepo>> => {

@@ -90,3 +90,3 @@ const jettons = Object.create(null);

export async function getJettonInfo (jetton_address: string, client: TonClient, is_testnet?: boolean): Promise<JettonInfoMain> {
export async function getJettonInfo (jetton_address: string, client: TonClient|TonClient4, is_testnet?: boolean): Promise<JettonInfoMain> {
const master_jeton_address = Address.parse(jetton_address);

@@ -93,0 +93,0 @@

@@ -1,6 +0,5 @@

import { getHttpEndpoint } from "@orbs-network/ton-access";
import { Address, TonClient, WalletContractV5R1 } from "@ton/ton";
import { getHttpEndpoint, getHttpV4Endpoint } from "@orbs-network/ton-access";
import { Address, TonClient4, WalletContractV5R1 } from "@ton/ton";
import { keyPairFromSecretKey } from "@ton/crypto";
import { safeJSONStringify } from "../../utils/safeJson";
import { TonTxWatcher } from '../txs/tonTxWatcher';
import { TonInteraction } from "../wallet/Core";

@@ -10,2 +9,3 @@ import axios from 'axios';

import { SendTx, STATUS } from "../../modules/txs/sendTx";
import { TonTxWatcherV4 } from "modules/txs/tonTxWatcherV4";

@@ -53,4 +53,5 @@ type Events = {

const endpoint = isTestnet ? 'https://testnet.toncenter.com/api/v2/jsonRPC' : await getHttpEndpoint({ network: init.network });
const endpoint2 = isTestnet ? 'https://testnet.toncenter.com/api/v2/jsonRPC' : await getHttpEndpoint({ network: init.network });
const endpoint4 = await getHttpV4Endpoint({ network: init.network });
const core = await TonInteraction.fabric({

@@ -63,4 +64,4 @@ endpoint,

const client = new TonClient({
endpoint: endpoint2,
const client4 = new TonClient4({
endpoint: endpoint4,
});

@@ -70,3 +71,3 @@

const txWatcher = new TonTxWatcher(client, address.toString({ testOnly: isTestnet }), init.last_lt, init.last_hash, undefined, {
const txWatcher = new TonTxWatcherV4(client4, address.toString({ testOnly: isTestnet }), init.last_lt, init.last_hash, undefined, {
tonBalance: (data: unknown) => { process.send && process.send(safeJSONStringify({data, event: 'tonBalance'})) },

@@ -73,0 +74,0 @@ jettonBalance: (data: unknown) => { process.send && process.send(safeJSONStringify({data, event: 'jettonBalance'})) },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc