diff --git a/bip21/bip21-tests.ts b/bip21/bip21-tests.ts
new file mode 100644
index 000000000..e685eca10
--- /dev/null
+++ b/bip21/bip21-tests.ts
@@ -0,0 +1,9 @@
+///
+
+let decoded:any = bip21.decode('bitcoin:1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH?amount=20.3&label=Foobar');
+
+let encoded:string = bip21.encode('1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH', {
+ amount: 20.3,
+ label: 'Foobar'
+});
+
\ No newline at end of file
diff --git a/bip21/bip21.d.ts b/bip21/bip21.d.ts
new file mode 100644
index 000000000..562fb7e34
--- /dev/null
+++ b/bip21/bip21.d.ts
@@ -0,0 +1,13 @@
+// Type definitions for bip21 v1.1.2
+// Project: https://github.com/bitcoinjs/bip21
+// Definitions by: Stefan Huber
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare module bip21 {
+ export function decode(uri:string) : {address:string,amount?:number};
+ export function encode(address:string,options?:any) : string;
+}
+
+declare module "bip21" {
+ export = bip21;
+}