@arkade-os/sdk 0.4.39 → 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.
- package/dist/adapters/expo.cjs +4 -4
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +2 -2
- package/dist/adapters/indexedDB.cjs +3 -3
- package/dist/adapters/indexedDB.js +2 -2
- package/dist/{ark-BzUNnkoc.d.cts → ark-BaZ6da8C.d.cts} +17 -4
- package/dist/{ark-BzUNnkoc.d.ts → ark-BaZ6da8C.d.ts} +17 -4
- package/dist/{asyncStorageTaskQueue-CIYeI6GM.d.ts → asyncStorageTaskQueue-CvV50MjV.d.ts} +2 -2
- package/dist/{asyncStorageTaskQueue-C0kQoY1x.d.cts → asyncStorageTaskQueue-trKcQM7q.d.cts} +2 -2
- package/dist/{chunk-UIFBMKI7.js → chunk-5TSUGRHP.js} +3 -3
- package/dist/{chunk-UIFBMKI7.js.map → chunk-5TSUGRHP.js.map} +1 -1
- package/dist/{chunk-LJLEFPWD.cjs → chunk-6EZY43WE.cjs} +14 -5
- package/dist/chunk-6EZY43WE.cjs.map +1 -0
- package/dist/{chunk-D744IES4.js → chunk-GF6NPAOJ.js} +14 -5
- package/dist/chunk-GF6NPAOJ.js.map +1 -0
- package/dist/{chunk-N56IDZON.cjs → chunk-GWISMFO5.cjs} +11 -11
- package/dist/{chunk-N56IDZON.cjs.map → chunk-GWISMFO5.cjs.map} +1 -1
- package/dist/{chunk-SYEGCMNV.js → chunk-I2O4Q2EL.js} +175 -78
- package/dist/chunk-I2O4Q2EL.js.map +1 -0
- package/dist/{chunk-P5FKMIGY.cjs → chunk-I4Z6KKUH.cjs} +251 -152
- package/dist/chunk-I4Z6KKUH.cjs.map +1 -0
- package/dist/{chunk-VGXTJ7HR.js → chunk-SWJBV4UB.js} +3 -3
- package/dist/{chunk-VGXTJ7HR.js.map → chunk-SWJBV4UB.js.map} +1 -1
- package/dist/{chunk-A5RLZCPO.cjs → chunk-TSG74BHI.cjs} +7 -7
- package/dist/{chunk-A5RLZCPO.cjs.map → chunk-TSG74BHI.cjs.map} +1 -1
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/{delegate-DHAgMIS9.d.cts → delegate-Bt5H1gbW.d.cts} +1 -1
- package/dist/{delegate-BjPbX-MR.d.ts → delegate-ClaZWxlA.d.ts} +1 -1
- package/dist/{index-BOQKDCmS.d.ts → index-ByYBDr1g.d.ts} +2 -2
- package/dist/{index-YkMAtSfw.d.cts → index-D6kIRfBy.d.cts} +2 -2
- package/dist/index.cjs +121 -113
- package/dist/index.d.cts +49 -10
- package/dist/index.d.ts +49 -10
- package/dist/index.js +2 -2
- package/dist/repositories/realm/index.cjs +11 -11
- package/dist/repositories/realm/index.d.cts +1 -1
- package/dist/repositories/realm/index.d.ts +1 -1
- package/dist/repositories/realm/index.js +2 -2
- package/dist/repositories/sqlite/index.cjs +11 -11
- package/dist/repositories/sqlite/index.d.cts +1 -1
- package/dist/repositories/sqlite/index.d.ts +1 -1
- package/dist/repositories/sqlite/index.js +2 -2
- package/dist/{taskRunner-Dfmt7ZPN.d.ts → taskRunner-Bwss4MUW.d.ts} +2 -2
- package/dist/{taskRunner-CVEgBO6d.d.cts → taskRunner-D7SuOTOa.d.cts} +2 -2
- package/dist/wallet/expo/background.cjs +12 -12
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +4 -4
- package/dist/wallet/expo/index.cjs +11 -11
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +3 -3
- package/dist/{wallet-_PTv-lMe.d.cts → wallet-V5C4Nlhz.d.cts} +2 -2
- package/dist/{wallet-C4Pide44.d.ts → wallet-l-2dKXVh.d.ts} +2 -2
- package/dist/worker/expo/index.cjs +7 -7
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-D744IES4.js.map +0 -1
- package/dist/chunk-LJLEFPWD.cjs.map +0 -1
- package/dist/chunk-P5FKMIGY.cjs.map +0 -1
- package/dist/chunk-SYEGCMNV.js.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.
|
|
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-
|
|
2769
|
-
//# sourceMappingURL=chunk-
|
|
2777
|
+
//# sourceMappingURL=chunk-GF6NPAOJ.js.map
|
|
2778
|
+
//# sourceMappingURL=chunk-GF6NPAOJ.js.map
|