Skip to content

Commit

Permalink
fix typings
Browse files Browse the repository at this point in the history
  • Loading branch information
jcramer committed Mar 31, 2020
1 parent d4cf9dd commit 8454d9b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,9 @@ Running the unit tests require node.js v8.15+.

# Change Log

### 0.25.2
- Update typings for bitcore-cash-lib

### 0.25.1
- Update typings for BchdNetwork

Expand Down
22 changes: 20 additions & 2 deletions lib/vendors.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ declare module "bitcore-lib-cash" {
export class Transaction {
inputs: Input[];
outputs: Output[];
toObject(): any;
readonly id: string;
readonly hash: string;
nid: string;
Expand Down Expand Up @@ -119,6 +120,7 @@ declare module "bitcore-lib-cash" {
}

export interface Output {
satoshis: number;
_scriptBuffer: Buffer;
readonly script: any;
}
Expand All @@ -131,8 +133,22 @@ declare module "bitcore-lib-cash" {
}

export class Script {
static fromAddress(arg0: string): any;
constructor(any: any);
fromBuffer(buffer: Buffer): Script;
toBuffer(): Buffer;
toAddress(network: any): Address;
fromAddress(address: Address): Script;
fromString(hex: string): Script;
fromASM(asm: string): string;
toASM(): string;
fromHex(hex: string): string
toHex(): string;
chunks: Chunk[];
}

export interface Chunk {
buf: Buffer;
len: number;
opcodenum: number;
}

export interface Util {
Expand Down Expand Up @@ -161,9 +177,11 @@ declare module "bitcore-lib-cash" {
export class Input {
output: any;
prevTxId: any;
script: Script;
outputIndex: number;
getSignatures(txn: Transaction, privateKey: PrivateKey, input_index: number, sigHashType: number): any;
setScript(script: Script): void;
_scriptBuffer: Buffer;
}
}

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "slpjs",
"version": "0.25.1",
"version": "0.25.2",
"description": "Simple Ledger Protocol (SLP) JavaScript Library",
"main": "index.js",
"files": [
Expand Down

0 comments on commit 8454d9b

Please sign in to comment.