Skip to content

Typings updates #4

Description

@jcramer

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch bchaddrjs-slp@0.2.12 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/bchaddrjs-slp/src/bchaddr.d.ts b/node_modules/bchaddrjs-slp/src/bchaddr.d.ts
index 37a8b4b..a1a7bb1 100644
--- a/node_modules/bchaddrjs-slp/src/bchaddr.d.ts
+++ b/node_modules/bchaddrjs-slp/src/bchaddr.d.ts
@@ -1,11 +1,22 @@
-export type Format = string;
-
-export type Network = string;
-
-export type Type = string;
+export enum Format {
+    Legacy = "legacy",
+    Bitpay = "bitpay",
+    Cashaddr = "cashaddr",
+    Slpaddr = "slpaddr"
+};
+
+export enum Network {
+    Mainnet = "mainnet",
+    Testnet = "testnet"
+};
+
+export enum Type {
+    P2PKH = "p2pkh",
+    P2SH = "p2sh"
+};
 
 export interface decoded {
-    hash: Uint8Array;
+    hash: Array<number>;
     format: Format;
     network: Network;
     type: Type;

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions