@arkade-os/sdk 0.4.67 → 0.4.68

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.
Files changed (78) hide show
  1. package/README.md +5 -0
  2. package/dist/adapters/expo.cjs +5 -5
  3. package/dist/adapters/expo.d.cts +2 -2
  4. package/dist/adapters/expo.d.ts +2 -2
  5. package/dist/adapters/expo.js +3 -3
  6. package/dist/adapters/indexedDB.cjs +5 -5
  7. package/dist/adapters/indexedDB.js +4 -4
  8. package/dist/{asyncStorageTaskQueue-LTpeXYaD.d.cts → asyncStorageTaskQueue-B2CcXIHU.d.cts} +2 -2
  9. package/dist/{asyncStorageTaskQueue-Za-e_zMk.d.ts → asyncStorageTaskQueue-DaZlVTbM.d.ts} +2 -2
  10. package/dist/{chunk-X3VEMUVV.js → chunk-33Q2RFET.js} +3 -3
  11. package/dist/{chunk-X3VEMUVV.js.map → chunk-33Q2RFET.js.map} +1 -1
  12. package/dist/{chunk-6TAQF6EV.js → chunk-45FKMOJH.js} +72 -120
  13. package/dist/chunk-45FKMOJH.js.map +1 -0
  14. package/dist/{chunk-3WIWNE4P.js → chunk-4CMXV5SF.js} +16 -4
  15. package/dist/chunk-4CMXV5SF.js.map +1 -0
  16. package/dist/{chunk-YDRZDZPP.cjs → chunk-4KCVS4ZN.cjs} +10 -10
  17. package/dist/{chunk-YDRZDZPP.cjs.map → chunk-4KCVS4ZN.cjs.map} +1 -1
  18. package/dist/{chunk-OIZ2V2VD.cjs → chunk-6YUACVX4.cjs} +118 -166
  19. package/dist/chunk-6YUACVX4.cjs.map +1 -0
  20. package/dist/{chunk-2JV4VQ7C.cjs → chunk-EJOFL5WH.cjs} +17 -3
  21. package/dist/chunk-EJOFL5WH.cjs.map +1 -0
  22. package/dist/{chunk-MZFUZUTQ.js → chunk-G4I6PU5H.js} +4 -4
  23. package/dist/{chunk-MZFUZUTQ.js.map → chunk-G4I6PU5H.js.map} +1 -1
  24. package/dist/{chunk-EALWOVHK.js → chunk-GQ4NMQGR.js} +4 -4
  25. package/dist/{chunk-EALWOVHK.js.map → chunk-GQ4NMQGR.js.map} +1 -1
  26. package/dist/{chunk-R2YAMONM.cjs → chunk-JGMSZIE4.cjs} +17 -17
  27. package/dist/{chunk-R2YAMONM.cjs.map → chunk-JGMSZIE4.cjs.map} +1 -1
  28. package/dist/{chunk-CO3KKSWM.cjs → chunk-PJR63FTK.cjs} +17 -17
  29. package/dist/{chunk-CO3KKSWM.cjs.map → chunk-PJR63FTK.cjs.map} +1 -1
  30. package/dist/{chunk-AEWJU6NZ.js → chunk-VBHXBI7F.js} +59 -23
  31. package/dist/chunk-VBHXBI7F.js.map +1 -0
  32. package/dist/{chunk-MJUTO3PY.cjs → chunk-WCJVKFAP.cjs} +480 -444
  33. package/dist/chunk-WCJVKFAP.cjs.map +1 -0
  34. package/dist/contracts/handlers/index.cjs +9 -9
  35. package/dist/contracts/handlers/index.d.cts +3 -3
  36. package/dist/contracts/handlers/index.d.ts +3 -3
  37. package/dist/contracts/handlers/index.js +2 -2
  38. package/dist/{delegate-cdmzb2f9.d.ts → delegate-AomVWxO_.d.ts} +1 -1
  39. package/dist/{delegate-Bz2e2zXY.d.cts → delegate-Bffc5f54.d.cts} +1 -1
  40. package/dist/{hdWalletCapable-BSjuUYOO.d.cts → hdWalletCapable-B5nRs3RH.d.cts} +2 -2
  41. package/dist/{hdWalletCapable-Hi12xjCJ.d.ts → hdWalletCapable-DZdIVa23.d.ts} +2 -2
  42. package/dist/{index-DU5o_hz7.d.cts → index-C7RZCfoY.d.cts} +17 -1
  43. package/dist/{index-DU5o_hz7.d.ts → index-C7RZCfoY.d.ts} +17 -1
  44. package/dist/{index-BiACuWaf.d.ts → index-jouvy8FD.d.ts} +96 -119
  45. package/dist/{index-D2GjZxBr.d.cts → index-nfyQM33h.d.cts} +96 -119
  46. package/dist/index.cjs +293 -289
  47. package/dist/index.d.cts +12 -8
  48. package/dist/index.d.ts +12 -8
  49. package/dist/index.js +4 -4
  50. package/dist/repositories/realm/index.cjs +19 -19
  51. package/dist/repositories/realm/index.d.cts +2 -2
  52. package/dist/repositories/realm/index.d.ts +2 -2
  53. package/dist/repositories/realm/index.js +5 -5
  54. package/dist/repositories/sqlite/index.cjs +18 -18
  55. package/dist/repositories/sqlite/index.d.cts +2 -2
  56. package/dist/repositories/sqlite/index.d.ts +2 -2
  57. package/dist/repositories/sqlite/index.js +5 -5
  58. package/dist/{taskRunner-BZJMLQ6g.d.cts → taskRunner-D2vnpPBT.d.cts} +2 -2
  59. package/dist/{taskRunner-DATaRQus.d.ts → taskRunner-DuwK9t8O.d.ts} +2 -2
  60. package/dist/wallet/expo/background.cjs +14 -14
  61. package/dist/wallet/expo/background.d.cts +3 -3
  62. package/dist/wallet/expo/background.d.ts +3 -3
  63. package/dist/wallet/expo/background.js +6 -6
  64. package/dist/wallet/expo/index.cjs +14 -14
  65. package/dist/wallet/expo/index.d.cts +4 -4
  66. package/dist/wallet/expo/index.d.ts +4 -4
  67. package/dist/wallet/expo/index.js +5 -5
  68. package/dist/worker/expo/index.cjs +9 -9
  69. package/dist/worker/expo/index.d.cts +4 -4
  70. package/dist/worker/expo/index.d.ts +4 -4
  71. package/dist/worker/expo/index.js +5 -5
  72. package/package.json +1 -1
  73. package/dist/chunk-2JV4VQ7C.cjs.map +0 -1
  74. package/dist/chunk-3WIWNE4P.js.map +0 -1
  75. package/dist/chunk-6TAQF6EV.js.map +0 -1
  76. package/dist/chunk-AEWJU6NZ.js.map +0 -1
  77. package/dist/chunk-MJUTO3PY.cjs.map +0 -1
  78. package/dist/chunk-OIZ2V2VD.cjs.map +0 -1
@@ -27,6 +27,18 @@ var Transaction = class extends Transaction$1 {
27
27
  function withArkOpts(opts) {
28
28
  return { ...Transaction.ARK_TX_OPTS, ...opts };
29
29
  }
30
+ function formatSighash(type) {
31
+ return `0x${type.toString(16).padStart(2, "0")}`;
32
+ }
33
+ function assertAllowedSighashTypes(tx, allowedSighashTypes = [SigHash.DEFAULT]) {
34
+ for (let i = 0; i < tx.inputsLength; i++) {
35
+ const declared = tx.getInput(i).sighashType;
36
+ if (declared === void 0) continue;
37
+ if (!allowedSighashTypes.includes(declared)) {
38
+ throw new Error(`Unallowed sighash type ${formatSighash(declared)} for input ${i}.`);
39
+ }
40
+ }
41
+ }
30
42
  function timelockToSequence(timelock) {
31
43
  return bip68.encode(
32
44
  timelock.type === "blocks" ? { blocks: Number(timelock.value) } : { seconds: Number(timelock.value) }
@@ -1010,7 +1022,7 @@ function resolveEventSource(override) {
1010
1022
  }
1011
1023
 
1012
1024
  // package.json
1013
- var version = "0.4.67";
1025
+ var version = "0.4.68";
1014
1026
 
1015
1027
  // src/utils/fetch.ts
1016
1028
  var buildVersion = "0.9.9";
@@ -2412,6 +2424,6 @@ function isExpired(vtxo) {
2412
2424
  return n.isSwept || n.expiresAt !== void 0 && n.expiresAt.getTime() <= Date.now();
2413
2425
  }
2414
2426
 
2415
- export { ArkAddress, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, BITCOIN_EMULATOR_PUBKEY, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, ConditionWitness, CosignerPublicKey, DEFAULT_ARKADE_SERVER_URL, DEFAULT_NETWORK, DEFAULT_NETWORK_NAME, DEFAULT_PAGE_SIZE, DigestMismatchError, EventSourceUnavailableError, FetchError, Intent, MUTINYNET_EMULATOR_PUBKEY, MultisigTapscript, OP_RETURN_EMPTY_PKSCRIPT, PrevArkTxField, PrevoutTxField, ProviderUnavailableError, REGTEST_EMULATOR_PUBKEY, RestArkProvider, SCRIPT_QUERY_CHUNK_SIZE, ServerResponseMismatchError, SettlementEventType, TapTreeCoder, Transaction, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, assembleBtcdTaprootTree, baseFetch, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, convertVtxo, craftToSpendTx, decodeTapscript, defaultEmulatorPubkey, eventSourceIterator, fetch, fetchVtxoCreatedAtByTxid, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNetwork, getNormalizedVtxos, getSequence, hasTerminalSpend, isArkError, isEventSourceError, isEventSourceUnavailableError, isExpired, isFetchTimeoutError, isPastExpiry, isRecoverable, isRetryableProviderError, isSpendable, isVirtualCoin, maybeArkError, networks, normalizeVtxo, parseLegacyExpiry, rateGate, resolveEmulatorPubkey, resolveEventSource, resolveTimeHeight, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, throwIfHttpUnavailable, timelockToSequence, toBatchExpiry, toOffchainInputFeeParams, toProviderUnavailable, toVirtualStatus };
2416
- //# sourceMappingURL=chunk-3WIWNE4P.js.map
2417
- //# sourceMappingURL=chunk-3WIWNE4P.js.map
2427
+ export { ArkAddress, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, BITCOIN_EMULATOR_PUBKEY, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, ConditionWitness, CosignerPublicKey, DEFAULT_ARKADE_SERVER_URL, DEFAULT_NETWORK, DEFAULT_NETWORK_NAME, DEFAULT_PAGE_SIZE, DigestMismatchError, EventSourceUnavailableError, FetchError, Intent, MUTINYNET_EMULATOR_PUBKEY, MultisigTapscript, OP_RETURN_EMPTY_PKSCRIPT, PrevArkTxField, PrevoutTxField, ProviderUnavailableError, REGTEST_EMULATOR_PUBKEY, RestArkProvider, SCRIPT_QUERY_CHUNK_SIZE, ServerResponseMismatchError, SettlementEventType, TapTreeCoder, Transaction, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, assembleBtcdTaprootTree, assertAllowedSighashTypes, baseFetch, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, convertVtxo, craftToSpendTx, decodeTapscript, defaultEmulatorPubkey, eventSourceIterator, fetch, fetchVtxoCreatedAtByTxid, formatSighash, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNetwork, getNormalizedVtxos, getSequence, hasTerminalSpend, isArkError, isEventSourceError, isEventSourceUnavailableError, isExpired, isFetchTimeoutError, isPastExpiry, isRecoverable, isRetryableProviderError, isSpendable, isVirtualCoin, maybeArkError, networks, normalizeVtxo, parseLegacyExpiry, rateGate, resolveEmulatorPubkey, resolveEventSource, resolveTimeHeight, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, throwIfHttpUnavailable, timelockToSequence, toBatchExpiry, toOffchainInputFeeParams, toProviderUnavailable, toVirtualStatus };
2428
+ //# sourceMappingURL=chunk-4CMXV5SF.js.map
2429
+ //# sourceMappingURL=chunk-4CMXV5SF.js.map