@arkade-os/sdk 0.4.49 → 0.4.50
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 +4 -4
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +2 -2
- package/dist/adapters/indexedDB.cjs +3 -3
- package/dist/adapters/indexedDB.js +2 -2
- package/dist/{ark-nkSiPYNf.d.cts → ark-ApoclKQZ.d.cts} +59 -52
- package/dist/{ark-nkSiPYNf.d.ts → ark-ApoclKQZ.d.ts} +59 -52
- package/dist/{asyncStorageTaskQueue-DCaEE83p.d.ts → asyncStorageTaskQueue-BCWmdVg8.d.ts} +1 -1
- package/dist/{asyncStorageTaskQueue-DdxhsEz6.d.cts → asyncStorageTaskQueue-CIjgv1co.d.cts} +1 -1
- package/dist/{chunk-2LAJ3RTH.cjs → chunk-6BQTROB4.cjs} +139 -148
- package/dist/chunk-6BQTROB4.cjs.map +1 -0
- package/dist/{chunk-BLJQV3N4.js → chunk-7WSVP7DK.js} +3 -3
- package/dist/{chunk-BLJQV3N4.js.map → chunk-7WSVP7DK.js.map} +1 -1
- package/dist/{chunk-CPO2UB7L.js → chunk-AA4Q2J57.js} +3 -3
- package/dist/{chunk-CPO2UB7L.js.map → chunk-AA4Q2J57.js.map} +1 -1
- package/dist/{chunk-6UI5BFE7.cjs → chunk-Q4K2RSMY.cjs} +7 -7
- package/dist/{chunk-6UI5BFE7.cjs.map → chunk-Q4K2RSMY.cjs.map} +1 -1
- package/dist/{chunk-QDXQULVM.cjs → chunk-SIAVTHMZ.cjs} +3 -3
- package/dist/{chunk-QDXQULVM.cjs.map → chunk-SIAVTHMZ.cjs.map} +1 -1
- package/dist/{chunk-5QVBJUOG.js → chunk-SNTSB6M2.js} +34 -43
- package/dist/chunk-SNTSB6M2.js.map +1 -0
- package/dist/{chunk-XOLH3LFO.cjs → chunk-TO3SR7TY.cjs} +11 -11
- package/dist/{chunk-XOLH3LFO.cjs.map → chunk-TO3SR7TY.cjs.map} +1 -1
- package/dist/{chunk-HN25T276.js → chunk-ZXRSSBCF.js} +3 -3
- package/dist/{chunk-HN25T276.js.map → chunk-ZXRSSBCF.js.map} +1 -1
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/{delegate-Cqqw1T1J.d.cts → delegate-CCHPwQft.d.cts} +1 -1
- package/dist/{delegate-D6Orvyq7.d.ts → delegate-hJYMZN1D.d.ts} +1 -1
- package/dist/{index-CWoogah0.d.ts → index-5Y9h9OnO.d.ts} +2 -2
- package/dist/{index-Yd4hecbM.d.cts → index-8jE1XJpT.d.cts} +2 -2
- package/dist/index.cjs +145 -145
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +2 -2
- package/dist/repositories/realm/index.cjs +17 -17
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +3 -3
- package/dist/repositories/sqlite/index.cjs +16 -16
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +3 -3
- package/dist/{taskRunner-BjB5QINR.d.cts → taskRunner-C3YLaM2x.d.cts} +1 -1
- package/dist/{taskRunner-Dw7xs60Q.d.ts → taskRunner-ChvV6Xrh.d.ts} +1 -1
- package/dist/wallet/expo/background.cjs +12 -12
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +4 -4
- package/dist/wallet/expo/index.cjs +12 -12
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +3 -3
- package/dist/{wallet-CGkWu3xV.d.cts → wallet-B260BTJs.d.cts} +2 -2
- package/dist/{wallet-DyUHrPyN.d.ts → wallet-DIH0gVfW.d.ts} +2 -2
- package/dist/worker/expo/index.cjs +7 -7
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-2LAJ3RTH.cjs.map +0 -1
- package/dist/chunk-5QVBJUOG.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transaction, setArkPsbtField, PrevArkTxField, ConditionWitness, AssetId, AssetGroup, AssetInput, AssetOutput, Metadata, Packet, craftToSpendTx, getArkPsbtFields, CosignerPublicKey, BufferReader, BufferWriter, OP_RETURN_EMPTY_PKSCRIPT, VtxoTaprootTree, baseFetch, Intent, rateGate, maybeArkError, isArkError, ArkErrorName, ProviderUnavailableError, FetchError, isFetchTimeoutError, AssetRef, isEventSourceError, RestArkProvider, RestIndexerProvider, ArkError } from './chunk-
|
|
1
|
+
import { Transaction, setArkPsbtField, PrevArkTxField, ConditionWitness, AssetId, AssetGroup, AssetInput, AssetOutput, Metadata, Packet, craftToSpendTx, getArkPsbtFields, CosignerPublicKey, BufferReader, BufferWriter, OP_RETURN_EMPTY_PKSCRIPT, VtxoTaprootTree, baseFetch, Intent, rateGate, maybeArkError, isArkError, ArkErrorName, ProviderUnavailableError, FetchError, isFetchTimeoutError, AssetRef, isEventSourceError, RestArkProvider, RestIndexerProvider, ArkError } from './chunk-AA4Q2J57.js';
|
|
2
2
|
import { witnessRefToBytes, validateProgram, toASM, stringifyArtifact, serializeArkadeContractParams, resolveAsm, parseArtifact, getOpcodeValue, getOpcodeName, fromASM, deserializeArkadeContractParams, computeArkadeScriptPublicKey, bytesToASM, asmToBytes, arkadeWitnessHash, arkadeScriptHash, SUPPORTED_PROGRAM_VERSION, OPCODE_VALUES, OPCODE_NAMES, bignum_exports, ArkadeScript, ArkadeProgramScript, ARKADE_OPS, ARKADE_OPCODE_VALUES, ARKADE_OPCODE_NAMES, ARKADE_OPCODES, ARKADE_OP, inputName, contractHandlers, isMainnetDescriptor, descriptorIsOurs, DefaultVtxo, DelegateVtxo, WALLET_RECEIVE_SOURCE, deriveDescriptorLeafPubKey, BoardingContractHandler } from './chunk-MBSYQ3WX.js';
|
|
3
3
|
import { VtxoScript, isRecoverable, CSVMultisigTapscript, DEFAULT_NETWORK, hasTerminalSpend, getNormalizedVtxos, isVirtualCoin, ArkAddress, sequenceToTimelock, decodeTapscript, scriptFromTapLeafScript, CLTVMultisigTapscript, timelockToSequence, DEFAULT_NETWORK_NAME, normalizeVtxo, getSequence, toBatchExpiry, toOffchainInputFeeParams, canRecoverOnchain, getNetwork, MultisigTapscript, getAllNormalizedVtxos, DEFAULT_PAGE_SIZE, canSpendOffchain, toVirtualStatus, resolveTimeHeight, parseLegacyExpiry, networks as networks$1, isExpired, DEFAULT_ARKADE_SERVER_URL, isPastExpiry } from './chunk-EFNLTS6Q.js';
|
|
4
4
|
import { __export } from './chunk-NSBPE2FW.js';
|
|
@@ -8114,10 +8114,10 @@ var ContractWatcher = class {
|
|
|
8114
8114
|
/**
|
|
8115
8115
|
* Add a contract to be watched.
|
|
8116
8116
|
*
|
|
8117
|
-
*
|
|
8117
|
+
* Once watching, every contract is subscribed and polled whatever
|
|
8118
|
+
* its state.
|
|
8118
8119
|
*
|
|
8119
|
-
*
|
|
8120
|
-
* (which may cause them to be watched even if inactive).
|
|
8120
|
+
* @see getWatchedContracts
|
|
8121
8121
|
*/
|
|
8122
8122
|
async addContract(contract) {
|
|
8123
8123
|
const state = {
|
|
@@ -8185,18 +8185,18 @@ var ContractWatcher = class {
|
|
|
8185
8185
|
return Array.from(this.contracts.values()).map((s) => s.contract);
|
|
8186
8186
|
}
|
|
8187
8187
|
/**
|
|
8188
|
-
*
|
|
8189
|
-
* - all active contracts, plus
|
|
8190
|
-
* - inactive contracts that still hold known virtual outputs
|
|
8191
|
-
* (the subscription keeps watching them so `vtxo_spent` events for
|
|
8192
|
-
* those unspent outputs are still observed).
|
|
8188
|
+
* Every registered contract, retired (`inactive`) ones included.
|
|
8193
8189
|
*
|
|
8194
|
-
*
|
|
8195
|
-
*
|
|
8196
|
-
*
|
|
8190
|
+
* Feeds both the subscription and the indexer sweep scope, so
|
|
8191
|
+
* narrowing it drops a contract from every background channel at
|
|
8192
|
+
* once. Nothing may be narrowed out: an Ark receive address can be
|
|
8193
|
+
* paid again after the wallet has rotated past it, and a payment
|
|
8194
|
+
* that lands outside every background channel is invisible until
|
|
8195
|
+
* some foreground read happens to sweep it. Retirement therefore
|
|
8196
|
+
* governs receive-address selection, not coverage.
|
|
8197
8197
|
*/
|
|
8198
8198
|
getWatchedContracts() {
|
|
8199
|
-
return
|
|
8199
|
+
return this.getAllContracts();
|
|
8200
8200
|
}
|
|
8201
8201
|
/**
|
|
8202
8202
|
* Get virtual outputs for contracts, grouped by contract script.
|
|
@@ -8225,7 +8225,7 @@ var ContractWatcher = class {
|
|
|
8225
8225
|
return new Map(results.flat(1));
|
|
8226
8226
|
}
|
|
8227
8227
|
/**
|
|
8228
|
-
* Start watching for virtual output events across all
|
|
8228
|
+
* Start watching for virtual output events across all watched contracts.
|
|
8229
8229
|
*/
|
|
8230
8230
|
async startWatching(callback) {
|
|
8231
8231
|
if (this.isWatching) {
|
|
@@ -8276,7 +8276,7 @@ var ContractWatcher = class {
|
|
|
8276
8276
|
return this.connectionState;
|
|
8277
8277
|
}
|
|
8278
8278
|
/**
|
|
8279
|
-
* Force a poll of all
|
|
8279
|
+
* Force a poll of all watched contracts.
|
|
8280
8280
|
* Useful for manual refresh or after app resume.
|
|
8281
8281
|
*/
|
|
8282
8282
|
async forcePoll() {
|
|
@@ -8464,7 +8464,7 @@ var ContractWatcher = class {
|
|
|
8464
8464
|
/**
|
|
8465
8465
|
* Update the subscription with scripts that should be watched.
|
|
8466
8466
|
*
|
|
8467
|
-
*
|
|
8467
|
+
* @see getWatchedContracts
|
|
8468
8468
|
*/
|
|
8469
8469
|
async updateSubscription() {
|
|
8470
8470
|
const scriptsToWatch = this.getWatchedContracts().map((c) => c.script);
|
|
@@ -8737,8 +8737,8 @@ var ContractManager = class _ContractManager {
|
|
|
8737
8737
|
* Static factory method for creating a new ContractManager.
|
|
8738
8738
|
* Initialize the manager by loading persisted contracts and starting to watch.
|
|
8739
8739
|
*
|
|
8740
|
-
* After initialization, the manager automatically watches
|
|
8741
|
-
*
|
|
8740
|
+
* After initialization, the manager automatically watches every persisted
|
|
8741
|
+
* contract. Use `onContractEvent()` to register event callbacks.
|
|
8742
8742
|
*
|
|
8743
8743
|
* @param config ContractManagerConfig
|
|
8744
8744
|
*/
|
|
@@ -9185,13 +9185,17 @@ var ContractManager = class _ContractManager {
|
|
|
9185
9185
|
return updated;
|
|
9186
9186
|
}
|
|
9187
9187
|
/**
|
|
9188
|
-
* Set a contract's state.
|
|
9188
|
+
* Set a contract's state. Retiring (`inactive`) keeps it watched;
|
|
9189
|
+
* see {@link ContractState}. To stop watching, use
|
|
9190
|
+
* {@link deleteContract}.
|
|
9189
9191
|
*/
|
|
9190
9192
|
async setContractState(script, state) {
|
|
9191
9193
|
await this.updateContract(script, { state });
|
|
9192
9194
|
}
|
|
9193
9195
|
/**
|
|
9194
|
-
* Delete a contract.
|
|
9196
|
+
* Delete a contract. Also removes it from the watcher — the only way
|
|
9197
|
+
* to stop watching a contract (retiring it via
|
|
9198
|
+
* {@link setContractState} does not).
|
|
9195
9199
|
*
|
|
9196
9200
|
* @param script - Contract script
|
|
9197
9201
|
*/
|
|
@@ -9266,22 +9270,10 @@ var ContractManager = class _ContractManager {
|
|
|
9266
9270
|
/**
|
|
9267
9271
|
* Force refresh virtual outputs from the indexer.
|
|
9268
9272
|
*
|
|
9269
|
-
* Without options, re-fetches
|
|
9270
|
-
*
|
|
9271
|
-
*
|
|
9272
|
-
*
|
|
9273
|
-
* cursor is not advanced because contracts outside the list may
|
|
9274
|
-
* have data we'd skip).
|
|
9275
|
-
*
|
|
9276
|
-
* `includeInactive: true` (and no `scripts`) widens the refresh to
|
|
9277
|
-
* every contract in the repository, including ones marked
|
|
9278
|
-
* `inactive` and ones that have dropped out of the watcher's
|
|
9279
|
-
* active set. This is a *superset* of the watched set, so the
|
|
9280
|
-
* cursor invariant still holds and the cursor advances normally.
|
|
9281
|
-
*
|
|
9282
|
-
* `after` / `before` apply a caller-supplied time window. The
|
|
9283
|
-
* cursor never advances on a windowed query because the window
|
|
9284
|
-
* may skip data outside its bounds.
|
|
9273
|
+
* Without options, re-fetches the watcher's watched set and
|
|
9274
|
+
* advances the global cursor. Each option narrows or widens that
|
|
9275
|
+
* scope and may hold the cursor back — see
|
|
9276
|
+
* {@link RefreshVtxosOptions}.
|
|
9285
9277
|
*/
|
|
9286
9278
|
async refreshVtxos(opts) {
|
|
9287
9279
|
const contracts = opts?.scripts ? await this.getContracts({ script: opts.scripts }) : void 0;
|
|
@@ -9397,11 +9389,10 @@ var ContractManager = class _ContractManager {
|
|
|
9397
9389
|
* Sync virtual outputs for the given contracts against the indexer.
|
|
9398
9390
|
*
|
|
9399
9391
|
* When `options.contracts` is omitted the sync covers the full
|
|
9400
|
-
* watched set (
|
|
9401
|
-
*
|
|
9402
|
-
*
|
|
9403
|
-
*
|
|
9404
|
-
* pick up.
|
|
9392
|
+
* watched set ({@link ContractWatcher.getWatchedContracts}) and the
|
|
9393
|
+
* global cursor is advanced on success. Passing an explicit subset
|
|
9394
|
+
* leaves the cursor alone so a narrow poll can't hide data that
|
|
9395
|
+
* other contracts still need to pick up.
|
|
9405
9396
|
*/
|
|
9406
9397
|
async syncContracts(options) {
|
|
9407
9398
|
const cursor = await getSyncCursor(this.config.walletRepository);
|
|
@@ -19887,5 +19878,5 @@ function isArkContract(str) {
|
|
|
19887
19878
|
}
|
|
19888
19879
|
|
|
19889
19880
|
export { ARKADE_MAGIC, ActivityRegistry, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP322, Batch, ChainedTxType, ContractManager, ContractRepositoryImpl, ContractWatcher, DB_VERSION, DEFAULT_MESSAGE_TIMEOUTS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet2 as Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, arkade_exports, assertIntentIdUnique, boardingResolver, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultActivityRegistry, createExitChainResolver, decodeArkContract, deserializeAssets, deserializeExitPackage, deserializeUtxo, deserializeVtxo, encodeArkContract, extendVirtualCoinForContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, intentMatchesFilter, intentPageBounds, isArkContract, isBatchSignable, isCooperativelyMigratable, isDiscoverable, isRetryableProviderError, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, isVtxoForScript, mergeChainedTxType, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, saveVtxosForContract, scriptFromArkAddress, selectCoinsWithAsset, selectVirtualCoins, serializeAssets, serializeExitPackage, serializeUtxo, serializeVtxo, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, warnAndFilterVtxosForScript };
|
|
19890
|
-
//# sourceMappingURL=chunk-
|
|
19891
|
-
//# sourceMappingURL=chunk-
|
|
19881
|
+
//# sourceMappingURL=chunk-SNTSB6M2.js.map
|
|
19882
|
+
//# sourceMappingURL=chunk-SNTSB6M2.js.map
|