[wip] start work on api deconstructor
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{type, library}.
|
||||
{realm, local}.
|
||||
{name, vanillae_test_cases}.
|
||||
{version, "0.1.0"}.
|
||||
{deps, ["local-vanillae-0.1.0"]}.
|
||||
@@ -0,0 +1,2 @@
|
||||
b58_cases_2.eterms
|
||||
b58_cases_3.eterms
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
%-module(b58).
|
||||
%-export([enc/1, dec/1]).
|
||||
-module(b58).
|
||||
-export([enc/1, dec/1]).
|
||||
|
||||
-mode(compile).
|
||||
%-mode(compile).
|
||||
%-spec enc(binary()) -> string().
|
||||
%% https://digitalbazaar.github.io/base58-spec/#encode
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{"compilerOptions" : {"target" : "es2022",
|
||||
"strict" : true,
|
||||
"esModuleInterop" : true,
|
||||
"skipLibCheck" : true,
|
||||
"forceConsistentCasingInFileNames" : true,
|
||||
"noImplicitAny" : true,
|
||||
"strictNullChecks" : true,
|
||||
"strictPropertyInitialization" : true,
|
||||
"sourceMap" : true,
|
||||
"outDir" : "dist",
|
||||
"declaration" : true},
|
||||
"$schema" : "https://json.schemastore.org/tsconfig",
|
||||
"display" : "Recommended",
|
||||
"include" : ["src/**/*"],
|
||||
"exclude" : ["src/jex_include"],
|
||||
"composite" : true}
|
||||
@@ -27,6 +27,11 @@
|
||||
<h5>Failed case log:</h5>
|
||||
<pre id="rlp-assershins"></pre>
|
||||
|
||||
<h1>Tx Decoding</h1>
|
||||
<input style="width: 800px;" type="text" id="tx-stuff" value="tx_+FgMAaEByWN+RgDnqzvC5n/GQOgjdkRE9DBV2l1VeKSaN1r6GNyhAXtm5sMFBwg25Ol5IFI9w+pZy7/YbFi6BwPqi80KuKdsCoYPJvVhyAAACYdoYWluYW5hA7ZC1w=="></input>
|
||||
<button id="tx-go">Go!</button>
|
||||
|
||||
|
||||
<script type="module" src="dist/test.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
{realm, local}.
|
||||
{name, vanillae_test}.
|
||||
{version, "0.1.0"}.
|
||||
{deps, ["local-vanillae-0.1.0"]}.
|
||||
{deps, ["local-vanillae-0.1.0",
|
||||
"local-vanillae_test_cases-0.1.0"]}.
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import * as cases from './cases.js';
|
||||
// test cases
|
||||
import * as cases from './jex_include/local-vanillae_test_cases-0.1.0/dist/cases.js';
|
||||
|
||||
import * as b64 from './jex_include/local-vanillae-0.1.0/dist/base64.js';
|
||||
import * as b58 from './jex_include/local-vanillae-0.1.0/dist/base58.js';
|
||||
import * as rlp from './jex_include/local-vanillae-0.1.0/dist/rlp.js';
|
||||
// vanillae libs
|
||||
import * as b64 from './jex_include/local-vanillae-0.1.0/dist/b64.js';
|
||||
import * as b58 from './jex_include/local-vanillae-0.1.0/dist/b58.js';
|
||||
import * as rlp from './jex_include/local-vanillae-0.1.0/dist/rlp.js';
|
||||
import * as ser from './jex_include/local-vanillae-0.1.0/dist/ser.js';
|
||||
|
||||
|
||||
function deepeq(dd1: rlp.decoded_data, dd2: rlp.decoded_data): boolean {
|
||||
@@ -196,6 +199,14 @@ function rlp_tests(): void {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function tx_tests(): void {
|
||||
// @ts-ignore value exists
|
||||
let tx_stuff = document.getElementById('tx-stuff')!.value;
|
||||
console.log(ser.decode_tx(tx_stuff));
|
||||
}
|
||||
|
||||
|
||||
function main(): void {
|
||||
document.getElementById('b64-total-cases')!.innerHTML = '' + cases.base64.length;
|
||||
document.getElementById('b64-go')!.onclick = b64_tests;
|
||||
@@ -205,5 +216,7 @@ function main(): void {
|
||||
|
||||
document.getElementById('rlp-total-cases')!.innerHTML = '' + cases.rlp.length;
|
||||
document.getElementById('rlp-go')!.onclick = rlp_tests;
|
||||
|
||||
document.getElementById('tx-go')!.onclick = tx_tests;
|
||||
}
|
||||
main();
|
||||
|
||||
Reference in New Issue
Block a user