layer2storage
Advanced tools
Comparing version 0.0.5 to 0.0.7
@@ -53,16 +53,2 @@ /*! ***************************************************************************** | ||
/* | ||
interface PaymentState extends LCState { | ||
sender: Address | ||
balance: string | ||
} | ||
*/ | ||
function makeLCState(id, nonce, party, counterparty, sig, vcRootHash, balanceA, balanceB, openVCs) { | ||
if (openVCs === void 0) { openVCs = 0; } | ||
return { id: id, nonce: nonce, party: party, counterparty: counterparty, sig: sig, openVCs: openVCs, vcRootHash: vcRootHash, balanceA: balanceA, balanceB: balanceB }; | ||
} | ||
function makeVCState(id, nonce, party, counterparty, sig, lcId, balanceA, balanceB, appState) { | ||
if (appState === void 0) { appState = null; } | ||
return { id: id, nonce: nonce, party: party, counterparty: counterparty, sig: sig, lcId: lcId, balanceA: balanceA, balanceB: balanceB, appState: appState }; | ||
} | ||
var LC_VCHANNELS_KEY = 'vchannels'; | ||
@@ -77,3 +63,3 @@ var VC_LEDGER_KEY = 'ledger'; | ||
if (!gun) | ||
throw new Error('Redis instance missing from constructor'); | ||
throw new Error('Gun instance missing from constructor'); | ||
this.gun = gun; | ||
@@ -436,3 +422,3 @@ this.prefix = prefix; | ||
export { makeLCState, makeVCState, GunStorageProxy }; | ||
export { GunStorageProxy }; | ||
//# sourceMappingURL=layer2storage.es5.js.map |
@@ -59,16 +59,2 @@ (function (global, factory) { | ||
/* | ||
interface PaymentState extends LCState { | ||
sender: Address | ||
balance: string | ||
} | ||
*/ | ||
function makeLCState(id, nonce, party, counterparty, sig, vcRootHash, balanceA, balanceB, openVCs) { | ||
if (openVCs === void 0) { openVCs = 0; } | ||
return { id: id, nonce: nonce, party: party, counterparty: counterparty, sig: sig, openVCs: openVCs, vcRootHash: vcRootHash, balanceA: balanceA, balanceB: balanceB }; | ||
} | ||
function makeVCState(id, nonce, party, counterparty, sig, lcId, balanceA, balanceB, appState) { | ||
if (appState === void 0) { appState = null; } | ||
return { id: id, nonce: nonce, party: party, counterparty: counterparty, sig: sig, lcId: lcId, balanceA: balanceA, balanceB: balanceB, appState: appState }; | ||
} | ||
var LC_VCHANNELS_KEY = 'vchannels'; | ||
@@ -83,3 +69,3 @@ var VC_LEDGER_KEY = 'ledger'; | ||
if (!gun) | ||
throw new Error('Redis instance missing from constructor'); | ||
throw new Error('Gun instance missing from constructor'); | ||
this.gun = gun; | ||
@@ -442,4 +428,2 @@ this.prefix = prefix; | ||
exports.makeLCState = makeLCState; | ||
exports.makeVCState = makeVCState; | ||
exports.GunStorageProxy = GunStorageProxy; | ||
@@ -446,0 +430,0 @@ |
@@ -38,18 +38,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* | ||
interface PaymentState extends LCState { | ||
sender: Address | ||
balance: string | ||
} | ||
*/ | ||
function makeLCState(id, nonce, party, counterparty, sig, vcRootHash, balanceA, balanceB, openVCs) { | ||
if (openVCs === void 0) { openVCs = 0; } | ||
return { id: id, nonce: nonce, party: party, counterparty: counterparty, sig: sig, openVCs: openVCs, vcRootHash: vcRootHash, balanceA: balanceA, balanceB: balanceB }; | ||
} | ||
exports.makeLCState = makeLCState; | ||
function makeVCState(id, nonce, party, counterparty, sig, lcId, balanceA, balanceB, appState) { | ||
if (appState === void 0) { appState = null; } | ||
return { id: id, nonce: nonce, party: party, counterparty: counterparty, sig: sig, lcId: lcId, balanceA: balanceA, balanceB: balanceB, appState: appState }; | ||
} | ||
exports.makeVCState = makeVCState; | ||
var LC_VCHANNELS_KEY = 'vchannels'; | ||
@@ -64,3 +48,3 @@ var VC_LEDGER_KEY = 'ledger'; | ||
if (!gun) | ||
throw new Error('Redis instance missing from constructor'); | ||
throw new Error('Gun instance missing from constructor'); | ||
this.gun = gun; | ||
@@ -67,0 +51,0 @@ this.prefix = prefix; |
@@ -10,4 +10,4 @@ declare type StrObject = { | ||
id: string; | ||
isClosed: boolean; | ||
nonce: string; | ||
isClosed?: boolean; | ||
party: Address; | ||
@@ -30,4 +30,2 @@ counterparty: Address; | ||
} | ||
export declare function makeLCState(id: string, nonce: string, party: Address, counterparty: Address, sig: string, vcRootHash: string, balanceA: BigNumber, balanceB: BigNumber, openVCs?: number): LCState; | ||
export declare function makeVCState(id: string, nonce: string, party: Address, counterparty: Address, sig: string, lcId: string, balanceA: BigNumber, balanceB: BigNumber, appState?: StrObject | null): VCState; | ||
export interface L2Database { | ||
@@ -34,0 +32,0 @@ logdriver(): void; |
{ | ||
"name": "layer2storage", | ||
"version": "0.0.5", | ||
"version": "0.0.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
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
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
97378
1312