@dfns/blockchain-integration
Advanced tools
Comparing version 1.0.14 to 1.0.15
@@ -1,5 +0,5 @@ | ||
import { Signer, createSigningGroup } from "./signer"; | ||
import { SigningGroup, createSigningGroup } from "./signing-group"; | ||
import { createLambdaHandler } from "./lambda-handler"; | ||
export { Signer, createLambdaHandler, createSigningGroup }; | ||
export { SigningGroup, createLambdaHandler, createSigningGroup }; | ||
export { WalletInterface } from "./types/wallet"; | ||
export { SignerAsync } from "./types/signer"; | ||
export { SigningGroupInterface } from "./types/signing-group"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createSigningGroup = exports.createLambdaHandler = exports.Signer = void 0; | ||
const signer_1 = require("./signer"); | ||
Object.defineProperty(exports, "Signer", { enumerable: true, get: function () { return signer_1.Signer; } }); | ||
Object.defineProperty(exports, "createSigningGroup", { enumerable: true, get: function () { return signer_1.createSigningGroup; } }); | ||
exports.createSigningGroup = exports.createLambdaHandler = exports.SigningGroup = void 0; | ||
const signing_group_1 = require("./signing-group"); | ||
Object.defineProperty(exports, "SigningGroup", { enumerable: true, get: function () { return signing_group_1.SigningGroup; } }); | ||
Object.defineProperty(exports, "createSigningGroup", { enumerable: true, get: function () { return signing_group_1.createSigningGroup; } }); | ||
const lambda_handler_1 = require("./lambda-handler"); | ||
Object.defineProperty(exports, "createLambdaHandler", { enumerable: true, get: function () { return lambda_handler_1.createLambdaHandler; } }); |
import { WalletInterface } from "../types/wallet"; | ||
import { SignerAsync } from "../types/signer"; | ||
import { SigningGroupInterface } from "../types/signing-group"; | ||
export declare function createLambdaHandler(walletImplementation: { | ||
new (signer: SignerAsync): WalletInterface; | ||
new (signer: SigningGroupInterface): WalletInterface; | ||
}, prefix: string): (lambdaEvent: any, context: any) => Promise<any>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createLambdaHandler = void 0; | ||
const signer_1 = require("../signer"); | ||
const signing_group_1 = require("../signing-group"); | ||
const { Router } = require("lambda-router"); | ||
// export class WalletImpl implements WalletInterface { | ||
// signer: SignerAsync; | ||
// constructor(signer: SignerAsync) { | ||
// this.signer = signer; | ||
// } | ||
// async getTransactions(): Promise<TransactionResponse> { | ||
// return { status: 1, data: { tx_hash: "1" } }; | ||
// } | ||
// async getBalance(): Promise<string> { | ||
// return "1"; | ||
// } | ||
// async getAddress(): Promise<string> { | ||
// return "1"; | ||
// } | ||
// async sendTransaction(foobar: any) { | ||
// return "1"; | ||
// } | ||
// } | ||
function createLambdaHandler(walletImplementation, prefix) { | ||
@@ -36,4 +18,3 @@ const router = Router({ | ||
router.get(CLIENT_PREFIX + "/address/{groupId}", async (event, context) => { | ||
console.log("GROUPID: ", event.pathParameters.groupId); | ||
const signer = new signer_1.Signer(event.pathParameters.groupId); | ||
const signer = new signing_group_1.SigningGroup(event.pathParameters.groupId); | ||
const wallet = new walletImplementation(signer); | ||
@@ -46,3 +27,3 @@ return { | ||
router.get(CLIENT_PREFIX + "/balance/{groupId}", async (event, context) => { | ||
const signer = new signer_1.Signer(event.pathParameters.groupId); | ||
const signer = new signing_group_1.SigningGroup(event.pathParameters.groupId); | ||
const wallet = new walletImplementation(signer); | ||
@@ -55,3 +36,3 @@ return { | ||
router.get(CLIENT_PREFIX + "/transactions/{groupId}", async (event, context) => { | ||
const signer = new signer_1.Signer(event.pathParameters.groupId); | ||
const signer = new signing_group_1.SigningGroup(event.pathParameters.groupId); | ||
const wallet = new walletImplementation(signer); | ||
@@ -64,3 +45,3 @@ return { | ||
router.post(CLIENT_PREFIX + "/transactions/{groupId}", async (event, context) => { | ||
const signer = new signer_1.Signer(event.pathParameters.groupId); | ||
const signer = new signing_group_1.SigningGroup(event.pathParameters.groupId); | ||
const wallet = new walletImplementation(signer); | ||
@@ -88,25 +69,1 @@ const tx = await wallet.sendPaymentTx({ | ||
exports.createLambdaHandler = createLambdaHandler; | ||
// class ABC implements WalletInterface { | ||
// constructor(signer: SignerAsync) {} | ||
// async getTransactions(): Promise<TransactionResponse> { | ||
// return { status: 1, data: { tx_hash: "1" } }; | ||
// } | ||
// async getBalance(): Promise<string> { | ||
// return "1"; | ||
// } | ||
// async getAddress(): Promise<string> { | ||
// return "1"; | ||
// } | ||
// async sendTransaction() { | ||
// return "1"; | ||
// } | ||
// } | ||
// createLambdaHandler(ABC, "abc"); | ||
// interface Test { | ||
// a: (bbb: string) => number; | ||
// } | ||
// const a: Test = { | ||
// a: () => { | ||
// return 1; | ||
// }, | ||
// }; |
{ | ||
"name": "@dfns/blockchain-integration", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"description": "Blockchain integration Kit for DFNS", | ||
@@ -24,4 +24,5 @@ "main": "lib/index.js", | ||
"@types/node-fetch": "^2.5.10", | ||
"ts-node": "^9.1.1", | ||
"typescript": "^4.2.4" | ||
} | ||
} |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
11620
26
269
1
3
3
2