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

bnc-sdk

Package Overview
Dependencies
Maintainers
3
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bnc-sdk - npm Package Compare versions

Comparing version 4.2.0 to 4.3.0

3

dist/types/src/account.d.ts
import { Emitter } from './interfaces';
declare function account(this: any, address: string): {
import Blocknative from '.';
declare function account(this: Blocknative, address: string): {
emitter: Emitter;

@@ -4,0 +5,0 @@ details: {

@@ -0,3 +1,4 @@

import Blocknative from '.';
import { Config, Emitter } from './interfaces';
declare function configuration(this: any, config: Config): Promise<string | {
declare function configuration(this: Blocknative, config: Config): Promise<string | {
details: {

@@ -4,0 +5,0 @@ config: Config;

@@ -1,26 +0,24 @@

import { InitializationOptions, Transaction, Account, Event, Unsubscribe, Simulate, Destroy, Configuration } from './interfaces';
/// <reference types="node" />
import { InitializationOptions, Ac, TransactionHandler, EventObject, Tx, Transaction, Account, Event, Unsubscribe, Simulate, Destroy, Configuration, SDKError, LimitRules, EnhancedConfig } from './interfaces';
declare class Blocknative {
private _storageKey;
private _connectionId;
private _dappId;
private _system;
private _networkId;
private _appName;
private _appVersion;
private _transactionHandlers;
private _socket;
private _connected;
private _sendMessage;
private _watchedTransactions;
private _watchedAccounts;
private _configurations;
private _pingTimeout?;
private _heartbeat?;
private _destroyed;
private _onerror;
private _queuedMessages;
private _limitRules;
private _waitToRetry;
private _processingQueue;
private _processQueue;
protected _storageKey: string;
protected _connectionId: string | undefined;
protected _dappId: string;
protected _system: string;
protected _networkId: number;
protected _appName: string;
protected _appVersion: string;
protected _transactionHandlers: TransactionHandler[];
protected _socket: any;
protected _connected: boolean;
protected _sendMessage: (msg: EventObject) => void;
protected _pingTimeout?: NodeJS.Timeout;
protected _heartbeat?: () => void;
protected _destroyed: boolean;
protected _onerror: ((error: SDKError) => void) | undefined;
protected _queuedMessages: EventObject[];
protected _limitRules: LimitRules;
protected _waitToRetry: null | Promise<void>;
protected _processingQueue: boolean;
protected _processQueue: () => Promise<void>;
transaction: Transaction;

@@ -33,4 +31,7 @@ account: Account;

configuration: Configuration;
watchedTransactions: Tx[];
watchedAccounts: Ac[];
configurations: Map<string, EnhancedConfig>;
constructor(options: InitializationOptions);
}
export default Blocknative;

@@ -103,3 +103,3 @@ import { Subject } from 'rxjs';

export declare type System = 'bitcoin' | 'ethereum';
export declare type Network = 'main' | 'testnet' | 'ropsten' | 'rinkeby' | 'goerli' | 'kovan' | 'xdai' | 'bsc-main' | 'matic-main' | 'fantom-main' | 'local';
export declare type Network = 'main' | 'testnet' | 'ropsten' | 'rinkeby' | 'goerli' | 'kovan' | 'xdai' | 'bsc-main' | 'matic-main' | 'fantom-main' | 'matic-mumbai' | 'local';
export declare type Status = 'pending' | 'confirmed' | 'speedup' | 'cancel' | 'failed' | 'dropped' | 'simulated';

@@ -247,18 +247,43 @@ export interface InputOutput {

}
export interface EventObject {
export declare type BaseEventObject = {
eventCode: string;
categoryCode: string;
transaction?: TransactionEventLog;
wallet?: {
};
export declare type BaseTransactionEventObject = {
startTime?: number;
status?: string;
id?: string;
};
export declare type BitcoinTransactionEventObject = BaseTransactionEventObject & {
txid: string;
};
export declare type EthereumTransactionEventObject = BaseTransactionEventObject & {
hash: string;
};
export declare type TransactionEventObject = BaseEventObject & {
transaction: BitcoinTransactionEventObject | EthereumTransactionEventObject | SimulationTransaction;
};
export declare type WalletEventObject = BaseEventObject & {
balance: {
balance: string;
};
contract?: {
};
export declare type ContractEventObject = BaseEventObject & {
contract: {
methodName: string;
parameters: any[];
};
account?: {
};
export declare type AccountEventObject = BaseEventObject & {
account: {
address: string;
};
connectionId?: string;
}
};
export declare type InitializeEventObject = BaseEventObject & {
connectionId: string;
};
export declare type ConfigEventObject = BaseEventObject & {
config: Config;
};
export declare type EventObject = TransactionEventObject | WalletEventObject | ContractEventObject | AccountEventObject | InitializeEventObject | ConfigEventObject;
export interface TransactionHandler {

@@ -265,0 +290,0 @@ (transaction: TransactionEvent): void;

import { SimulationTransaction, SimulationTransactionOutput } from './interfaces';
declare function simulate(this: any, system: string, network: string, transaction: SimulationTransaction): Promise<SimulationTransactionOutput>;
import Blocknative from '.';
declare function simulate(this: Blocknative, system: string, network: string, transaction: SimulationTransaction): Promise<SimulationTransactionOutput>;
export default simulate;
import { Emitter } from './interfaces';
declare function transaction(this: any, hash: string, id?: string): {
import Blocknative from '.';
declare function transaction(this: Blocknative, hash: string, id?: string): {
details: {

@@ -8,2 +9,11 @@ eventCode: string;

status: string;
hash: string;
txid?: undefined;
} | {
eventCode: string;
id: string;
startTime: number;
status: string;
txid: string;
hash?: undefined;
};

@@ -10,0 +20,0 @@ emitter: Emitter;

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

declare function unsubscribe(this: any, addressOrHash: string): void;
import Blocknative from '.';
declare function unsubscribe(this: Blocknative, addressOrHash: string): void;
export default unsubscribe;
{
"name": "bnc-sdk",
"version": "4.2.0",
"version": "4.3.0",
"description": "SDK to connect to the blocknative backend via a websocket connection",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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