Comparing version 1.0.0-beta.12 to 1.0.0-beta.15
"use strict"; | ||
exports.__esModule = true; | ||
require("core-js"); | ||
var errors = require("../../errors"); | ||
require("../../typed-array"); | ||
exports.padTrytes = function (length) { return function (trytes) { | ||
@@ -6,0 +6,0 @@ return trytes.length < length ? trytes.concat('9'.repeat(length - trytes.length)) : trytes; |
@@ -34,2 +34,21 @@ "use strict"; | ||
}; }; // tslint:disable-line prefer-object-spread | ||
var PersistenceEvents; | ||
(function (PersistenceEvents) { | ||
PersistenceEvents["writeBundle"] = "writeBundle"; | ||
PersistenceEvents["deleteBundle"] = "deleteBundle"; | ||
PersistenceEvents["writeCDA"] = "writeCDA"; | ||
PersistenceEvents["deleteCDA"] = "deleteCDA"; | ||
})(PersistenceEvents = exports.PersistenceEvents || (exports.PersistenceEvents = {})); | ||
var PersistenceBatchTypes; | ||
(function (PersistenceBatchTypes) { | ||
PersistenceBatchTypes["writeBundle"] = "writeBundle"; | ||
PersistenceBatchTypes["deleteBundle"] = "deleteBundle"; | ||
PersistenceBatchTypes["writeCDA"] = "writeCDA"; | ||
PersistenceBatchTypes["deleteCDA"] = "delteCDA"; | ||
})(PersistenceBatchTypes = exports.PersistenceBatchTypes || (exports.PersistenceBatchTypes = {})); | ||
var PersistenceAdapterBatchTypes; | ||
(function (PersistenceAdapterBatchTypes) { | ||
PersistenceAdapterBatchTypes["write"] = "write"; | ||
PersistenceAdapterBatchTypes["delete"] = "delete"; | ||
})(PersistenceAdapterBatchTypes = exports.PersistenceAdapterBatchTypes || (exports.PersistenceAdapterBatchTypes = {})); | ||
//# sourceMappingURL=types.js.map |
{ | ||
"name": "@iota/pad", | ||
"version": "1.0.0-beta.12", | ||
"version": "1.0.0-beta.15", | ||
"description": "Padding utility", | ||
@@ -65,3 +65,3 @@ "main": "./out/pad/src/index.js", | ||
}, | ||
"gitHead": "0777d33f7a01a2751b570774e917ce5e2485cd40" | ||
"gitHead": "fe5e4a44530c27a5cd5d1d65aaf79b49aa2be3cd" | ||
} |
@@ -0,3 +1,3 @@ | ||
import 'core-js' | ||
import * as errors from '../../errors' | ||
import '../../typed-array' | ||
import { Tag, Trytes } from '../../types' | ||
@@ -4,0 +4,0 @@ |
@@ -1,2 +0,2 @@ | ||
import '../../typed-array'; | ||
import 'core-js'; | ||
export declare const padTrytes: (length: number) => (trytes: string) => string; | ||
@@ -3,0 +3,0 @@ export declare const padTrits: (length: number) => (trits: Int8Array) => Int8Array; |
@@ -265,15 +265,19 @@ /// <reference types="node" /> | ||
readonly batch: (ops: ReadonlyArray<PersistenceBatch<T>>) => Promise<void>; | ||
readonly stateRead: (key: B) => Promise<B>; | ||
readonly stateWrite: (key: B, value: B) => Promise<void>; | ||
readonly stateDelete: (key: B) => Promise<B>; | ||
readonly stateBatch: (ops: ReadonlyArray<PersistenceAdapterBatch<B, B>>) => Promise<void>; | ||
readonly createStateReadStream: (options?: PersistenceIteratorOptions) => NodeJS.ReadableStream; | ||
readonly historyRead: (key: B) => Promise<B>; | ||
readonly historyWrite: (key: B, value: B) => Promise<void>; | ||
readonly historyDelete: (key: B) => Promise<void>; | ||
readonly historyBatch: (ops: ReadonlyArray<PersistenceAdapterBatch<B, B>>) => Promise<void>; | ||
readonly createHistoryReadStream: (options?: PersistenceIteratorOptions) => NodeJS.ReadableStream; | ||
readonly state: PersistenceAdapter<B, B>; | ||
readonly history: PersistenceAdapter<B, B>; | ||
} | ||
export declare enum PersistenceEvents { | ||
writeBundle = "writeBundle", | ||
deleteBundle = "deleteBundle", | ||
writeCDA = "writeCDA", | ||
deleteCDA = "deleteCDA" | ||
} | ||
export declare enum PersistenceBatchTypes { | ||
writeBundle = "writeBundle", | ||
deleteBundle = "deleteBundle", | ||
writeCDA = "writeCDA", | ||
deleteCDA = "delteCDA" | ||
} | ||
export interface PersistenceBatch<V = Int8Array> { | ||
readonly type: 'writeBundle' | 'deleteBundle' | 'writeCDA' | 'deleteCDA'; | ||
readonly type: PersistenceBatchTypes.writeBundle | PersistenceBatchTypes.deleteBundle | PersistenceBatchTypes.writeCDA | PersistenceBatchTypes.deleteCDA; | ||
readonly value: V; | ||
@@ -293,6 +297,12 @@ } | ||
readonly createReadStream: (options?: PersistenceIteratorOptions) => NodeJS.ReadableStream; | ||
readonly close: () => Promise<void>; | ||
readonly open: () => Promise<void>; | ||
} | ||
export declare type PersistenceAdapterBatch<K = Buffer, V = Buffer> = PersistenceAdapterWriteOp<K, V> | PersistenceAdapterDeleteOp<K>; | ||
export declare enum PersistenceAdapterBatchTypes { | ||
write = "write", | ||
delete = "delete" | ||
} | ||
export interface PersistenceAdapterWriteOp<K = Buffer, V = Buffer> { | ||
readonly type: 'write'; | ||
readonly type: PersistenceAdapterBatchTypes.write; | ||
readonly key: K; | ||
@@ -302,3 +312,3 @@ readonly value: V; | ||
export interface PersistenceAdapterDeleteOp<K = Buffer> { | ||
readonly type: 'delete'; | ||
readonly type: PersistenceAdapterBatchTypes.delete; | ||
readonly key: K; | ||
@@ -305,0 +315,0 @@ } |
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
57031
34
680