edge-core-js
Advanced tools
Comparing version 0.9.6 to 0.9.7
# edge-core-js | ||
## 0.9.7 | ||
* Fix payment request Flow types. | ||
* Implement plugin data API. | ||
## 0.9.5 | ||
@@ -4,0 +9,0 @@ |
{ | ||
"name": "edge-core-js", | ||
"version": "0.9.6", | ||
"version": "0.9.7", | ||
"description": "Edge account & wallet management library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -352,2 +352,13 @@ // @flow | ||
export type EdgePluginData = { | ||
deleteItem(pluginId: string, itemId: string): Promise<mixed>, | ||
deletePlugin(pluginId: string): Promise<mixed>, | ||
listItemIds(pluginId: string): Promise<Array<string>>, | ||
listPluginIds(): Promise<Array<string>>, | ||
getItem(pluginId: string, itemId: string): Promise<string>, | ||
setItem(pluginId: string, itemId: string, value: string): Promise<mixed> | ||
} | ||
export type EdgeAccount = { | ||
@@ -361,4 +372,5 @@ // Basic login information: | ||
// Exchange-rate info: | ||
// Special-purpose API's: | ||
+exchangeCache: any, | ||
+pluginData: EdgePluginData, | ||
@@ -530,3 +542,3 @@ // What login method was used? | ||
paymentProtocolUrl: string | ||
) => EdgePaymentProtocolInfo, | ||
) => Promise<EdgePaymentProtocolInfo>, | ||
@@ -743,5 +755,5 @@ // Wallet management: | ||
dumpData(): EdgeDataDump, | ||
getPaymentProtocolInfo?: ( | ||
+getPaymentProtocolInfo?: ( | ||
paymentProtocolUrl: string | ||
) => EdgePaymentProtocolInfo, | ||
) => Promise<EdgePaymentProtocolInfo>, | ||
getDisplayPrivateSeed(): string | null, | ||
@@ -748,0 +760,0 @@ getDisplayPublicSeed(): string | null, |
@@ -9,2 +9,3 @@ // @flow | ||
EdgeLobby, | ||
EdgePluginData, | ||
EdgeWalletInfo, | ||
@@ -26,2 +27,3 @@ EdgeWalletInfoFull, | ||
import { makeLobbyApi } from './lobby-api.js' | ||
import { makePluginDataApi } from './plugin-data-api.js' | ||
@@ -55,2 +57,3 @@ /** | ||
const exchangeCache = makeExchangeCache(ai) | ||
const pluginData = makePluginDataApi(ai, state) | ||
@@ -78,6 +81,9 @@ const rawAccount: EdgeAccount = { | ||
// Exchange cache: | ||
// Speciality API's: | ||
get exchangeCache (): any { | ||
return exchangeCache | ||
}, | ||
get pluginData (): EdgePluginData { | ||
return pluginData | ||
}, | ||
@@ -84,0 +90,0 @@ // What login method was used? |
@@ -443,6 +443,5 @@ // @flow | ||
'@getPaymentProtocolInfo': { sync: true }, | ||
getPaymentProtocolInfo ( | ||
paymentProtocolUrl: string | ||
): EdgePaymentProtocolInfo { | ||
): Promise<EdgePaymentProtocolInfo> { | ||
if (!engine.getPaymentProtocolInfo) { | ||
@@ -449,0 +448,0 @@ throw new Error( |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
5118773
88
57295