@qntx/wallet-native 0.8.1 → 0.9.0
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.
|
@@ -18044,7 +18044,7 @@ zoo`.split("\n"));
|
|
|
18044
18044
|
}
|
|
18045
18045
|
};
|
|
18046
18046
|
}));
|
|
18047
|
-
// packages/wallet-chains/dist/message-
|
|
18047
|
+
// packages/wallet-chains/dist/message-Dv18g8ii.mjs
|
|
18048
18048
|
init_secp256k1();
|
|
18049
18049
|
init_utils();
|
|
18050
18050
|
init_transaction();
|
|
@@ -18116,9 +18116,14 @@ zoo`.split("\n"));
|
|
|
18116
18116
|
}
|
|
18117
18117
|
return out;
|
|
18118
18118
|
};
|
|
18119
|
-
/** CompactSize length prefix
|
|
18119
|
+
/** CompactSize length prefix for the one-byte form. */
|
|
18120
18120
|
var varint = (n) => Uint8Array.of(n);
|
|
18121
|
-
var
|
|
18121
|
+
var COMPACT_SIZE_ONE_BYTE_MAX = 252;
|
|
18122
|
+
/** A length-prefixed push; longer data would need a multi-byte CompactSize this code never emits. */
|
|
18123
|
+
var pushData = (data) => {
|
|
18124
|
+
if (data.length > COMPACT_SIZE_ONE_BYTE_MAX) throw new ChainError("invalid-request", "BIP-322 script data exceeds 252 bytes");
|
|
18125
|
+
return concat$2(varint(data.length), data);
|
|
18126
|
+
};
|
|
18122
18127
|
var u32le$1 = (n) => Uint8Array.of(n % 256, Math.floor(n / 256) % 256, Math.floor(n / 65536) % 256, Math.floor(n / 16777216) % 256);
|
|
18123
18128
|
var u64le$1 = (n) => {
|
|
18124
18129
|
const out = /* @__PURE__ */ new Uint8Array(8);
|
|
@@ -25132,6 +25137,8 @@ zoo`.split("\n"));
|
|
|
25132
25137
|
}
|
|
25133
25138
|
// packages/wallet-chains/dist/evm.mjs
|
|
25134
25139
|
init_objectSpread2();
|
|
25140
|
+
/** The native asset id in `AssetFlow` and simulated asset changes. */
|
|
25141
|
+
var EVM_NATIVE_ASSET = "native";
|
|
25135
25142
|
var USDC$1 = Object.freeze({
|
|
25136
25143
|
symbol: "USDC",
|
|
25137
25144
|
decimals: 6,
|
|
@@ -25168,7 +25175,6 @@ zoo`.split("\n"));
|
|
|
25168
25175
|
var ERC721_TRANSFER_FROM = from$2("function transferFrom(address from, address to, uint256 tokenId)");
|
|
25169
25176
|
var ERC721_SAFE_FROM = from$2("function safeTransferFrom(address from, address to, uint256 tokenId)");
|
|
25170
25177
|
var ERC1155_SAFE_FROM = from$2("function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes data)");
|
|
25171
|
-
var NATIVE_ASSET = "native";
|
|
25172
25178
|
var MAX_UINT256 = 2n ** 256n - 1n;
|
|
25173
25179
|
var argAddress = (args, index) => {
|
|
25174
25180
|
const value = args[index];
|
|
@@ -25198,7 +25204,7 @@ zoo`.split("\n"));
|
|
|
25198
25204
|
}
|
|
25199
25205
|
};
|
|
25200
25206
|
var weiAmount = (wei, symbol, decimals) => _objectSpread2(_objectSpread2({
|
|
25201
|
-
asset:
|
|
25207
|
+
asset: EVM_NATIVE_ASSET,
|
|
25202
25208
|
amount: wei.toString(10)
|
|
25203
25209
|
}, symbol === void 0 ? {} : { symbol }), decimals === void 0 ? {} : { decimals });
|
|
25204
25210
|
var feeWei = (tx) => BigInt(tx.gas) * (tx.type === "eip1559" ? BigInt(tx.maxFeePerGas) : BigInt(tx.gasPrice));
|
|
@@ -26777,8 +26783,11 @@ zoo`.split("\n"));
|
|
|
26777
26783
|
numRequiredSignatures: message.numSignerAccounts,
|
|
26778
26784
|
staticAccounts,
|
|
26779
26785
|
instructions: message.instructions,
|
|
26780
|
-
|
|
26781
|
-
|
|
26786
|
+
lookups: lookups.map((l) => ({
|
|
26787
|
+
address: l.lookupTableAddress,
|
|
26788
|
+
writableIndexes: l.writableIndexes,
|
|
26789
|
+
readonlyIndexes: l.readonlyIndexes
|
|
26790
|
+
}))
|
|
26782
26791
|
};
|
|
26783
26792
|
};
|
|
26784
26793
|
var isRecord$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -26838,6 +26847,8 @@ zoo`.split("\n"));
|
|
|
26838
26847
|
if (tables === void 0) return;
|
|
26839
26848
|
for (const table of tables) if (!isSolanaAddress(table.address) || !table.addresses.every(isSolanaAddress)) throw new ChainError("invalid-address", "lookup table entries must be base58 32-byte addresses");
|
|
26840
26849
|
};
|
|
26850
|
+
/** The native asset id in `AssetFlow` and simulated asset changes. */
|
|
26851
|
+
var SOLANA_NATIVE_ASSET = "lamports";
|
|
26841
26852
|
var USDC = Object.freeze({
|
|
26842
26853
|
symbol: "USDC",
|
|
26843
26854
|
decimals: 6,
|
|
@@ -26856,7 +26867,6 @@ zoo`.split("\n"));
|
|
|
26856
26867
|
var _table$network;
|
|
26857
26868
|
return (_table$network = table[network]) === null || _table$network === void 0 ? void 0 : _table$network[mint];
|
|
26858
26869
|
};
|
|
26859
|
-
var LAMPORTS_ASSET = "lamports";
|
|
26860
26870
|
var u32 = getU32Decoder();
|
|
26861
26871
|
var u64$1 = getU64Decoder();
|
|
26862
26872
|
var u32le = (data, offset) => u32.decode(data, offset);
|
|
@@ -26920,7 +26930,7 @@ zoo`.split("\n"));
|
|
|
26920
26930
|
"ata-create-idempotent"
|
|
26921
26931
|
]);
|
|
26922
26932
|
var classify$1 = (parsed, calls, network, table) => {
|
|
26923
|
-
if (parsed.
|
|
26933
|
+
if (parsed.lookups.length > 0) return "partial";
|
|
26924
26934
|
let allFull = true;
|
|
26925
26935
|
for (const call of calls) {
|
|
26926
26936
|
var _call$mint;
|
|
@@ -26957,7 +26967,7 @@ zoo`.split("\n"));
|
|
|
26957
26967
|
if (source === signer) outflows.push({
|
|
26958
26968
|
to: call.to,
|
|
26959
26969
|
amount: {
|
|
26960
|
-
asset:
|
|
26970
|
+
asset: SOLANA_NATIVE_ASSET,
|
|
26961
26971
|
amount: ((_call$amount = call.amount) !== null && _call$amount !== void 0 ? _call$amount : 0n).toString(10)
|
|
26962
26972
|
},
|
|
26963
26973
|
verified: true
|
|
@@ -26994,7 +27004,7 @@ zoo`.split("\n"));
|
|
|
26994
27004
|
outflows,
|
|
26995
27005
|
approvals,
|
|
26996
27006
|
fee: fee === void 0 ? void 0 : { max: {
|
|
26997
|
-
asset:
|
|
27007
|
+
asset: SOLANA_NATIVE_ASSET,
|
|
26998
27008
|
amount: fee.toString(10)
|
|
26999
27009
|
} },
|
|
27000
27010
|
warnings: [],
|
|
@@ -29022,8 +29032,9 @@ zoo`.split("\n"));
|
|
|
29022
29032
|
/**
|
|
29023
29033
|
* Export `ncryptsec` at logN 16 with key security byte 0x02 ("the client does not track this" in
|
|
29024
29034
|
* NIP-49's terms): the kernel does not track a key's handling history and any key can be exported
|
|
29025
|
-
* as plaintext nsec, so 0x01 would never be honest.
|
|
29026
|
-
*
|
|
29035
|
+
* as plaintext nsec, so 0x01 would never be honest. `nip49Encrypt` draws its salt and nonce from
|
|
29036
|
+
* `crypto.getRandomValues`, which the kernel runtime installs natively (the same source as
|
|
29037
|
+
* `__qntx.random`; in a Web Worker, the platform CSPRNG), so no API-level injection is needed.
|
|
29027
29038
|
*/
|
|
29028
29039
|
async function ncryptsecFromSecretKey(secretKey, password) {
|
|
29029
29040
|
const encoded = await encrypt(secretKey, decodeUtf8Secret(password), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qntx/wallet-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Native kernel runtime host for the qntx wallet — CBOR transport, KernelHost adapter and createNativeWallet",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"author": "QuantX <x@qntx.org>",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@qntx/nostr-native": "0.15.3",
|
|
62
62
|
"@qntx/spark-native": "0.5.2",
|
|
63
|
-
"@qntx/wallet": "0.
|
|
63
|
+
"@qntx/wallet": "0.9.0",
|
|
64
64
|
"react-native": "~0.88.0",
|
|
65
65
|
"react-native-nitro-modules": "~0.37.1"
|
|
66
66
|
}
|