@arkade-os/sdk 0.5.12 → 0.5.14
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/README.md +6 -0
- package/dist/adapters/expo.cjs +7 -7
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +4 -4
- package/dist/{asyncStorageTaskQueue-DTNS2qfN.d.cts → asyncStorageTaskQueue-DzO5SBcm.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-Bsty8W7d.d.ts → asyncStorageTaskQueue-p7zeFhA3.d.ts} +2 -2
- package/dist/{chunk-4OY5BCIE.js → chunk-4HZQSKWG.js} +628 -23
- package/dist/chunk-4HZQSKWG.js.map +1 -0
- package/dist/{chunk-4X4SY3RH.cjs → chunk-6J4GABF7.cjs} +28 -20
- package/dist/chunk-6J4GABF7.cjs.map +1 -0
- package/dist/{chunk-YAVF2PR6.cjs → chunk-6TBTL42M.cjs} +87 -2
- package/dist/chunk-6TBTL42M.cjs.map +1 -0
- package/dist/{chunk-5NY5EOS2.js → chunk-72EC3ASW.js} +4 -4
- package/dist/{chunk-5NY5EOS2.js.map → chunk-72EC3ASW.js.map} +1 -1
- package/dist/{chunk-QV7AOZZN.cjs → chunk-7LPT6AYH.cjs} +21 -21
- package/dist/{chunk-QV7AOZZN.cjs.map → chunk-7LPT6AYH.cjs.map} +1 -1
- package/dist/{chunk-JA4SYFC7.cjs → chunk-ACIQZLWL.cjs} +379 -20
- package/dist/chunk-ACIQZLWL.cjs.map +1 -0
- package/dist/{chunk-BA3GPO5C.js → chunk-AZHBGWVC.js} +5 -5
- package/dist/{chunk-BA3GPO5C.js.map → chunk-AZHBGWVC.js.map} +1 -1
- package/dist/{chunk-HNLC6F73.cjs → chunk-EVVLVFY7.cjs} +20 -20
- package/dist/{chunk-HNLC6F73.cjs.map → chunk-EVVLVFY7.cjs.map} +1 -1
- package/dist/{chunk-2YXVU5TK.js → chunk-GB67AGXG.js} +81 -3
- package/dist/chunk-GB67AGXG.js.map +1 -0
- package/dist/{chunk-WBZYYRAB.js → chunk-HWWSLCQN.js} +9724 -8151
- package/dist/chunk-HWWSLCQN.js.map +1 -0
- package/dist/{chunk-4TMJBLJT.js → chunk-J2JZZTOE.js} +20 -14
- package/dist/chunk-J2JZZTOE.js.map +1 -0
- package/dist/{chunk-3RO63OPW.js → chunk-LCGRZ24T.js} +4 -4
- package/dist/{chunk-3RO63OPW.js.map → chunk-LCGRZ24T.js.map} +1 -1
- package/dist/{chunk-CJUVKHK4.cjs → chunk-LQH7DACV.cjs} +10204 -8628
- package/dist/chunk-LQH7DACV.cjs.map +1 -0
- package/dist/{chunk-QDX2HUBK.cjs → chunk-MEIE2AEU.cjs} +11 -11
- package/dist/{chunk-QDX2HUBK.cjs.map → chunk-MEIE2AEU.cjs.map} +1 -1
- package/dist/{chunk-3ABF4EMM.js → chunk-X57WKONW.js} +369 -10
- package/dist/chunk-X57WKONW.js.map +1 -0
- package/dist/{chunk-C3NKBKRY.cjs → chunk-XZHTYYW5.cjs} +680 -68
- package/dist/chunk-XZHTYYW5.cjs.map +1 -0
- package/dist/compiler.cjs +3 -4
- package/dist/compiler.cjs.map +1 -1
- package/dist/compiler.d.cts +1 -1
- package/dist/compiler.d.ts +1 -1
- package/dist/compiler.js +2 -3
- package/dist/compiler.js.map +1 -1
- package/dist/contracts/handlers/index.cjs +15 -11
- package/dist/contracts/handlers/index.d.cts +5 -5
- package/dist/contracts/handlers/index.d.ts +5 -5
- package/dist/contracts/handlers/index.js +4 -4
- package/dist/{index-D_zLtU-F.d.ts → index-CaOBA9Ev.d.ts} +2 -2
- package/dist/{index-BBmZXXqk.d.cts → index-Cy57QdcL.d.cts} +589 -23
- package/dist/{index-DJ32LpfD.d.ts → index-Db5qzYRi.d.ts} +589 -23
- package/dist/{index-DenQfCn1.d.cts → index-Lq_u0hqj.d.cts} +2 -2
- package/dist/index.cjs +403 -368
- package/dist/index.d.cts +197 -117
- package/dist/index.d.ts +197 -117
- package/dist/index.js +6 -7
- package/dist/{program-DPzf5qsk.d.cts → program-ZWUAWy_9.d.cts} +1 -1
- package/dist/{program-38A2Twvj.d.ts → program-zdDO4cMt.d.ts} +1 -1
- package/dist/repositories/realm/index.cjs +39 -40
- package/dist/repositories/realm/index.cjs.map +1 -1
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +7 -8
- package/dist/repositories/realm/index.js.map +1 -1
- package/dist/repositories/sqlite/index.cjs +37 -38
- package/dist/repositories/sqlite/index.cjs.map +1 -1
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +7 -8
- package/dist/repositories/sqlite/index.js.map +1 -1
- package/dist/{taskRunner-BBGaN4cq.d.cts → taskRunner-DhZ-KQBW.d.cts} +2 -2
- package/dist/{taskRunner-Cck24OnC.d.ts → taskRunner-amPuilMW.d.ts} +2 -2
- package/dist/wallet/expo/background.cjs +16 -17
- package/dist/wallet/expo/background.cjs.map +1 -1
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +8 -9
- package/dist/wallet/expo/background.js.map +1 -1
- package/dist/wallet/expo/index.cjs +17 -18
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +2 -2
- package/dist/wallet/expo/index.d.ts +2 -2
- package/dist/wallet/expo/index.js +7 -8
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/worker/expo/index.cjs +11 -12
- package/dist/worker/expo/index.cjs.map +1 -1
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +7 -8
- package/dist/worker/expo/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2YXVU5TK.js.map +0 -1
- package/dist/chunk-3ABF4EMM.js.map +0 -1
- package/dist/chunk-4OY5BCIE.js.map +0 -1
- package/dist/chunk-4TMJBLJT.js.map +0 -1
- package/dist/chunk-4X4SY3RH.cjs.map +0 -1
- package/dist/chunk-C3NKBKRY.cjs.map +0 -1
- package/dist/chunk-CJUVKHK4.cjs.map +0 -1
- package/dist/chunk-JA4SYFC7.cjs.map +0 -1
- package/dist/chunk-PHOJF7OK.cjs +0 -376
- package/dist/chunk-PHOJF7OK.cjs.map +0 -1
- package/dist/chunk-UXLETBNK.js +0 -373
- package/dist/chunk-UXLETBNK.js.map +0 -1
- package/dist/chunk-WBZYYRAB.js.map +0 -1
- package/dist/chunk-YAVF2PR6.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
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, IndexedDBVtxoReservationRepository, 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, Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WsElectrumChainSource, addArkadeCashRecord, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, arkade_exports as arkade, arkadeCashId, arkadeCashResolver, assertFinalCommitmentMatchesValidated, assertNoAssets, assertNoSelection, assertPageRequest, assertRecipientArkadeAddress, assertSendDeadline, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, assetsOf, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, captureSendDeadline, claimWithPreimageIdentity,
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export { ArkAddress, BITCOIN_EMULATOR_PUBKEY, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, DEFAULT_ARKADE_EMULATOR_URL, MUTINYNET_EMULATOR_PUBKEY, MultisigTapscript, REGTEST_EMULATOR_PUBKEY, TapTreeCoder, VtxoScript, assembleBtcdTaprootTree, decodeTapscript, defaultEmulatorPubkey, getNetwork, getSequence, networkFromArkadeInfo, networkFromOperatorInfo, networks, resolveEmulatorPubkey, scriptFromTapLeafScript, sequenceToTimelock, timelockToSequence } from './chunk-2YXVU5TK.js';
|
|
1
|
+
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, DELEGATION_EXPIRES_KEY, DELEGATION_LOCAL_STATUS, DELEGATION_REGISTERED_KEY, DELEGATION_STATUS_KEY, DatabaseUpgradeBlockedError, DelegateManagerImpl, DelegateNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, ExecutorManagerImpl, ExecutorRequestError, Extension, ExtensionNotFoundError, ForeignDescriptorError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryBatchRegistrationRepository, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBBatchRegistrationRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBVtxoReservationRepository, 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, RestExecutorProvider, SeedIdentity, SendDeadlineExceededError, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, StaticDescriptorProvider, TreeSignerSession, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, VtxoReservedError, Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WsElectrumChainSource, addArkadeCashRecord, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, arkade_exports as arkade, arkadeCashId, arkadeCashResolver, assertFinalCommitmentMatchesValidated, assertNoAssets, assertNoSelection, assertPageRequest, assertRecipientArkadeAddress, assertSendDeadline, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, assetsOf, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, captureSendDeadline, claimWithPreimageIdentity, classifyBoardingExpiry, closeDatabase, collabExitResolver, collectBatchRegistrations, collectContracts, collectIntents, collectPages, collectScriptVtxos, collectTransactionHistory, collectUtxos, collectVtxos, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createArkadeCashTracker, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, createManagedConnection, createPrfPasskey, decodeArkContract, decodeBoardingExit, defaultBatchExpiryPolicy, deleteByIndex, deserializeExitPackage, encodeArkContract, evaluatePrf, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isAddressAllocationCapable, isArkContract, isBatchSignable, isBtcAddress, isContractGenericallySpendable, isContractVtxoEvent, isCosignFallback, isDeterministicSigner, isDiscoverable, isHDAllocationCapable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isSigningIdentity, isSubdust, isTerminalBatchRegistrationState, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, iteratePages, logExcludedVtxos, makeHandle, matchServerCheckpoints, mergeArkadeCashRecord, mnemonicFromPrf, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, pageResult, prfSupport, promisifyRequest, provisionClaimSecret, provisionRefundKey, readArkadeCash, registerWalletRestoreHook, resolveAssetAmount, resolveBatchExpiryPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, selectCoinsWithAsset, selectVirtualCoins, selectionOf, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signingDescriptorIndex, strictSigningDescriptorIndex, submitViaEmulator, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, walletFeeSource, watchExecutorContracts, withPrevTxs } from './chunk-HWWSLCQN.js';
|
|
2
|
+
export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, IndexerUtxosUnsupportedError, RestIndexerProvider, asset_exports as asset } from './chunk-72EC3ASW.js';
|
|
3
|
+
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, ExecutorContractHandler, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor } from './chunk-4HZQSKWG.js';
|
|
4
|
+
export { UnsupportedProgramVersionError } from './chunk-X57WKONW.js';
|
|
5
|
+
export { ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ConditionWitness, CosignerPublicKey, DigestMismatchError, EventSourceUnavailableError, FetchError, HttpResponseError, Intent, OnchainCosignAmbiguousError, OnchainCosignRejectedError, OnchainCosignUnsupportedError, PrevArkTxField, PrevoutTxField, Proof, ProviderUnavailableError, READ_TIMEOUT_MS, RestArkProvider, RestOperatorProvider, ServerResponseMismatchError, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, assertAllowedSighashTypes, assertNonNegativeMs, assertTimerMs, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNormalizedVtxos, isArkError, isEventSourceUnavailableError, isPastExpiry, isRetryableProviderError, isVirtualCoin, isVtxoSpent, maybeArkError, resolveEventSource, sdkVersion, setArkPsbtField, toOffchainInputFeeParams } from './chunk-J2JZZTOE.js';
|
|
6
|
+
export { ArkAddress, BITCOIN_EMULATOR_PUBKEY, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, DEFAULT_ARKADE_EMULATOR_URL, MUTINYNET_EMULATOR_PUBKEY, MultisigTapscript, REGTEST_EMULATOR_PUBKEY, TapTreeCoder, VtxoScript, assembleBtcdTaprootTree, classifyAgainstSignerSet, classifyContractSigner, decodeTapscript, defaultEmulatorPubkey, getNetwork, getSequence, isCooperativelyMigratable, networkFromArkadeInfo, networkFromOperatorInfo, networks, resolveEmulatorPubkey, scriptFromTapLeafScript, sequenceToTimelock, signerSetFromInfo, timelockToSequence, toXOnly, toXOnlySignerHex } from './chunk-GB67AGXG.js';
|
|
8
7
|
//# sourceMappingURL=index.js.map
|
|
9
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -285,4 +285,4 @@ declare function serializeArkadeContractParams(typed: ArkadeContractParams): Rec
|
|
|
285
285
|
/** Parse the string map persisted in `Contract.params` back into typed params. */
|
|
286
286
|
declare function deserializeArkadeContractParams(params: Record<string, string>): ArkadeContractParams;
|
|
287
287
|
|
|
288
|
-
export { type ArkadeArgValue as A, type CompiledProgramFunction as C, type InputDef as I, type Program as P, type SourceRange as S, type TapscriptSegment as T, UnsupportedProgramVersionError as U, type WitnessRef as W, ArkadeProgramScript as a, type ProgramKeys as b, type ArkadeParamValue as c, type ArkadeFunction as d, type ArkadeValueType as e, type ArkadeArgType as f, type ArkadeContractParams as g, type ArkadeSegment as h, type AsmToken as i, type InputRef as j,
|
|
288
|
+
export { type ArkadeArgValue as A, type CompiledProgramFunction as C, type InputDef as I, type Program as P, type SourceRange as S, type TapscriptSegment as T, UnsupportedProgramVersionError as U, type WitnessRef as W, ArkadeProgramScript as a, type ProgramKeys as b, type ArkadeParamValue as c, type ArkadeFunction as d, type ArkadeValueType as e, type ArkadeArgType as f, type ArkadeContractParams as g, type ArkadeSegment as h, type AsmToken as i, type InputRef as j, type SignerRef as k, type TweakedSigner as l, SUPPORTED_PROGRAM_VERSION as m, deserializeArkadeContractParams as n, stringifyArtifact as o, parseArtifact as p, resolveAsm as r, serializeArkadeContractParams as s, validateProgram as v, witnessRefToBytes as w };
|
|
@@ -285,4 +285,4 @@ declare function serializeArkadeContractParams(typed: ArkadeContractParams): Rec
|
|
|
285
285
|
/** Parse the string map persisted in `Contract.params` back into typed params. */
|
|
286
286
|
declare function deserializeArkadeContractParams(params: Record<string, string>): ArkadeContractParams;
|
|
287
287
|
|
|
288
|
-
export { type ArkadeArgValue as A, type CompiledProgramFunction as C, type InputDef as I, type Program as P, type SourceRange as S, type TapscriptSegment as T, UnsupportedProgramVersionError as U, type WitnessRef as W, ArkadeProgramScript as a, type ProgramKeys as b, type ArkadeParamValue as c, type ArkadeFunction as d, type ArkadeValueType as e, type ArkadeArgType as f, type ArkadeContractParams as g, type ArkadeSegment as h, type AsmToken as i, type InputRef as j,
|
|
288
|
+
export { type ArkadeArgValue as A, type CompiledProgramFunction as C, type InputDef as I, type Program as P, type SourceRange as S, type TapscriptSegment as T, UnsupportedProgramVersionError as U, type WitnessRef as W, ArkadeProgramScript as a, type ProgramKeys as b, type ArkadeParamValue as c, type ArkadeFunction as d, type ArkadeValueType as e, type ArkadeArgType as f, type ArkadeContractParams as g, type ArkadeSegment as h, type AsmToken as i, type InputRef as j, type SignerRef as k, type TweakedSigner as l, SUPPORTED_PROGRAM_VERSION as m, deserializeArkadeContractParams as n, stringifyArtifact as o, parseArtifact as p, resolveAsm as r, serializeArkadeContractParams as s, validateProgram as v, witnessRefToBytes as w };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
8
|
-
|
|
9
|
-
require('../../chunk-YAVF2PR6.cjs');
|
|
3
|
+
var chunkLQH7DACV_cjs = require('../../chunk-LQH7DACV.cjs');
|
|
4
|
+
require('../../chunk-7LPT6AYH.cjs');
|
|
5
|
+
require('../../chunk-XZHTYYW5.cjs');
|
|
6
|
+
require('../../chunk-ACIQZLWL.cjs');
|
|
7
|
+
var chunk6J4GABF7_cjs = require('../../chunk-6J4GABF7.cjs');
|
|
8
|
+
require('../../chunk-6TBTL42M.cjs');
|
|
10
9
|
|
|
11
10
|
// src/repositories/realm/walletRepository.ts
|
|
12
11
|
var RealmWalletRepository = class {
|
|
@@ -42,7 +41,7 @@ var RealmWalletRepository = class {
|
|
|
42
41
|
await this.ensureInit();
|
|
43
42
|
this.realm.write(() => {
|
|
44
43
|
for (const vtxo of vtxos) {
|
|
45
|
-
const s =
|
|
44
|
+
const s = chunkLQH7DACV_cjs.serializeVtxo(vtxo);
|
|
46
45
|
this.realm.create(
|
|
47
46
|
"ArkVtxo",
|
|
48
47
|
{
|
|
@@ -57,7 +56,7 @@ var RealmWalletRepository = class {
|
|
|
57
56
|
intentCb: s.intentTapLeafScript.cb,
|
|
58
57
|
intentS: s.intentTapLeafScript.s,
|
|
59
58
|
statusJson: JSON.stringify(s.status),
|
|
60
|
-
createdAt:
|
|
59
|
+
createdAt: chunkLQH7DACV_cjs.createdAtToIso(s.createdAt),
|
|
61
60
|
isUnrolled: s.isUnrolled ?? false,
|
|
62
61
|
isSpent: s.isSpent === void 0 ? null : s.isSpent,
|
|
63
62
|
isSwept: s.isSwept === void 0 ? null : s.isSwept,
|
|
@@ -81,7 +80,7 @@ var RealmWalletRepository = class {
|
|
|
81
80
|
return this.deleteWhere("ArkVtxo", "address", address);
|
|
82
81
|
}
|
|
83
82
|
async getVtxosForScriptPage(script, page, options) {
|
|
84
|
-
|
|
83
|
+
chunkLQH7DACV_cjs.assertPageRequest(page);
|
|
85
84
|
await this.ensureInit();
|
|
86
85
|
let results = this.realm.objects("ArkVtxo").filtered("script == $0", script);
|
|
87
86
|
if (options?.unspentOnly) {
|
|
@@ -108,15 +107,15 @@ var RealmWalletRepository = class {
|
|
|
108
107
|
rows.push({ address: row.address, vtxo: vtxoObjectToDomain(row) });
|
|
109
108
|
if (rows.length > page.limit) break;
|
|
110
109
|
}
|
|
111
|
-
const result =
|
|
110
|
+
const result = chunkLQH7DACV_cjs.pageResult(rows, page.limit, (row) => ({
|
|
112
111
|
address: row.address,
|
|
113
112
|
txid: row.vtxo.txid,
|
|
114
113
|
vout: row.vtxo.vout
|
|
115
114
|
}));
|
|
116
|
-
return options?.unspentOnly ? { ...result, items: result.items.filter((row) => !
|
|
115
|
+
return options?.unspentOnly ? { ...result, items: result.items.filter((row) => !chunk6J4GABF7_cjs.isVtxoSpent(row.vtxo)) } : result;
|
|
117
116
|
}
|
|
118
117
|
async saveVtxosForScript(key, vtxos) {
|
|
119
|
-
return this.saveVtxos(
|
|
118
|
+
return this.saveVtxos(chunkLQH7DACV_cjs.checkSaveVtxosForScript("RealmWalletRepository", key, vtxos), vtxos);
|
|
120
119
|
}
|
|
121
120
|
async deleteVtxosForScript(script) {
|
|
122
121
|
return this.deleteWhere("ArkVtxo", "script", script);
|
|
@@ -126,7 +125,7 @@ var RealmWalletRepository = class {
|
|
|
126
125
|
return this.pageByAddress("ArkUtxo", address, page, utxoObjectToDomain);
|
|
127
126
|
}
|
|
128
127
|
async pageByAddress(schema, address, page, deserialize) {
|
|
129
|
-
|
|
128
|
+
chunkLQH7DACV_cjs.assertPageRequest(page);
|
|
130
129
|
await this.ensureInit();
|
|
131
130
|
let results = this.realm.objects(schema).filtered("address == $0", address);
|
|
132
131
|
if (page.after) {
|
|
@@ -144,18 +143,18 @@ var RealmWalletRepository = class {
|
|
|
144
143
|
rows.push({ key: { txid: row.txid, vout: row.vout }, item: deserialize(row) });
|
|
145
144
|
if (rows.length > page.limit) break;
|
|
146
145
|
}
|
|
147
|
-
const result =
|
|
146
|
+
const result = chunkLQH7DACV_cjs.pageResult(rows, page.limit, (row) => row.key);
|
|
148
147
|
return { items: result.items.map((row) => row.item), nextCursor: result.nextCursor };
|
|
149
148
|
}
|
|
150
149
|
async saveUtxos(addressOrBatch, utxos) {
|
|
151
150
|
await this.ensureInit();
|
|
152
|
-
const rows =
|
|
151
|
+
const rows = chunkLQH7DACV_cjs.utxoEntries(addressOrBatch, utxos).flatMap(
|
|
153
152
|
([address, list]) => list.map((utxo) => ({ address, utxo }))
|
|
154
153
|
);
|
|
155
154
|
if (rows.length === 0) return;
|
|
156
155
|
this.realm.write(() => {
|
|
157
156
|
for (const { address, utxo } of rows) {
|
|
158
|
-
const s =
|
|
157
|
+
const s = chunkLQH7DACV_cjs.serializeUtxo(utxo);
|
|
159
158
|
this.realm.create(
|
|
160
159
|
"ArkUtxo",
|
|
161
160
|
{
|
|
@@ -182,8 +181,8 @@ var RealmWalletRepository = class {
|
|
|
182
181
|
}
|
|
183
182
|
// ── Transaction history ────────────────────────────────────────────
|
|
184
183
|
async getTransactionHistoryPage(filter, page) {
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
chunkLQH7DACV_cjs.assertPageRequest(page);
|
|
185
|
+
chunkLQH7DACV_cjs.assertHistoryPageFilter(filter);
|
|
187
186
|
let results = this.realm.objects("ArkTransaction").filtered("address == $0", filter.address);
|
|
188
187
|
results = results.filtered(
|
|
189
188
|
"createdAt >= $0",
|
|
@@ -197,12 +196,12 @@ var RealmWalletRepository = class {
|
|
|
197
196
|
["arkTxid", false]
|
|
198
197
|
])) {
|
|
199
198
|
const tx = txObjectToDomain(row);
|
|
200
|
-
if (page.after !== void 0 &&
|
|
199
|
+
if (page.after !== void 0 && chunkLQH7DACV_cjs.compareHistoryCursors({ createdAt: tx.createdAt, key: tx.key }, page.after) <= 0)
|
|
201
200
|
continue;
|
|
202
201
|
rows.push(tx);
|
|
203
202
|
if (rows.length > page.limit) break;
|
|
204
203
|
}
|
|
205
|
-
return
|
|
204
|
+
return chunkLQH7DACV_cjs.pageResult(rows, page.limit, (tx) => ({ createdAt: tx.createdAt, key: tx.key }));
|
|
206
205
|
}
|
|
207
206
|
async saveTransactions(address, txs) {
|
|
208
207
|
await this.ensureInit();
|
|
@@ -220,7 +219,7 @@ var RealmWalletRepository = class {
|
|
|
220
219
|
amount: tx.amount,
|
|
221
220
|
settled: tx.settled,
|
|
222
221
|
createdAt: tx.createdAt,
|
|
223
|
-
assetsJson: tx.assets ? JSON.stringify(
|
|
222
|
+
assetsJson: tx.assets ? JSON.stringify(chunkLQH7DACV_cjs.serializeAssets(tx.assets)) : null
|
|
224
223
|
},
|
|
225
224
|
"modified"
|
|
226
225
|
);
|
|
@@ -250,7 +249,7 @@ var RealmWalletRepository = class {
|
|
|
250
249
|
settings: row.settingsJson ? JSON.parse(row.settingsJson) : void 0,
|
|
251
250
|
lastSyncTime: row.lastSyncTime ?? void 0
|
|
252
251
|
} : {};
|
|
253
|
-
const state =
|
|
252
|
+
const state = chunkLQH7DACV_cjs.applyWalletStateUpdate(current, updater);
|
|
254
253
|
this.realm.create(
|
|
255
254
|
"ArkWalletState",
|
|
256
255
|
{
|
|
@@ -322,9 +321,9 @@ function vtxoObjectToDomain(obj) {
|
|
|
322
321
|
// Post-migration every row has `script`, but the backfill is
|
|
323
322
|
// idempotent: derive from `address` if the legacy column is still
|
|
324
323
|
// null (e.g. the migration hasn't run yet on this handle).
|
|
325
|
-
script: obj.script ??
|
|
324
|
+
script: obj.script ?? chunkLQH7DACV_cjs.scriptFromArkAddress(obj.address)
|
|
326
325
|
};
|
|
327
|
-
return
|
|
326
|
+
return chunkLQH7DACV_cjs.deserializeVtxo(serialized);
|
|
328
327
|
}
|
|
329
328
|
function utxoObjectToDomain(obj) {
|
|
330
329
|
const serialized = {
|
|
@@ -343,7 +342,7 @@ function utxoObjectToDomain(obj) {
|
|
|
343
342
|
status: JSON.parse(obj.statusJson),
|
|
344
343
|
extraWitness: obj.extraWitnessJson ? JSON.parse(obj.extraWitnessJson) : void 0
|
|
345
344
|
};
|
|
346
|
-
return
|
|
345
|
+
return chunkLQH7DACV_cjs.deserializeUtxo(serialized);
|
|
347
346
|
}
|
|
348
347
|
function txObjectToDomain(obj) {
|
|
349
348
|
const tx = {
|
|
@@ -358,7 +357,7 @@ function txObjectToDomain(obj) {
|
|
|
358
357
|
createdAt: obj.createdAt
|
|
359
358
|
};
|
|
360
359
|
if (obj.assetsJson) {
|
|
361
|
-
tx.assets =
|
|
360
|
+
tx.assets = chunkLQH7DACV_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
|
|
362
361
|
}
|
|
363
362
|
return tx;
|
|
364
363
|
}
|
|
@@ -384,9 +383,9 @@ var RealmContractRepository = class {
|
|
|
384
383
|
}
|
|
385
384
|
// ── Contract management ────────────────────────────────────────────
|
|
386
385
|
async getContractsPage(filter, page) {
|
|
387
|
-
|
|
388
|
-
if (
|
|
389
|
-
const toPage = (rows) =>
|
|
386
|
+
chunkLQH7DACV_cjs.assertPageRequest(page);
|
|
387
|
+
if (chunkLQH7DACV_cjs.contractFilterMatchesNothing(filter)) return { items: [] };
|
|
388
|
+
const toPage = (rows) => chunkLQH7DACV_cjs.pageResult(rows.map(contractObjectToDomain), page.limit, (contract) => contract.script);
|
|
390
389
|
if (filter?.watch === void 0 || filter.script !== void 0) {
|
|
391
390
|
return toPage(this.readRows(filter, page));
|
|
392
391
|
}
|
|
@@ -420,7 +419,7 @@ var RealmContractRepository = class {
|
|
|
420
419
|
if (query) results = results.filtered(query, ...args);
|
|
421
420
|
const rows = [];
|
|
422
421
|
for (const row of results.sorted("script")) {
|
|
423
|
-
if (filter?.scope !== void 0 && ![filter.scope].flat().includes(
|
|
422
|
+
if (filter?.scope !== void 0 && ![filter.scope].flat().includes(chunkLQH7DACV_cjs.scopeOf(contractObjectToDomain(row))))
|
|
424
423
|
continue;
|
|
425
424
|
rows.push(row);
|
|
426
425
|
if (rows.length > page.limit) break;
|
|
@@ -550,7 +549,7 @@ var RealmBatchRegistrationRepository = class {
|
|
|
550
549
|
const clashes = [
|
|
551
550
|
...this.realm.objects("ArkIntent").filtered("intentId == $0", intent.registrationId)
|
|
552
551
|
].map(toIntent);
|
|
553
|
-
|
|
552
|
+
chunkLQH7DACV_cjs.assertIntentIdUnique(intent, clashes);
|
|
554
553
|
}
|
|
555
554
|
this.realm.create(
|
|
556
555
|
"ArkIntent",
|
|
@@ -578,22 +577,22 @@ var RealmBatchRegistrationRepository = class {
|
|
|
578
577
|
});
|
|
579
578
|
}
|
|
580
579
|
async getBatchRegistrationsPage(filter, page) {
|
|
581
|
-
|
|
580
|
+
chunkLQH7DACV_cjs.assertPageRequest(page);
|
|
582
581
|
let results = this.realm.objects("ArkIntent");
|
|
583
582
|
if (page.after !== void 0) results = results.filtered("intentTxId > $0", page.after);
|
|
584
583
|
const rows = [];
|
|
585
584
|
for (const row of results.sorted("intentTxId")) {
|
|
586
585
|
const intent = toIntent(row);
|
|
587
|
-
if (filter && !
|
|
586
|
+
if (filter && !chunkLQH7DACV_cjs.intentMatchesFilter(intent, filter)) continue;
|
|
588
587
|
rows.push(intent);
|
|
589
588
|
if (rows.length > page.limit) break;
|
|
590
589
|
}
|
|
591
|
-
return
|
|
590
|
+
return chunkLQH7DACV_cjs.pageResult(rows, page.limit, (intent) => intent.proofTxId);
|
|
592
591
|
}
|
|
593
592
|
async getLockedVtxoOutpoints() {
|
|
594
593
|
const out = [];
|
|
595
594
|
for (const o of [...this.realm.objects("ArkIntent")].map(toIntent))
|
|
596
|
-
if (!
|
|
595
|
+
if (!chunkLQH7DACV_cjs.isTerminalBatchRegistrationState(o.state)) out.push(...o.proofInputs);
|
|
597
596
|
return out;
|
|
598
597
|
}
|
|
599
598
|
/** @deprecated Use {@link saveBatchRegistration}. */
|
|
@@ -644,7 +643,7 @@ var RealmVirtualTxRepository = class {
|
|
|
644
643
|
txid: t.txid,
|
|
645
644
|
psbt: t.psbt ?? prev?.psbt ?? null,
|
|
646
645
|
expiresAt: t.expiresAt ?? prev?.expiresAt ?? null,
|
|
647
|
-
type:
|
|
646
|
+
type: chunkLQH7DACV_cjs.mergeChainedTxType(t.type, prev?.type)
|
|
648
647
|
},
|
|
649
648
|
"modified"
|
|
650
649
|
);
|
|
@@ -890,9 +889,9 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
890
889
|
for (let i = 0; i < newVtxos.length; i++) {
|
|
891
890
|
const newVtxo = newVtxos[i];
|
|
892
891
|
if (!newVtxo.script) {
|
|
893
|
-
newVtxo.script =
|
|
892
|
+
newVtxo.script = chunkLQH7DACV_cjs.scriptFromArkAddress(newVtxo.address);
|
|
894
893
|
}
|
|
895
|
-
const facts =
|
|
894
|
+
const facts = chunkLQH7DACV_cjs.legacyVtxoFacts(legacyByPk.get(newVtxo.pk));
|
|
896
895
|
if (facts) {
|
|
897
896
|
if (newVtxo.isSpent == null) newVtxo.isSpent = facts.isSpent;
|
|
898
897
|
if (newVtxo.isSwept == null) newVtxo.isSwept = facts.isSwept;
|
|
@@ -922,7 +921,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
922
921
|
|
|
923
922
|
Object.defineProperty(exports, "ChainedTxType", {
|
|
924
923
|
enumerable: true,
|
|
925
|
-
get: function () { return
|
|
924
|
+
get: function () { return chunkLQH7DACV_cjs.ChainedTxType; }
|
|
926
925
|
});
|
|
927
926
|
exports.ARK_REALM_SCHEMA_VERSION = ARK_REALM_SCHEMA_VERSION;
|
|
928
927
|
exports.ArkExperimentalRealmSchemas = ArkExperimentalRealmSchemas;
|