@arkade-os/sdk 0.5.13 → 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.
Files changed (74) hide show
  1. package/README.md +6 -0
  2. package/dist/adapters/expo.cjs +6 -6
  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/{asyncStorageTaskQueue-Y4BlVm41.d.cts → asyncStorageTaskQueue-DzO5SBcm.d.cts} +2 -2
  7. package/dist/{asyncStorageTaskQueue-Dhbe00Ya.d.ts → asyncStorageTaskQueue-p7zeFhA3.d.ts} +2 -2
  8. package/dist/{chunk-QSERJPTT.js → chunk-4HZQSKWG.js} +3 -3
  9. package/dist/{chunk-QSERJPTT.js.map → chunk-4HZQSKWG.js.map} +1 -1
  10. package/dist/{chunk-HS7TKVOZ.cjs → chunk-6J4GABF7.cjs} +8 -4
  11. package/dist/chunk-6J4GABF7.cjs.map +1 -0
  12. package/dist/{chunk-BA36SQY2.js → chunk-72EC3ASW.js} +3 -3
  13. package/dist/{chunk-BA36SQY2.js.map → chunk-72EC3ASW.js.map} +1 -1
  14. package/dist/{chunk-WFJPLXOE.cjs → chunk-7LPT6AYH.cjs} +18 -18
  15. package/dist/{chunk-WFJPLXOE.cjs.map → chunk-7LPT6AYH.cjs.map} +1 -1
  16. package/dist/{chunk-BP4NA7HK.js → chunk-AZHBGWVC.js} +4 -4
  17. package/dist/{chunk-BP4NA7HK.js.map → chunk-AZHBGWVC.js.map} +1 -1
  18. package/dist/{chunk-6XVTGWQK.cjs → chunk-EVVLVFY7.cjs} +17 -17
  19. package/dist/{chunk-6XVTGWQK.cjs.map → chunk-EVVLVFY7.cjs.map} +1 -1
  20. package/dist/{chunk-Y3AWLHQP.js → chunk-HWWSLCQN.js} +394 -58
  21. package/dist/chunk-HWWSLCQN.js.map +1 -0
  22. package/dist/{chunk-LHLRG2BE.js → chunk-J2JZZTOE.js} +8 -5
  23. package/dist/chunk-J2JZZTOE.js.map +1 -0
  24. package/dist/{chunk-D4QH6L54.js → chunk-LCGRZ24T.js} +4 -4
  25. package/dist/{chunk-D4QH6L54.js.map → chunk-LCGRZ24T.js.map} +1 -1
  26. package/dist/{chunk-6WPP4UGN.cjs → chunk-LQH7DACV.cjs} +871 -535
  27. package/dist/chunk-LQH7DACV.cjs.map +1 -0
  28. package/dist/{chunk-TYSUFG2K.cjs → chunk-MEIE2AEU.cjs} +11 -11
  29. package/dist/{chunk-TYSUFG2K.cjs.map → chunk-MEIE2AEU.cjs.map} +1 -1
  30. package/dist/{chunk-TD4PKK2I.cjs → chunk-XZHTYYW5.cjs} +8 -8
  31. package/dist/{chunk-TD4PKK2I.cjs.map → chunk-XZHTYYW5.cjs.map} +1 -1
  32. package/dist/compiler.d.cts +1 -1
  33. package/dist/compiler.d.ts +1 -1
  34. package/dist/contracts/handlers/index.cjs +10 -10
  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/{index-BapVvuoI.d.ts → index-CaOBA9Ev.d.ts} +2 -2
  39. package/dist/{index-BQwrHcOh.d.cts → index-Cy57QdcL.d.cts} +67 -2
  40. package/dist/{index-DuXylQrN.d.ts → index-Db5qzYRi.d.ts} +67 -2
  41. package/dist/{index-BaTItxPx.d.cts → index-Lq_u0hqj.d.cts} +2 -2
  42. package/dist/index.cjs +325 -325
  43. package/dist/index.d.cts +126 -57
  44. package/dist/index.d.ts +126 -57
  45. package/dist/index.js +4 -4
  46. package/dist/{program-DPzf5qsk.d.cts → program-ZWUAWy_9.d.cts} +1 -1
  47. package/dist/{program-38A2Twvj.d.ts → program-zdDO4cMt.d.ts} +1 -1
  48. package/dist/repositories/realm/index.cjs +37 -37
  49. package/dist/repositories/realm/index.d.cts +2 -2
  50. package/dist/repositories/realm/index.d.ts +2 -2
  51. package/dist/repositories/realm/index.js +5 -5
  52. package/dist/repositories/sqlite/index.cjs +35 -35
  53. package/dist/repositories/sqlite/index.d.cts +2 -2
  54. package/dist/repositories/sqlite/index.d.ts +2 -2
  55. package/dist/repositories/sqlite/index.js +5 -5
  56. package/dist/{taskRunner-D2itCXf6.d.cts → taskRunner-DhZ-KQBW.d.cts} +2 -2
  57. package/dist/{taskRunner-BxOmg-O6.d.ts → taskRunner-amPuilMW.d.ts} +2 -2
  58. package/dist/wallet/expo/background.cjs +14 -14
  59. package/dist/wallet/expo/background.d.cts +3 -3
  60. package/dist/wallet/expo/background.d.ts +3 -3
  61. package/dist/wallet/expo/background.js +6 -6
  62. package/dist/wallet/expo/index.cjs +15 -15
  63. package/dist/wallet/expo/index.d.cts +2 -2
  64. package/dist/wallet/expo/index.d.ts +2 -2
  65. package/dist/wallet/expo/index.js +5 -5
  66. package/dist/worker/expo/index.cjs +9 -9
  67. package/dist/worker/expo/index.d.cts +4 -4
  68. package/dist/worker/expo/index.d.ts +4 -4
  69. package/dist/worker/expo/index.js +5 -5
  70. package/package.json +1 -1
  71. package/dist/chunk-6WPP4UGN.cjs.map +0 -1
  72. package/dist/chunk-HS7TKVOZ.cjs.map +0 -1
  73. package/dist/chunk-LHLRG2BE.js.map +0 -1
  74. package/dist/chunk-Y3AWLHQP.js.map +0 -1
package/README.md CHANGED
@@ -432,6 +432,12 @@ try {
432
432
 
433
433
  `OnchainCosignAmbiguousError` means the transaction may have been broadcast (a transport failure, or a server error after submission): do not retry with other coins. The inputs stay pending until the chain resolves.
434
434
 
435
+ For `sendOnchain` and `cosignOnchainTx` that check is enough. `Ramps.offboardExact` is stricter, because `isCosignFallback(e)` only says arkd did not sign. The wallet already did, and an operator that kept the signed transaction can complete it later, so it rethrows every `OnchainCosignRejectedError` after signing instead of paying through a batch. Paying from other coins could pay twice, and a batch offboard cannot be made to conflict with the kept transaction: arkd refuses an intent that has onchain (boarding) inputs and onchain outputs (`INVALID_INTENT_PROOF`). The caller picks the strategy:
436
+
437
+ - Wait for the held inputs to resolve and retry. The hold ends when an onchain sync sees the coins spent, or releases them once the chain tip is 6 blocks (`ONCHAIN_PENDING_RELEASE_BLOCKS`, fixed, not `onchainCosignMarginBlocks`) past the tip at signing. There is no event for it: track the block height and retry after that. The sync may show that the original payment went through, so before retrying check that it did not complete (the coins are spent, or the recipient has the funds), and retry only if it did not.
438
+ - Settle the boarding coins into VTXOs first (no onchain output), then offboard from those. That spends the coins, so the kept transaction can no longer confirm, but it joins a batch before the coins expire, which costs the user a fee and a fresh VTXO lifetime.
439
+ - Accept the risk and pay again, if the operator is trusted not to complete the transaction.
440
+
435
441
  Contracts carry a `scope`: `"offchain"`, `"onchain"` or `"both"`. It controls whether the contract's onchain coins are watched and spent through cosigning; boarding contracts default to `"onchain"`.
436
442
 
437
443
  Automatic behaviour:
@@ -1,23 +1,23 @@
1
1
  'use strict';
2
2
 
3
- var chunk6XVTGWQK_cjs = require('../chunk-6XVTGWQK.cjs');
4
- require('../chunk-WFJPLXOE.cjs');
5
- require('../chunk-HS7TKVOZ.cjs');
3
+ var chunkEVVLVFY7_cjs = require('../chunk-EVVLVFY7.cjs');
4
+ require('../chunk-7LPT6AYH.cjs');
5
+ require('../chunk-6J4GABF7.cjs');
6
6
  require('../chunk-6TBTL42M.cjs');
7
7
 
8
8
 
9
9
 
10
10
  Object.defineProperty(exports, "ExpoArkProvider", {
11
11
  enumerable: true,
12
- get: function () { return chunk6XVTGWQK_cjs.ExpoArkProvider; }
12
+ get: function () { return chunkEVVLVFY7_cjs.ExpoArkProvider; }
13
13
  });
14
14
  Object.defineProperty(exports, "ExpoIndexerProvider", {
15
15
  enumerable: true,
16
- get: function () { return chunk6XVTGWQK_cjs.ExpoIndexerProvider; }
16
+ get: function () { return chunkEVVLVFY7_cjs.ExpoIndexerProvider; }
17
17
  });
18
18
  Object.defineProperty(exports, "ExpoOperatorProvider", {
19
19
  enumerable: true,
20
- get: function () { return chunk6XVTGWQK_cjs.ExpoOperatorProvider; }
20
+ get: function () { return chunkEVVLVFY7_cjs.ExpoOperatorProvider; }
21
21
  });
22
22
  //# sourceMappingURL=expo.cjs.map
23
23
  //# sourceMappingURL=expo.cjs.map
@@ -1,5 +1,5 @@
1
- import { u as RestOperatorProvider, q as SettlementEvent, T as TxNotificationEvent, v as RestIndexerProvider, w as SubscriptionEvent, x as SubscriptionHeartbeat } from '../index-BQwrHcOh.cjs';
2
- export { y as ArkProvider, z as IndexerProvider, B as OperatorProvider } from '../index-BQwrHcOh.cjs';
1
+ import { u as RestOperatorProvider, q as SettlementEvent, T as TxNotificationEvent, v as RestIndexerProvider, w as SubscriptionEvent, x as SubscriptionHeartbeat } from '../index-Cy57QdcL.cjs';
2
+ export { y as ArkProvider, z as IndexerProvider, B as OperatorProvider } from '../index-Cy57QdcL.cjs';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer';
5
5
  import '@scure/btc-signer/psbt.js';
@@ -1,5 +1,5 @@
1
- import { u as RestOperatorProvider, q as SettlementEvent, T as TxNotificationEvent, v as RestIndexerProvider, w as SubscriptionEvent, x as SubscriptionHeartbeat } from '../index-DuXylQrN.js';
2
- export { y as ArkProvider, z as IndexerProvider, B as OperatorProvider } from '../index-DuXylQrN.js';
1
+ import { u as RestOperatorProvider, q as SettlementEvent, T as TxNotificationEvent, v as RestIndexerProvider, w as SubscriptionEvent, x as SubscriptionHeartbeat } from '../index-Db5qzYRi.js';
2
+ export { y as ArkProvider, z as IndexerProvider, B as OperatorProvider } from '../index-Db5qzYRi.js';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer';
5
5
  import '@scure/btc-signer/psbt.js';
@@ -1,6 +1,6 @@
1
- export { ExpoArkProvider, ExpoIndexerProvider, ExpoOperatorProvider } from '../chunk-BP4NA7HK.js';
2
- import '../chunk-BA36SQY2.js';
3
- import '../chunk-LHLRG2BE.js';
1
+ export { ExpoArkProvider, ExpoIndexerProvider, ExpoOperatorProvider } from '../chunk-AZHBGWVC.js';
2
+ import '../chunk-72EC3ASW.js';
3
+ import '../chunk-J2JZZTOE.js';
4
4
  import '../chunk-GB67AGXG.js';
5
5
  //# sourceMappingURL=expo.js.map
6
6
  //# sourceMappingURL=expo.js.map
@@ -1,4 +1,4 @@
1
- import { c as TaskQueue, b as TaskItem, d as TaskResult } from './taskRunner-D2itCXf6.cjs';
1
+ import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-DhZ-KQBW.cjs';
2
2
 
3
3
  /**
4
4
  * Minimal async key-value storage interface.
@@ -46,4 +46,4 @@ declare class AsyncStorageTaskQueue implements TaskQueue {
46
46
  private writeList;
47
47
  }
48
48
 
49
- export { type AsyncStorageLike as A, AsyncStorageTaskQueue as a };
49
+ export { AsyncStorageTaskQueue as A, type AsyncStorageLike as a };
@@ -1,4 +1,4 @@
1
- import { c as TaskQueue, b as TaskItem, d as TaskResult } from './taskRunner-BxOmg-O6.js';
1
+ import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-amPuilMW.js';
2
2
 
3
3
  /**
4
4
  * Minimal async key-value storage interface.
@@ -46,4 +46,4 @@ declare class AsyncStorageTaskQueue implements TaskQueue {
46
46
  private writeList;
47
47
  }
48
48
 
49
- export { type AsyncStorageLike as A, AsyncStorageTaskQueue as a };
49
+ export { AsyncStorageTaskQueue as A, type AsyncStorageLike as a };
@@ -1,5 +1,5 @@
1
1
  import { deserializeArkadeContractParams, serializeArkadeContractParams, ArkadeProgramScript, computeArkadeScriptPublicKey, staticWitness, resolveCsvTimelock, resolveTimelockValue, programFromArtifact, ArkadeScript } from './chunk-X57WKONW.js';
2
- import { SCRIPT_QUERY_CHUNK_SIZE, indexerPages, getNormalizedVtxos, DEFAULT_PAGE_SIZE } from './chunk-LHLRG2BE.js';
2
+ import { SCRIPT_QUERY_CHUNK_SIZE, indexerPages, getNormalizedVtxos, DEFAULT_PAGE_SIZE } from './chunk-J2JZZTOE.js';
3
3
  import { VtxoScript, MultisigTapscript, CSVMultisigTapscript, timelockToSequence, sequenceToTimelock, ConditionMultisigTapscript, CLTVMultisigTapscript, ConditionCSVMultisigTapscript, sequenceToCanonicalTimelock } from './chunk-GB67AGXG.js';
4
4
  import { hex } from '@scure/base';
5
5
  import { networks, expand } from '@bitcoinerlab/descriptors-scure';
@@ -2091,5 +2091,5 @@ contractHandlers.register(ArkadeContractHandler);
2091
2091
  contractHandlers.register(ExecutorContractHandler);
2092
2092
 
2093
2093
  export { ArkadeContractHandler, BoardingContractHandler, DEFAULT_TEMPLATE_IDS, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, ExecutorContractHandler, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, WALLET_RECEIVE_SOURCE, contractHandlers, defaultVariables, delegateDiscoveryKeys, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, descriptorIsOurs, evenOwnerKey, executorContractParams, executorKeysOf, exitSequence, extractPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, isMainnetDescriptor, normalizeToDescriptor, parseHDDescriptor, speculativeReceiveMetadata };
2094
- //# sourceMappingURL=chunk-QSERJPTT.js.map
2095
- //# sourceMappingURL=chunk-QSERJPTT.js.map
2094
+ //# sourceMappingURL=chunk-4HZQSKWG.js.map
2095
+ //# sourceMappingURL=chunk-4HZQSKWG.js.map