@sidhujag/sysweb3-keyring 1.0.628 → 2.1.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.
- package/CHANGELOG.md +30 -0
- package/README.md +174 -0
- package/cjs/bip84-native.js +8 -0
- package/cjs/bip84-native.js.map +1 -0
- package/cjs/hardware-wallet-manager.js +302 -128
- package/cjs/hardware-wallet-manager.js.map +1 -1
- package/cjs/keyring-core.js +319 -0
- package/cjs/keyring-core.js.map +1 -1
- package/cjs/keyring-manager.js +9 -3
- package/cjs/keyring-manager.js.map +1 -1
- package/cjs/ledger/bitcoin_client/lib/appClient.js.map +1 -1
- package/cjs/ledger/host-types.js +10 -0
- package/cjs/ledger/host-types.js.map +1 -0
- package/cjs/ledger/index.js +243 -447
- package/cjs/ledger/index.js.map +1 -1
- package/cjs/ledger/prepare-psbt.js +177 -0
- package/cjs/ledger/prepare-psbt.js.map +1 -0
- package/cjs/public-bip84.js +157 -0
- package/cjs/public-bip84.js.map +1 -0
- package/cjs/software-hd-account.js +23 -0
- package/cjs/software-hd-account.js.map +1 -0
- package/cjs/software-utxo-account.js +12 -0
- package/cjs/software-utxo-account.js.map +1 -0
- package/cjs/software.js +24 -0
- package/cjs/software.js.map +1 -1
- package/cjs/transactions/bip84-native-plan.js +481 -0
- package/cjs/transactions/bip84-native-plan.js.map +1 -0
- package/cjs/transactions/ethereum.js +55 -10
- package/cjs/transactions/ethereum.js.map +1 -1
- package/cjs/transactions/hardware-psbt.js +36 -44
- package/cjs/transactions/hardware-psbt.js.map +1 -1
- package/cjs/transactions/prepared-bip84.js +214 -0
- package/cjs/transactions/prepared-bip84.js.map +1 -0
- package/cjs/transactions/prepared-evm.js +197 -0
- package/cjs/transactions/prepared-evm.js.map +1 -0
- package/cjs/trezor/connect.js +243 -0
- package/cjs/trezor/connect.js.map +1 -0
- package/cjs/trezor/index.js +96 -58
- package/cjs/trezor/index.js.map +1 -1
- package/cjs/trezor/witness.js +25 -0
- package/cjs/trezor/witness.js.map +1 -0
- package/cjs/utils/psbt-account-scope.js +5 -3
- package/cjs/utils/psbt-account-scope.js.map +1 -1
- package/esm/errorUtils.js +72 -0
- package/esm/errorUtils.js.map +1 -0
- package/esm/ethers-v6.js +207 -0
- package/esm/ethers-v6.js.map +1 -0
- package/esm/hardware-wallet-manager.js +643 -0
- package/esm/hardware-wallet-manager.js.map +1 -0
- package/esm/ledger/bitcoin_client/lib/appClient.js +279 -0
- package/esm/ledger/bitcoin_client/lib/appClient.js.map +1 -0
- package/esm/ledger/bitcoin_client/lib/bip32.js +49 -0
- package/esm/ledger/bitcoin_client/lib/bip32.js.map +1 -0
- package/esm/ledger/bitcoin_client/lib/buffertools.js +119 -0
- package/esm/ledger/bitcoin_client/lib/buffertools.js.map +1 -0
- package/esm/ledger/bitcoin_client/lib/clientCommands.js +269 -0
- package/esm/ledger/bitcoin_client/lib/clientCommands.js.map +1 -0
- package/esm/ledger/bitcoin_client/lib/merkelizedPsbt.js +50 -0
- package/esm/ledger/bitcoin_client/lib/merkelizedPsbt.js.map +1 -0
- package/esm/ledger/bitcoin_client/lib/merkle.js +111 -0
- package/esm/ledger/bitcoin_client/lib/merkle.js.map +1 -0
- package/esm/ledger/bitcoin_client/lib/merkleMap.js +42 -0
- package/esm/ledger/bitcoin_client/lib/merkleMap.js.map +1 -0
- package/esm/ledger/bitcoin_client/lib/policy.js +68 -0
- package/esm/ledger/bitcoin_client/lib/policy.js.map +1 -0
- package/esm/ledger/bitcoin_client/lib/psbtv2.js +645 -0
- package/esm/ledger/bitcoin_client/lib/psbtv2.js.map +1 -0
- package/esm/ledger/bitcoin_client/lib/varint.js +108 -0
- package/esm/ledger/bitcoin_client/lib/varint.js.map +1 -0
- package/esm/ledger/consts.js +4 -0
- package/esm/ledger/consts.js.map +1 -0
- package/esm/ledger/dmk-evm.js +258 -0
- package/esm/ledger/dmk-evm.js.map +1 -0
- package/esm/ledger/dmk-session.js +264 -0
- package/esm/ledger/dmk-session.js.map +1 -0
- package/esm/ledger/dmk-utxo.js +279 -0
- package/esm/ledger/dmk-utxo.js.map +1 -0
- package/esm/ledger/host-types.js +5 -0
- package/esm/ledger/host-types.js.map +1 -0
- package/esm/ledger/index.js +268 -0
- package/esm/ledger/index.js.map +1 -0
- package/esm/ledger/prepare-psbt.js +141 -0
- package/esm/ledger/prepare-psbt.js.map +1 -0
- package/esm/ledger/types.js +2 -0
- package/esm/ledger/types.js.map +1 -0
- package/esm/ledger-host.js +36 -0
- package/esm/ledger-host.js.map +1 -0
- package/esm/private-records.js +153 -0
- package/esm/private-records.js.map +1 -0
- package/esm/providers.js +588 -0
- package/esm/providers.js.map +1 -0
- package/esm/signers.js +28 -0
- package/esm/signers.js.map +1 -0
- package/esm/trezor/connect.js +206 -0
- package/esm/trezor/connect.js.map +1 -0
- package/esm/trezor/index.js +876 -0
- package/esm/trezor/index.js.map +1 -0
- package/esm/trezor/witness.js +21 -0
- package/esm/trezor/witness.js.map +1 -0
- package/esm/types.js +17 -0
- package/esm/types.js.map +1 -0
- package/esm/utils/derivation-paths.js +109 -0
- package/esm/utils/derivation-paths.js.map +1 -0
- package/esm/utils/psbt-account-scope.js +310 -0
- package/esm/utils/psbt-account-scope.js.map +1 -0
- package/package.json +34 -9
- package/types/bip84-native.d.ts +3 -0
- package/types/hardware-wallet-manager.d.ts +12 -19
- package/types/keyring-core.d.ts +14 -0
- package/types/keyring-manager.d.ts +2 -1
- package/types/ledger/bitcoin_client/lib/appClient.d.ts +6 -3
- package/types/ledger/dmk-evm.d.ts +8 -0
- package/types/ledger/dmk-session.d.ts +60 -0
- package/types/ledger/dmk-utxo.d.ts +26 -0
- package/types/ledger/host-types.d.ts +131 -0
- package/types/ledger/index.d.ts +21 -58
- package/types/ledger/prepare-psbt.d.ts +3 -0
- package/types/ledger/types.d.ts +3 -0
- package/types/ledger-host.d.ts +7 -0
- package/types/public-bip84.d.ts +39 -0
- package/types/software-hd-account.d.ts +16 -0
- package/types/software-utxo-account.d.ts +13 -0
- package/types/software.d.ts +26 -0
- package/types/transactions/bip84-native-plan.d.ts +83 -0
- package/types/transactions/ethereum.d.ts +1 -1
- package/types/transactions/prepared-bip84.d.ts +27 -0
- package/types/transactions/prepared-evm.d.ts +53 -0
- package/types/trezor/connect.d.ts +42 -0
- package/types/trezor/index.d.ts +22 -4
- package/types/trezor/witness.d.ts +3 -0
- package/types/utils/psbt-account-scope.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
- Add the standalone `cjs/public-bip84` entry for strict Bitcoin/Syscoin mainnet account parsing and native SegWit address derivation. It returns public data only; an account public key does not prove ancestry or ownership.
|
|
6
|
+
- Add `SoftwareKeyring.deriveBip84HdPublicAccount` for guarded public derivation from an unlocked software HD wallet, without selecting accounts, writing storage or discovering addresses.
|
|
7
|
+
- Add the standalone `cjs/bip84-native` planner for bounded native-coin P2WPKH transactions with explicit parent data, change, RBF and exact fee limits. Asset, special and coinbase parents are excluded.
|
|
8
|
+
- Add `SoftwareKeyring.signPreparedBip84Transaction` for the selected Bitcoin/Syscoin mainnet HD account. It binds the account, network and synchronous host guard, verifies the rebuilt transaction and signatures, and returns immutable signed bytes, identifiers and exact fee/size data.
|
|
9
|
+
- These offline APIs do not unlock, access a provider, persist records or broadcast. Hosts still own input eligibility, fresh approval, change reservations and durable journaling before broadcast. Existing vault, EVM, generic PSBT and hardware APIs remain unchanged; native and live qualification remain separate.
|
|
10
|
+
|
|
11
|
+
## 2.0.0
|
|
12
|
+
|
|
13
|
+
- Add `SoftwareKeyring.deriveEvmHdRuntimeAccount` for host-allocated Ethereum BIP44 indices. It returns the existing password-encrypted runtime account record without installing an account, writing storage or querying a network. The method binds session, selection and network identity and requires a synchronous host guard. Hosts must strip encrypted `xprv` before producing public metadata.
|
|
14
|
+
|
|
15
|
+
- Add `SoftwareKeyring.signPreparedEvmTransaction` for offline signing of fully specified legacy/EIP-1559 envelopes. The request binds the selected software account and exact network/endpoint, requires synchronous host admission, validates all signed fields and recovered identity, and returns immutable signed bytes plus their local hash. It never estimates fees, resolves names, fills fields or broadcasts; hosts must durably retain the result before submission and reconcile uncertain broadcasts by hash.
|
|
16
|
+
|
|
17
|
+
- Breaking: Ledger signing requires an explicitly injected semantic `LedgerHost`. Raw LedgerJS transports/clients are removed; use the isolated browser ESM host entry for device access.
|
|
18
|
+
- Adopt current Device Management Kit and Ethereum signer packages while preserving the custom Syscoin/Bitcoin protocol. Serialize device operations and reject stale, wrong-account, malformed and mismatched-sighash responses.
|
|
19
|
+
- Disable remote Ledger metadata/transaction checks/telemetry by default. Require fresh per-intent consent for transaction/typed-data signing that may fall back to blind signing.
|
|
20
|
+
- Bind receive addresses to public account derivation, preserve on-device approval for unusual paths, and snapshot queued UTXO requests before connection awaits.
|
|
21
|
+
- Existing software-only entry, vault formats and account derivation remain compatible. Host/device and native-runtime qualification are separate requirements.
|
|
22
|
+
|
|
23
|
+
- Remove the legacy Trezor UTXO library. Reuse Bitcoinjs address decoding with a checksum-verified two-byte-version compatibility path, and encode witness vectors with the public CompactSize codec.
|
|
24
|
+
|
|
25
|
+
- Move Trezor hardware integration to Connect 10.0.1 and remove the redundant direct Connect Web dependency.
|
|
26
|
+
- Load the browser transport only inside a supported MV3 extension. Preserve CommonJS/ESM and software-entry imports without browser globals or device initialization.
|
|
27
|
+
- Preserve the existing SDK failure payload while retaining Connect error codes; stop retrying cancellations, disconnects and unsupported hosts/coins.
|
|
28
|
+
- Replace removed Connect device events with status updates from request outcomes and disposal. Immediate physical unplug notifications are no longer exposed by upstream.
|
|
29
|
+
- Reject pending calls locally on lock/disposal and discard late responses. Defer remote cleanup while requests are outstanding; return `HARDWARE_SIGNER_BUSY` until they settle rather than opening another approval prompt.
|
|
30
|
+
- Normalize Trezor hexadecimal recovery values without mutating signed responses; preserve approved transaction and session checks.
|
|
31
|
+
- Physical device qualification and consuming-extension Suite Web permissions remain release gates.
|
|
32
|
+
|
|
3
33
|
## 1.0.628
|
|
4
34
|
|
|
5
35
|
- Add the `cjs/software` entry with explicit asynchronous host storage and an opaque wallet-authority handle. Software keyrings do not load browser hardware transports or global storage.
|
package/README.md
CHANGED
|
@@ -74,6 +74,114 @@ const keyringManager = await KeyringManager.createInitialized(
|
|
|
74
74
|
);
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
+
### Offline BIP84 public account derivation
|
|
78
|
+
|
|
79
|
+
The standalone public entry accepts a bare **mainnet xpub or zpub** for a depth-3
|
|
80
|
+
account whose child number is hardened. It derives only native SegWit P2WPKH
|
|
81
|
+
addresses at `/0/index` (receive) or `/1/index` (change), with a nonhardened index
|
|
82
|
+
from 0 through 2,147,483,647. Choose `bitcoin` or `syscoin` explicitly. Testnet
|
|
83
|
+
versions, private keys, descriptors, origin/path suffixes and arbitrary networks
|
|
84
|
+
are rejected. Requests must be plain own-data objects with exactly the documented
|
|
85
|
+
fields; inherited properties, getters and extra fields are rejected. Existing
|
|
86
|
+
generic watch-descriptor and keyring APIs are unchanged.
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
import {
|
|
90
|
+
parseBip84PublicAccount,
|
|
91
|
+
deriveBip84PublicAddress,
|
|
92
|
+
} from '@sidhujag/sysweb3-keyring/cjs/public-bip84';
|
|
93
|
+
|
|
94
|
+
const account = parseBip84PublicAccount({
|
|
95
|
+
network: 'syscoin',
|
|
96
|
+
accountKey: exportedPublicAccountKey,
|
|
97
|
+
});
|
|
98
|
+
const receive = deriveBip84PublicAddress({
|
|
99
|
+
network: account.network,
|
|
100
|
+
accountKey: account.canonicalKey,
|
|
101
|
+
branch: 0,
|
|
102
|
+
index: 0,
|
|
103
|
+
});
|
|
104
|
+
// receive.address, receive.scriptPubKey; no keyring or provider required.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The canonical account identity is the tuple `(network, policy, canonicalKey)`.
|
|
108
|
+
`policy` is `bip84-p2wpkh`; `canonicalKey` normalizes xpub/zpub aliases to zpub.
|
|
109
|
+
`accountIndex` is the encoded hardened child number minus 2^31. Key serialization
|
|
110
|
+
and depth cannot prove the original purpose, coin type, full ancestry or ownership.
|
|
111
|
+
In particular, the same public key can be encoded for either supported network;
|
|
112
|
+
network selection changes the address encoding and identity, not the derived
|
|
113
|
+
witness program. Require the user to verify their source wallet's BIP84 account
|
|
114
|
+
and network, and compare a known receive address before using a watch account.
|
|
115
|
+
|
|
116
|
+
Calls are synchronous and stateless: one key of at most 112 Base58 characters,
|
|
117
|
+
one account parse and two requested child derivations per address; no range scan,
|
|
118
|
+
cache, fetch, storage, RNG or wallet signing. The upstream BIP32 factory runs
|
|
119
|
+
deterministic ECC known-vector self-tests at module initialization (including
|
|
120
|
+
fixed-fixture signatures); it never receives a wallet private key here. The
|
|
121
|
+
underlying BIP32 implementation can retry an invalid child internally; a returned index mismatch is rejected instead
|
|
122
|
+
of silently changing the requested path. There is no wall-clock guarantee for
|
|
123
|
+
pathological library retries. Successful outputs are frozen objects containing
|
|
124
|
+
only strings and numbers (including a frozen nested account), never a BIP32 node.
|
|
125
|
+
Invalid input throws `PublicBip84Error` with a constant `INVALID_INPUT`,
|
|
126
|
+
`INVALID_ACCOUNT` or `INVALID_DERIVATION` code and no echoed key.
|
|
127
|
+
|
|
128
|
+
An account public key reveals all nonhardened receive and change addresses and
|
|
129
|
+
allows their activity to be linked. It cannot spend funds on its own, but remains
|
|
130
|
+
privacy-sensitive. The API performs no discovery or history lookup. A consuming
|
|
131
|
+
wallet must obtain informed consent before sharing an account key or derived
|
|
132
|
+
addresses with an indexer, own explicit discovery/page/concurrency bounds, and
|
|
133
|
+
label partial or unavailable history honestly. This library slice does not
|
|
134
|
+
implement or qualify a complete mobile watch-account feature.
|
|
135
|
+
|
|
136
|
+
### Development BIP84 native-transfer foundation
|
|
137
|
+
|
|
138
|
+
`SoftwareKeyring.deriveBip84HdPublicAccount(request, { assertCurrent })` derives
|
|
139
|
+
an explicit HD index for a captured Bitcoin/Syscoin mainnet context and returns
|
|
140
|
+
only frozen public account and receive-address data. It requires an already
|
|
141
|
+
unlocked software host; it does not select accounts, update a catalogue, store an
|
|
142
|
+
xprv, discover addresses or contact a provider. The host must supply a synchronous
|
|
143
|
+
revision/consent guard and recheck it after awaiting the operation. Labels and
|
|
144
|
+
currency strings do not choose the derivation path.
|
|
145
|
+
|
|
146
|
+
The standalone `@sidhujag/sysweb3-keyring/cjs/bip84-native` entry exports
|
|
147
|
+
`prepareBip84NativeTransaction` and its types. It builds exact unsigned version-2
|
|
148
|
+
bytes from a bounded immutable plan: one P2WPKH recipient, optional verified
|
|
149
|
+
branch-1 change, explicit RBF, locktime zero, full previous transaction data and
|
|
150
|
+
integer fee limits. Parent transactions must be ordinary version 1/2 and
|
|
151
|
+
non-coinbase. All SYS special/asset parents are excluded even when a selected
|
|
152
|
+
output appears to be native change. Missing provider asset metadata is not proof
|
|
153
|
+
that an output is safe to spend.
|
|
154
|
+
|
|
155
|
+
The planner allows at most 64 inputs/parents, 1,000,000 bytes per parent and
|
|
156
|
+
2,000,000 aggregate parent bytes. Before decoding any parent, it also enforces
|
|
157
|
+
an aggregate budget of 8,192 decoded components: parent inputs, outputs, witness
|
|
158
|
+
vectors and witness items each consume one component, including empty items.
|
|
159
|
+
This is a wallet resource policy, not a consensus limit; large scripts remain
|
|
160
|
+
subject to the separate byte limits. Wallet policy additionally caps absolute fees
|
|
161
|
+
at 10,000,000 satoshis and fee rate at 1,000 sat/vB; callers must provide limits
|
|
162
|
+
no higher than those ceilings. Maximum signature size is used only to reject
|
|
163
|
+
fees that cannot possibly satisfy the rate ceiling; the prepared signer checks
|
|
164
|
+
that ceiling again using the actual finalized virtual size. Zero fee is arithmetic-valid, not a relay guarantee.
|
|
165
|
+
Oversized valid parents are unavailable to this initial planner; no data is
|
|
166
|
+
truncated or silently omitted. Returned bytes/data are public and privacy-sensitive.
|
|
167
|
+
|
|
168
|
+
This is a development foundation, **not a native UTXO sending capability**.
|
|
169
|
+
`SoftwareKeyring.signPreparedBip84Transaction(request, { assertCurrent })` (added in 2.1.0)
|
|
170
|
+
signs only the selected HD account's exact prepared plan. It requires the SDK
|
|
171
|
+
selected type/index, requested account and seed-derived canonical public key to
|
|
172
|
+
agree. The mandatory synchronous host guard additionally binds fresh approval,
|
|
173
|
+
monotonic revision and review expiry. It rebuilds the plan, verifies complete
|
|
174
|
+
low-S SIGHASH_ALL signatures and exact unsigned bytes, and checks the final fee
|
|
175
|
+
against actual virtual size. It performs no unlock, storage, discovery or
|
|
176
|
+
broadcast and returns only frozen signed bytes, identifiers and fee/size data.
|
|
177
|
+
It does not consume or create per-account encrypted xprvs. The host still owns
|
|
178
|
+
canonical-chain/unspent checks, confirmed-input eligibility, protected collateral
|
|
179
|
+
and pending outpoint reservations, change-index persistence, fresh authentication,
|
|
180
|
+
review cancellation and eventual journal-before-broadcast behavior. Full parent
|
|
181
|
+
bytes prove an outpoint's content, not chain membership, maturity or spendability.
|
|
182
|
+
Existing generic PSBT, EVM and hardware APIs are unchanged. Native and live
|
|
183
|
+
qualification remain future work.
|
|
184
|
+
|
|
77
185
|
### Account Management
|
|
78
186
|
|
|
79
187
|
```javascript
|
|
@@ -150,6 +258,32 @@ const signature = await keyringManager.ethereumTransaction.signPersonalMessage([
|
|
|
150
258
|
|
|
151
259
|
### Hardware Wallet Support
|
|
152
260
|
|
|
261
|
+
Trezor uses `@trezor/connect-webextension` 10.0.1. The hardware adapter loads it
|
|
262
|
+
only when a supported MV3 extension invokes Trezor; ordinary Node CommonJS/ESM
|
|
263
|
+
imports and the software entry do not initialize browser transports. Unsupported
|
|
264
|
+
hosts reject hardware operations instead of falling back to software signing.
|
|
265
|
+
|
|
266
|
+
The extension must configure `externally_connectable` for
|
|
267
|
+
`https://suite.trezor.io/*` and host access to that origin, as required by the
|
|
268
|
+
[published Connect 10 webextension package](https://www.npmjs.com/package/@trezor/connect-webextension/v/10.0.1).
|
|
269
|
+
Connect selects Suite Desktop or the Suite Web popup. The old Connect 9 iframe,
|
|
270
|
+
content script, and `connectSrc` settings are not part of this integration.
|
|
271
|
+
|
|
272
|
+
Connect 10 does not expose the old device event emitter. SDK connection status
|
|
273
|
+
and cached model information update from request results and disposal; they are
|
|
274
|
+
not immediate physical unplug notifications. Disposal immediately rejects pending
|
|
275
|
+
SDK operations and fences late replies. Suite Web may leave its popup open; a
|
|
276
|
+
late approval there is discarded locally rather than treated as a fresh approval.
|
|
277
|
+
When an underlying request is still active, transport cleanup is deferred to avoid
|
|
278
|
+
triggering an automatic fallback popup. New initialization fails with
|
|
279
|
+
`HARDWARE_SIGNER_BUSY` until that request settles; local lock/disposal does not
|
|
280
|
+
wait for the remote prompt. An upstream transport failure can still trigger remote
|
|
281
|
+
fallback UI while that old request is pending; the local SDK will reject its result.
|
|
282
|
+
A failed or cancelled operation
|
|
283
|
+
never authorizes a cached transaction, and terminal disconnect/unsupported-host
|
|
284
|
+
errors are not retried. Device pairing, display verification, signing, and
|
|
285
|
+
reconnection still require physical-device qualification in the consuming host.
|
|
286
|
+
|
|
153
287
|
```javascript
|
|
154
288
|
// Import Trezor account
|
|
155
289
|
const trezorAccount = await keyringManager.importTrezorAccount(
|
|
@@ -293,3 +427,43 @@ collection rather than guaranteed memory erasure.
|
|
|
293
427
|
## License
|
|
294
428
|
|
|
295
429
|
MIT License
|
|
430
|
+
|
|
431
|
+
### Ledger platform host
|
|
432
|
+
|
|
433
|
+
Ledger device access uses the Device Management Kit. The regular and software
|
|
434
|
+
entries do not load a Ledger transport or device SDK. Browser integrations must
|
|
435
|
+
create the heavy host from `@sidhujag/sysweb3-keyring/esm/ledger-host` in a visible
|
|
436
|
+
extension page and inject its semantic `LedgerHost` port into the wallet authority:
|
|
437
|
+
|
|
438
|
+
```ts
|
|
439
|
+
// Visible device page only:
|
|
440
|
+
import { createLedgerDmkHost } from '@sidhujag/sysweb3-keyring/esm/ledger-host';
|
|
441
|
+
const host = createLedgerDmkHost({
|
|
442
|
+
confirmBlindSigning: async (intent, signal) => {
|
|
443
|
+
// Show the exact immutable intent and an explicit blind-signing warning.
|
|
444
|
+
// Return true only after a fresh user decision; cancellation must return false.
|
|
445
|
+
return showTrustedWalletConfirmation(intent, signal);
|
|
446
|
+
},
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
// Wallet authority: use a secured semantic port to that page, not a raw APDU port.
|
|
450
|
+
const wallet = new KeyringManager(undefined, authorizedLedgerHostPort);
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
Use only the ESM host entry with a browser bundler and its required platform
|
|
454
|
+
polyfills. `cjs/ledger-host` is not a supported entry. A service worker cannot own
|
|
455
|
+
the WebHID device picker. The platform must bind the host to its own trusted page,
|
|
456
|
+
revoke pending operations on lock/close, and never expose this port to dapps.
|
|
457
|
+
A missing host fails with `HARDWARE_SIGNER_UNAVAILABLE`; there is no legacy
|
|
458
|
+
LedgerJS fallback. Pass either a shared hardware manager or a Ledger host to
|
|
459
|
+
`KeyringManager`, not both.
|
|
460
|
+
|
|
461
|
+
The default host performs no remote metadata lookup, transaction checks, or
|
|
462
|
+
signing telemetry. The current Ethereum signer library can fall back to blind
|
|
463
|
+
signing, so transaction and typed-data signing require per-request approval
|
|
464
|
+
through the trusted `confirmBlindSigning` callback. Omitting it fails closed.
|
|
465
|
+
Personal-message signing and address retrieval remain available offline.
|
|
466
|
+
Signatures are checked against the expected account; UTXO signatures must also
|
|
467
|
+
match the approved PSBT and its requested sighash coverage. The custom UTXO host
|
|
468
|
+
supports the existing Syscoin and Bitcoin app protocols. Physical-device and
|
|
469
|
+
firmware qualification remain separate from source and mocked-device tests.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prepareBip84NativeTransaction = exports.Bip84NativeError = void 0;
|
|
4
|
+
/** Pure native-coin BIP84 transfer preparation, without a wallet or provider. */
|
|
5
|
+
var bip84_native_plan_1 = require("./transactions/bip84-native-plan");
|
|
6
|
+
Object.defineProperty(exports, "Bip84NativeError", { enumerable: true, get: function () { return bip84_native_plan_1.Bip84NativeError; } });
|
|
7
|
+
Object.defineProperty(exports, "prepareBip84NativeTransaction", { enumerable: true, get: function () { return bip84_native_plan_1.prepareBip84NativeTransaction; } });
|
|
8
|
+
//# sourceMappingURL=bip84-native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bip84-native.js","sourceRoot":"","sources":["../../src/bip84-native.ts"],"names":[],"mappings":";;;AAAA,iFAAiF;AACjF,sEAG0C;AAFxC,qHAAA,gBAAgB,OAAA;AAChB,kIAAA,6BAA6B,OAAA"}
|