@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/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:
|
package/dist/adapters/expo.cjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunkEVVLVFY7_cjs = require('../chunk-EVVLVFY7.cjs');
|
|
4
|
+
require('../chunk-7LPT6AYH.cjs');
|
|
5
|
+
require('../chunk-6J4GABF7.cjs');
|
|
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
|
|
12
|
+
get: function () { return chunkEVVLVFY7_cjs.ExpoArkProvider; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "ExpoIndexerProvider", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkEVVLVFY7_cjs.ExpoIndexerProvider; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "ExpoOperatorProvider", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkEVVLVFY7_cjs.ExpoOperatorProvider; }
|
|
21
21
|
});
|
|
22
22
|
//# sourceMappingURL=expo.cjs.map
|
|
23
23
|
//# sourceMappingURL=expo.cjs.map
|
package/dist/adapters/expo.d.cts
CHANGED
|
@@ -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-
|
|
2
|
-
export { y as ArkProvider, z as IndexerProvider, B as OperatorProvider } from '../index-
|
|
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';
|
package/dist/adapters/expo.d.ts
CHANGED
|
@@ -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-
|
|
2
|
-
export { y as ArkProvider, z as IndexerProvider, B as OperatorProvider } from '../index-
|
|
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';
|
package/dist/adapters/expo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ExpoArkProvider, ExpoIndexerProvider, ExpoOperatorProvider } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { ExpoArkProvider, ExpoIndexerProvider, ExpoOperatorProvider } from '../chunk-AZHBGWVC.js';
|
|
2
|
+
import '../chunk-72EC3ASW.js';
|
|
3
|
+
import '../chunk-J2JZZTOE.js';
|
|
4
|
+
import '../chunk-GB67AGXG.js';
|
|
5
5
|
//# sourceMappingURL=expo.js.map
|
|
6
6
|
//# sourceMappingURL=expo.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
49
|
+
export { AsyncStorageTaskQueue as A, type AsyncStorageLike as a };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
49
|
+
export { AsyncStorageTaskQueue as A, type AsyncStorageLike as a };
|