@trinsic/okapi
Advanced tools
Comparing version 1.2.0 to 1.4.0
@@ -43,1 +43,15 @@ import * as proto from "@trinsic/okapi-proto"; | ||
} | ||
export declare class Hashing { | ||
static blake3Hash( | ||
request: proto.Blake3HashRequest | ||
): Promise<proto.Blake3HashResponse>; | ||
static blake3KeyedHash( | ||
request: proto.Blake3KeyedHashRequest | ||
): Promise<proto.Blake3KeyedHashResponse>; | ||
static blake3DeriveKey( | ||
request: proto.Blake3DeriveKeyRequest | ||
): Promise<proto.Blake3DeriveKeyResponse>; | ||
static sha256Hash( | ||
request: proto.SHA256HashRequest | ||
): Promise<proto.SHA256HashResponse>; | ||
} |
@@ -25,3 +25,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Oberon = exports.LdProofs = exports.DIDComm = exports.DIDKey = void 0; | ||
exports.Hashing = exports.Oberon = exports.LdProofs = exports.DIDComm = exports.DIDKey = void 0; | ||
const native = __importStar(require("@trinsic/okapi-node")); | ||
@@ -84,2 +84,17 @@ const proto = __importStar(require("@trinsic/okapi-proto")); | ||
exports.Oberon = Oberon; | ||
class Hashing { | ||
static blake3Hash(request) { | ||
return Promise.resolve(proto.Blake3HashResponse.deserializeBinary(native.blake3_hash(request.serializeBinary()))); | ||
} | ||
static blake3KeyedHash(request) { | ||
return Promise.resolve(proto.Blake3KeyedHashResponse.deserializeBinary(native.blake3_keyed_hash(request.serializeBinary()))); | ||
} | ||
static blake3DeriveKey(request) { | ||
return Promise.resolve(proto.Blake3DeriveKeyResponse.deserializeBinary(native.blake3_derive_key(request.serializeBinary()))); | ||
} | ||
static sha256Hash(request) { | ||
return Promise.resolve(proto.SHA256HashResponse.deserializeBinary(native.sha256_hash(request.serializeBinary()))); | ||
} | ||
} | ||
exports.Hashing = Hashing; | ||
//# sourceMappingURL=index.js.map |
@@ -43,1 +43,15 @@ import * as proto from "@trinsic/okapi-proto"; | ||
} | ||
export declare class Hashing { | ||
static blake3Hash( | ||
request: proto.Blake3HashRequest | ||
): Promise<proto.Blake3HashResponse>; | ||
static blake3KeyedHash( | ||
request: proto.Blake3KeyedHashRequest | ||
): Promise<proto.Blake3KeyedHashResponse>; | ||
static blake3DeriveKey( | ||
request: proto.Blake3DeriveKeyRequest | ||
): Promise<proto.Blake3DeriveKeyResponse>; | ||
static sha256Hash( | ||
request: proto.SHA256HashRequest | ||
): Promise<proto.SHA256HashResponse>; | ||
} |
@@ -39,2 +39,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
export * from "@trinsic/okapi-proto"; | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
var native; | ||
@@ -250,2 +251,20 @@ var initalized = false; | ||
export { Oberon }; | ||
var Hashing = /** @class */ (function () { | ||
function Hashing() { | ||
} | ||
Hashing.blake3Hash = function (request) { | ||
return Promise.resolve(proto.Blake3HashResponse.deserializeBinary(native.blake3_hash(request.serializeBinary()))); | ||
}; | ||
Hashing.blake3KeyedHash = function (request) { | ||
return Promise.resolve(proto.Blake3KeyedHashResponse.deserializeBinary(native.blake3_keyed_hash(request.serializeBinary()))); | ||
}; | ||
Hashing.blake3DeriveKey = function (request) { | ||
return Promise.resolve(proto.Blake3DeriveKeyResponse.deserializeBinary(native.blake3_derive_key(request.serializeBinary()))); | ||
}; | ||
Hashing.sha256Hash = function (request) { | ||
return Promise.resolve(proto.SHA256HashResponse.deserializeBinary(native.sha256_hash(request.serializeBinary()))); | ||
}; | ||
return Hashing; | ||
}()); | ||
export { Hashing }; | ||
//# sourceMappingURL=index.web.js.map |
{ | ||
"name": "@trinsic/okapi", | ||
"version": "1.2.0", | ||
"version": "1.4.0", | ||
"description": "", | ||
@@ -22,5 +22,5 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@trinsic/okapi-node": "^1.2.0", | ||
"@trinsic/okapi-proto": "^1.2.0", | ||
"@trinsic/okapi-web": "^1.2.0", | ||
"@trinsic/okapi-node": "^1.4.0", | ||
"@trinsic/okapi-proto": "^1.4.0", | ||
"@trinsic/okapi-web": "^1.4.0", | ||
"google-protobuf": "^3.14.0-rc.3" | ||
@@ -47,3 +47,3 @@ }, | ||
}, | ||
"gitHead": "f812349f3d09c660e469fadf812c6a69af4a31fa" | ||
"gitHead": "075ed8d78b96e140bc35b9b5784aade4480ea102" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
40469
476
Updated@trinsic/okapi-node@^1.4.0
Updated@trinsic/okapi-proto@^1.4.0
Updated@trinsic/okapi-web@^1.4.0