@arkade-os/sdk 0.4.15 → 0.4.17
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 +102 -96
- package/dist/cjs/arkfee/estimator.js +1 -1
- package/dist/cjs/arkfee/types.js +2 -1
- package/dist/cjs/arknote/index.js +43 -4
- package/dist/cjs/bip322/index.js +1 -1
- package/dist/cjs/contracts/arkcontract.js +1 -1
- package/dist/cjs/contracts/contractManager.js +60 -28
- package/dist/cjs/contracts/contractWatcher.js +29 -22
- package/dist/cjs/contracts/handlers/default.js +1 -1
- package/dist/cjs/contracts/handlers/delegate.js +1 -1
- package/dist/cjs/contracts/handlers/helpers.js +1 -1
- package/dist/cjs/extension/asset/assetGroup.js +92 -5
- package/dist/cjs/extension/asset/assetId.js +67 -3
- package/dist/cjs/extension/asset/assetInput.js +18 -0
- package/dist/cjs/extension/asset/assetOutput.js +15 -0
- package/dist/cjs/extension/asset/assetRef.js +66 -0
- package/dist/cjs/extension/asset/metadata.js +15 -0
- package/dist/cjs/extension/asset/packet.js +4 -1
- package/dist/cjs/extension/index.js +1 -1
- package/dist/cjs/forfeit.js +14 -0
- package/dist/cjs/identity/seedIdentity.js +2 -2
- package/dist/cjs/identity/singleKey.js +4 -0
- package/dist/cjs/intent/index.js +28 -12
- package/dist/cjs/providers/ark.js +3 -2
- package/dist/cjs/providers/delegator.js +20 -1
- package/dist/cjs/providers/expoArk.js +2 -2
- package/dist/cjs/providers/indexer.js +2 -2
- package/dist/cjs/providers/onchain.js +2 -1
- package/dist/cjs/repositories/realm/schemas.js +2 -2
- package/dist/cjs/repositories/realm/types.js +1 -1
- package/dist/cjs/script/address.js +37 -6
- package/dist/cjs/script/base.js +70 -1
- package/dist/cjs/script/default.js +3 -0
- package/dist/cjs/script/delegate.js +4 -0
- package/dist/cjs/script/tapscript.js +17 -2
- package/dist/cjs/script/vhtlc.js +35 -27
- package/dist/cjs/storage/fileSystem.js +1 -1
- package/dist/cjs/storage/inMemory.js +1 -1
- package/dist/cjs/storage/indexedDB.js +1 -1
- package/dist/cjs/storage/localStorage.js +1 -1
- package/dist/cjs/tree/validation.js +1 -1
- package/dist/cjs/utils/arkTransaction.js +5 -5
- package/dist/cjs/utils/bip21.js +16 -3
- package/dist/cjs/utils/syncCursors.js +4 -4
- package/dist/cjs/utils/transaction.js +1 -1
- package/dist/cjs/utils/transactionHistory.js +11 -11
- package/dist/cjs/utils/unknownFields.js +3 -3
- package/dist/cjs/wallet/asset-manager.js +4 -4
- package/dist/cjs/wallet/batch.js +5 -5
- package/dist/cjs/wallet/delegator.js +9 -8
- package/dist/cjs/wallet/expo/background.js +3 -3
- package/dist/cjs/wallet/expo/wallet.js +7 -7
- package/dist/cjs/wallet/index.js +43 -0
- package/dist/cjs/wallet/onchain.js +43 -5
- package/dist/cjs/wallet/ramps.js +44 -14
- package/dist/cjs/wallet/serviceWorker/wallet-message-handler.js +22 -22
- package/dist/cjs/wallet/serviceWorker/wallet.js +28 -24
- package/dist/cjs/wallet/unroll.js +12 -8
- package/dist/cjs/wallet/utils.js +1 -1
- package/dist/cjs/wallet/vtxo-manager.js +122 -82
- package/dist/cjs/wallet/wallet.js +140 -77
- package/dist/cjs/worker/expo/asyncStorageTaskQueue.js +1 -1
- package/dist/cjs/worker/expo/processors/contractPollProcessor.js +2 -2
- package/dist/cjs/worker/expo/taskRunner.js +3 -3
- package/dist/cjs/worker/messageBus.js +3 -0
- package/dist/esm/arkfee/estimator.js +1 -1
- package/dist/esm/arkfee/types.js +2 -1
- package/dist/esm/arknote/index.js +43 -4
- package/dist/esm/bip322/index.js +1 -1
- package/dist/esm/contracts/arkcontract.js +1 -1
- package/dist/esm/contracts/contractManager.js +60 -28
- package/dist/esm/contracts/contractWatcher.js +29 -22
- package/dist/esm/contracts/handlers/default.js +1 -1
- package/dist/esm/contracts/handlers/delegate.js +1 -1
- package/dist/esm/contracts/handlers/helpers.js +1 -1
- package/dist/esm/extension/asset/assetGroup.js +92 -5
- package/dist/esm/extension/asset/assetId.js +67 -3
- package/dist/esm/extension/asset/assetInput.js +18 -0
- package/dist/esm/extension/asset/assetOutput.js +15 -0
- package/dist/esm/extension/asset/assetRef.js +66 -0
- package/dist/esm/extension/asset/metadata.js +15 -0
- package/dist/esm/extension/asset/packet.js +4 -1
- package/dist/esm/extension/index.js +1 -1
- package/dist/esm/forfeit.js +14 -0
- package/dist/esm/identity/seedIdentity.js +2 -2
- package/dist/esm/identity/singleKey.js +4 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/intent/index.js +28 -12
- package/dist/esm/providers/ark.js +3 -2
- package/dist/esm/providers/delegator.js +20 -1
- package/dist/esm/providers/expoArk.js +2 -2
- package/dist/esm/providers/indexer.js +2 -2
- package/dist/esm/providers/onchain.js +2 -1
- package/dist/esm/repositories/realm/schemas.js +2 -2
- package/dist/esm/repositories/realm/types.js +1 -1
- package/dist/esm/script/address.js +37 -6
- package/dist/esm/script/base.js +70 -1
- package/dist/esm/script/default.js +3 -0
- package/dist/esm/script/delegate.js +4 -0
- package/dist/esm/script/tapscript.js +17 -2
- package/dist/esm/script/vhtlc.js +35 -27
- package/dist/esm/storage/fileSystem.js +1 -1
- package/dist/esm/storage/inMemory.js +1 -1
- package/dist/esm/storage/indexedDB.js +1 -1
- package/dist/esm/storage/localStorage.js +1 -1
- package/dist/esm/tree/validation.js +1 -1
- package/dist/esm/utils/arkTransaction.js +5 -5
- package/dist/esm/utils/bip21.js +16 -3
- package/dist/esm/utils/syncCursors.js +4 -4
- package/dist/esm/utils/transaction.js +1 -1
- package/dist/esm/utils/transactionHistory.js +11 -11
- package/dist/esm/utils/unknownFields.js +3 -3
- package/dist/esm/wallet/asset-manager.js +4 -4
- package/dist/esm/wallet/batch.js +5 -5
- package/dist/esm/wallet/delegator.js +9 -8
- package/dist/esm/wallet/expo/background.js +3 -3
- package/dist/esm/wallet/expo/wallet.js +7 -7
- package/dist/esm/wallet/index.js +43 -0
- package/dist/esm/wallet/onchain.js +43 -5
- package/dist/esm/wallet/ramps.js +44 -14
- package/dist/esm/wallet/serviceWorker/wallet-message-handler.js +22 -22
- package/dist/esm/wallet/serviceWorker/wallet.js +28 -24
- package/dist/esm/wallet/unroll.js +12 -8
- package/dist/esm/wallet/utils.js +1 -1
- package/dist/esm/wallet/vtxo-manager.js +121 -81
- package/dist/esm/wallet/wallet.js +140 -77
- package/dist/esm/worker/expo/asyncStorageTaskQueue.js +1 -1
- package/dist/esm/worker/expo/processors/contractPollProcessor.js +2 -2
- package/dist/esm/worker/expo/taskRunner.js +3 -3
- package/dist/esm/worker/messageBus.js +3 -0
- package/dist/types/arkfee/estimator.d.ts +1 -1
- package/dist/types/arkfee/types.d.ts +2 -1
- package/dist/types/arknote/index.d.ts +44 -4
- package/dist/types/bip322/index.d.ts +1 -1
- package/dist/types/contracts/arkcontract.d.ts +1 -1
- package/dist/types/contracts/contractManager.d.ts +39 -65
- package/dist/types/contracts/contractWatcher.d.ts +39 -18
- package/dist/types/contracts/handlers/default.d.ts +1 -1
- package/dist/types/contracts/handlers/delegate.d.ts +1 -1
- package/dist/types/contracts/handlers/helpers.d.ts +1 -1
- package/dist/types/contracts/types.d.ts +36 -26
- package/dist/types/extension/asset/assetGroup.d.ts +92 -1
- package/dist/types/extension/asset/assetId.d.ts +67 -3
- package/dist/types/extension/asset/assetInput.d.ts +18 -0
- package/dist/types/extension/asset/assetOutput.d.ts +15 -0
- package/dist/types/extension/asset/assetRef.d.ts +66 -0
- package/dist/types/extension/asset/metadata.d.ts +15 -0
- package/dist/types/extension/asset/packet.d.ts +4 -1
- package/dist/types/extension/index.d.ts +1 -1
- package/dist/types/forfeit.d.ts +14 -0
- package/dist/types/identity/index.d.ts +16 -0
- package/dist/types/identity/seedIdentity.d.ts +8 -6
- package/dist/types/identity/singleKey.d.ts +4 -0
- package/dist/types/intent/index.d.ts +19 -6
- package/dist/types/providers/ark.d.ts +40 -2
- package/dist/types/providers/delegator.d.ts +54 -1
- package/dist/types/providers/expoArk.d.ts +2 -2
- package/dist/types/providers/indexer.d.ts +105 -2
- package/dist/types/providers/onchain.d.ts +62 -1
- package/dist/types/repositories/realm/schemas.d.ts +2 -2
- package/dist/types/repositories/realm/types.d.ts +2 -2
- package/dist/types/repositories/walletRepository.d.ts +16 -0
- package/dist/types/script/address.d.ts +35 -2
- package/dist/types/script/base.d.ts +66 -1
- package/dist/types/script/default.d.ts +3 -0
- package/dist/types/script/delegate.d.ts +4 -0
- package/dist/types/script/tapscript.d.ts +17 -2
- package/dist/types/script/vhtlc.d.ts +35 -27
- package/dist/types/storage/fileSystem.d.ts +1 -1
- package/dist/types/storage/inMemory.d.ts +1 -1
- package/dist/types/storage/index.d.ts +1 -1
- package/dist/types/storage/indexedDB.d.ts +1 -1
- package/dist/types/storage/localStorage.d.ts +1 -1
- package/dist/types/utils/arkTransaction.d.ts +3 -3
- package/dist/types/utils/bip21.d.ts +17 -0
- package/dist/types/utils/syncCursors.d.ts +4 -4
- package/dist/types/utils/transaction.d.ts +1 -1
- package/dist/types/utils/transactionHistory.d.ts +3 -3
- package/dist/types/utils/unknownFields.d.ts +5 -5
- package/dist/types/wallet/asset-manager.d.ts +3 -3
- package/dist/types/wallet/batch.d.ts +27 -7
- package/dist/types/wallet/delegator.d.ts +10 -0
- package/dist/types/wallet/expo/background.d.ts +4 -4
- package/dist/types/wallet/expo/wallet.d.ts +10 -10
- package/dist/types/wallet/index.d.ts +457 -25
- package/dist/types/wallet/onchain.d.ts +42 -4
- package/dist/types/wallet/ramps.d.ts +40 -10
- package/dist/types/wallet/serviceWorker/wallet-message-handler.d.ts +4 -4
- package/dist/types/wallet/serviceWorker/wallet.d.ts +71 -33
- package/dist/types/wallet/unroll.d.ts +8 -6
- package/dist/types/wallet/vtxo-manager.d.ts +146 -93
- package/dist/types/wallet/wallet.d.ts +91 -33
- package/dist/types/worker/expo/asyncStorageTaskQueue.d.ts +1 -1
- package/dist/types/worker/expo/processors/contractPollProcessor.d.ts +1 -1
- package/dist/types/worker/expo/taskRunner.d.ts +6 -6
- package/dist/types/worker/messageBus.d.ts +5 -3
- package/package.json +1 -1
|
@@ -15,26 +15,91 @@ export declare const TapTreeCoder: (typeof PSBTOutput.tapTree)[2];
|
|
|
15
15
|
export declare function scriptFromTapLeafScript(leaf: TapLeafScript): Bytes;
|
|
16
16
|
/**
|
|
17
17
|
* VtxoScript is a script that contains a list of tapleaf scripts.
|
|
18
|
-
* It is used to create
|
|
18
|
+
* It is used to create virtual output scripts.
|
|
19
|
+
*
|
|
20
|
+
* @see ArkAddress
|
|
19
21
|
*
|
|
20
22
|
* @example
|
|
21
23
|
* ```typescript
|
|
22
24
|
* const vtxoScript = new VtxoScript([new Uint8Array(32), new Uint8Array(32)]);
|
|
25
|
+
* ```
|
|
23
26
|
*/
|
|
24
27
|
export declare class VtxoScript {
|
|
25
28
|
readonly scripts: Bytes[];
|
|
26
29
|
readonly leaves: TapLeafScript[];
|
|
27
30
|
readonly tweakedPublicKey: Bytes;
|
|
31
|
+
/**
|
|
32
|
+
* Decode a virtual output script from an encoded TapTree.
|
|
33
|
+
*
|
|
34
|
+
* @param tapTree - Encoded TapTree bytes
|
|
35
|
+
* @returns Decoded virtual output script
|
|
36
|
+
* @throws Error if the TapTree cannot be decoded into a valid script set
|
|
37
|
+
* @see encode
|
|
38
|
+
*/
|
|
28
39
|
static decode(tapTree: Bytes): VtxoScript;
|
|
40
|
+
/**
|
|
41
|
+
* Create a virtual output script from its tapleaf scripts.
|
|
42
|
+
*
|
|
43
|
+
* @param scripts - Raw tapscript bytes for each leaf
|
|
44
|
+
* @throws Error if the provided leaves cannot produce a valid Taproot tree
|
|
45
|
+
*/
|
|
29
46
|
constructor(scripts: Bytes[]);
|
|
47
|
+
/**
|
|
48
|
+
* Encode the virtual output script to a TapTree byte representation.
|
|
49
|
+
*
|
|
50
|
+
* @returns Encoded TapTree bytes
|
|
51
|
+
* @see decode
|
|
52
|
+
*/
|
|
30
53
|
encode(): Bytes;
|
|
54
|
+
/**
|
|
55
|
+
* Build the Arkade address corresponding to this virtual output script.
|
|
56
|
+
*
|
|
57
|
+
* @param prefix - Bech32 human-readable prefix
|
|
58
|
+
* @param serverPubKey - 32-byte Arkade server public key
|
|
59
|
+
* @returns Arkade address for this script
|
|
60
|
+
* @see ArkAddress
|
|
61
|
+
*/
|
|
31
62
|
address(prefix: string, serverPubKey: Bytes): ArkAddress;
|
|
32
63
|
get pkScript(): Bytes;
|
|
64
|
+
/**
|
|
65
|
+
* Build the Taproot onchain address corresponding to this virtual output script.
|
|
66
|
+
*
|
|
67
|
+
* @param network - Bitcoin network descriptor
|
|
68
|
+
* @returns Taproot onchain address
|
|
69
|
+
* @see address
|
|
70
|
+
*/
|
|
33
71
|
onchainAddress(network: typeof NETWORK): string;
|
|
72
|
+
/**
|
|
73
|
+
* Look up a tapleaf script by its hex-encoded tapscript body.
|
|
74
|
+
*
|
|
75
|
+
* @param scriptHex - Hex-encoded tapscript body without the leaf version byte
|
|
76
|
+
* @returns Matching tapleaf script
|
|
77
|
+
* @throws Error if no matching leaf exists
|
|
78
|
+
*/
|
|
34
79
|
findLeaf(scriptHex: string): TapLeafScript;
|
|
80
|
+
/**
|
|
81
|
+
* Return all unilateral exit paths embedded in the virtual output script.
|
|
82
|
+
*
|
|
83
|
+
* @returns CSV-based exit paths found in the leaves
|
|
84
|
+
* @see getSequence
|
|
85
|
+
*/
|
|
35
86
|
exitPaths(): Array<CSVMultisigTapscript.Type | ConditionCSVMultisigTapscript.Type>;
|
|
36
87
|
}
|
|
37
88
|
export type EncodedVtxoScript = {
|
|
38
89
|
tapTree: Bytes;
|
|
39
90
|
};
|
|
91
|
+
/**
|
|
92
|
+
* Extract the timelock value encoded in a timelocked tapleaf, if any.
|
|
93
|
+
*
|
|
94
|
+
* The return value is unit-ambiguous: for a CSV leaf it is a BIP-68
|
|
95
|
+
* nSequence (relative timelock); for a CLTV leaf it is an absolute
|
|
96
|
+
* nLockTime. Callers must know which leaf shape they are inspecting to
|
|
97
|
+
* interpret the number correctly, and must not copy a CSV result into
|
|
98
|
+
* `Transaction.lockTime` (or vice versa).
|
|
99
|
+
*
|
|
100
|
+
* @param tapLeafScript - Tapleaf script to inspect
|
|
101
|
+
* @returns The encoded timelock value, or `undefined` when neither a CSV
|
|
102
|
+
* nor CLTV path is present
|
|
103
|
+
* @see VtxoScript.exitPaths
|
|
104
|
+
*/
|
|
40
105
|
export declare function getSequence(tapLeafScript: TapLeafScript): number | undefined;
|
|
@@ -34,8 +34,11 @@ export declare namespace DefaultVtxo {
|
|
|
34
34
|
static readonly DEFAULT_TIMELOCK: RelativeTimelock;
|
|
35
35
|
readonly forfeitScript: string;
|
|
36
36
|
readonly exitScript: string;
|
|
37
|
+
/** Create the default virtual output script with one forfeit path and one exit path. */
|
|
37
38
|
constructor(options: Options);
|
|
39
|
+
/** Return the forfeit tapleaf script. */
|
|
38
40
|
forfeit(): TapLeafScript;
|
|
41
|
+
/** Return the unilateral exit tapleaf script. */
|
|
39
42
|
exit(): TapLeafScript;
|
|
40
43
|
}
|
|
41
44
|
}
|
|
@@ -28,9 +28,13 @@ export declare namespace DelegateVtxo {
|
|
|
28
28
|
readonly options: Options;
|
|
29
29
|
readonly defaultVtxo: DefaultVtxo.Script;
|
|
30
30
|
readonly delegateScript: string;
|
|
31
|
+
/** Create a delegated virtual output script with forfeit, exit, and delegate paths. */
|
|
31
32
|
constructor(options: Options);
|
|
33
|
+
/** Return the forfeit tapleaf script. */
|
|
32
34
|
forfeit(): TapLeafScript;
|
|
35
|
+
/** Return the unilateral exit tapleaf script. */
|
|
33
36
|
exit(): TapLeafScript;
|
|
37
|
+
/** Return the delegate tapleaf script. */
|
|
34
38
|
delegate(): TapLeafScript;
|
|
35
39
|
}
|
|
36
40
|
}
|
|
@@ -29,9 +29,9 @@ export interface ArkTapscript<T extends TapscriptType, Params> {
|
|
|
29
29
|
script: Uint8Array;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* decodeTapscript is a function that decodes an
|
|
32
|
+
* decodeTapscript is a function that decodes an Arkade tapscript from a raw script.
|
|
33
33
|
*
|
|
34
|
-
* @throws {Error} if the script is not a valid
|
|
34
|
+
* @throws {Error} if the script is not a valid Arkade tapscript
|
|
35
35
|
* @example
|
|
36
36
|
* ```typescript
|
|
37
37
|
* const arkTapscript = decodeTapscript(new Uint8Array(32));
|
|
@@ -59,8 +59,11 @@ export declare namespace MultisigTapscript {
|
|
|
59
59
|
pubkeys: Bytes[];
|
|
60
60
|
type?: MultisigType;
|
|
61
61
|
};
|
|
62
|
+
/** Encode a plain multisig tapscript. */
|
|
62
63
|
function encode(params: Params): Type;
|
|
64
|
+
/** Decode a plain multisig tapscript from raw script bytes. */
|
|
63
65
|
function decode(script: Uint8Array): Type;
|
|
66
|
+
/** Return true when the tapscript is a plain multisig tapscript. */
|
|
64
67
|
function is(tapscript: ArkTapscript<any, any>): tapscript is Type;
|
|
65
68
|
}
|
|
66
69
|
/**
|
|
@@ -81,8 +84,11 @@ export declare namespace CSVMultisigTapscript {
|
|
|
81
84
|
type Params = {
|
|
82
85
|
timelock: RelativeTimelock;
|
|
83
86
|
} & MultisigTapscript.Params;
|
|
87
|
+
/** Encode a CSV multisig tapscript. */
|
|
84
88
|
function encode(params: Params): Type;
|
|
89
|
+
/** Decode a CSV multisig tapscript from raw script bytes. */
|
|
85
90
|
function decode(script: Uint8Array): Type;
|
|
91
|
+
/** Return true when the tapscript is a CSV multisig tapscript. */
|
|
86
92
|
function is(tapscript: ArkTapscript<any, any>): tapscript is Type;
|
|
87
93
|
}
|
|
88
94
|
/**
|
|
@@ -102,8 +108,11 @@ export declare namespace ConditionCSVMultisigTapscript {
|
|
|
102
108
|
type Params = {
|
|
103
109
|
conditionScript: Bytes;
|
|
104
110
|
} & CSVMultisigTapscript.Params;
|
|
111
|
+
/** Encode a condition + CSV multisig tapscript. */
|
|
105
112
|
function encode(params: Params): Type;
|
|
113
|
+
/** Decode a condition + CSV multisig tapscript from raw script bytes. */
|
|
106
114
|
function decode(script: Uint8Array): Type;
|
|
115
|
+
/** Return true when the tapscript is a condition + CSV multisig tapscript. */
|
|
107
116
|
function is(tapscript: ArkTapscript<any, any>): tapscript is Type;
|
|
108
117
|
}
|
|
109
118
|
/**
|
|
@@ -123,8 +132,11 @@ export declare namespace ConditionMultisigTapscript {
|
|
|
123
132
|
type Params = {
|
|
124
133
|
conditionScript: Bytes;
|
|
125
134
|
} & MultisigTapscript.Params;
|
|
135
|
+
/** Encode a condition + multisig tapscript. */
|
|
126
136
|
function encode(params: Params): Type;
|
|
137
|
+
/** Decode a condition + multisig tapscript from raw script bytes. */
|
|
127
138
|
function decode(script: Uint8Array): Type;
|
|
139
|
+
/** Return true when the tapscript is a condition + multisig tapscript. */
|
|
128
140
|
function is(tapscript: ArkTapscript<any, any>): tapscript is Type;
|
|
129
141
|
}
|
|
130
142
|
/**
|
|
@@ -144,7 +156,10 @@ export declare namespace CLTVMultisigTapscript {
|
|
|
144
156
|
type Params = {
|
|
145
157
|
absoluteTimelock: bigint;
|
|
146
158
|
} & MultisigTapscript.Params;
|
|
159
|
+
/** Encode a CLTV multisig tapscript. */
|
|
147
160
|
function encode(params: Params): Type;
|
|
161
|
+
/** Decode a CLTV multisig tapscript from raw script bytes. */
|
|
148
162
|
function decode(script: Uint8Array): Type;
|
|
163
|
+
/** Return true when the tapscript is a CLTV multisig tapscript. */
|
|
149
164
|
function is(tapscript: ArkTapscript<any, any>): tapscript is Type;
|
|
150
165
|
}
|
|
@@ -1,33 +1,7 @@
|
|
|
1
1
|
import { Bytes } from "@scure/btc-signer/utils.js";
|
|
2
2
|
import { RelativeTimelock } from "./tapscript";
|
|
3
3
|
import { TapLeafScript, VtxoScript } from "./base";
|
|
4
|
-
/**
|
|
5
|
-
* Virtual Hash Time Lock Contract (VHTLC) implementation.
|
|
6
|
-
*
|
|
7
|
-
* VHTLC is a contract that enables atomic swaps and conditional payments
|
|
8
|
-
* in the Ark protocol. It provides multiple spending paths:
|
|
9
|
-
*
|
|
10
|
-
* - **claim**: Receiver can claim funds by revealing the preimage
|
|
11
|
-
* - **refund**: Sender and receiver can collaboratively refund
|
|
12
|
-
* - **refundWithoutReceiver**: Sender can refund after locktime expires
|
|
13
|
-
* - **unilateralClaim**: Receiver can claim unilaterally after delay
|
|
14
|
-
* - **unilateralRefund**: Sender and receiver can refund unilaterally after delay
|
|
15
|
-
* - **unilateralRefundWithoutReceiver**: Sender can refund unilaterally after delay
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* const vhtlc = new VHTLC.Script({
|
|
20
|
-
* sender: alicePubKey,
|
|
21
|
-
* receiver: bobPubKey,
|
|
22
|
-
* server: serverPubKey,
|
|
23
|
-
* preimageHash: hash160(secret),
|
|
24
|
-
* refundLocktime: BigInt(chainTip + 10),
|
|
25
|
-
* unilateralClaimDelay: { type: 'blocks', value: 100n },
|
|
26
|
-
* unilateralRefundDelay: { type: 'blocks', value: 102n },
|
|
27
|
-
* unilateralRefundWithoutReceiverDelay: { type: 'blocks', value: 103n }
|
|
28
|
-
* });
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
4
|
+
/** Virtual Hash Time Lock Contract (VHTLC) namespace. */
|
|
31
5
|
export declare namespace VHTLC {
|
|
32
6
|
interface Options {
|
|
33
7
|
sender: Bytes;
|
|
@@ -39,6 +13,33 @@ export declare namespace VHTLC {
|
|
|
39
13
|
unilateralRefundDelay: RelativeTimelock;
|
|
40
14
|
unilateralRefundWithoutReceiverDelay: RelativeTimelock;
|
|
41
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Virtual Hash Time Lock Contract (VHTLC) script implementation.
|
|
18
|
+
*
|
|
19
|
+
* VHTLC enables atomic swaps and conditional payments in the Arkade protocol.
|
|
20
|
+
* It provides multiple spending paths:
|
|
21
|
+
*
|
|
22
|
+
* - **claim**: Receiver can claim funds by revealing the preimage
|
|
23
|
+
* - **refund**: Sender and receiver can collaboratively refund
|
|
24
|
+
* - **refundWithoutReceiver**: Sender can refund after locktime expires
|
|
25
|
+
* - **unilateralClaim**: Receiver can claim unilaterally after delay
|
|
26
|
+
* - **unilateralRefund**: Sender and receiver can refund unilaterally after delay
|
|
27
|
+
* - **unilateralRefundWithoutReceiver**: Sender can refund unilaterally after delay
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* const vhtlc = new VHTLC.Script({
|
|
32
|
+
* sender: alicePubKey,
|
|
33
|
+
* receiver: bobPubKey,
|
|
34
|
+
* server: serverPubKey,
|
|
35
|
+
* preimageHash: hash160(secret),
|
|
36
|
+
* refundLocktime: BigInt(chainTip + 10),
|
|
37
|
+
* unilateralClaimDelay: { type: 'blocks', value: 100n },
|
|
38
|
+
* unilateralRefundDelay: { type: 'blocks', value: 102n },
|
|
39
|
+
* unilateralRefundWithoutReceiverDelay: { type: 'blocks', value: 103n }
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
42
43
|
class Script extends VtxoScript {
|
|
43
44
|
readonly options: Options;
|
|
44
45
|
readonly claimScript: string;
|
|
@@ -47,12 +48,19 @@ export declare namespace VHTLC {
|
|
|
47
48
|
readonly unilateralClaimScript: string;
|
|
48
49
|
readonly unilateralRefundScript: string;
|
|
49
50
|
readonly unilateralRefundWithoutReceiverScript: string;
|
|
51
|
+
/** Create a VHTLC script from the supplied participant keys, hash, and timelocks. */
|
|
50
52
|
constructor(options: Options);
|
|
53
|
+
/** Return the collaborative claim tapleaf script. */
|
|
51
54
|
claim(): TapLeafScript;
|
|
55
|
+
/** Return the collaborative refund tapleaf script. */
|
|
52
56
|
refund(): TapLeafScript;
|
|
57
|
+
/** Return the refund-without-receiver tapleaf script. */
|
|
53
58
|
refundWithoutReceiver(): TapLeafScript;
|
|
59
|
+
/** Return the unilateral claim tapleaf script. */
|
|
54
60
|
unilateralClaim(): TapLeafScript;
|
|
61
|
+
/** Return the unilateral refund tapleaf script. */
|
|
55
62
|
unilateralRefund(): TapLeafScript;
|
|
63
|
+
/** Return the unilateral refund-without-receiver tapleaf script. */
|
|
56
64
|
unilateralRefundWithoutReceiver(): TapLeafScript;
|
|
57
65
|
}
|
|
58
66
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { StorageAdapter } from "./index";
|
|
2
2
|
/**
|
|
3
|
-
* @deprecated Use
|
|
3
|
+
* @deprecated Use repository implementations via `StorageConfig` instead.
|
|
4
4
|
*/
|
|
5
5
|
export declare class FileSystemStorageAdapter implements StorageAdapter {
|
|
6
6
|
private readonly basePath;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @deprecated Use StorageConfig instead
|
|
2
|
+
* @deprecated Use `StorageConfig` with repository implementations such as `IndexedDBWalletRepository` and `IndexedDBContractRepository` instead.
|
|
3
3
|
*/
|
|
4
4
|
export interface StorageAdapter {
|
|
5
5
|
getItem(key: string): Promise<string | null>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { StorageAdapter } from "./index";
|
|
2
2
|
/**
|
|
3
|
-
* @deprecated Use
|
|
3
|
+
* @deprecated Use repository implementations via `StorageConfig` instead.
|
|
4
4
|
*/
|
|
5
5
|
export declare class LocalStorageAdapter implements StorageAdapter {
|
|
6
6
|
private getSafeLocalStorage;
|
|
@@ -16,7 +16,7 @@ export type OffchainTx = {
|
|
|
16
16
|
*
|
|
17
17
|
* Creates one checkpoint transaction per input and a virtual transaction that
|
|
18
18
|
* combines all the checkpoints, sending to the specified outputs. This is the
|
|
19
|
-
* core function for creating
|
|
19
|
+
* core function for creating Arkade transactions.
|
|
20
20
|
*
|
|
21
21
|
* @param inputs - Array of virtual transaction inputs
|
|
22
22
|
* @param outputs - Array of transaction outputs
|
|
@@ -42,8 +42,8 @@ export declare function verifyTapscriptSignatures(tx: Transaction, inputIndex: n
|
|
|
42
42
|
*/
|
|
43
43
|
export declare function combineTapscriptSigs(signedTx: Transaction, originalTx: Transaction): Transaction;
|
|
44
44
|
/**
|
|
45
|
-
* Validates if a given string is a valid
|
|
46
|
-
* @param address The
|
|
45
|
+
* Validates if a given string is a valid Arkade address by attempting to decode it.
|
|
46
|
+
* @param address The Arkade address to validate.
|
|
47
47
|
* @returns True if the address is valid, false otherwise.
|
|
48
48
|
*/
|
|
49
49
|
export declare function isValidArkAddress(address: string): boolean;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
/** Known BIP21 parameters including Arkade-specific extensions. */
|
|
1
2
|
export interface BIP21Params {
|
|
2
3
|
address?: string;
|
|
3
4
|
amount?: number;
|
|
4
5
|
label?: string;
|
|
5
6
|
message?: string;
|
|
7
|
+
/** Optional Arkade address parameter. */
|
|
6
8
|
ark?: string;
|
|
9
|
+
/** Optional Silent Payment address parameter. */
|
|
7
10
|
sp?: string;
|
|
8
11
|
[key: string]: string | number | undefined;
|
|
9
12
|
}
|
|
13
|
+
/** Result returned by `BIP21.parse`. */
|
|
10
14
|
export interface BIP21ParseResult {
|
|
11
15
|
originalString: string;
|
|
12
16
|
params: BIP21Params;
|
|
@@ -16,6 +20,19 @@ export declare enum BIP21Error {
|
|
|
16
20
|
INVALID_ADDRESS = "Invalid address"
|
|
17
21
|
}
|
|
18
22
|
export declare class BIP21 {
|
|
23
|
+
/**
|
|
24
|
+
* Create a BIP21 URI from the provided parameters.
|
|
25
|
+
*
|
|
26
|
+
* @param params - BIP21 parameters to encode
|
|
27
|
+
* @returns Encoded BIP21 URI
|
|
28
|
+
*/
|
|
19
29
|
static create(params: BIP21Params): string;
|
|
30
|
+
/**
|
|
31
|
+
* Parse a BIP21 URI and return its decoded parameters.
|
|
32
|
+
*
|
|
33
|
+
* @param uri - BIP21 URI to parse
|
|
34
|
+
* @returns Parsed BIP21 URI data
|
|
35
|
+
* @throws Error if the URI does not start with the `bitcoin:` scheme
|
|
36
|
+
*/
|
|
20
37
|
static parse(uri: string): BIP21ParseResult;
|
|
21
38
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WalletRepository, WalletState } from "../repositories/walletRepository";
|
|
2
2
|
/** Lag behind real-time to avoid racing with indexer writes. */
|
|
3
3
|
export declare const SAFETY_LAG_MS = 30000;
|
|
4
|
-
/** Overlap window so boundary
|
|
4
|
+
/** Overlap window so boundary virtual outputs are never missed. */
|
|
5
5
|
export declare const OVERLAP_MS = 60000;
|
|
6
6
|
type SyncCursors = Record<string, number>;
|
|
7
7
|
/**
|
|
@@ -38,15 +38,15 @@ export declare function clearSyncCursors(repo: WalletRepository, scripts?: strin
|
|
|
38
38
|
* Returns `undefined` when the script has no cursor (bootstrap needed).
|
|
39
39
|
*
|
|
40
40
|
* No upper bound (`before`) is applied to the query so that freshly
|
|
41
|
-
* created
|
|
42
|
-
* when advancing the cursor (see
|
|
41
|
+
* created virtual outputs are never excluded. The safety lag is applied only
|
|
42
|
+
* when advancing the cursor (see @see cursorCutoff).
|
|
43
43
|
*/
|
|
44
44
|
export declare function computeSyncWindow(cursor: number | undefined): {
|
|
45
45
|
after: number;
|
|
46
46
|
} | undefined;
|
|
47
47
|
/**
|
|
48
48
|
* The safe high-water mark for cursor advancement.
|
|
49
|
-
* Lags behind real-time by
|
|
49
|
+
* Lags behind real-time by @see SAFETY_LAG_MS so that virtual outputs still
|
|
50
50
|
* being indexed are re-queried on the next sync.
|
|
51
51
|
*
|
|
52
52
|
* When `requestStartedAt` is provided the cutoff is frozen to the
|
|
@@ -3,7 +3,7 @@ import { TxOpts } from "@scure/btc-signer/transaction";
|
|
|
3
3
|
import { Bytes } from "@scure/btc-signer/utils";
|
|
4
4
|
/**
|
|
5
5
|
* Transaction is a wrapper around the @scure/btc-signer Transaction class.
|
|
6
|
-
* It adds the
|
|
6
|
+
* It adds the Arkade protocol specific options to the transaction.
|
|
7
7
|
*/
|
|
8
8
|
export declare class Transaction extends BtcSignerTransaction {
|
|
9
9
|
static ARK_TX_OPTS: TxOpts;
|
|
@@ -3,13 +3,13 @@ type ExtendedArkTransaction = ArkTransaction & {
|
|
|
3
3
|
tag: "offchain" | "boarding" | "exit" | "batch";
|
|
4
4
|
};
|
|
5
5
|
/**
|
|
6
|
-
* Builds the transaction history by analyzing virtual
|
|
6
|
+
* Builds the transaction history by analyzing virtual outputs, boarding transactions, and ignored commitments.
|
|
7
7
|
* History is sorted from newest to oldest and is composed only of SENT and RECEIVED transactions.
|
|
8
8
|
*
|
|
9
|
-
* @param {VirtualCoin[]} vtxos - An array of virtual
|
|
9
|
+
* @param {VirtualCoin[]} vtxos - An array of virtual outputs representing the user's transactions and balances.
|
|
10
10
|
* @param {ArkTransaction[]} allBoardingTxs - An array of boarding transactions to include in the history.
|
|
11
11
|
* @param {Set<string>} commitmentsToIgnore - A set of commitment IDs that should be excluded from processing.
|
|
12
|
-
* @return {ExtendedArkTransaction[]} A sorted array of extended
|
|
12
|
+
* @return {ExtendedArkTransaction[]} A sorted array of extended Arkade transactions, representing the transaction history.
|
|
13
13
|
*/
|
|
14
14
|
export declare function buildTransactionHistory(vtxos: VirtualCoin[], allBoardingTxs: ArkTransaction[], commitmentsToIgnore: Set<string>, getTxCreatedAt?: (txid: string) => Promise<number | undefined>): Promise<ExtendedArkTransaction[]>;
|
|
15
15
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Transaction } from "@scure/btc-signer";
|
|
2
2
|
import { TransactionInputUpdate } from "@scure/btc-signer/psbt.js";
|
|
3
3
|
/**
|
|
4
|
-
* ArkPsbtFieldKey
|
|
4
|
+
* ArkPsbtFieldKey are the available key names for the Arkade PSBT custom fields.
|
|
5
5
|
*/
|
|
6
6
|
export declare enum ArkPsbtFieldKey {
|
|
7
7
|
VtxoTaprootTree = "taptree",
|
|
@@ -10,13 +10,13 @@ export declare enum ArkPsbtFieldKey {
|
|
|
10
10
|
ConditionWitness = "condition"
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* ArkPsbtFieldKeyType is the type of the
|
|
14
|
-
* Every
|
|
13
|
+
* ArkPsbtFieldKeyType is the key type of the Arkade PSBT custom field.
|
|
14
|
+
* Every Arkade PSBT field has key type 222.
|
|
15
15
|
*/
|
|
16
16
|
export declare const ArkPsbtFieldKeyType = 222;
|
|
17
17
|
/**
|
|
18
|
-
* ArkPsbtFieldCoder is the coder for the
|
|
19
|
-
*
|
|
18
|
+
* ArkPsbtFieldCoder is the coder for the Arkade PSBT custom fields.
|
|
19
|
+
* Each type has its own coder.
|
|
20
20
|
*/
|
|
21
21
|
export interface ArkPsbtFieldCoder<T> {
|
|
22
22
|
key: ArkPsbtFieldKey;
|
|
@@ -15,7 +15,7 @@ export declare class AssetManager extends ReadonlyAssetManager implements IAsset
|
|
|
15
15
|
* @param params.amount - Amount of asset units to issue
|
|
16
16
|
* @param params.controlAssetId - Optional control asset ID (for reissuable assets)
|
|
17
17
|
* @param params.metadata - Optional metadata to attach to the asset
|
|
18
|
-
* @returns Promise resolving to the
|
|
18
|
+
* @returns Promise resolving to the Arkade transaction ID and asset ID
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* ```typescript
|
|
@@ -39,7 +39,7 @@ export declare class AssetManager extends ReadonlyAssetManager implements IAsset
|
|
|
39
39
|
* @param params - Parameters for asset reissuance
|
|
40
40
|
* @param params.assetId - The asset ID to reissue (control asset ID is resolved via getAssetDetails)
|
|
41
41
|
* @param params.amount - Amount of additional units to issue
|
|
42
|
-
* @returns Promise resolving to the
|
|
42
|
+
* @returns Promise resolving to the Arkade transaction ID
|
|
43
43
|
*
|
|
44
44
|
* @example
|
|
45
45
|
* ```typescript
|
|
@@ -55,7 +55,7 @@ export declare class AssetManager extends ReadonlyAssetManager implements IAsset
|
|
|
55
55
|
* @param params - Parameters for burning
|
|
56
56
|
* @param params.assetId - The asset ID to burn
|
|
57
57
|
* @param params.amount - Amount of units to burn
|
|
58
|
-
* @returns Promise resolving to the
|
|
58
|
+
* @returns Promise resolving to the Arkade transaction ID
|
|
59
59
|
*
|
|
60
60
|
* @example
|
|
61
61
|
* ```typescript
|
|
@@ -10,7 +10,7 @@ import { TxTree } from "../tree/txTree";
|
|
|
10
10
|
* const handler = wallet.createBatchHandler(intentId, inputs, expectedRecipients, musig2session);
|
|
11
11
|
*
|
|
12
12
|
* const abortController = new AbortController();
|
|
13
|
-
* // Get event stream from
|
|
13
|
+
* // Get event stream from the Arkade provider
|
|
14
14
|
* const eventStream = arkProvider.getEventStream(
|
|
15
15
|
* abortController.signal,
|
|
16
16
|
* ['your-topic-1', 'your-topic-2']
|
|
@@ -39,7 +39,7 @@ export declare namespace Batch {
|
|
|
39
39
|
/**
|
|
40
40
|
* Called when tree signing starts.
|
|
41
41
|
* @param event The tree signing started event.
|
|
42
|
-
* @param vtxoTree The unsigned
|
|
42
|
+
* @param vtxoTree The unsigned virtual output tree, reconstructed from the TreeTxEvent events.
|
|
43
43
|
* @returns Promise resolving to a boolean indicating whether to continue processing.
|
|
44
44
|
*/
|
|
45
45
|
onTreeSigningStarted(event: TreeSigningStartedEvent, vtxoTree: TxTree): Promise<{
|
|
@@ -56,21 +56,41 @@ export declare namespace Batch {
|
|
|
56
56
|
/**
|
|
57
57
|
* Called during batch finalization.
|
|
58
58
|
* @param event The batch finalization event.
|
|
59
|
-
* @param vtxoTree The signed
|
|
59
|
+
* @param vtxoTree The signed virtual output tree, reconstructed from the TreeTxEvent events.
|
|
60
60
|
* @param connectorTree The connector transaction tree, reconstructed from the TreeTxEvent events.
|
|
61
61
|
*/
|
|
62
62
|
onBatchFinalization(event: BatchFinalizationEvent, vtxoTree?: TxTree, connectorTree?: TxTree): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Called when batch finalization completes successfully.
|
|
65
|
+
*
|
|
66
|
+
* @param event - Batch finalized event
|
|
67
|
+
*/
|
|
63
68
|
onBatchFinalized?(event: BatchFinalizedEvent): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Called when batch processing fails.
|
|
71
|
+
*
|
|
72
|
+
* @param event - Batch failed event
|
|
73
|
+
*/
|
|
64
74
|
onBatchFailed?(event: BatchFailedEvent): Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* Called for each virtual output tree transaction chunk received during batch processing.
|
|
77
|
+
*
|
|
78
|
+
* @param event - Tree transaction event
|
|
79
|
+
*/
|
|
65
80
|
onTreeTxEvent?(event: TreeTxEvent): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Called for each tree signature event received during batch processing.
|
|
83
|
+
*
|
|
84
|
+
* @param event - Tree signature event
|
|
85
|
+
*/
|
|
66
86
|
onTreeSignatureEvent?(event: TreeSignatureEvent): Promise<void>;
|
|
67
87
|
}
|
|
68
88
|
/**
|
|
69
89
|
* Options for the join function.
|
|
70
|
-
*
|
|
71
|
-
* @
|
|
72
|
-
* @
|
|
73
|
-
* @
|
|
90
|
+
*
|
|
91
|
+
* @property abortController - Abort controller used to cancel batch processing.
|
|
92
|
+
* @property skipVtxoTreeSigning - Ignore events related to the virtual output tree musig2 signing session.
|
|
93
|
+
* @property eventCallback - Callback invoked for each settlement event received while joining the batch.
|
|
74
94
|
*/
|
|
75
95
|
type JoinOptions = Partial<{
|
|
76
96
|
abortController: AbortController;
|
|
@@ -3,6 +3,14 @@ import { ArkProvider, DelegateInfo, ExtendedVirtualCoin, Identity, Outpoint } fr
|
|
|
3
3
|
import { DelegatorProvider } from "../providers/delegator";
|
|
4
4
|
import { Bytes } from "@scure/btc-signer/utils";
|
|
5
5
|
export interface IDelegatorManager {
|
|
6
|
+
/**
|
|
7
|
+
* Delegate virtual outputs to the remote delegation service.
|
|
8
|
+
*
|
|
9
|
+
* @param vtxos - Virtual outputs to delegate
|
|
10
|
+
* @param destination - Arkade address that should receive renewed funds
|
|
11
|
+
* @param delegateAt - Optional timestamp to force a specific delegation time
|
|
12
|
+
* @returns Successfully delegated and failed outpoint groups
|
|
13
|
+
*/
|
|
6
14
|
delegate(vtxos: ExtendedVirtualCoin[], destination: string, delegateAt?: Date): Promise<{
|
|
7
15
|
delegated: Outpoint[];
|
|
8
16
|
failed: {
|
|
@@ -10,12 +18,14 @@ export interface IDelegatorManager {
|
|
|
10
18
|
error: unknown;
|
|
11
19
|
}[];
|
|
12
20
|
}>;
|
|
21
|
+
/** Fetch delegate metadata such as pubkey, fee, and delegate address. */
|
|
13
22
|
getDelegateInfo(): Promise<DelegateInfo>;
|
|
14
23
|
}
|
|
15
24
|
export declare class DelegatorManagerImpl implements IDelegatorManager {
|
|
16
25
|
readonly delegatorProvider: DelegatorProvider;
|
|
17
26
|
readonly arkInfoProvider: Pick<ArkProvider, "getInfo">;
|
|
18
27
|
readonly identity: Identity;
|
|
28
|
+
/** Create a delegator manager from the configured provider, Arkade info source, and wallet identity. */
|
|
19
29
|
constructor(delegatorProvider: DelegatorProvider, arkInfoProvider: Pick<ArkProvider, "getInfo">, identity: Identity);
|
|
20
30
|
getDelegateInfo(): Promise<DelegateInfo>;
|
|
21
31
|
delegate(vtxos: ExtendedVirtualCoin[], destination: string, delegateAt?: Date): Promise<{
|
|
@@ -3,7 +3,7 @@ import type { ContractRepository } from "../../repositories/contractRepository";
|
|
|
3
3
|
import type { AsyncStorageTaskQueue } from "../../worker/expo/asyncStorageTaskQueue";
|
|
4
4
|
import type { TaskProcessor } from "../../worker/expo/taskRunner";
|
|
5
5
|
/**
|
|
6
|
-
* Wallet parameters persisted by
|
|
6
|
+
* Wallet parameters persisted by @see ExpoWallet.setup and read
|
|
7
7
|
* by the background handler to reconstruct providers and `extendVtxo`
|
|
8
8
|
* without a network call.
|
|
9
9
|
*/
|
|
@@ -15,7 +15,7 @@ export interface PersistedBackgroundConfig {
|
|
|
15
15
|
exitTimelockType: "blocks" | "seconds";
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Options for
|
|
18
|
+
* Options for @see defineExpoBackgroundTask.
|
|
19
19
|
*/
|
|
20
20
|
export interface DefineBackgroundTaskOptions {
|
|
21
21
|
/** AsyncStorage-backed queue (must match the one passed to ExpoWallet.setup). */
|
|
@@ -52,8 +52,8 @@ export declare function defineExpoBackgroundTask(taskName: string, options: Defi
|
|
|
52
52
|
/**
|
|
53
53
|
* Activate the OS-level background task scheduler.
|
|
54
54
|
*
|
|
55
|
-
* Call this after
|
|
56
|
-
*
|
|
55
|
+
* Call this after @see defineExpoBackgroundTask (typically inside
|
|
56
|
+
* @see ExpoWallet.setup or in a React component after wallet init).
|
|
57
57
|
*
|
|
58
58
|
* @param minimumInterval - Minimum interval in minutes (default 15).
|
|
59
59
|
*/
|