Skip to content

Commit

Permalink
add JS test for Address.new_p2pk() and
Browse files Browse the repository at this point in the history
ErgoTree.from_base16_bytes();
  • Loading branch information
greenhat committed Nov 9, 2020
1 parent 0fd2fdd commit 31f73ea
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bindings/ergo-lib-wasm/tests/test_address.js
@@ -0,0 +1,13 @@
import { expect, assert } from 'chai';

import {
Address,
ErgoTree
} from '../pkg/ergo_lib_wasm';

it('new_p2pk from base16 ergo tree', async () => {
let tree_bytes_base16_str = '0008cd0327e65711a59378c59359c3e1d0f7abe906479eccb76094e50fe79d743ccc15e6';
let tree = ErgoTree.from_base16_bytes(tree_bytes_base16_str);
let addr = Address.new_p2pk(tree);
assert(addr != null);
});

0 comments on commit 31f73ea

Please sign in to comment.