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

crosslightning-base

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crosslightning-base - npm Package Compare versions

Comparing version 5.0.1 to 6.0.0

7

dist/events/types/InitializeEvent.d.ts
import { SwapEvent } from "./SwapEvent";
import { SwapData } from "../../swaps/SwapData";
import * as BN from "bn.js";
import { ChainSwapType } from "../../swaps/ChainSwapType";
export declare class InitializeEvent<T extends SwapData> extends SwapEvent<T> {
txoHash: string;
signatureNonce: number;
swapData: T;
constructor(paymentHash: string, sequence: BN, txoHash: string, signatureNonce: number, swapData: T);
swapType: ChainSwapType;
swapData: () => Promise<T>;
constructor(paymentHash: string, sequence: BN, txoHash: string, swapType: ChainSwapType, swapData: () => Promise<T>);
}

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

class InitializeEvent extends SwapEvent_1.SwapEvent {
constructor(paymentHash, sequence, txoHash, signatureNonce, swapData) {
constructor(paymentHash, sequence, txoHash, swapType, swapData) {
super(paymentHash, sequence);
this.txoHash = txoHash;
this.signatureNonce = signatureNonce;
this.swapType = swapType;
this.swapData = swapData;

@@ -12,0 +12,0 @@ }

@@ -16,3 +16,2 @@ export * from "./btcrelay/BtcRelay";

export * from "./storage/StorageObject";
export * from "./swaps/ISwapNonce";
export * from "./swaps/SwapContract";

@@ -19,0 +18,0 @@ export * from "./swaps/SwapData";

@@ -32,3 +32,2 @@ "use strict";

__exportStar(require("./storage/StorageObject"), exports);
__exportStar(require("./swaps/ISwapNonce"), exports);
__exportStar(require("./swaps/SwapContract"), exports);

@@ -35,0 +34,0 @@ __exportStar(require("./swaps/SwapData"), exports);

@@ -5,3 +5,2 @@ /// <reference types="node" />

import * as BN from "bn.js";
import { ISwapNonce } from "./ISwapNonce";
import { BtcStoredHeader } from "../btcrelay/types/BtcStoredHeader";

@@ -26,6 +25,6 @@ import { SwapCommitStatus } from "./SwapCommitStatus";

start(): Promise<void>;
initPayIn(swapData: T, timeout: string, prefix: string, signature: string, nonce: number, waitForConfirmation?: boolean, skipChecks?: boolean, abortSignal?: AbortSignal, feeRate?: any): Promise<string>;
txsInitPayIn(swapData: T, timeout: string, prefix: string, signature: string, nonce: number, skipChecks?: boolean, feeRate?: any): Promise<TX[]>;
init(swapData: T, timeout: string, prefix: string, signature: string, nonce: number, txoHash?: Buffer, waitForConfirmation?: boolean, skipChecks?: boolean, abortSignal?: AbortSignal, feeRate?: any): Promise<string>;
txsInit(swapData: T, timeout: string, prefix: string, signature: string, nonce: number, txoHash?: Buffer, skipChecks?: boolean, feeRate?: any): Promise<TX[]>;
initPayIn(swapData: T, timeout: string, prefix: string, signature: string, waitForConfirmation?: boolean, skipChecks?: boolean, abortSignal?: AbortSignal, feeRate?: any): Promise<string>;
txsInitPayIn(swapData: T, timeout: string, prefix: string, signature: string, skipChecks?: boolean, feeRate?: any): Promise<TX[]>;
init(swapData: T, timeout: string, prefix: string, signature: string, txoHash?: Buffer, waitForConfirmation?: boolean, skipChecks?: boolean, abortSignal?: AbortSignal, feeRate?: any): Promise<string>;
txsInit(swapData: T, timeout: string, prefix: string, signature: string, txoHash?: Buffer, skipChecks?: boolean, feeRate?: any): Promise<TX[]>;
claimWithSecret(swapData: T, secret: string, checkExpiry?: boolean, initAta?: boolean, waitForConfirmation?: boolean, abortSignal?: AbortSignal, feeRate?: any): Promise<string>;

@@ -49,3 +48,3 @@ txsClaimWithSecret(swapData: T, secret: string, checkExpiry?: boolean, initAta?: boolean, feeRate?: any): Promise<TX[]>;

txsRefundWithAuthorization(swapData: T, timeout: string, prefix: string, signature: string, check?: boolean, initAta?: boolean, feeRate?: any): Promise<TX[]>;
initAndClaimWithSecret(swapData: T, timeout: string, prefix: string, signature: string, nonce: number, secret: string, waitForConfirmation?: boolean, skipChecks?: boolean, abortSignal?: AbortSignal, feeRate?: any): Promise<string[]>;
initAndClaimWithSecret(swapData: T, timeout: string, prefix: string, signature: string, secret: string, waitForConfirmation?: boolean, skipChecks?: boolean, abortSignal?: AbortSignal, feeRate?: any): Promise<string[]>;
isExpired(swapData: T): boolean;

@@ -59,4 +58,3 @@ isClaimable(swapData: T): Promise<boolean>;

preFetchBlockDataForSignatures?(): Promise<any>;
getClaimInitSignature(swapData: T, nonce: ISwapNonce, authorizationTimeout: number, preFetchedBlockData?: any, feeRate?: any): Promise<{
nonce: number;
getClaimInitSignature(swapData: T, authorizationTimeout: number, preFetchedBlockData?: any, feeRate?: any): Promise<{
prefix: string;

@@ -66,7 +64,6 @@ timeout: string;

}>;
isValidClaimInitAuthorization(swapData: T, timeout: string, prefix: string, signature: string, nonce: number, feeRate?: any): Promise<Buffer | null>;
getClaimInitAuthorizationExpiry(swapData: T, timeout: string, prefix: string, signature: string, nonce: number): Promise<number>;
isClaimInitAuthorizationExpired(swapData: T, timeout: string, prefix: string, signature: string, nonce: number): Promise<boolean>;
getInitSignature(swapData: T, nonce: ISwapNonce, authorizationTimeout: number, preFetchedBlockData?: any, feeRate?: any): Promise<{
nonce: number;
isValidClaimInitAuthorization(swapData: T, timeout: string, prefix: string, signature: string, feeRate?: any): Promise<Buffer | null>;
getClaimInitAuthorizationExpiry(swapData: T, timeout: string, prefix: string, signature: string): Promise<number>;
isClaimInitAuthorizationExpired(swapData: T, timeout: string, prefix: string, signature: string): Promise<boolean>;
getInitSignature(swapData: T, authorizationTimeout: number, preFetchedBlockData?: any, feeRate?: any): Promise<{
prefix: string;

@@ -76,5 +73,5 @@ timeout: string;

}>;
isValidInitAuthorization(swapData: T, timeout: string, prefix: string, signature: string, nonce: number, feeRate?: any): Promise<Buffer | null>;
getInitAuthorizationExpiry(swapData: T, timeout: string, prefix: string, signature: string, nonce: number): Promise<number>;
isInitAuthorizationExpired(swapData: T, timeout: string, prefix: string, signature: string, nonce: number): Promise<boolean>;
isValidInitAuthorization(swapData: T, timeout: string, prefix: string, signature: string, feeRate?: any): Promise<Buffer | null>;
getInitAuthorizationExpiry(swapData: T, timeout: string, prefix: string, signature: string): Promise<number>;
isInitAuthorizationExpired(swapData: T, timeout: string, prefix: string, signature: string): Promise<boolean>;
getRefundSignature(swapData: T, authorizationTimeout: number): Promise<{

@@ -81,0 +78,0 @@ prefix: string;

{
"name": "crosslightning-base",
"version": "5.0.1",
"version": "6.0.0",
"description": "Base classes and interfaces of SolLightning",

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

import {SwapEvent} from "./SwapEvent";
import {SwapData} from "../../swaps/SwapData";
import * as BN from "bn.js";
import {ChainSwapType} from "../../swaps/ChainSwapType";

@@ -8,9 +9,9 @@ export class InitializeEvent<T extends SwapData> extends SwapEvent<T> {

txoHash: string;
signatureNonce: number;
swapData: T;
swapType: ChainSwapType;
swapData: () => Promise<T>;
constructor(paymentHash: string, sequence: BN, txoHash: string, signatureNonce: number, swapData: T) {
constructor(paymentHash: string, sequence: BN, txoHash: string, swapType: ChainSwapType, swapData: () => Promise<T>) {
super(paymentHash, sequence);
this.txoHash = txoHash;
this.signatureNonce = signatureNonce;
this.swapType = swapType;
this.swapData = swapData;

@@ -17,0 +18,0 @@ }

@@ -16,3 +16,2 @@ export * from "./btcrelay/BtcRelay";

export * from "./storage/StorageObject";
export * from "./swaps/ISwapNonce";
export * from "./swaps/SwapContract";

@@ -19,0 +18,0 @@ export * from "./swaps/SwapData";

import {SwapData} from "./SwapData";
import {TokenAddress} from "./TokenAddress";
import * as BN from "bn.js";
import {ISwapNonce} from "./ISwapNonce";
import {BtcStoredHeader} from "../btcrelay/types/BtcStoredHeader";

@@ -29,7 +28,7 @@ import {SwapCommitStatus} from "./SwapCommitStatus";

initPayIn(swapData: T, timeout: string, prefix: string, signature: string, nonce: number, waitForConfirmation?: boolean, skipChecks?: boolean, abortSignal?: AbortSignal, feeRate?: any): Promise<string>;
txsInitPayIn(swapData: T, timeout: string, prefix: string, signature: string, nonce: number, skipChecks?: boolean, feeRate?: any): Promise<TX[]>;
initPayIn(swapData: T, timeout: string, prefix: string, signature: string, waitForConfirmation?: boolean, skipChecks?: boolean, abortSignal?: AbortSignal, feeRate?: any): Promise<string>;
txsInitPayIn(swapData: T, timeout: string, prefix: string, signature: string, skipChecks?: boolean, feeRate?: any): Promise<TX[]>;
init(swapData: T, timeout: string, prefix: string, signature: string, nonce: number, txoHash?: Buffer, waitForConfirmation?: boolean, skipChecks?: boolean, abortSignal?: AbortSignal, feeRate?: any): Promise<string>;
txsInit(swapData: T, timeout: string, prefix: string, signature: string, nonce: number, txoHash?: Buffer, skipChecks?: boolean, feeRate?: any): Promise<TX[]>;
init(swapData: T, timeout: string, prefix: string, signature: string, txoHash?: Buffer, waitForConfirmation?: boolean, skipChecks?: boolean, abortSignal?: AbortSignal, feeRate?: any): Promise<string>;
txsInit(swapData: T, timeout: string, prefix: string, signature: string, txoHash?: Buffer, skipChecks?: boolean, feeRate?: any): Promise<TX[]>;

@@ -48,3 +47,3 @@ claimWithSecret(swapData: T, secret: string, checkExpiry?: boolean, initAta?: boolean, waitForConfirmation?: boolean, abortSignal?: AbortSignal, feeRate?: any): Promise<string>;

initAndClaimWithSecret(swapData: T, timeout: string, prefix: string, signature: string, nonce: number, secret: string, waitForConfirmation?: boolean, skipChecks?: boolean, abortSignal?: AbortSignal, feeRate?: any): Promise<string[]>;
initAndClaimWithSecret(swapData: T, timeout: string, prefix: string, signature: string, secret: string, waitForConfirmation?: boolean, skipChecks?: boolean, abortSignal?: AbortSignal, feeRate?: any): Promise<string[]>;

@@ -63,4 +62,3 @@ isExpired(swapData: T): boolean;

getClaimInitSignature(swapData: T, nonce: ISwapNonce, authorizationTimeout: number, preFetchedBlockData?: any, feeRate?: any): Promise<{
nonce: number,
getClaimInitSignature(swapData: T, authorizationTimeout: number, preFetchedBlockData?: any, feeRate?: any): Promise<{
prefix: string,

@@ -70,8 +68,7 @@ timeout: string,

}>;
isValidClaimInitAuthorization(swapData: T, timeout: string, prefix: string, signature: string, nonce: number, feeRate?: any): Promise<Buffer | null>;
getClaimInitAuthorizationExpiry(swapData: T, timeout: string, prefix: string, signature: string, nonce: number): Promise<number>;
isClaimInitAuthorizationExpired(swapData: T, timeout: string, prefix: string, signature: string, nonce: number): Promise<boolean>;
isValidClaimInitAuthorization(swapData: T, timeout: string, prefix: string, signature: string, feeRate?: any): Promise<Buffer | null>;
getClaimInitAuthorizationExpiry(swapData: T, timeout: string, prefix: string, signature: string): Promise<number>;
isClaimInitAuthorizationExpired(swapData: T, timeout: string, prefix: string, signature: string): Promise<boolean>;
getInitSignature(swapData: T, nonce: ISwapNonce, authorizationTimeout: number, preFetchedBlockData?: any, feeRate?: any): Promise<{
nonce: number,
getInitSignature(swapData: T, authorizationTimeout: number, preFetchedBlockData?: any, feeRate?: any): Promise<{
prefix: string,

@@ -81,5 +78,5 @@ timeout: string,

}>;
isValidInitAuthorization(swapData: T, timeout: string, prefix: string, signature: string, nonce: number, feeRate?: any): Promise<Buffer | null>;
getInitAuthorizationExpiry(swapData: T, timeout: string, prefix: string, signature: string, nonce: number): Promise<number>;
isInitAuthorizationExpired(swapData: T, timeout: string, prefix: string, signature: string, nonce: number): Promise<boolean>;
isValidInitAuthorization(swapData: T, timeout: string, prefix: string, signature: string, feeRate?: any): Promise<Buffer | null>;
getInitAuthorizationExpiry(swapData: T, timeout: string, prefix: string, signature: string): Promise<number>;
isInitAuthorizationExpired(swapData: T, timeout: string, prefix: string, signature: string): Promise<boolean>;

@@ -86,0 +83,0 @@ getRefundSignature(swapData: T, authorizationTimeout: number): Promise<{

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