@secretkeylabs/xverse-agent-wallet 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +19 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -161442,7 +161442,7 @@ var runeTokenToFungibleToken = (runeBalance) => ({
|
|
|
161442
161442
|
ticker: token.ticker,
|
|
161443
161443
|
name: token.ticker,
|
|
161444
161444
|
assetName: token.ticker,
|
|
161445
|
-
principal: token.
|
|
161445
|
+
principal: token.identifier,
|
|
161446
161446
|
balance: "0",
|
|
161447
161447
|
total_received: "0",
|
|
161448
161448
|
total_sent: "0"
|
|
@@ -372082,6 +372082,22 @@ import { mkdir, readFile, writeFile } from "fs/promises";
|
|
|
372082
372082
|
import { dirname, join as join3 } from "path";
|
|
372083
372083
|
import * as v26 from "valibot";
|
|
372084
372084
|
var storageSchema = v26.record(v26.string(), v26.string());
|
|
372085
|
+
function createInMemoryStorageAdapter() {
|
|
372086
|
+
const cache = {};
|
|
372087
|
+
return {
|
|
372088
|
+
get: async (key) => cache[key] ?? null,
|
|
372089
|
+
getMany: async (...keys) => {
|
|
372090
|
+
return Object.fromEntries(keys.map((key) => [key, key in cache ? cache[key] : undefined]));
|
|
372091
|
+
},
|
|
372092
|
+
set: async (key, value) => {
|
|
372093
|
+
cache[key] = value;
|
|
372094
|
+
},
|
|
372095
|
+
remove: async (key) => {
|
|
372096
|
+
delete cache[key];
|
|
372097
|
+
},
|
|
372098
|
+
getAllKeys: async () => Object.keys(cache)
|
|
372099
|
+
};
|
|
372100
|
+
}
|
|
372085
372101
|
function createFileStorageAdapter(namespace2) {
|
|
372086
372102
|
const filePath = join3(getVaultsPath(), `${namespace2}.json`);
|
|
372087
372103
|
let cache = {};
|
|
@@ -372137,7 +372153,7 @@ function createFileStorageAdapter(namespace2) {
|
|
|
372137
372153
|
var createVault = () => {
|
|
372138
372154
|
return new MasterVault({
|
|
372139
372155
|
cryptoUtilsAdapter: cryptoAdapter,
|
|
372140
|
-
sessionStorageAdapter:
|
|
372156
|
+
sessionStorageAdapter: createInMemoryStorageAdapter(),
|
|
372141
372157
|
encryptedDataStorageAdapter: createFileStorageAdapter("encrypted"),
|
|
372142
372158
|
commonStorageAdapter: createFileStorageAdapter("common")
|
|
372143
372159
|
});
|
|
@@ -380465,7 +380481,7 @@ Run with --yes to confirm.`,
|
|
|
380465
380481
|
};
|
|
380466
380482
|
|
|
380467
380483
|
// index.ts
|
|
380468
|
-
var cliVersion = "0.1.
|
|
380484
|
+
var cliVersion = "0.1.9";
|
|
380469
380485
|
setXClientVersion(`xverse-agent-wallet/${cliVersion}`);
|
|
380470
380486
|
var program = new Command;
|
|
380471
380487
|
program.name("xverse-wallet").version(cliVersion).description("Xverse wallet CLI");
|