base-x and bs58: definitions and tests added

This commit is contained in:
Ilya Mochalov
2016-01-17 00:17:07 +05:00
parent 70bf7e2bfe
commit 263c39f576
4 changed files with 68 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
/// <reference path="./bs58.d.ts" />
import * as bs58 from 'bs58';
{
let encoded: string;
encoded = bs58.encode([255]);
encoded = bs58.encode({0: 255, length: 1});
}
let decoded: number[] = bs58.decode('5Q');
+14
View File
@@ -0,0 +1,14 @@
// Type definitions for bs58 3.0.0
// Project: https://github.com/cryptocoinjs/bs58
// Definitions by: Ilya Mochalov <https://github.com/chrootsu>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../base-x/base-x.d.ts" />
declare module "bs58" {
namespace base58 {}
let base58: BaseX.BaseConverter;
export = base58;
}