@arkade-os/sdk 0.5.14 → 0.5.15
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 +49 -1
- package/dist/adapters/expo.cjs +6 -6
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +3 -3
- package/dist/artifact-DA5YHM2k.d.cts +87 -0
- package/dist/artifact-DacurepK.d.ts +87 -0
- package/dist/{asyncStorageTaskQueue-p7zeFhA3.d.ts → asyncStorageTaskQueue-B3umqlkb.d.ts} +2 -2
- package/dist/{asyncStorageTaskQueue-DzO5SBcm.d.cts → asyncStorageTaskQueue-Dq6AJHNv.d.cts} +2 -2
- package/dist/{chunk-MEIE2AEU.cjs → chunk-35GRSVCZ.cjs} +11 -11
- package/dist/{chunk-MEIE2AEU.cjs.map → chunk-35GRSVCZ.cjs.map} +1 -1
- package/dist/{chunk-X57WKONW.js → chunk-43APGKWL.js} +130 -22
- package/dist/chunk-43APGKWL.js.map +1 -0
- package/dist/{chunk-LQH7DACV.cjs → chunk-CMFRCBZW.cjs} +866 -615
- package/dist/chunk-CMFRCBZW.cjs.map +1 -0
- package/dist/{chunk-6J4GABF7.cjs → chunk-FKHUXSYW.cjs} +3 -3
- package/dist/chunk-FKHUXSYW.cjs.map +1 -0
- package/dist/{chunk-AZHBGWVC.js → chunk-HVUZKXB2.js} +4 -4
- package/dist/{chunk-AZHBGWVC.js.map → chunk-HVUZKXB2.js.map} +1 -1
- package/dist/{chunk-EVVLVFY7.cjs → chunk-INQAIZUO.cjs} +17 -17
- package/dist/{chunk-EVVLVFY7.cjs.map → chunk-INQAIZUO.cjs.map} +1 -1
- package/dist/{chunk-7LPT6AYH.cjs → chunk-JSYS2KX3.cjs} +18 -18
- package/dist/{chunk-7LPT6AYH.cjs.map → chunk-JSYS2KX3.cjs.map} +1 -1
- package/dist/{chunk-4HZQSKWG.js → chunk-R37I633T.js} +22 -17
- package/dist/chunk-R37I633T.js.map +1 -0
- package/dist/{chunk-ACIQZLWL.cjs → chunk-UNLH3NNG.cjs} +129 -20
- package/dist/chunk-UNLH3NNG.cjs.map +1 -0
- package/dist/{chunk-XZHTYYW5.cjs → chunk-VIQF74QJ.cjs} +38 -33
- package/dist/chunk-VIQF74QJ.cjs.map +1 -0
- package/dist/{chunk-LCGRZ24T.js → chunk-XPZ7TMXH.js} +4 -4
- package/dist/{chunk-LCGRZ24T.js.map → chunk-XPZ7TMXH.js.map} +1 -1
- package/dist/{chunk-72EC3ASW.js → chunk-YYSHQPCG.js} +3 -3
- package/dist/{chunk-72EC3ASW.js.map → chunk-YYSHQPCG.js.map} +1 -1
- package/dist/{chunk-J2JZZTOE.js → chunk-Z4LG3CZ4.js} +3 -3
- package/dist/chunk-Z4LG3CZ4.js.map +1 -0
- package/dist/{chunk-HWWSLCQN.js → chunk-ZECZ2MKX.js} +344 -93
- package/dist/chunk-ZECZ2MKX.js.map +1 -0
- package/dist/compiler.cjs +5 -5
- package/dist/compiler.cjs.map +1 -1
- package/dist/compiler.d.cts +9 -9
- package/dist/compiler.d.ts +9 -9
- package/dist/compiler.js +5 -5
- package/dist/compiler.js.map +1 -1
- package/dist/contracts/handlers/index.cjs +11 -11
- package/dist/contracts/handlers/index.d.cts +2 -2
- package/dist/contracts/handlers/index.d.ts +2 -2
- package/dist/contracts/handlers/index.js +3 -3
- package/dist/{index-Cy57QdcL.d.cts → index-Bi22mLsh.d.cts} +147 -43
- package/dist/{index-CaOBA9Ev.d.ts → index-CiLMmCHX.d.ts} +1 -1
- package/dist/{index-Db5qzYRi.d.ts → index-DOdoDqvM.d.ts} +147 -43
- package/dist/{index-Lq_u0hqj.d.cts → index-DnKugm-h.d.cts} +1 -1
- package/dist/index.cjs +327 -327
- package/dist/index.d.cts +32 -66
- package/dist/index.d.ts +32 -66
- package/dist/index.js +5 -5
- package/dist/repositories/realm/index.cjs +38 -38
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +6 -6
- package/dist/repositories/sqlite/index.cjs +36 -36
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +6 -6
- package/dist/{taskRunner-amPuilMW.d.ts → taskRunner-CoE4Xx9K.d.ts} +2 -2
- package/dist/{taskRunner-DhZ-KQBW.d.cts → taskRunner-DFG0BN_R.d.cts} +2 -2
- package/dist/wallet/expo/background.cjs +15 -15
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +7 -7
- package/dist/wallet/expo/index.cjs +19 -16
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +3 -2
- package/dist/wallet/expo/index.d.ts +3 -2
- package/dist/wallet/expo/index.js +9 -6
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/worker/expo/index.cjs +10 -10
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +6 -6
- package/package.json +3 -3
- package/dist/chunk-4HZQSKWG.js.map +0 -1
- package/dist/chunk-6J4GABF7.cjs.map +0 -1
- package/dist/chunk-ACIQZLWL.cjs.map +0 -1
- package/dist/chunk-HWWSLCQN.js.map +0 -1
- package/dist/chunk-J2JZZTOE.js.map +0 -1
- package/dist/chunk-LQH7DACV.cjs.map +0 -1
- package/dist/chunk-X57WKONW.js.map +0 -1
- package/dist/chunk-XZHTYYW5.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { deserializeArkadeContractParams, serializeArkadeContractParams, ArkadeProgramScript, computeArkadeScriptPublicKey, staticWitness, resolveCsvTimelock, resolveTimelockValue, programFromArtifact, ArkadeScript } from './chunk-
|
|
2
|
-
import { SCRIPT_QUERY_CHUNK_SIZE, indexerPages, getNormalizedVtxos, DEFAULT_PAGE_SIZE } from './chunk-
|
|
1
|
+
import { deserializeArkadeContractParams, serializeArkadeContractParams, ArkadeProgramScript, computeArkadeScriptPublicKey, staticWitness, resolveCsvTimelock, resolveTimelockValue, programFromArtifact, ArkadeScript } from './chunk-43APGKWL.js';
|
|
2
|
+
import { SCRIPT_QUERY_CHUNK_SIZE, indexerPages, getNormalizedVtxos, DEFAULT_PAGE_SIZE } from './chunk-Z4LG3CZ4.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';
|
|
@@ -1906,8 +1906,8 @@ function instantiate(doc, construction, variables, keys) {
|
|
|
1906
1906
|
throw new Error(
|
|
1907
1907
|
`unknown artifact ${construction.definition.artifact}`
|
|
1908
1908
|
);
|
|
1909
|
-
const
|
|
1910
|
-
const args = { server:
|
|
1909
|
+
const operatorKey = hex.decode(keys.operatorPubkey).subarray(1);
|
|
1910
|
+
const args = { server: operatorKey };
|
|
1911
1911
|
for (const [field, binding] of Object.entries(construction.arguments)) {
|
|
1912
1912
|
if (typeof binding === "string") {
|
|
1913
1913
|
const value = variables[binding.slice(1, -1)];
|
|
@@ -1925,7 +1925,7 @@ function instantiate(doc, construction, variables, keys) {
|
|
|
1925
1925
|
if (field.type === "pubkey") args[field.name] = value.subarray(1);
|
|
1926
1926
|
}
|
|
1927
1927
|
return new ArkadeProgramScript(programFromArtifact(def), args, {
|
|
1928
|
-
serverKey,
|
|
1928
|
+
serverKey: operatorKey,
|
|
1929
1929
|
emulatorKey: hex.decode(keys.emulatorPubkey)
|
|
1930
1930
|
});
|
|
1931
1931
|
}
|
|
@@ -1958,15 +1958,15 @@ function executorContractParams(template, owner, keys, params) {
|
|
|
1958
1958
|
renewalWindow: params.renewalWindow,
|
|
1959
1959
|
maxFee: params.maxFee,
|
|
1960
1960
|
...template === "boarding" ? { boardingExitDelay: params.boardingExitDelay } : {},
|
|
1961
|
-
|
|
1962
|
-
|
|
1961
|
+
batchCosignerPubKey: hex.decode(keys.batchCosignerPubkey),
|
|
1962
|
+
operatorPubKey: hex.decode(keys.operatorPubkey),
|
|
1963
1963
|
emulatorPubKey: hex.decode(keys.emulatorPubkey)
|
|
1964
1964
|
});
|
|
1965
1965
|
}
|
|
1966
1966
|
function executorKeysOf(p) {
|
|
1967
1967
|
return {
|
|
1968
|
-
|
|
1969
|
-
|
|
1968
|
+
batchCosignerPubkey: hex.encode(p.batchCosignerPubKey),
|
|
1969
|
+
operatorPubkey: hex.encode(p.operatorPubKey),
|
|
1970
1970
|
emulatorPubkey: hex.encode(p.emulatorPubKey)
|
|
1971
1971
|
};
|
|
1972
1972
|
}
|
|
@@ -1979,7 +1979,7 @@ var ExecutorContractHandler = {
|
|
|
1979
1979
|
const script = new DefaultVtxo.Script(
|
|
1980
1980
|
{
|
|
1981
1981
|
pubKey: p.owner.subarray(1),
|
|
1982
|
-
serverPubKey: p.
|
|
1982
|
+
serverPubKey: p.operatorPubKey.subarray(1),
|
|
1983
1983
|
csvTimelock: sequenceToTimelock(p.boardingExitDelay ?? p.exitDelay)
|
|
1984
1984
|
},
|
|
1985
1985
|
derived.scripts.slice(2)
|
|
@@ -1999,8 +1999,9 @@ var ExecutorContractHandler = {
|
|
|
1999
1999
|
renewalWindow: params.renewalWindow.toString(),
|
|
2000
2000
|
maxFee: params.maxFee.toString(),
|
|
2001
2001
|
...params.boardingExitDelay !== void 0 ? { boardingExitDelay: params.boardingExitDelay.toString() } : {},
|
|
2002
|
-
|
|
2003
|
-
|
|
2002
|
+
batchCosignerPubKey: hex.encode(params.batchCosignerPubKey),
|
|
2003
|
+
// stored as serverPubKey, the name every contract type stores the operator pubkey under
|
|
2004
|
+
serverPubKey: hex.encode(params.operatorPubKey),
|
|
2004
2005
|
emulatorPubKey: hex.encode(params.emulatorPubKey)
|
|
2005
2006
|
};
|
|
2006
2007
|
},
|
|
@@ -2015,8 +2016,12 @@ var ExecutorContractHandler = {
|
|
|
2015
2016
|
renewalWindow: integer(params.renewalWindow, "renewalWindow"),
|
|
2016
2017
|
maxFee: integer(params.maxFee, "maxFee"),
|
|
2017
2018
|
...params.template === "boarding" ? { boardingExitDelay: integer(params.boardingExitDelay, "boardingExitDelay") } : {},
|
|
2018
|
-
|
|
2019
|
-
|
|
2019
|
+
// rows stored before the Executor's key rename hold it as cosignerPubKey
|
|
2020
|
+
batchCosignerPubKey: compressed(
|
|
2021
|
+
params.batchCosignerPubKey ?? params.cosignerPubKey,
|
|
2022
|
+
"batchCosignerPubKey"
|
|
2023
|
+
),
|
|
2024
|
+
operatorPubKey: compressed(params.serverPubKey, "serverPubKey"),
|
|
2020
2025
|
emulatorPubKey: compressed(params.emulatorPubKey, "emulatorPubKey")
|
|
2021
2026
|
};
|
|
2022
2027
|
},
|
|
@@ -2073,7 +2078,7 @@ function discovered(template, descriptor, { keys, params }, deps) {
|
|
|
2073
2078
|
type: ExecutorContractHandler.type,
|
|
2074
2079
|
params: serialized,
|
|
2075
2080
|
script: hex.encode(script.pkScript),
|
|
2076
|
-
address: script.address(deps.network.hrp, hex.decode(keys.
|
|
2081
|
+
address: script.address(deps.network.hrp, hex.decode(keys.operatorPubkey).subarray(1)).encode(),
|
|
2077
2082
|
scope: template === "boarding" ? "onchain" : "offchain",
|
|
2078
2083
|
label: template === "renewal" ? "Delegated renewal" : "Delegated boarding",
|
|
2079
2084
|
metadata: { signingDescriptor: descriptor }
|
|
@@ -2091,5 +2096,5 @@ contractHandlers.register(ArkadeContractHandler);
|
|
|
2091
2096
|
contractHandlers.register(ExecutorContractHandler);
|
|
2092
2097
|
|
|
2093
2098
|
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-
|
|
2095
|
-
//# sourceMappingURL=chunk-
|
|
2099
|
+
//# sourceMappingURL=chunk-R37I633T.js.map
|
|
2100
|
+
//# sourceMappingURL=chunk-R37I633T.js.map
|