@arkade-os/sdk 0.4.38 → 0.4.40

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 (65) hide show
  1. package/dist/adapters/expo.cjs +4 -4
  2. package/dist/adapters/expo.d.cts +2 -2
  3. package/dist/adapters/expo.d.ts +2 -2
  4. package/dist/adapters/expo.js +2 -2
  5. package/dist/adapters/indexedDB.cjs +3 -3
  6. package/dist/adapters/indexedDB.js +2 -2
  7. package/dist/{ark-BzUNnkoc.d.cts → ark-BaZ6da8C.d.cts} +17 -4
  8. package/dist/{ark-BzUNnkoc.d.ts → ark-BaZ6da8C.d.ts} +17 -4
  9. package/dist/{asyncStorageTaskQueue-CIYeI6GM.d.ts → asyncStorageTaskQueue-CvV50MjV.d.ts} +2 -2
  10. package/dist/{asyncStorageTaskQueue-C0kQoY1x.d.cts → asyncStorageTaskQueue-trKcQM7q.d.cts} +2 -2
  11. package/dist/{chunk-A25NYZT5.js → chunk-5TSUGRHP.js} +3 -3
  12. package/dist/{chunk-A25NYZT5.js.map → chunk-5TSUGRHP.js.map} +1 -1
  13. package/dist/{chunk-PXMV7RPT.cjs → chunk-6EZY43WE.cjs} +14 -5
  14. package/dist/chunk-6EZY43WE.cjs.map +1 -0
  15. package/dist/{chunk-ISWKPRX3.js → chunk-GF6NPAOJ.js} +14 -5
  16. package/dist/chunk-GF6NPAOJ.js.map +1 -0
  17. package/dist/{chunk-ZLDWJQIY.cjs → chunk-GWISMFO5.cjs} +11 -11
  18. package/dist/{chunk-ZLDWJQIY.cjs.map → chunk-GWISMFO5.cjs.map} +1 -1
  19. package/dist/{chunk-CCUUO2GR.js → chunk-I2O4Q2EL.js} +175 -78
  20. package/dist/chunk-I2O4Q2EL.js.map +1 -0
  21. package/dist/{chunk-JSTCR7PQ.cjs → chunk-I4Z6KKUH.cjs} +251 -152
  22. package/dist/chunk-I4Z6KKUH.cjs.map +1 -0
  23. package/dist/{chunk-RJK63VVZ.js → chunk-SWJBV4UB.js} +3 -3
  24. package/dist/{chunk-RJK63VVZ.js.map → chunk-SWJBV4UB.js.map} +1 -1
  25. package/dist/{chunk-KHUOY3QD.cjs → chunk-TSG74BHI.cjs} +7 -7
  26. package/dist/{chunk-KHUOY3QD.cjs.map → chunk-TSG74BHI.cjs.map} +1 -1
  27. package/dist/contracts/handlers/index.d.cts +3 -3
  28. package/dist/contracts/handlers/index.d.ts +3 -3
  29. package/dist/{delegate-DHAgMIS9.d.cts → delegate-Bt5H1gbW.d.cts} +1 -1
  30. package/dist/{delegate-BjPbX-MR.d.ts → delegate-ClaZWxlA.d.ts} +1 -1
  31. package/dist/{index-BOQKDCmS.d.ts → index-ByYBDr1g.d.ts} +2 -2
  32. package/dist/{index-YkMAtSfw.d.cts → index-D6kIRfBy.d.cts} +2 -2
  33. package/dist/index.cjs +121 -113
  34. package/dist/index.d.cts +49 -10
  35. package/dist/index.d.ts +49 -10
  36. package/dist/index.js +2 -2
  37. package/dist/repositories/realm/index.cjs +11 -11
  38. package/dist/repositories/realm/index.d.cts +1 -1
  39. package/dist/repositories/realm/index.d.ts +1 -1
  40. package/dist/repositories/realm/index.js +2 -2
  41. package/dist/repositories/sqlite/index.cjs +11 -11
  42. package/dist/repositories/sqlite/index.d.cts +1 -1
  43. package/dist/repositories/sqlite/index.d.ts +1 -1
  44. package/dist/repositories/sqlite/index.js +2 -2
  45. package/dist/{taskRunner-Dfmt7ZPN.d.ts → taskRunner-Bwss4MUW.d.ts} +2 -2
  46. package/dist/{taskRunner-CVEgBO6d.d.cts → taskRunner-D7SuOTOa.d.cts} +2 -2
  47. package/dist/wallet/expo/background.cjs +12 -12
  48. package/dist/wallet/expo/background.d.cts +3 -3
  49. package/dist/wallet/expo/background.d.ts +3 -3
  50. package/dist/wallet/expo/background.js +4 -4
  51. package/dist/wallet/expo/index.cjs +11 -11
  52. package/dist/wallet/expo/index.d.cts +4 -4
  53. package/dist/wallet/expo/index.d.ts +4 -4
  54. package/dist/wallet/expo/index.js +3 -3
  55. package/dist/{wallet-_PTv-lMe.d.cts → wallet-V5C4Nlhz.d.cts} +2 -2
  56. package/dist/{wallet-C4Pide44.d.ts → wallet-l-2dKXVh.d.ts} +2 -2
  57. package/dist/worker/expo/index.cjs +7 -7
  58. package/dist/worker/expo/index.d.cts +4 -4
  59. package/dist/worker/expo/index.d.ts +4 -4
  60. package/dist/worker/expo/index.js +3 -3
  61. package/package.json +1 -1
  62. package/dist/chunk-CCUUO2GR.js.map +0 -1
  63. package/dist/chunk-ISWKPRX3.js.map +0 -1
  64. package/dist/chunk-JSTCR7PQ.cjs.map +0 -1
  65. package/dist/chunk-PXMV7RPT.cjs.map +0 -1
@@ -177,7 +177,7 @@ var Intent;
177
177
  if (!validateInputs(inputs)) ;
178
178
  if (!validateOutputs(outputs)) ;
179
179
  const toSpend = craftToSpendTx(message, inputs[0].witnessUtxo.script);
180
- return craftToSignTx(toSpend, inputs, outputs);
180
+ return craftToSignTx(toSpend, inputs, outputs, message);
181
181
  }
182
182
  Intent2.create = create;
183
183
  function fee(proof) {
@@ -230,6 +230,7 @@ var OP_RETURN_EMPTY_PKSCRIPT = new Uint8Array([OP.RETURN]);
230
230
  var ZERO_32 = new Uint8Array(32).fill(0);
231
231
  var MAX_INDEX = 4294967295;
232
232
  var TAG_INTENT_PROOF = "ark-intent-proof-message";
233
+ var PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE = 9;
233
234
  function validateInput(input) {
234
235
  if (input.index === void 0) throw new Error("intent proof input requires index");
235
236
  if (input.txid === void 0) throw new Error("intent proof input requires txid");
@@ -270,7 +271,7 @@ function craftToSpendTx(message, pkScript, tag = TAG_INTENT_PROOF) {
270
271
  });
271
272
  return tx;
272
273
  }
273
- function craftToSignTx(toSpend, inputs, outputs) {
274
+ function craftToSignTx(toSpend, inputs, outputs, message) {
274
275
  const firstInput = inputs[0];
275
276
  const tx = new Transaction({
276
277
  version: 2,
@@ -311,6 +312,14 @@ function craftToSignTx(toSpend, inputs, outputs) {
311
312
  script: output.script
312
313
  });
313
314
  }
315
+ const global = tx.global;
316
+ global.unknown = [
317
+ ...global.unknown ?? [],
318
+ [
319
+ { type: PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE, key: new Uint8Array() },
320
+ new TextEncoder().encode(message)
321
+ ]
322
+ ];
314
323
  return tx;
315
324
  }
316
325
  function hashMessage(message, tag = TAG_INTENT_PROOF) {
@@ -340,7 +349,7 @@ function prepareCoinAsIntentProofInput(coin) {
340
349
  }
341
350
 
342
351
  // package.json
343
- var version = "0.4.38";
352
+ var version = "0.4.40";
344
353
 
345
354
  // src/utils/fetch.ts
346
355
  var buildVersion = "0.9.9";
@@ -2765,5 +2774,5 @@ var Response;
2765
2774
  })(Response || (Response = {}));
2766
2775
 
2767
2776
  export { ArkError, ArkPsbtFieldKey, ArkPsbtFieldKeyType, AssetGroup, AssetId, AssetInput, AssetOutput, AssetRef, BufferReader, ChainTxType, ConditionWitness, CosignerPublicKey, DigestMismatchError, IndexerTxType, Intent, Metadata, OP_RETURN_EMPTY_PKSCRIPT, Packet, RestArkProvider, RestIndexerProvider, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, asset_exports, baseFetch, buildVersion, craftToSpendTx, fetch, getArkPsbtFields, isEventSourceError, isFetchTimeoutError, maybeArkError, sdkVersion, setArkPsbtField };
2768
- //# sourceMappingURL=chunk-ISWKPRX3.js.map
2769
- //# sourceMappingURL=chunk-ISWKPRX3.js.map
2777
+ //# sourceMappingURL=chunk-GF6NPAOJ.js.map
2778
+ //# sourceMappingURL=chunk-GF6NPAOJ.js.map