@arkade-os/sdk 0.5.6 → 0.5.7
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/adapters/expo.cjs +6 -6
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +3 -3
- package/dist/{asyncStorageTaskQueue-Bh2n0msM.d.cts → asyncStorageTaskQueue-B9byr6ij.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-CpkstKZ5.d.ts → asyncStorageTaskQueue-XP4CCdRY.d.ts} +2 -2
- package/dist/{chunk-HKEPJBTY.cjs → chunk-3NALVGMJ.cjs} +16 -16
- package/dist/{chunk-HKEPJBTY.cjs.map → chunk-3NALVGMJ.cjs.map} +1 -1
- package/dist/{chunk-VWW2ZBPI.js → chunk-4AJRIM44.js} +4 -4
- package/dist/{chunk-VWW2ZBPI.js.map → chunk-4AJRIM44.js.map} +1 -1
- package/dist/{chunk-NDQ4LB4X.cjs → chunk-MQUATTIM.cjs} +8 -8
- package/dist/{chunk-NDQ4LB4X.cjs.map → chunk-MQUATTIM.cjs.map} +1 -1
- package/dist/{chunk-DJYX73W2.js → chunk-MWEDDWFU.js} +4 -4
- package/dist/{chunk-DJYX73W2.js.map → chunk-MWEDDWFU.js.map} +1 -1
- package/dist/{chunk-C7NY6WSA.js → chunk-MWMO2ZQP.js} +3 -3
- package/dist/{chunk-C7NY6WSA.js.map → chunk-MWMO2ZQP.js.map} +1 -1
- package/dist/{chunk-4X67IB2V.cjs → chunk-MXCB6EVM.cjs} +15 -15
- package/dist/{chunk-4X67IB2V.cjs.map → chunk-MXCB6EVM.cjs.map} +1 -1
- package/dist/{chunk-LZAINCGU.cjs → chunk-OMPDPBT5.cjs} +3 -3
- package/dist/chunk-OMPDPBT5.cjs.map +1 -0
- package/dist/{chunk-YKT4NAQG.js → chunk-RLD7DRSZ.js} +341 -25
- package/dist/chunk-RLD7DRSZ.js.map +1 -0
- package/dist/{chunk-Y3CDDPWI.cjs → chunk-URGVQ5TQ.cjs} +756 -434
- package/dist/chunk-URGVQ5TQ.cjs.map +1 -0
- package/dist/{chunk-47Z4LEIW.js → chunk-V2DDN4MV.js} +3 -3
- package/dist/{chunk-47Z4LEIW.js.map → chunk-V2DDN4MV.js.map} +1 -1
- package/dist/{chunk-YS76JSGP.cjs → chunk-V5WRO3P6.cjs} +10 -10
- package/dist/{chunk-YS76JSGP.cjs.map → chunk-V5WRO3P6.cjs.map} +1 -1
- package/dist/{chunk-QTMK34TP.js → chunk-VMVFRTF4.js} +3 -3
- package/dist/chunk-VMVFRTF4.js.map +1 -0
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +2 -2
- package/dist/contracts/handlers/index.d.ts +2 -2
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{index-C66rjxz2.d.ts → index-18cDMayF.d.ts} +1 -1
- package/dist/{index-2wKMrT0a.d.ts → index-B_kcptF8.d.ts} +1 -1
- package/dist/{index-46g577Ka.d.cts → index-Ccfhdfvj.d.cts} +1 -1
- package/dist/{index-Dqk07NwJ.d.cts → index-DDJFHfba.d.cts} +1 -1
- package/dist/index.cjs +335 -311
- package/dist/index.d.cts +72 -121
- package/dist/index.d.ts +72 -121
- package/dist/index.js +4 -4
- package/dist/{keyringDescriptorProvider-DiBM4GmB.d.ts → keyringDescriptorProvider-DL-jAiRO.d.ts} +150 -2
- package/dist/{keyringDescriptorProvider-DnaLUC7v.d.cts → keyringDescriptorProvider-Dtv0JWrT.d.cts} +150 -2
- package/dist/repositories/realm/index.cjs +37 -37
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +35 -35
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-BM6IAKlS.d.ts → taskRunner-DUafWu0o.d.ts} +2 -2
- package/dist/{taskRunner-BmDIZiSl.d.cts → taskRunner-JYHaLPne.d.cts} +2 -2
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +15 -15
- package/dist/wallet/expo/index.d.cts +3 -3
- package/dist/wallet/expo/index.d.ts +3 -3
- package/dist/wallet/expo/index.js +5 -5
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +5 -5
- package/package.json +2 -2
- package/dist/chunk-LZAINCGU.cjs.map +0 -1
- package/dist/chunk-QTMK34TP.js.map +0 -1
- package/dist/chunk-Y3CDDPWI.cjs.map +0 -1
- package/dist/chunk-YKT4NAQG.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { programFromArtifact, isContractArtifact } from './chunk-V3ZLL5VY.js';
|
|
2
|
-
import { Packet, AssetId, AssetGroup, AssetInput, AssetOutput, Metadata, RestIndexerProvider, BufferReader, BufferWriter, IndexerUtxosUnsupportedError, AssetRef } from './chunk-
|
|
3
|
-
import { contractHandlers, speculativeReceiveMetadata, isMainnetDescriptor, descriptorIsOurs, deriveDescriptorLeafPubKey, deriveDescriptorLeafCompressedPubKey, normalizeToDescriptor, extractPubKey, parseHDDescriptor, identityDescriptor, DefaultVtxo, DelegateVtxo, WALLET_RECEIVE_SOURCE, BoardingContractHandler, DefaultContractHandler, exitSequence } from './chunk-
|
|
2
|
+
import { Packet, AssetId, AssetGroup, AssetInput, AssetOutput, Metadata, RestIndexerProvider, BufferReader, BufferWriter, IndexerUtxosUnsupportedError, AssetRef } from './chunk-MWMO2ZQP.js';
|
|
3
|
+
import { contractHandlers, speculativeReceiveMetadata, isMainnetDescriptor, descriptorIsOurs, deriveDescriptorLeafPubKey, deriveDescriptorLeafCompressedPubKey, normalizeToDescriptor, extractPubKey, parseHDDescriptor, identityDescriptor, DefaultVtxo, DelegateVtxo, WALLET_RECEIVE_SOURCE, BoardingContractHandler, DefaultContractHandler, exitSequence } from './chunk-V2DDN4MV.js';
|
|
4
4
|
import { witnessRefToBytes, validateProgram, toASM, stringifyArtifact, serializeArkadeContractParams, resolveAsm, parseArtifact, getOpcodeValue, getOpcodeName, fromASM, deserializeArkadeContractParams, computeArkadeScriptPublicKey, bytesToASM, asmToBytes, arkadeWitnessHash, arkadeScriptHash, UnsupportedProgramVersionError, SUPPORTED_PROGRAM_VERSION, OPCODE_VALUES, OPCODE_NAMES, bignum_exports, ArkadeScript, ArkadeProgramScript, ARKADE_OPS, ARKADE_OPCODE_VALUES, ARKADE_OPCODE_NAMES, ARKADE_OPCODES, ARKADE_OP, toXOnly, staticWitness, validateParamValue } from './chunk-DNFTHG73.js';
|
|
5
|
-
import { Transaction, requiresForfeit, setArkPsbtField, ConditionWitness, toOffchainInputFeeParams, normalizeVtxo, Proof, isVtxoSpent, getNormalizedVtxos, PrevArkTxField, craftToSpendTx, RestOperatorProvider, isVirtualCoin, getArkPsbtFields, CosignerPublicKey, ServerResponseMismatchError, isArkError, ArkErrorName, assertNonNegativeMs, isRetryableProviderError, OUTPOINT_QUERY_CHUNK_SIZE, getAllNormalizedVtxos, DEFAULT_PAGE_SIZE, VtxoTaprootTree, PrevoutTxField, OnchainCosignUnsupportedError, assertAllowedSighashTypes, OP_RETURN_EMPTY_PKSCRIPT, canSweepOnchain, baseFetch, assertTimerMs, isEventSourceError, isEventSourceUnavailableError, isPastExpiry, formatSighash, rateGate, OnchainCosignRejectedError, maybeArkError, canRecoverOnchain, READ_TIMEOUT_MS, OnchainCosignAmbiguousError, ArkError, resolveTimeHeight, canSpendOffchain, INFO_FETCH_TIMEOUT_MS, fetchVtxoCreatedAtByTxid, EXPIRY_MIN_PLAUSIBLE_MS, ProviderUnavailableError, ONCHAIN_COSIGN_REJECTED_PREFIX, ONCHAIN_COSIGN_AMBIGUOUS_PREFIX, ONCHAIN_COSIGN_UNSUPPORTED_PREFIX } from './chunk-
|
|
5
|
+
import { Transaction, requiresForfeit, setArkPsbtField, ConditionWitness, toOffchainInputFeeParams, normalizeVtxo, Proof, isVtxoSpent, getNormalizedVtxos, PrevArkTxField, craftToSpendTx, RestOperatorProvider, isVirtualCoin, getArkPsbtFields, CosignerPublicKey, ServerResponseMismatchError, isArkError, ArkErrorName, assertNonNegativeMs, isRetryableProviderError, OUTPOINT_QUERY_CHUNK_SIZE, getAllNormalizedVtxos, DEFAULT_PAGE_SIZE, VtxoTaprootTree, PrevoutTxField, OnchainCosignUnsupportedError, assertAllowedSighashTypes, OP_RETURN_EMPTY_PKSCRIPT, canSweepOnchain, baseFetch, assertTimerMs, isEventSourceError, isEventSourceUnavailableError, isPastExpiry, formatSighash, rateGate, OnchainCosignRejectedError, maybeArkError, canRecoverOnchain, READ_TIMEOUT_MS, OnchainCosignAmbiguousError, ArkError, resolveTimeHeight, canSpendOffchain, INFO_FETCH_TIMEOUT_MS, fetchVtxoCreatedAtByTxid, EXPIRY_MIN_PLAUSIBLE_MS, ProviderUnavailableError, ONCHAIN_COSIGN_REJECTED_PREFIX, ONCHAIN_COSIGN_AMBIGUOUS_PREFIX, ONCHAIN_COSIGN_UNSUPPORTED_PREFIX } from './chunk-VMVFRTF4.js';
|
|
6
6
|
import { VtxoScript, __export, CSVMultisigTapscript, networks, getNetwork, DEFAULT_NETWORK, resolveEmulatorPubkey, timelockToSequence, decodeTapscript, CLTVMultisigTapscript, ConditionCSVMultisigTapscript, ArkAddress, sequenceToTimelock, DEFAULT_ARKADE_SERVER_URL, DEFAULT_NETWORK_NAME, scriptFromTapLeafScript, proofTapLeafScriptOf, getSequence, MultisigTapscript, DEFAULT_ARKADE_EMULATOR_URL, networkFromOperatorInfo, toBIP371TapTree } from './chunk-FDJ734CH.js';
|
|
7
7
|
import { entropyToMnemonic, mnemonicToSeedSync, validateMnemonic } from '@scure/bip39';
|
|
8
8
|
import { wordlist } from '@scure/bip39/wordlists/english.js';
|
|
@@ -2123,14 +2123,22 @@ var EsploraProvider = class {
|
|
|
2123
2123
|
let anchorHeight;
|
|
2124
2124
|
const baseline = (async () => {
|
|
2125
2125
|
const [history, tip] = await Promise.allSettled([getAllTxs(), this.getChainTip()]);
|
|
2126
|
+
let failure;
|
|
2126
2127
|
if (history.status === "fulfilled") {
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2128
|
+
try {
|
|
2129
|
+
const keys = history.value.map(txKey2);
|
|
2130
|
+
for (const key of keys) seen.add(key);
|
|
2131
|
+
baselined = true;
|
|
2132
|
+
return;
|
|
2133
|
+
} catch (error) {
|
|
2134
|
+
failure = error;
|
|
2135
|
+
}
|
|
2136
|
+
} else {
|
|
2137
|
+
failure = history.reason;
|
|
2130
2138
|
}
|
|
2131
2139
|
console.warn(
|
|
2132
2140
|
"Could not baseline watched addresses; the first poll pass will establish it instead:",
|
|
2133
|
-
|
|
2141
|
+
failure
|
|
2134
2142
|
);
|
|
2135
2143
|
if (tip.status === "fulfilled") anchorHeight = tip.value.height;
|
|
2136
2144
|
})();
|
|
@@ -5663,10 +5671,22 @@ var VtxoManager = class _VtxoManager {
|
|
|
5663
5671
|
const arkAddress = await wallet.getAddress();
|
|
5664
5672
|
const totalAmount = deductOffchainOutputFee(subtotal, estimator, arkAddress);
|
|
5665
5673
|
if (totalAmount < dustAmount) return;
|
|
5666
|
-
await wallet.settle({
|
|
5674
|
+
const settledTxid = await wallet.settle({
|
|
5667
5675
|
inputs: batch,
|
|
5668
5676
|
outputs: [{ address: arkAddress, amount: totalAmount }]
|
|
5669
5677
|
});
|
|
5678
|
+
try {
|
|
5679
|
+
await wallet.correlateArkadeCashRecovery?.(
|
|
5680
|
+
contract.script,
|
|
5681
|
+
settledTxid,
|
|
5682
|
+
Number(totalAmount)
|
|
5683
|
+
);
|
|
5684
|
+
} catch (error) {
|
|
5685
|
+
console.error(
|
|
5686
|
+
`Failed to record arkcash recovery ${settledTxid} for ${contract.script}:`,
|
|
5687
|
+
error
|
|
5688
|
+
);
|
|
5689
|
+
}
|
|
5670
5690
|
}
|
|
5671
5691
|
if (vtxos.length === 0) return;
|
|
5672
5692
|
const spent = new Set(batch.map((vtxo) => `${vtxo.txid}:${vtxo.vout}`));
|
|
@@ -7086,6 +7106,92 @@ var ArkadeCash = class _ArkadeCash {
|
|
|
7086
7106
|
return this.vtxoScript.address(addressHrp, this._serverPubKey);
|
|
7087
7107
|
}
|
|
7088
7108
|
};
|
|
7109
|
+
var ArkadeCashTracker = class {
|
|
7110
|
+
records = /* @__PURE__ */ new Map();
|
|
7111
|
+
get(id) {
|
|
7112
|
+
return this.records.get(id);
|
|
7113
|
+
}
|
|
7114
|
+
list() {
|
|
7115
|
+
return [...this.records.values()].sort((a, b) => b.createdAt - a.createdAt);
|
|
7116
|
+
}
|
|
7117
|
+
};
|
|
7118
|
+
function createArkadeCashTracker() {
|
|
7119
|
+
return new ArkadeCashTracker();
|
|
7120
|
+
}
|
|
7121
|
+
var unionByTxid = (a, b) => [
|
|
7122
|
+
...new Map([...a, ...b].map((entry) => [entry.txid, entry])).values()
|
|
7123
|
+
];
|
|
7124
|
+
function mergeArkadeCashRecord(prev, next) {
|
|
7125
|
+
if (!prev) return next;
|
|
7126
|
+
const lead = prev.action === "claimed" && next.action === "issued" ? prev : next;
|
|
7127
|
+
return {
|
|
7128
|
+
id: next.id,
|
|
7129
|
+
action: lead.action,
|
|
7130
|
+
outcome: lead.outcome,
|
|
7131
|
+
createdAt: Math.min(prev.createdAt, next.createdAt),
|
|
7132
|
+
issues: unionByTxid(prev.issues, next.issues),
|
|
7133
|
+
claims: unionByTxid(prev.claims, next.claims)
|
|
7134
|
+
};
|
|
7135
|
+
}
|
|
7136
|
+
function isArkadeCashRecord(value) {
|
|
7137
|
+
if (!value || typeof value !== "object") return false;
|
|
7138
|
+
const v = value;
|
|
7139
|
+
return typeof v.id === "string" && (v.action === "issued" || v.action === "claimed") && typeof v.createdAt === "number" && typeof v.outcome === "string" && Array.isArray(v.issues) && Array.isArray(v.claims);
|
|
7140
|
+
}
|
|
7141
|
+
function addArkadeCashRecord(records, record) {
|
|
7142
|
+
records.records.set(record.id, mergeArkadeCashRecord(records.get(record.id), record));
|
|
7143
|
+
}
|
|
7144
|
+
function arkadeCashId(cash) {
|
|
7145
|
+
return hex.encode(cash.vtxoScript.pkScript);
|
|
7146
|
+
}
|
|
7147
|
+
function arkadeCashResolver(records) {
|
|
7148
|
+
let index;
|
|
7149
|
+
const build = () => {
|
|
7150
|
+
const next = /* @__PURE__ */ new Map();
|
|
7151
|
+
for (const record of records.list()) {
|
|
7152
|
+
for (const { txid } of [...record.issues, ...record.claims]) {
|
|
7153
|
+
const touching = next.get(txid) ?? [];
|
|
7154
|
+
if (touching[touching.length - 1] !== record) touching.push(record);
|
|
7155
|
+
next.set(txid, touching);
|
|
7156
|
+
}
|
|
7157
|
+
}
|
|
7158
|
+
return next;
|
|
7159
|
+
};
|
|
7160
|
+
return {
|
|
7161
|
+
id: "arkade-cash",
|
|
7162
|
+
async prepare() {
|
|
7163
|
+
index = build();
|
|
7164
|
+
},
|
|
7165
|
+
resolve(tx) {
|
|
7166
|
+
if (tx.key.boardingTxid) return [];
|
|
7167
|
+
index ??= build();
|
|
7168
|
+
const txid = tx.key.arkTxid || tx.key.commitmentTxid;
|
|
7169
|
+
const isBatchRow = !tx.key.arkTxid;
|
|
7170
|
+
const direction = tx.type === "SENT" /* TxSent */ ? "issued" : "claimed";
|
|
7171
|
+
return (index.get(txid) ?? []).flatMap((record) => {
|
|
7172
|
+
const entries = direction === "issued" ? record.issues : record.claims;
|
|
7173
|
+
const match = entries.find(
|
|
7174
|
+
(entry) => entry.txid === txid && (!isBatchRow || entry.amount === tx.amount)
|
|
7175
|
+
);
|
|
7176
|
+
if (!match) return [];
|
|
7177
|
+
return [
|
|
7178
|
+
{
|
|
7179
|
+
groupId: `arkade-cash:${record.id}:${direction}`,
|
|
7180
|
+
label: direction === "issued" ? "Cash issued" : "Cash claimed",
|
|
7181
|
+
kind: "arkade-cash",
|
|
7182
|
+
outcome: record.outcome,
|
|
7183
|
+
metadata: { cashId: record.id, direction },
|
|
7184
|
+
amount: match.amount
|
|
7185
|
+
}
|
|
7186
|
+
];
|
|
7187
|
+
});
|
|
7188
|
+
}
|
|
7189
|
+
};
|
|
7190
|
+
}
|
|
7191
|
+
async function arkadeCashActivity(records, txs) {
|
|
7192
|
+
const activities = await buildActivities(txs, [arkadeCashResolver(records)]);
|
|
7193
|
+
return activities.filter((activity) => activity.intent?.kind === "arkade-cash");
|
|
7194
|
+
}
|
|
7089
7195
|
|
|
7090
7196
|
// src/wallet/intentReconciliation.ts
|
|
7091
7197
|
var NON_TERMINAL_INTENT_STATES = ALL_BATCH_REGISTRATION_STATES.filter((s) => !isTerminalBatchRegistrationState(s));
|
|
@@ -14976,10 +15082,11 @@ var ReadonlyWallet = class _ReadonlyWallet {
|
|
|
14976
15082
|
* Return wallet transaction history derived from Arkade state and boarding transactions.
|
|
14977
15083
|
*/
|
|
14978
15084
|
async getTransactionHistory() {
|
|
14979
|
-
const [
|
|
15085
|
+
const [fullSnapshot, { boardingTxs, commitmentsToIgnore }] = await Promise.all([
|
|
14980
15086
|
this.contractSnapshot(),
|
|
14981
15087
|
this.getBoardingTxs()
|
|
14982
15088
|
]);
|
|
15089
|
+
const snapshot = fullSnapshot.filter(({ contract }) => !isRecoveryOnlyContract(contract));
|
|
14983
15090
|
const allVtxos = snapshot.flatMap((_) => _.vtxos);
|
|
14984
15091
|
const resolveTxCreatedAt = (txids) => fetchVtxoCreatedAtByTxid(this.indexerProvider, txids);
|
|
14985
15092
|
return buildTransactionHistory(
|
|
@@ -17836,11 +17943,17 @@ var Wallet2 = class extends ReadonlyWallet {
|
|
|
17836
17943
|
const myPkScript = ArkAddress.decode(await this.getAddress()).pkScript;
|
|
17837
17944
|
let { spendable, recoverable, unclaimed } = this.classifyCashVtxos(vtxos);
|
|
17838
17945
|
let swept = 0;
|
|
17946
|
+
const claims = [];
|
|
17839
17947
|
const drainable = vtxos.filter(
|
|
17840
17948
|
(vtxo) => !isSubdust(vtxo, this.dustAmount) && !vtxo.isUnrolled
|
|
17841
17949
|
);
|
|
17842
17950
|
if (drainable.length > 0) {
|
|
17843
|
-
let drained = {
|
|
17951
|
+
let drained = {
|
|
17952
|
+
count: 0,
|
|
17953
|
+
swept: 0,
|
|
17954
|
+
claimed: /* @__PURE__ */ new Set(),
|
|
17955
|
+
claims: []
|
|
17956
|
+
};
|
|
17844
17957
|
try {
|
|
17845
17958
|
drained = await this.finalizePendingCashTxs(
|
|
17846
17959
|
cash,
|
|
@@ -17851,6 +17964,7 @@ var Wallet2 = class extends ReadonlyWallet {
|
|
|
17851
17964
|
} catch (error) {
|
|
17852
17965
|
console.error("Failed to drain pending arkadeCash txs:", error);
|
|
17853
17966
|
}
|
|
17967
|
+
claims.push(...drained.claims);
|
|
17854
17968
|
if (drained.count > 0) {
|
|
17855
17969
|
vtxos = await this.fetchAllVtxos(scripts);
|
|
17856
17970
|
({ spendable, recoverable, unclaimed } = this.classifyCashVtxos(vtxos));
|
|
@@ -17868,7 +17982,7 @@ var Wallet2 = class extends ReadonlyWallet {
|
|
|
17868
17982
|
);
|
|
17869
17983
|
for (const vtxo of spendable) {
|
|
17870
17984
|
try {
|
|
17871
|
-
await signAndSubmitOffchainTx({
|
|
17985
|
+
const registeredTxid = await signAndSubmitOffchainTx({
|
|
17872
17986
|
identity: cash.identity,
|
|
17873
17987
|
provider: this.arkProvider,
|
|
17874
17988
|
inputs: [
|
|
@@ -17884,6 +17998,7 @@ var Wallet2 = class extends ReadonlyWallet {
|
|
|
17884
17998
|
serverUnrollScript,
|
|
17885
17999
|
oneShot: this.oneShotSubmit
|
|
17886
18000
|
});
|
|
18001
|
+
claims.push({ txid: registeredTxid, amount: vtxo.value });
|
|
17887
18002
|
swept += vtxo.value;
|
|
17888
18003
|
} catch (error) {
|
|
17889
18004
|
console.error(
|
|
@@ -17914,6 +18029,7 @@ var Wallet2 = class extends ReadonlyWallet {
|
|
|
17914
18029
|
}
|
|
17915
18030
|
}
|
|
17916
18031
|
return {
|
|
18032
|
+
claims,
|
|
17917
18033
|
swept,
|
|
17918
18034
|
recovering: {
|
|
17919
18035
|
amount: recovering.reduce((total, vtxo) => total + vtxo.value, 0),
|
|
@@ -18031,6 +18147,36 @@ var Wallet2 = class extends ReadonlyWallet {
|
|
|
18031
18147
|
}
|
|
18032
18148
|
await manager.deleteContract(script);
|
|
18033
18149
|
}
|
|
18150
|
+
/**
|
|
18151
|
+
* Correlate an imported voucher's settlement with the voucher record. This
|
|
18152
|
+
* is deliberately kept on wallet state rather than being inferred from the
|
|
18153
|
+
* generic recovery row, which has no safe public correlation key. The
|
|
18154
|
+
* imported contract carries no cash id, so its script is the join key:
|
|
18155
|
+
* the script is the voucher id.
|
|
18156
|
+
*/
|
|
18157
|
+
async correlateArkadeCashRecovery(cashId, txid, amount, outcome = "recovered") {
|
|
18158
|
+
await updateWalletState(this.walletRepository, (state) => {
|
|
18159
|
+
const raw = state.settings?.arkadeCashRecovery;
|
|
18160
|
+
const entries = Array.isArray(raw) ? raw : [];
|
|
18161
|
+
const index = entries.findIndex(
|
|
18162
|
+
(entry) => isArkadeCashRecord(entry) && entry.id === cashId
|
|
18163
|
+
);
|
|
18164
|
+
const previous = index >= 0 ? entries[index] : void 0;
|
|
18165
|
+
if (previous?.claims.some((claim) => claim.txid === txid)) return state;
|
|
18166
|
+
const next = mergeArkadeCashRecord(previous, {
|
|
18167
|
+
id: cashId,
|
|
18168
|
+
action: "claimed",
|
|
18169
|
+
outcome,
|
|
18170
|
+
createdAt: Math.floor(Date.now() / 1e3),
|
|
18171
|
+
issues: [],
|
|
18172
|
+
claims: [{ txid, amount }]
|
|
18173
|
+
});
|
|
18174
|
+
const updated = [...entries];
|
|
18175
|
+
if (index >= 0) updated[index] = next;
|
|
18176
|
+
else updated.push(next);
|
|
18177
|
+
return { ...state, settings: { ...state.settings, arkadeCashRecovery: updated } };
|
|
18178
|
+
});
|
|
18179
|
+
}
|
|
18034
18180
|
/**
|
|
18035
18181
|
* Split the VTXOs at an arkadeCash address into three buckets: the ones the
|
|
18036
18182
|
* thin sweep can move (`spendable`), the operator-swept ones that must go
|
|
@@ -18088,7 +18234,12 @@ var Wallet2 = class extends ReadonlyWallet {
|
|
|
18088
18234
|
* @returns Txs finalized, sats paid to this wallet, and the outpoints consumed to pay it.
|
|
18089
18235
|
*/
|
|
18090
18236
|
async finalizePendingCashTxs(cash, vtxos, cashScript, myPkScript) {
|
|
18091
|
-
const result = {
|
|
18237
|
+
const result = {
|
|
18238
|
+
count: 0,
|
|
18239
|
+
swept: 0,
|
|
18240
|
+
claimed: /* @__PURE__ */ new Set(),
|
|
18241
|
+
claims: []
|
|
18242
|
+
};
|
|
18092
18243
|
const inputs = vtxos.map((vtxo) => ({
|
|
18093
18244
|
...vtxo,
|
|
18094
18245
|
forfeitTapLeafScript: cashScript.forfeit(),
|
|
@@ -18145,6 +18296,7 @@ var Wallet2 = class extends ReadonlyWallet {
|
|
|
18145
18296
|
result.count++;
|
|
18146
18297
|
const paidToMe = this.arkTxAmountPaidTo(pendingTx.finalArkTx, myPkScriptHex);
|
|
18147
18298
|
if (paidToMe === 0) continue;
|
|
18299
|
+
result.claims.push({ txid: pendingTx.arkTxid, amount: paidToMe });
|
|
18148
18300
|
result.swept += paidToMe;
|
|
18149
18301
|
for (const checkpoint of checkpointTxs) {
|
|
18150
18302
|
for (let i = 0; i < checkpoint.inputsLength; i++) {
|
|
@@ -20056,6 +20208,51 @@ var Ramps = class {
|
|
|
20056
20208
|
return { change, changeAddress };
|
|
20057
20209
|
}
|
|
20058
20210
|
};
|
|
20211
|
+
function groupByTxid(coins) {
|
|
20212
|
+
const totals = /* @__PURE__ */ new Map();
|
|
20213
|
+
for (const { txid, value } of coins) totals.set(txid, (totals.get(txid) ?? 0) + value);
|
|
20214
|
+
return [...totals].map(([txid, amount]) => ({ txid, amount }));
|
|
20215
|
+
}
|
|
20216
|
+
async function readArkadeCash(token, indexer, info, onchain) {
|
|
20217
|
+
const cash = ArkadeCash.fromString(token);
|
|
20218
|
+
const signer = classifyAgainstSignerSet(hex.encode(cash.serverPubKey), signerSetFromInfo(info));
|
|
20219
|
+
if (signer.status === "UNKNOWN_SIGNER") {
|
|
20220
|
+
throw new Error("ArkadeCash belongs to another operator");
|
|
20221
|
+
}
|
|
20222
|
+
const coins = await getAllNormalizedVtxos(indexer, [arkadeCashId(cash)]);
|
|
20223
|
+
return classifyArkadeCash(
|
|
20224
|
+
coins,
|
|
20225
|
+
info.dust,
|
|
20226
|
+
await resolveTimeHeight(onchain),
|
|
20227
|
+
signer.status === "EXPIRED"
|
|
20228
|
+
);
|
|
20229
|
+
}
|
|
20230
|
+
function classifyArkadeCash(coins, dust, now, awaitingSweep = false) {
|
|
20231
|
+
const eligible = coins.filter(
|
|
20232
|
+
(coin) => coin.value >= Number(dust) && !(coin.assets && coin.assets.length > 0)
|
|
20233
|
+
);
|
|
20234
|
+
const hasSpent = eligible.some(isVtxoSpent);
|
|
20235
|
+
const hasLive = eligible.some((coin) => !isVtxoSpent(coin) && !coin.isUnrolled);
|
|
20236
|
+
const hasExit = eligible.some((coin) => !isVtxoSpent(coin) && coin.isUnrolled);
|
|
20237
|
+
const recoverable = eligible.some((coin) => !isVtxoSpent(coin) && coin.isSwept);
|
|
20238
|
+
const elapsedBatch = eligible.some(
|
|
20239
|
+
(coin) => !isVtxoSpent(coin) && !coin.isSwept && isPastExpiry(coin, now)
|
|
20240
|
+
);
|
|
20241
|
+
return {
|
|
20242
|
+
status: eligible.length === 0 ? "unissued" : hasExit && !hasLive ? "exited" : hasSpent && !hasLive ? "claimed" : recoverable ? "recovering" : elapsedBatch || awaitingSweep ? "expired" : "available",
|
|
20243
|
+
amount: eligible.reduce((sum, coin) => sum + (isVtxoSpent(coin) ? 0 : coin.value), 0),
|
|
20244
|
+
issues: groupByTxid(eligible),
|
|
20245
|
+
claims: groupByTxid(
|
|
20246
|
+
// `||`: the indexer reports an unset id as an empty string, not as absent.
|
|
20247
|
+
eligible.flatMap((coin) => {
|
|
20248
|
+
const txid = coin.arkTxId || coin.settledBy;
|
|
20249
|
+
return txid ? [{ txid, value: coin.value }] : [];
|
|
20250
|
+
})
|
|
20251
|
+
)
|
|
20252
|
+
};
|
|
20253
|
+
}
|
|
20254
|
+
|
|
20255
|
+
// src/wallet/serviceWorker/wallet-message-handler.ts
|
|
20059
20256
|
var WalletNotInitializedError = class extends Error {
|
|
20060
20257
|
constructor() {
|
|
20061
20258
|
super("Wallet handler not initialized");
|
|
@@ -20090,6 +20287,25 @@ function deserializeAggregateError(payload) {
|
|
|
20090
20287
|
});
|
|
20091
20288
|
return new AggregateError(errs, payload.message);
|
|
20092
20289
|
}
|
|
20290
|
+
function isSerializedArkadeCashCreateError(value) {
|
|
20291
|
+
if (!value || typeof value !== "object") return false;
|
|
20292
|
+
const v = value;
|
|
20293
|
+
return v.name === "ArkadeCashCreateError" && typeof v.message === "string" && typeof v.cash === "string" && !!v.cause && typeof v.cause.name === "string" && typeof v.cause.message === "string";
|
|
20294
|
+
}
|
|
20295
|
+
function serializeArkadeCashCreateError(error) {
|
|
20296
|
+
const cause = error.cause;
|
|
20297
|
+
return {
|
|
20298
|
+
name: "ArkadeCashCreateError",
|
|
20299
|
+
message: error.message,
|
|
20300
|
+
cash: error.cash,
|
|
20301
|
+
cause: cause instanceof Error ? { name: cause.name, message: cause.message } : { name: "Error", message: String(cause) }
|
|
20302
|
+
};
|
|
20303
|
+
}
|
|
20304
|
+
function deserializeArkadeCashCreateError(payload) {
|
|
20305
|
+
const cause = new Error(payload.cause.message);
|
|
20306
|
+
cause.name = payload.cause.name;
|
|
20307
|
+
return new ArkadeCashCreateError(payload.cash, cause);
|
|
20308
|
+
}
|
|
20093
20309
|
var ReadonlyWalletError = class extends Error {
|
|
20094
20310
|
constructor() {
|
|
20095
20311
|
super("Read-only wallet: operation requires signing");
|
|
@@ -20103,6 +20319,7 @@ var DelegateNotConfiguredError = class extends Error {
|
|
|
20103
20319
|
}
|
|
20104
20320
|
};
|
|
20105
20321
|
var DEFAULT_MESSAGE_TAG = "WALLET_UPDATER";
|
|
20322
|
+
var isLongRunningCashAction = (request) => request.action === "create" || request.action === "claim";
|
|
20106
20323
|
function unsupportedByManager(method) {
|
|
20107
20324
|
return new Error(`Contract manager does not support ${method}`);
|
|
20108
20325
|
}
|
|
@@ -20338,7 +20555,10 @@ var WalletMessageHandler = class {
|
|
|
20338
20555
|
message.type === "MIGRATE_DEPRECATED_SIGNER_VTXOS" || // HD restore walks the index range with one indexer round-trip per
|
|
20339
20556
|
// step until it hits gapLimit consecutive unused indices. The bus
|
|
20340
20557
|
// deadline must not race the scan; liveness stays covered by PING.
|
|
20341
|
-
message.type === "RESTORE_WALLET" ||
|
|
20558
|
+
message.type === "RESTORE_WALLET" || // `create` and `claim` run sends and sweeps. A bus deadline would
|
|
20559
|
+
// answer with a timeout error and drop the token or txids that the
|
|
20560
|
+
// finished handler could still deliver.
|
|
20561
|
+
message.type === "ARKADE_CASH" && isLongRunningCashAction(message.payload) || message.type === "COSIGN_ONCHAIN_TX" || message.type === "SEND_ONCHAIN";
|
|
20342
20562
|
}
|
|
20343
20563
|
async handleMessage(message) {
|
|
20344
20564
|
const id = message.id;
|
|
@@ -20381,6 +20601,82 @@ var WalletMessageHandler = class {
|
|
|
20381
20601
|
payload: { address }
|
|
20382
20602
|
});
|
|
20383
20603
|
}
|
|
20604
|
+
case "ARKADE_CASH": {
|
|
20605
|
+
const request = message.payload;
|
|
20606
|
+
switch (request.action) {
|
|
20607
|
+
case "get": {
|
|
20608
|
+
const cash = ArkadeCash.fromString(request.token);
|
|
20609
|
+
const report = await readArkadeCash(
|
|
20610
|
+
request.token,
|
|
20611
|
+
this.readonlyWallet.indexerProvider,
|
|
20612
|
+
await this.readonlyWallet.getArkadeInfo(),
|
|
20613
|
+
this.readonlyWallet.onchainProvider
|
|
20614
|
+
);
|
|
20615
|
+
return this.tagged({
|
|
20616
|
+
id,
|
|
20617
|
+
type: "ARKADE_CASH",
|
|
20618
|
+
payload: { action: "get", cashId: arkadeCashId(cash), ...report }
|
|
20619
|
+
});
|
|
20620
|
+
}
|
|
20621
|
+
case "create": {
|
|
20622
|
+
try {
|
|
20623
|
+
const token = await this.requireWallet().createCash(request.amount);
|
|
20624
|
+
return this.tagged({
|
|
20625
|
+
id,
|
|
20626
|
+
type: "ARKADE_CASH",
|
|
20627
|
+
payload: { action: "create", token }
|
|
20628
|
+
});
|
|
20629
|
+
} catch (error) {
|
|
20630
|
+
if (!(error instanceof ArkadeCashCreateError)) throw error;
|
|
20631
|
+
return this.tagged({
|
|
20632
|
+
id,
|
|
20633
|
+
error: serializeArkadeCashCreateError(
|
|
20634
|
+
error
|
|
20635
|
+
)
|
|
20636
|
+
});
|
|
20637
|
+
}
|
|
20638
|
+
}
|
|
20639
|
+
case "activities": {
|
|
20640
|
+
const records = createArkadeCashTracker();
|
|
20641
|
+
request.records.forEach(
|
|
20642
|
+
(record) => addArkadeCashRecord(records, record)
|
|
20643
|
+
);
|
|
20644
|
+
const state = await this.walletRepository?.getWalletState();
|
|
20645
|
+
const recovered = state?.settings?.arkadeCashRecovery;
|
|
20646
|
+
if (Array.isArray(recovered)) {
|
|
20647
|
+
recovered.filter(isArkadeCashRecord).forEach((record) => addArkadeCashRecord(records, record));
|
|
20648
|
+
}
|
|
20649
|
+
return this.tagged({
|
|
20650
|
+
id,
|
|
20651
|
+
type: "ARKADE_CASH",
|
|
20652
|
+
payload: {
|
|
20653
|
+
action: "activities",
|
|
20654
|
+
activities: await arkadeCashActivity(
|
|
20655
|
+
records,
|
|
20656
|
+
await this.buildTransactionHistoryFromCache() ?? []
|
|
20657
|
+
)
|
|
20658
|
+
}
|
|
20659
|
+
});
|
|
20660
|
+
}
|
|
20661
|
+
case "claim": {
|
|
20662
|
+
const result = await this.requireWallet().claimCash(request.token);
|
|
20663
|
+
return this.tagged({
|
|
20664
|
+
id,
|
|
20665
|
+
type: "ARKADE_CASH",
|
|
20666
|
+
payload: { action: "claim", ...result }
|
|
20667
|
+
});
|
|
20668
|
+
}
|
|
20669
|
+
case "reveal": {
|
|
20670
|
+
const record = ArkadeCash.fromString(request.token);
|
|
20671
|
+
return this.tagged({
|
|
20672
|
+
id,
|
|
20673
|
+
type: "ARKADE_CASH",
|
|
20674
|
+
payload: { action: "reveal", cashId: arkadeCashId(record) }
|
|
20675
|
+
});
|
|
20676
|
+
}
|
|
20677
|
+
}
|
|
20678
|
+
return this.tagged({ id, error: new Error("Unknown Arkade Cash action") });
|
|
20679
|
+
}
|
|
20384
20680
|
case "GET_OPERATOR_INFO":
|
|
20385
20681
|
case "GET_ARKADE_INFO": {
|
|
20386
20682
|
const { payload } = message;
|
|
@@ -21351,9 +21647,8 @@ var WalletMessageHandler = class {
|
|
|
21351
21647
|
* arkcash) are excluded by default, mirroring {@link ReadonlyWallet.getVtxos}:
|
|
21352
21648
|
* they are settled in their own isolated intent and must stay out of the
|
|
21353
21649
|
* wallet's balance / VTXO / coin-selection / pending-tx views that read this.
|
|
21354
|
-
*
|
|
21355
|
-
*
|
|
21356
|
-
* directly and does include them.
|
|
21650
|
+
* Transaction history excludes them too, as does the non-worker
|
|
21651
|
+
* `getTransactionHistory`.
|
|
21357
21652
|
*/
|
|
21358
21653
|
async getVtxosFromRepo(options) {
|
|
21359
21654
|
return (await this.repoSnapshot(options)).vtxos;
|
|
@@ -21371,8 +21666,7 @@ var WalletMessageHandler = class {
|
|
|
21371
21666
|
* what it knows is closed — so the coins of a just-registered escrowed
|
|
21372
21667
|
* contract would count as available until the next poll.
|
|
21373
21668
|
*
|
|
21374
|
-
* Recovery-only contracts are skipped
|
|
21375
|
-
* {@link getVtxosFromRepo}).
|
|
21669
|
+
* Recovery-only contracts are skipped (see {@link getVtxosFromRepo}).
|
|
21376
21670
|
*/
|
|
21377
21671
|
async repoSnapshot(options = {}) {
|
|
21378
21672
|
const repository = this.walletRepository;
|
|
@@ -21396,9 +21690,7 @@ var WalletMessageHandler = class {
|
|
|
21396
21690
|
void addressPromise.catch(() => void 0);
|
|
21397
21691
|
const manager = await wallet.getContractManager();
|
|
21398
21692
|
const contracts = await manager.getContracts();
|
|
21399
|
-
const eligible = contracts.filter(
|
|
21400
|
-
(contract) => options.includeRecoveryOnly || !isRecoveryOnlyContract(contract)
|
|
21401
|
-
);
|
|
21693
|
+
const eligible = contracts.filter((contract) => !isRecoveryOnlyContract(contract));
|
|
21402
21694
|
const listsPromise = Promise.all(
|
|
21403
21695
|
eligible.map((contract) => getVtxosForContract(repository, contract, options))
|
|
21404
21696
|
);
|
|
@@ -21449,7 +21741,7 @@ var WalletMessageHandler = class {
|
|
|
21449
21741
|
async buildTransactionHistoryFromCache() {
|
|
21450
21742
|
if (!this.readonlyWallet) return null;
|
|
21451
21743
|
const [{ snapshot, vtxos }, { boardingTxs, commitmentsToIgnore }] = await Promise.all([
|
|
21452
|
-
this.repoSnapshot(
|
|
21744
|
+
this.repoSnapshot(),
|
|
21453
21745
|
this.readonlyWallet.getBoardingTxs()
|
|
21454
21746
|
]);
|
|
21455
21747
|
const indexerProvider = this.indexerProvider;
|
|
@@ -21564,6 +21856,8 @@ var DEFAULT_MESSAGE_TIMEOUTS = {
|
|
|
21564
21856
|
RECOVER_VTXOS: 5e4,
|
|
21565
21857
|
RENEW_VTXOS: 5e4,
|
|
21566
21858
|
SWEEP_EXPIRED_BOARDING_UTXOS: 5e4,
|
|
21859
|
+
// Only `get`/`activities`/`reveal`: `create` and `claim` stream with no deadline.
|
|
21860
|
+
ARKADE_CASH: 5e4,
|
|
21567
21861
|
COSIGN_ONCHAIN_TX: 5e4,
|
|
21568
21862
|
SEND_ONCHAIN: 5e4,
|
|
21569
21863
|
// Streaming/long-running like RENEW_VTXOS (rotation + settle); the value is
|
|
@@ -21723,6 +22017,28 @@ var ServiceWorkerReadonlyWallet = class _ServiceWorkerReadonlyWallet {
|
|
|
21723
22017
|
}
|
|
21724
22018
|
serviceWorker;
|
|
21725
22019
|
messageTag;
|
|
22020
|
+
arkadeCash = (request) => this.cashRequest(request);
|
|
22021
|
+
async cashRequest(request) {
|
|
22022
|
+
const message = {
|
|
22023
|
+
id: getRandomId(),
|
|
22024
|
+
tag: this.messageTag,
|
|
22025
|
+
type: "ARKADE_CASH",
|
|
22026
|
+
payload: request
|
|
22027
|
+
};
|
|
22028
|
+
try {
|
|
22029
|
+
const response = isLongRunningCashAction(request) ? await this.sendMessageWithRetry(message, {
|
|
22030
|
+
onEvent: () => {
|
|
22031
|
+
},
|
|
22032
|
+
isComplete: (resp) => resp.type === "ARKADE_CASH"
|
|
22033
|
+
}) : await this.sendMessage(message);
|
|
22034
|
+
return response.payload;
|
|
22035
|
+
} catch (error) {
|
|
22036
|
+
if (isSerializedArkadeCashCreateError(error)) {
|
|
22037
|
+
throw deserializeArkadeCashCreateError(error);
|
|
22038
|
+
}
|
|
22039
|
+
throw error;
|
|
22040
|
+
}
|
|
22041
|
+
}
|
|
21726
22042
|
walletRepository;
|
|
21727
22043
|
contractRepository;
|
|
21728
22044
|
identity;
|
|
@@ -27539,6 +27855,6 @@ function createDefaultPaymentRouter(wallet) {
|
|
|
27539
27855
|
}).use(arkRail()).use(arkAssetRail()).use(onchainRail({ feeInfo: walletFeeSource(wallet) }));
|
|
27540
27856
|
}
|
|
27541
27857
|
|
|
27542
|
-
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, AbortError, ActivityRegistry, AmbiguousRouteError, ArkNote, Arkade, ArkadeCash, ArkadeCashCreateError, ArkadeCashOperatorMismatchError, AssetManager, BATCH_REGISTRATION_TERMINAL_STATES, BIP21, BIP21Error, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, CachingArkProvider, CachingOperatorProvider, ChainedTxType, ConnectionDisposedError, ContractManager, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_PASSKEY_LABEL, DatabaseUpgradeBlockedError, DelegateManagerImpl, DelegateNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, ForeignDescriptorError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryBatchRegistrationRepository, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBBatchRegistrationRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, KeyringDescriptorProvider, MAX_PAGE_SIZE, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainCosignPreflightError, OnchainWallet, OversizedChangeError, P2A, PasskeyCancelled, PasskeyUnconfirmed, PaymentRouter, PrevTxUnavailableError, PrfUnavailable, REGTEST_MIN_BATCH_EXPIRY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestEmulatorProvider, SeedIdentity, SendDeadlineExceededError, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, StaticDescriptorProvider, TreeSignerSession, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, VtxoReservedError, Wallet2 as Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WsElectrumChainSource, adoptContractDescriptor, applyWalletStateUpdate, arkAssetRail, arkRail, arkTarget, arkade_exports, assertFinalCommitmentMatchesValidated, assertHistoryPageFilter, assertIntentIdUnique, assertNoAssets, assertNoSelection, assertPageRequest, assertRecipientArkadeAddress, assertSendDeadline, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, assetsOf, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, captureSendDeadline, checkSaveVtxosForScript, claimWithPreimageIdentity, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, collectBatchRegistrations, collectContracts, collectIntents, collectPages, collectScriptVtxos, collectTransactionHistory, collectUtxos, collectVtxos, combineTapscriptSigs, compareHistoryCursors, contractFilterMatchesNothing, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, createManagedConnection, createPrfPasskey, createdAtToIso, decodeArkContract, defaultBatchExpiryPolicy, deleteByIndex, deserializeAssets, deserializeExitPackage, deserializeUtxo, deserializeVtxo, encodeArkContract, evaluatePrf, exitObserverFor, extendVirtualCoinForContract, extractOperatorProviderUrl, gateExclusion, gatedContracts, getAllByIndexValues, getRandomId, hasBoardingTxExpired, hasCandidates, intentMatchesFilter, invoiceTarget, isAddressAllocationCapable, isArkContract, isBatchSignable, isBtcAddress, isContractGenericallySpendable, isContractVtxoEvent, isCooperativelyMigratable, isCosignFallback, isDeterministicSigner, isDiscoverable, isHDAllocationCapable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isSigningIdentity, isSubdust, isTerminalBatchRegistrationState, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, iteratePages, legacyVtxoFacts, logExcludedVtxos, makeHandle, matchServerCheckpoints, mergeChainedTxType, mnemonicFromPrf, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, pageResult, prfSupport, promisifyRequest, provisionClaimSecret, provisionRefundKey, registerWalletRestoreHook, resolveAssetAmount, resolveBatchExpiryPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, saveVtxosForContract, scopeOf, scriptFromArkAddress, selectCoinsWithAsset, selectVirtualCoins, selectionOf, serializeAssets, serializeExitPackage, serializeUtxo, serializeVtxo, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, submitViaEmulator, toXOnlySignerHex, tryResolveSendAmount, utxoEntries, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, walletFeeSource, warnAndFilterVtxosForScript, withPrevTxs };
|
|
27543
|
-
//# sourceMappingURL=chunk-
|
|
27544
|
-
//# sourceMappingURL=chunk-
|
|
27858
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, AbortError, ActivityRegistry, AmbiguousRouteError, ArkNote, Arkade, ArkadeCash, ArkadeCashCreateError, ArkadeCashOperatorMismatchError, AssetManager, BATCH_REGISTRATION_TERMINAL_STATES, BIP21, BIP21Error, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, CachingArkProvider, CachingOperatorProvider, ChainedTxType, ConnectionDisposedError, ContractManager, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_PASSKEY_LABEL, DatabaseUpgradeBlockedError, DelegateManagerImpl, DelegateNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, ForeignDescriptorError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryBatchRegistrationRepository, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBBatchRegistrationRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, KeyringDescriptorProvider, MAX_PAGE_SIZE, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainCosignPreflightError, OnchainWallet, OversizedChangeError, P2A, PasskeyCancelled, PasskeyUnconfirmed, PaymentRouter, PrevTxUnavailableError, PrfUnavailable, REGTEST_MIN_BATCH_EXPIRY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestEmulatorProvider, SeedIdentity, SendDeadlineExceededError, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, StaticDescriptorProvider, TreeSignerSession, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, VtxoReservedError, Wallet2 as Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WsElectrumChainSource, addArkadeCashRecord, adoptContractDescriptor, applyWalletStateUpdate, arkAssetRail, arkRail, arkTarget, arkadeCashId, arkadeCashResolver, arkade_exports, assertFinalCommitmentMatchesValidated, assertHistoryPageFilter, assertIntentIdUnique, assertNoAssets, assertNoSelection, assertPageRequest, assertRecipientArkadeAddress, assertSendDeadline, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, assetsOf, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, captureSendDeadline, checkSaveVtxosForScript, claimWithPreimageIdentity, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, collectBatchRegistrations, collectContracts, collectIntents, collectPages, collectScriptVtxos, collectTransactionHistory, collectUtxos, collectVtxos, combineTapscriptSigs, compareHistoryCursors, contractFilterMatchesNothing, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createArkadeCashTracker, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, createManagedConnection, createPrfPasskey, createdAtToIso, decodeArkContract, defaultBatchExpiryPolicy, deleteByIndex, deserializeAssets, deserializeExitPackage, deserializeUtxo, deserializeVtxo, encodeArkContract, evaluatePrf, exitObserverFor, extendVirtualCoinForContract, extractOperatorProviderUrl, gateExclusion, gatedContracts, getAllByIndexValues, getRandomId, hasBoardingTxExpired, hasCandidates, intentMatchesFilter, invoiceTarget, isAddressAllocationCapable, isArkContract, isBatchSignable, isBtcAddress, isContractGenericallySpendable, isContractVtxoEvent, isCooperativelyMigratable, isCosignFallback, isDeterministicSigner, isDiscoverable, isHDAllocationCapable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isSigningIdentity, isSubdust, isTerminalBatchRegistrationState, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, iteratePages, legacyVtxoFacts, logExcludedVtxos, makeHandle, matchServerCheckpoints, mergeArkadeCashRecord, mergeChainedTxType, mnemonicFromPrf, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, pageResult, prfSupport, promisifyRequest, provisionClaimSecret, provisionRefundKey, readArkadeCash, registerWalletRestoreHook, resolveAssetAmount, resolveBatchExpiryPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, saveVtxosForContract, scopeOf, scriptFromArkAddress, selectCoinsWithAsset, selectVirtualCoins, selectionOf, serializeAssets, serializeExitPackage, serializeUtxo, serializeVtxo, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, submitViaEmulator, toXOnlySignerHex, tryResolveSendAmount, utxoEntries, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, walletFeeSource, warnAndFilterVtxosForScript, withPrevTxs };
|
|
27859
|
+
//# sourceMappingURL=chunk-RLD7DRSZ.js.map
|
|
27860
|
+
//# sourceMappingURL=chunk-RLD7DRSZ.js.map
|