mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
11 lines
408 B
TypeScript
11 lines
408 B
TypeScript
import * as baseX from 'base-x';
|
|
|
|
const BASE58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
const bs58 = baseX(BASE58);
|
|
|
|
const decoded = bs58.decode('5Kd3NBUAdUnhyzenEwVLy9pBKxSwXvE9FMPyR4UKZvpe6E3AgLr');
|
|
decoded; // $ExpectType Buffer
|
|
bs58.decodeUnsafe('5Kd3NBUAdUnhyzenEwVLy9pBKxSwXvE9FMPyR4UKZvpe6E3AgLr'); // $ExpectType Buffer | undefined
|
|
|
|
bs58.encode(decoded); // $ExpectType string
|