@dfns/blockchain-integration
Advanced tools
Comparing version 1.0.8 to 1.0.9
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", |
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
9480
236