@arkade-os/sdk 0.5.7 → 0.5.8

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 (94) hide show
  1. package/README.md +2 -2
  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-B9byr6ij.d.cts → asyncStorageTaskQueue-B5NPtkXo.d.cts} +2 -2
  7. package/dist/{asyncStorageTaskQueue-XP4CCdRY.d.ts → asyncStorageTaskQueue-YPwiJyVA.d.ts} +2 -2
  8. package/dist/{chunk-V2DDN4MV.js → chunk-3F5AJ235.js} +4 -4
  9. package/dist/{chunk-V2DDN4MV.js.map → chunk-3F5AJ235.js.map} +1 -1
  10. package/dist/{chunk-3NALVGMJ.cjs → chunk-4IDCSOP2.cjs} +22 -16
  11. package/dist/chunk-4IDCSOP2.cjs.map +1 -0
  12. package/dist/{chunk-JFJNB7ZH.cjs → chunk-5PWL7WOT.cjs} +7 -5
  13. package/dist/chunk-5PWL7WOT.cjs.map +1 -0
  14. package/dist/{chunk-MWMO2ZQP.js → chunk-E7LKKEVR.js} +10 -4
  15. package/dist/chunk-E7LKKEVR.js.map +1 -0
  16. package/dist/{chunk-URGVQ5TQ.cjs → chunk-EQ3JVVUR.cjs} +599 -547
  17. package/dist/chunk-EQ3JVVUR.cjs.map +1 -0
  18. package/dist/{chunk-MWEDDWFU.js → chunk-F5O6JI2H.js} +8 -6
  19. package/dist/chunk-F5O6JI2H.js.map +1 -0
  20. package/dist/{chunk-4AJRIM44.js → chunk-H7GT3QC4.js} +4 -4
  21. package/dist/{chunk-4AJRIM44.js.map → chunk-H7GT3QC4.js.map} +1 -1
  22. package/dist/{chunk-MXCB6EVM.cjs → chunk-JQSHFSME.cjs} +19 -17
  23. package/dist/chunk-JQSHFSME.cjs.map +1 -0
  24. package/dist/{chunk-MQUATTIM.cjs → chunk-JYQXB7OH.cjs} +19 -19
  25. package/dist/{chunk-MQUATTIM.cjs.map → chunk-JYQXB7OH.cjs.map} +1 -1
  26. package/dist/{chunk-V5WRO3P6.cjs → chunk-KWR37J6L.cjs} +10 -10
  27. package/dist/{chunk-V5WRO3P6.cjs.map → chunk-KWR37J6L.cjs.map} +1 -1
  28. package/dist/{chunk-X6ZI53DZ.cjs → chunk-L7OOPAUG.cjs} +14 -26
  29. package/dist/chunk-L7OOPAUG.cjs.map +1 -0
  30. package/dist/{chunk-RLD7DRSZ.js → chunk-OLKZUJIN.js} +127 -75
  31. package/dist/chunk-OLKZUJIN.js.map +1 -0
  32. package/dist/{chunk-OMPDPBT5.cjs → chunk-SOJDUKY6.cjs} +271 -225
  33. package/dist/chunk-SOJDUKY6.cjs.map +1 -0
  34. package/dist/{chunk-V3ZLL5VY.js → chunk-U34GU5RM.js} +9 -21
  35. package/dist/chunk-U34GU5RM.js.map +1 -0
  36. package/dist/{chunk-DNFTHG73.js → chunk-XXNPX4MK.js} +7 -5
  37. package/dist/chunk-XXNPX4MK.js.map +1 -0
  38. package/dist/{chunk-VMVFRTF4.js → chunk-YTOABP6J.js} +268 -226
  39. package/dist/chunk-YTOABP6J.js.map +1 -0
  40. package/dist/compiler.cjs +3 -3
  41. package/dist/compiler.d.cts +1 -1
  42. package/dist/compiler.d.ts +1 -1
  43. package/dist/compiler.js +2 -2
  44. package/dist/contracts/handlers/index.cjs +10 -10
  45. package/dist/contracts/handlers/index.d.cts +3 -3
  46. package/dist/contracts/handlers/index.d.ts +3 -3
  47. package/dist/contracts/handlers/index.js +3 -3
  48. package/dist/{index-Ccfhdfvj.d.cts → index-CKzBYoDa.d.cts} +2 -2
  49. package/dist/{index-B_kcptF8.d.ts → index-COs69e8T.d.ts} +2 -2
  50. package/dist/{index-18cDMayF.d.ts → index-Pk3i_MMU.d.ts} +12 -2
  51. package/dist/{index-DDJFHfba.d.cts → index-czozpKPT.d.cts} +12 -2
  52. package/dist/index.cjs +325 -321
  53. package/dist/index.d.cts +52 -23
  54. package/dist/index.d.ts +52 -23
  55. package/dist/index.js +6 -6
  56. package/dist/{keyringDescriptorProvider-DL-jAiRO.d.ts → keyringDescriptorProvider-CbNzWwbS.d.ts} +15 -2
  57. package/dist/{keyringDescriptorProvider-Dtv0JWrT.d.cts → keyringDescriptorProvider-nC8fIjBN.d.cts} +15 -2
  58. package/dist/{program-BARSNg3X.d.ts → program-38A2Twvj.d.ts} +4 -2
  59. package/dist/{program-znrWkxE4.d.cts → program-DPzf5qsk.d.cts} +4 -2
  60. package/dist/repositories/realm/index.cjs +39 -39
  61. package/dist/repositories/realm/index.d.cts +2 -2
  62. package/dist/repositories/realm/index.d.ts +2 -2
  63. package/dist/repositories/realm/index.js +7 -7
  64. package/dist/repositories/sqlite/index.cjs +37 -37
  65. package/dist/repositories/sqlite/index.d.cts +2 -2
  66. package/dist/repositories/sqlite/index.d.ts +2 -2
  67. package/dist/repositories/sqlite/index.js +7 -7
  68. package/dist/{taskRunner-DUafWu0o.d.ts → taskRunner-DBOqvP33.d.ts} +2 -2
  69. package/dist/{taskRunner-JYHaLPne.d.cts → taskRunner-DXivOJHc.d.cts} +2 -2
  70. package/dist/wallet/expo/background.cjs +16 -16
  71. package/dist/wallet/expo/background.d.cts +3 -3
  72. package/dist/wallet/expo/background.d.ts +3 -3
  73. package/dist/wallet/expo/background.js +8 -8
  74. package/dist/wallet/expo/index.cjs +17 -17
  75. package/dist/wallet/expo/index.d.cts +3 -3
  76. package/dist/wallet/expo/index.d.ts +3 -3
  77. package/dist/wallet/expo/index.js +7 -7
  78. package/dist/worker/expo/index.cjs +11 -11
  79. package/dist/worker/expo/index.d.cts +4 -4
  80. package/dist/worker/expo/index.d.ts +4 -4
  81. package/dist/worker/expo/index.js +7 -7
  82. package/package.json +1 -1
  83. package/dist/chunk-3NALVGMJ.cjs.map +0 -1
  84. package/dist/chunk-DNFTHG73.js.map +0 -1
  85. package/dist/chunk-JFJNB7ZH.cjs.map +0 -1
  86. package/dist/chunk-MWEDDWFU.js.map +0 -1
  87. package/dist/chunk-MWMO2ZQP.js.map +0 -1
  88. package/dist/chunk-MXCB6EVM.cjs.map +0 -1
  89. package/dist/chunk-OMPDPBT5.cjs.map +0 -1
  90. package/dist/chunk-RLD7DRSZ.js.map +0 -1
  91. package/dist/chunk-URGVQ5TQ.cjs.map +0 -1
  92. package/dist/chunk-V3ZLL5VY.js.map +0 -1
  93. package/dist/chunk-VMVFRTF4.js.map +0 -1
  94. package/dist/chunk-X6ZI53DZ.cjs.map +0 -1
package/README.md CHANGED
@@ -1579,7 +1579,7 @@ await contract.register({ label: 'Hashlock' })
1579
1579
 
1580
1580
  const funded = await contract.on('vtxo_received', async () => {
1581
1581
  funded.off()
1582
- const { txid } = await contract.functions.claim(preimage)
1582
+ const { txid } = await contract.functions.claim({ arkadeScript: [preimage] })
1583
1583
  .to(ArkAddress.decode(recipientAddress).pkScript, 10_000n)
1584
1584
  .send()
1585
1585
  })
@@ -1592,7 +1592,7 @@ await wallet.send({ address: contract.address, amount: 10_000 })
1592
1592
 
1593
1593
  The connected operator supplies `<SERVER_KEY>` (the reserved `server` parameter in normalized Programs) and `<SERVER_EXIT_DELAY>`; conflicting overrides fail, and time-based delays that are not multiples of 512 seconds fail rather than changing the advertised delay. Resolved bindings are persisted, so restoring the contract keeps its script through server key or policy changes. A declared constructor named `user` defaults to the connected identity; other constructor keys remain caller-provided. Pass a struct or array param whole by its source name, such as `{ owners: [{ key }, { key }] }`; the flattened names it binds, such as `owners.0.key`, are also accepted, and a missing, extra or duplicated field fails with its full name. Child-output placeholders remain explicit `bytes32` constructor bindings. Leaf call inputs used as script operands cannot produce a fixed address and are rejected; raw CSV operands must be canonical BIP68 encodings.
1594
1594
 
1595
- For compiler-derived programs, call arguments are covenant inputs in declaration order, followed by non-signature leaf inputs in declaration order, one argument per source parameter: a struct or array input is passed whole, as in `contract.functions.spend(request, oracles)`. Same-named inputs in the two scopes remain separate positional arguments. Leaf signatures are PSBT signatures, not condition arguments: `send()` supports the connected identity and infrastructure signers; additional identities and covenant-tweaked leaf keys require explicit PSBT signing via `build()`. Covenant signature arguments remain caller-provided; transaction-bound Arkade `checkSig` signatures require an Arkade-specific digest helper, which is deferred. CSV leaves require aged onchain outputs and cannot use this offchain builder. Typed call validation and these spending limits apply to every normalized Program. The public `SignerRef` union is unchanged; version 1 programs store emulator signer placement in optional `emulatorIndex` metadata.
1595
+ Call arguments are grouped by the script whose witness they fill: `arkadeScript` holds the covenant inputs, which go into the emulator packet, and `tapscript` holds the non-signature leaf inputs, which go into the leaf's `ConditionWitness`, as in `contract.functions.claim({ arkadeScript: [preimage, flag], tapscript: [leafPreimage] })`. Each list follows declaration order with one argument per source parameter, so a struct or array input is passed whole, as in `contract.functions.spend({ arkadeScript: [request, oracles] })`. Omit the key of a segment without inputs, and call a function without inputs with no arguments. Same-named inputs in the two scopes stay independent. Hand-written programs declare inputs on the segment whose `witness` names them (`tapscript.inputs`, `arkadeScript.inputs`). Leaf signatures are PSBT signatures, not condition arguments: `send()` supports the connected identity and infrastructure signers; additional identities and covenant-tweaked leaf keys require explicit PSBT signing via `build()`. Covenant signature arguments remain caller-provided; transaction-bound Arkade `checkSig` signatures require an Arkade-specific digest helper, which is deferred. CSV leaves require aged onchain outputs and cannot use this offchain builder. Typed call validation and these spending limits apply to every normalized Program. The public `SignerRef` union is unchanged; version 1 programs store emulator signer placement in optional `emulatorIndex` metadata.
1596
1596
 
1597
1597
  #### Compiling Arkade source
1598
1598
 
@@ -1,23 +1,23 @@
1
1
  'use strict';
2
2
 
3
- var chunkMXCB6EVM_cjs = require('../chunk-MXCB6EVM.cjs');
4
- require('../chunk-3NALVGMJ.cjs');
5
- require('../chunk-OMPDPBT5.cjs');
3
+ var chunkJQSHFSME_cjs = require('../chunk-JQSHFSME.cjs');
4
+ require('../chunk-4IDCSOP2.cjs');
5
+ require('../chunk-SOJDUKY6.cjs');
6
6
  require('../chunk-FLPWNMX3.cjs');
7
7
 
8
8
 
9
9
 
10
10
  Object.defineProperty(exports, "ExpoArkProvider", {
11
11
  enumerable: true,
12
- get: function () { return chunkMXCB6EVM_cjs.ExpoArkProvider; }
12
+ get: function () { return chunkJQSHFSME_cjs.ExpoArkProvider; }
13
13
  });
14
14
  Object.defineProperty(exports, "ExpoIndexerProvider", {
15
15
  enumerable: true,
16
- get: function () { return chunkMXCB6EVM_cjs.ExpoIndexerProvider; }
16
+ get: function () { return chunkJQSHFSME_cjs.ExpoIndexerProvider; }
17
17
  });
18
18
  Object.defineProperty(exports, "ExpoOperatorProvider", {
19
19
  enumerable: true,
20
- get: function () { return chunkMXCB6EVM_cjs.ExpoOperatorProvider; }
20
+ get: function () { return chunkJQSHFSME_cjs.ExpoOperatorProvider; }
21
21
  });
22
22
  //# sourceMappingURL=expo.cjs.map
23
23
  //# sourceMappingURL=expo.cjs.map
@@ -1,5 +1,5 @@
1
- import { r as RestOperatorProvider, n as SettlementEvent, T as TxNotificationEvent, s as RestIndexerProvider, t as SubscriptionEvent, u as SubscriptionHeartbeat } from '../index-DDJFHfba.cjs';
2
- export { v as ArkProvider, w as IndexerProvider, x as OperatorProvider } from '../index-DDJFHfba.cjs';
1
+ import { r as RestOperatorProvider, n as SettlementEvent, T as TxNotificationEvent, s as RestIndexerProvider, t as SubscriptionEvent, u as SubscriptionHeartbeat } from '../index-czozpKPT.cjs';
2
+ export { v as ArkProvider, w as IndexerProvider, x as OperatorProvider } from '../index-czozpKPT.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 { r as RestOperatorProvider, n as SettlementEvent, T as TxNotificationEvent, s as RestIndexerProvider, t as SubscriptionEvent, u as SubscriptionHeartbeat } from '../index-18cDMayF.js';
2
- export { v as ArkProvider, w as IndexerProvider, x as OperatorProvider } from '../index-18cDMayF.js';
1
+ import { r as RestOperatorProvider, n as SettlementEvent, T as TxNotificationEvent, s as RestIndexerProvider, t as SubscriptionEvent, u as SubscriptionHeartbeat } from '../index-Pk3i_MMU.js';
2
+ export { v as ArkProvider, w as IndexerProvider, x as OperatorProvider } from '../index-Pk3i_MMU.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-MWEDDWFU.js';
2
- import '../chunk-MWMO2ZQP.js';
3
- import '../chunk-VMVFRTF4.js';
1
+ export { ExpoArkProvider, ExpoIndexerProvider, ExpoOperatorProvider } from '../chunk-F5O6JI2H.js';
2
+ import '../chunk-E7LKKEVR.js';
3
+ import '../chunk-YTOABP6J.js';
4
4
  import '../chunk-FDJ734CH.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-JYHaLPne.cjs';
1
+ import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-DXivOJHc.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-DUafWu0o.js';
1
+ import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-DBOqvP33.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
- import { deserializeArkadeContractParams, serializeArkadeContractParams, ArkadeProgramScript, computeArkadeScriptPublicKey, staticWitness, resolveCsvTimelock, resolveTimelockValue, ArkadeScript } from './chunk-DNFTHG73.js';
2
- import { SCRIPT_QUERY_CHUNK_SIZE, getNormalizedVtxos, DEFAULT_PAGE_SIZE } from './chunk-VMVFRTF4.js';
1
+ import { deserializeArkadeContractParams, serializeArkadeContractParams, ArkadeProgramScript, computeArkadeScriptPublicKey, staticWitness, resolveCsvTimelock, resolveTimelockValue, ArkadeScript } from './chunk-XXNPX4MK.js';
2
+ import { SCRIPT_QUERY_CHUNK_SIZE, getNormalizedVtxos, DEFAULT_PAGE_SIZE } from './chunk-YTOABP6J.js';
3
3
  import { VtxoScript, MultisigTapscript, CSVMultisigTapscript, timelockToSequence, sequenceToTimelock, ConditionMultisigTapscript, CLTVMultisigTapscript, ConditionCSVMultisigTapscript } from './chunk-FDJ734CH.js';
4
4
  import { hex } from '@scure/base';
5
5
  import { networks, expand } from '@bitcoinerlab/descriptors-scure';
@@ -1488,5 +1488,5 @@ contractHandlers.register(BoardingContractHandler);
1488
1488
  contractHandlers.register(ArkadeContractHandler);
1489
1489
 
1490
1490
  export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, WALLET_RECEIVE_SOURCE, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, descriptorIsOurs, exitSequence, extractPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, isMainnetDescriptor, normalizeToDescriptor, parseHDDescriptor, speculativeReceiveMetadata };
1491
- //# sourceMappingURL=chunk-V2DDN4MV.js.map
1492
- //# sourceMappingURL=chunk-V2DDN4MV.js.map
1491
+ //# sourceMappingURL=chunk-3F5AJ235.js.map
1492
+ //# sourceMappingURL=chunk-3F5AJ235.js.map