@waves.exchange/matcher-ws
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -60,4 +60,4 @@ /// <reference types="zen-observable" /> | ||
export declare type AddressUpdateMessages = RawAddressUpdate | AddressUpdateSubscribeMessage | AddressUpdateUnsubscribeMessage; | ||
export declare function addressUpdates(ws: WebSocketSubject<AddressUpdateMessages>, address: string, accessToken: string): Observable<AddressUpdate>; | ||
export declare function addressUpdates(ws: WebSocketSubject<AddressUpdateMessages>, address: string, accessToken: string, filters?: Array<string>): Observable<AddressUpdate>; | ||
export {}; | ||
//# sourceMappingURL=addressUpdates.d.ts.map |
@@ -6,6 +6,6 @@ "use strict"; | ||
const MatcherUpdateSequence_1 = require("./MatcherUpdateSequence"); | ||
function addressUpdates(ws, address, accessToken) { | ||
function addressUpdates(ws, address, accessToken, filters = []) { | ||
return new reactive_1.Observable((observer) => { | ||
const matcherUpdateSequence = new MatcherUpdateSequence_1.MatcherUpdateSequence(); | ||
const subscription = ws.multiplex(() => ({ T: 'aus', S: address, t: 'jwt', j: accessToken }), () => ({ T: 'u', S: address }), (message) => message.T === 'au' && message.S === address).subscribe((au) => { | ||
const subscription = ws.multiplex(() => ({ T: 'aus', S: address, t: 'jwt', j: accessToken, f: filters }), () => ({ T: 'u', S: address }), (message) => message.T === 'au' && message.S === address).subscribe((au) => { | ||
if (matcherUpdateSequence.setAndValidate(au.U)) { | ||
@@ -12,0 +12,0 @@ observer.next({ |
{ | ||
"name": "@waves.exchange/matcher-ws", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "typings": "dist/index.d.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
22077
1