browser_test -> wallet

This commit is contained in:
stjet
2025-01-13 18:50:04 +00:00
parent 0c806142b0
commit 6a9dc7a90f
43 changed files with 925 additions and 719 deletions

17
ts_test/index.ts Normal file
View File

@@ -0,0 +1,17 @@
//import * as bns from "../main.js";
import * as bns from "banani-bns";
const rpc = new bns.banani.RPC("https://kaliumapi.appditto.com/api");
const TLDS: Record<string, `ban_${string}` | `nano_${string}`> = { "mictest": "ban_1dzpfrgi8t4byzmdeidh57p14h5jwbursf1t3ztbmeqnqqdcbpgp9x8j3cw6" };
const resolver = new bns.Resolver(rpc, TLDS);
(async () => {
console.log(await resolver.resolve("long", "mictest"));
console.log(await resolver.resolve("nishina247", "mictest"));
const resolver2 = new bns.Resolver(rpc, TLDS, 3);
console.log(await resolver2.resolve("long", "mictest"));
})();

78
ts_test/package-lock.json generated Normal file
View File

@@ -0,0 +1,78 @@
{
"name": "ts_test",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"banani-bns": "^0.0.9"
},
"devDependencies": {
"typescript": "^5.4.5"
}
},
"node_modules/b4a": {
"version": "1.6.7",
"resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz",
"integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==",
"license": "Apache-2.0"
},
"node_modules/banani": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/banani/-/banani-1.0.4.tgz",
"integrity": "sha512-/W5cedmDLcrQ9T/Y17Yrk82t1EtJPf3sH14JAzgoHWgqsza2QC0YQallIOc51sY/WxEdnqLSSSoNk9hFkcd3og==",
"license": "MIT",
"dependencies": {
"blake2b": "^2.1.4"
}
},
"node_modules/banani-bns": {
"version": "0.0.9",
"resolved": "https://registry.npmjs.org/banani-bns/-/banani-bns-0.0.9.tgz",
"integrity": "sha512-G9eRXk24ykHLqSCr2LgqNHyUvuzye0VTpNMZdyD4/8HtZRU05Pv1Dbk1lbINkz0ZVf1Y2Jl6dF0ivXMLWBqIRA==",
"dependencies": {
"banani": "^1.0.4"
}
},
"node_modules/blake2b": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/blake2b/-/blake2b-2.1.4.tgz",
"integrity": "sha512-AyBuuJNI64gIvwx13qiICz6H6hpmjvYS5DGkG6jbXMOT8Z3WUJ3V1X0FlhIoT1b/5JtHE3ki+xjtMvu1nn+t9A==",
"license": "ISC",
"dependencies": {
"blake2b-wasm": "^2.4.0",
"nanoassert": "^2.0.0"
}
},
"node_modules/blake2b-wasm": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/blake2b-wasm/-/blake2b-wasm-2.4.0.tgz",
"integrity": "sha512-S1kwmW2ZhZFFFOghcx73+ZajEfKBqhP82JMssxtLVMxlaPea1p9uoLiUZ5WYyHn0KddwbLc+0vh4wR0KBNoT5w==",
"license": "MIT",
"dependencies": {
"b4a": "^1.0.1",
"nanoassert": "^2.0.0"
}
},
"node_modules/nanoassert": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-2.0.0.tgz",
"integrity": "sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA==",
"license": "ISC"
},
"node_modules/typescript": {
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",
"integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
}
}
}

12
ts_test/package.json Normal file
View File

@@ -0,0 +1,12 @@
{
"main": "index.js",
"scripts": {
"compile": "tsc -p ."
},
"devDependencies": {
"typescript": "^5.4.5"
},
"dependencies": {
"banani-bns": "^0.0.9"
}
}

13
ts_test/tsconfig.json Normal file
View File

@@ -0,0 +1,13 @@
{
"compilerOptions": {
"target": "es2021",
"module": "node16",
"moduleResolution": "node16",
"typeRoots": ["./node_modules/@types"],
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"lib": ["ES2020"],
"exclude": ["node_modules"]
}