Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dfns/blockchain-integration

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfns/blockchain-integration - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

6

lib/lambda-handler/lambda-handler.d.ts
import { WalletInterface } from "../types/wallet";
import { SignerAsync } from "../types/signer";
interface WalletImpl extends WalletInterface {
export declare function createLambdaHandler(walletImplementation: {
new (signer: SignerAsync): WalletInterface;
}
export declare function createLambdaHandler(walletImplementation: WalletImpl, prefix: string): (lambdaEvent: any, context: any) => Promise<any>;
export {};
}, prefix: string): (lambdaEvent: any, context: any) => Promise<any>;

@@ -6,2 +6,20 @@ "use strict";

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) {

@@ -67,1 +85,25 @@ const router = Router({

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;
// },
// };
import { TransactionResponse } from "./responses";
import { SendPaymentTxParams } from "./requests";
export interface WalletInterface {
getAddress(): Promise<string>;
getBalance(): Promise<string>;
getTransactions(): Promise<TransactionResponse>;
sendTransaction(paymentTxParams: SendPaymentTxParams): Promise<string>;
getAddress: () => Promise<string>;
getBalance: () => Promise<string>;
getTransactions: () => Promise<TransactionResponse>;
sendTransaction: (paymentTxParams: SendPaymentTxParams) => Promise<string>;
}
{
"name": "@dfns/blockchain-integration",
"version": "1.0.8",
"version": "1.0.9",
"description": "Blockchain integration Kit for DFNS",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc