frontblock
Advanced tools
Comparing version 0.3.4 to 0.3.5
@@ -33,3 +33,4 @@ "use strict"; | ||
exportRPCs() { | ||
const unhookFn = async (uid) => { return await this.unsubscribe(this.apikey, uid); }; | ||
const unsub = async (uid) => { return await this.unsubscribe(this.apikey, uid); }; | ||
const quit = async (uid) => { return await this.quit(this.apikey, uid); }; | ||
return [ | ||
@@ -45,14 +46,14 @@ { | ||
type: 'hook', | ||
unhook: unhookFn, | ||
unhook: quit, | ||
visibility: 'private' | ||
}, { | ||
name: 'unsubscribe', | ||
rpc: unhookFn, | ||
rpc: unsub, | ||
type: 'unhook', | ||
visibility: 'private' | ||
}, { | ||
name: 'resume', | ||
name: 'consume', | ||
rpc: async (apikey, uid, callback) => { return await this.consume(this.apikey, uid, callback); }, | ||
type: 'hook', | ||
unhook: unhookFn, | ||
unhook: quit, | ||
visibility: 'private' | ||
@@ -97,3 +98,3 @@ } | ||
async subsume(apikey, coin, account, callback) { | ||
const r = await this.socket.call("subscribe", apikey, coin, account); | ||
const r = await this.socket.call("subsume", apikey, coin, account); | ||
const res = Types_1.parseSubResponse(r); | ||
@@ -100,0 +101,0 @@ if (res instanceof Types_1.SubscriptionResponse) { |
@@ -46,3 +46,4 @@ import { Coin, AccountMap, TransactionMap, SubscriptionResponse, ErrorResponse, SuccessResponse, parseResponse, parseSubResponse } from "frontblock-generic/Types"; | ||
exportRPCs(): socketioRPC[] { | ||
const unhookFn = async(uid:string) => { return await this.unsubscribe(this.apikey, uid) } | ||
const unsub = async(uid:string) => { return await this.unsubscribe(this.apikey, uid) } | ||
const quit = async(uid:string) => {return await this.quit(this.apikey, uid) } | ||
return [ | ||
@@ -58,14 +59,14 @@ { | ||
type: 'hook', | ||
unhook: unhookFn, | ||
unhook: quit, | ||
visibility: 'private' | ||
},{ | ||
name: 'unsubscribe', | ||
rpc: unhookFn, | ||
rpc: unsub, | ||
type: 'unhook', | ||
visibility: 'private' | ||
},{ | ||
name: 'resume', | ||
name: 'consume', | ||
rpc: async<C extends Coin>(apikey: string, uid: string, callback: (tx: TransactionMap[C]) => void) => {return await this.consume(this.apikey, uid, callback)}, | ||
type: 'hook', | ||
unhook: unhookFn, | ||
unhook: quit, | ||
visibility: 'private' | ||
@@ -116,3 +117,3 @@ } | ||
async subsume<C extends Coin>(apikey: string, coin: C, account: AccountMap[C], callback: (tx: TransactionMap[C]) => void): Promise<SubscriptionResponse | ErrorResponse> { | ||
const r = await this.socket.call("subscribe", apikey, coin, account) | ||
const r = await this.socket.call("subsume", apikey, coin, account) | ||
const res = parseSubResponse(r) | ||
@@ -119,0 +120,0 @@ if(res instanceof SubscriptionResponse){ |
{ | ||
"name": "frontblock", | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"description": "frontblock shop-side library ", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
11100
263