Comparing version 4.4.0 to 4.4.1
@@ -1,4 +0,40 @@ | ||
import Blocknative from './sdk'; | ||
/// <reference types="node" /> | ||
import MultiChain from './multichain'; | ||
import { InitializationOptions, Ac, TransactionHandler, EventObject, Tx, Transaction, Account, Event, Unsubscribe, Simulate, Destroy, Configuration, SDKError, LimitRules, EnhancedConfig, MultiChainOptions } from './types'; | ||
declare class SDK { | ||
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: string[]; | ||
protected _limitRules: LimitRules; | ||
protected _waitToRetry: null | Promise<void>; | ||
protected _processingQueue: boolean; | ||
protected _processQueue: () => Promise<void>; | ||
transaction: Transaction; | ||
account: Account; | ||
event: Event; | ||
simulate: Simulate; | ||
unsubscribe: Unsubscribe; | ||
destroy: Destroy; | ||
configuration: Configuration; | ||
watchedTransactions: Tx[]; | ||
watchedAccounts: Ac[]; | ||
configurations: Map<string, EnhancedConfig>; | ||
constructor(options: InitializationOptions); | ||
static multichain(options: MultiChainOptions): MultiChain; | ||
} | ||
export default SDK; | ||
export * from './types'; | ||
export { default as MultichainSDK } from './multichain'; | ||
export default Blocknative; | ||
export type { MultiChain }; |
import { Observable, Subject } from 'rxjs'; | ||
import Blocknative from '../sdk'; | ||
import type SDK from '../'; | ||
import subscribe from './subscribe'; | ||
@@ -9,3 +9,3 @@ import unsubscribe from './unsubscribe'; | ||
ws: WebSocket | void; | ||
connections: Record<ChainId, Blocknative | null>; | ||
connections: Record<ChainId, SDK | null>; | ||
transactions$: Observable<EthereumTransactionData>; | ||
@@ -15,5 +15,6 @@ errors$: Subject<SDKError>; | ||
unsubscribe: typeof unsubscribe; | ||
Blocknative: typeof SDK; | ||
protected onTransaction$: Subject<EthereumTransactionData>; | ||
constructor(options: MultiChainOptions); | ||
constructor(options: MultiChainOptions, Blocknative: typeof SDK); | ||
} | ||
export default MultiChain; |
{ | ||
"name": "bnc-sdk", | ||
"version": "4.4.0", | ||
"version": "4.4.1", | ||
"description": "SDK to connect to the blocknative backend via a websocket connection", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -178,5 +178,5 @@ # Blocknative sdk | ||
```javascript | ||
import { MultichainSDK } from 'bnc-sdk' | ||
import Blocknative from 'bnc-sdk' | ||
const blocknative = new MultichainSDK({ apiKey: '<YOUR_API_KEY>' }) | ||
const blocknative = Blocknative.multichain({ apiKey: '<YOUR_API_KEY>' }) | ||
@@ -183,0 +183,0 @@ // subscribe to address events |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
650349
20040
22