@arkade-os/sdk 0.5.0-rc.9 → 0.5.1
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 +232 -51
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.d.cts +5 -5
- package/dist/adapters/expo.d.ts +5 -5
- package/dist/adapters/expo.js +3 -3
- package/dist/{asyncStorageTaskQueue-DZYrAWN8.d.ts → asyncStorageTaskQueue-CdWheMqT.d.ts} +1 -1
- package/dist/{asyncStorageTaskQueue-ChKX-D51.d.cts → asyncStorageTaskQueue-DFt5LgW5.d.cts} +1 -1
- package/dist/{chunk-R4KRWX7R.js → chunk-3M22PJVB.js} +427 -1078
- package/dist/chunk-3M22PJVB.js.map +1 -0
- package/dist/{chunk-J2K7WWMJ.js → chunk-6MIGYYWB.js} +112 -243
- package/dist/chunk-6MIGYYWB.js.map +1 -0
- package/dist/{chunk-FQCMEAWN.js → chunk-FXVEOEYB.js} +32 -39
- package/dist/chunk-FXVEOEYB.js.map +1 -0
- package/dist/{chunk-7OL2P5TV.cjs → chunk-GQUFPTN7.cjs} +39 -46
- package/dist/chunk-GQUFPTN7.cjs.map +1 -0
- package/dist/{chunk-VMVHRKXM.cjs → chunk-GW42FS2X.cjs} +494 -1122
- package/dist/chunk-GW42FS2X.cjs.map +1 -0
- package/dist/{chunk-V4JZOFYT.cjs → chunk-HQNQ3CLQ.cjs} +124 -254
- package/dist/chunk-HQNQ3CLQ.cjs.map +1 -0
- package/dist/{chunk-PO2ZDZZC.cjs → chunk-JJ6QKTFZ.cjs} +12 -10
- package/dist/chunk-JJ6QKTFZ.cjs.map +1 -0
- package/dist/{chunk-3TCWQPAC.js → chunk-NKKJEA3Z.js} +5842 -4284
- package/dist/chunk-NKKJEA3Z.js.map +1 -0
- package/dist/{chunk-JFZBKPSV.js → chunk-QFB55EOZ.js} +541 -400
- package/dist/chunk-QFB55EOZ.js.map +1 -0
- package/dist/{chunk-PKD5VPYX.cjs → chunk-QKNSMVBW.cjs} +6143 -4565
- package/dist/chunk-QKNSMVBW.cjs.map +1 -0
- package/dist/{chunk-VTXMC4N7.cjs → chunk-XLHUGP3G.cjs} +548 -399
- package/dist/chunk-XLHUGP3G.cjs.map +1 -0
- package/dist/{chunk-Z3QM5XFY.js → chunk-XQRIY5K5.js} +7 -5
- package/dist/chunk-XQRIY5K5.js.map +1 -0
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +5 -5
- package/dist/contracts/handlers/index.d.ts +5 -5
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-CyBnNY9v.d.ts → delegate-BSbGQabI.d.ts} +1 -1
- package/dist/{delegate-Cyv2suFd.d.cts → delegate-CFCfrReG.d.cts} +1 -1
- package/dist/{index-BIL9boGL.d.ts → index-B3fRWO5i.d.cts} +1652 -2291
- package/dist/{index-BIL9boGL.d.cts → index-B3fRWO5i.d.ts} +1652 -2291
- package/dist/index-CzUVvIxA.d.ts +645 -0
- package/dist/index-Fpf4mQZr.d.cts +645 -0
- package/dist/index.cjs +399 -311
- package/dist/index.d.cts +957 -1124
- package/dist/index.d.ts +957 -1124
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +165 -103
- package/dist/repositories/realm/index.cjs.map +1 -1
- package/dist/repositories/realm/index.d.cts +18 -14
- package/dist/repositories/realm/index.d.ts +18 -14
- package/dist/repositories/realm/index.js +153 -91
- package/dist/repositories/realm/index.js.map +1 -1
- package/dist/repositories/sqlite/index.cjs +226 -184
- package/dist/repositories/sqlite/index.cjs.map +1 -1
- package/dist/repositories/sqlite/index.d.cts +22 -21
- package/dist/repositories/sqlite/index.d.ts +22 -21
- package/dist/repositories/sqlite/index.js +218 -176
- package/dist/repositories/sqlite/index.js.map +1 -1
- package/dist/{taskRunner-Cu4uO1to.d.ts → taskRunner-CdfoCMaw.d.ts} +1 -1
- package/dist/{taskRunner-DxpSuKmh.d.cts → taskRunner-Dk6oDAtd.d.cts} +1 -1
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.cjs.map +1 -1
- package/dist/wallet/expo/background.d.cts +10 -16
- package/dist/wallet/expo/background.d.ts +10 -16
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/background.js.map +1 -1
- package/dist/wallet/expo/index.cjs +19 -14
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +8 -6
- package/dist/wallet/expo/index.d.ts +8 -6
- package/dist/wallet/expo/index.js +10 -5
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/wallet-BQHNgc_v.d.ts +1874 -0
- package/dist/wallet-D9dvXu-K.d.cts +1874 -0
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +6 -6
- package/dist/worker/expo/index.d.ts +6 -6
- package/dist/worker/expo/index.js +5 -5
- package/package.json +10 -11
- package/dist/chunk-3TCWQPAC.js.map +0 -1
- package/dist/chunk-7OL2P5TV.cjs.map +0 -1
- package/dist/chunk-FQCMEAWN.js.map +0 -1
- package/dist/chunk-J2K7WWMJ.js.map +0 -1
- package/dist/chunk-JFZBKPSV.js.map +0 -1
- package/dist/chunk-PKD5VPYX.cjs.map +0 -1
- package/dist/chunk-PO2ZDZZC.cjs.map +0 -1
- package/dist/chunk-R4KRWX7R.js.map +0 -1
- package/dist/chunk-V4JZOFYT.cjs.map +0 -1
- package/dist/chunk-VMVHRKXM.cjs.map +0 -1
- package/dist/chunk-VTXMC4N7.cjs.map +0 -1
- package/dist/chunk-Z3QM5XFY.js.map +0 -1
- package/dist/hdWalletCapable-D1ImQqlu.d.cts +0 -2214
- package/dist/hdWalletCapable-DvumVrKW.d.ts +0 -2214
- package/dist/index-DleNQcz5.d.cts +0 -850
- package/dist/index-QVhQgYvU.d.ts +0 -850
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { W as WalletRepository,
|
|
2
|
-
export {
|
|
1
|
+
import { W as WalletRepository, P as PageRequest, O as Outpoint, F as PageResult, D as ExtendedVirtualCoin, H as ScriptVtxoCursor, J as ScriptVtxoPageOptions, K as StoredVtxo, L as VtxoRepositoryKey, E as ExtendedCoin, M as TransactionHistoryPageFilter, Q as TransactionHistoryPageCursor, h as ArkTransaction, U as WalletState, C as ContractRepository, X as ContractFilter, B as Contract, Y as IntentRepository, Z as ArkIntent, _ as IntentPageFilter, $ as VirtualTxRepository, a0 as VirtualTx, a1 as VtxoBranch } from '../../index-B3fRWO5i.js';
|
|
2
|
+
export { a2 as ChainedTxType } from '../../index-B3fRWO5i.js';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
|
-
import '@scure/btc-signer/transaction.js';
|
|
5
|
-
import '@scure/btc-signer';
|
|
6
4
|
import '@scure/btc-signer/psbt.js';
|
|
5
|
+
import '@scure/btc-signer';
|
|
6
|
+
import '@scure/btc-signer/transaction.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Minimal SQL execution interface that consumers implement
|
|
@@ -39,7 +39,7 @@ interface SQLiteWalletRepositoryOptions {
|
|
|
39
39
|
*/
|
|
40
40
|
declare class SQLiteWalletRepository implements WalletRepository {
|
|
41
41
|
private readonly db;
|
|
42
|
-
readonly version:
|
|
42
|
+
readonly version: 2;
|
|
43
43
|
private initPromise;
|
|
44
44
|
private readonly prefix;
|
|
45
45
|
private readonly tables;
|
|
@@ -49,13 +49,15 @@ declare class SQLiteWalletRepository implements WalletRepository {
|
|
|
49
49
|
/**
|
|
50
50
|
* Bring the `vtxos` table to the current schema (v1 = `script` NOT NULL).
|
|
51
51
|
*
|
|
52
|
-
*
|
|
52
|
+
* Four cases:
|
|
53
53
|
* - Fresh install: create the v1 schema directly.
|
|
54
54
|
* - Legacy install without a `script` column: add it, backfill from
|
|
55
55
|
* `address`, then rebuild the table with NOT NULL (SQLite cannot add
|
|
56
56
|
* the NOT NULL constraint in place).
|
|
57
57
|
* - Legacy install with a nullable `script` column: backfill the NULLs
|
|
58
58
|
* and rebuild.
|
|
59
|
+
* - 0.4.x install: `script` is already NOT NULL but `virtual_status_json
|
|
60
|
+
* NOT NULL` is still there, and `saveVtxos` no longer writes it.
|
|
59
61
|
*
|
|
60
62
|
* The backfill derives `script` from the Ark address, matching what the
|
|
61
63
|
* indexer would have returned — new rows from the indexer always carry a
|
|
@@ -81,18 +83,24 @@ declare class SQLiteWalletRepository implements WalletRepository {
|
|
|
81
83
|
*/
|
|
82
84
|
private backfillCanonicalVtxoColumns;
|
|
83
85
|
private vtxosCreateSql;
|
|
86
|
+
/**
|
|
87
|
+
* `INSERT OR REPLACE` rows, as many to a statement as the parameter budget allows.
|
|
88
|
+
* No enclosing transaction: on the shared connection it would take in other repos' writes.
|
|
89
|
+
*/
|
|
90
|
+
private insertOrReplace;
|
|
84
91
|
[Symbol.asyncDispose](): Promise<void>;
|
|
85
92
|
clear(): Promise<void>;
|
|
86
|
-
|
|
93
|
+
getVtxosPage(address: string, page: PageRequest<Outpoint>): Promise<PageResult<ExtendedVirtualCoin, Outpoint>>;
|
|
87
94
|
saveVtxos(address: string, vtxos: ExtendedVirtualCoin[]): Promise<void>;
|
|
88
95
|
deleteVtxos(address: string): Promise<void>;
|
|
89
|
-
|
|
96
|
+
getVtxosForScriptPage(script: string, page: PageRequest<ScriptVtxoCursor>, options?: ScriptVtxoPageOptions): Promise<PageResult<StoredVtxo, ScriptVtxoCursor>>;
|
|
90
97
|
saveVtxosForScript(key: VtxoRepositoryKey, vtxos: ExtendedVirtualCoin[]): Promise<void>;
|
|
91
98
|
deleteVtxosForScript(script: string): Promise<void>;
|
|
92
|
-
|
|
93
|
-
|
|
99
|
+
getUtxosPage(address: string, page: PageRequest<Outpoint>): Promise<PageResult<ExtendedCoin, Outpoint>>;
|
|
100
|
+
private pageByAddress;
|
|
101
|
+
saveUtxos(addressOrBatch: string | ReadonlyMap<string, ExtendedCoin[]>, utxos?: ExtendedCoin[]): Promise<void>;
|
|
94
102
|
deleteUtxos(address: string): Promise<void>;
|
|
95
|
-
|
|
103
|
+
getTransactionHistoryPage(filter: TransactionHistoryPageFilter, page: PageRequest<TransactionHistoryPageCursor>): Promise<PageResult<ArkTransaction, TransactionHistoryPageCursor>>;
|
|
96
104
|
saveTransactions(address: string, txs: ArkTransaction[]): Promise<void>;
|
|
97
105
|
deleteTransactions(address: string): Promise<void>;
|
|
98
106
|
getWalletState(): Promise<WalletState | null>;
|
|
@@ -114,7 +122,7 @@ interface SQLiteContractRepositoryOptions {
|
|
|
114
122
|
*/
|
|
115
123
|
declare class SQLiteContractRepository implements ContractRepository {
|
|
116
124
|
private readonly db;
|
|
117
|
-
readonly version:
|
|
125
|
+
readonly version: 3;
|
|
118
126
|
private initPromise;
|
|
119
127
|
private readonly prefix;
|
|
120
128
|
private readonly table;
|
|
@@ -124,15 +132,10 @@ declare class SQLiteContractRepository implements ContractRepository {
|
|
|
124
132
|
private addColumnIfMissing;
|
|
125
133
|
[Symbol.asyncDispose](): Promise<void>;
|
|
126
134
|
clear(): Promise<void>;
|
|
127
|
-
|
|
135
|
+
getContractsPage(filter: ContractFilter | undefined, page: PageRequest): Promise<PageResult<Contract>>;
|
|
128
136
|
saveContract(contract: Contract): Promise<void>;
|
|
129
137
|
deleteContract(script: string): Promise<void>;
|
|
130
138
|
private addFilterCondition;
|
|
131
|
-
/**
|
|
132
|
-
* Same as {@link addFilterCondition}, except a row predating the
|
|
133
|
-
* column stores NULL and must match `"watched"`.
|
|
134
|
-
*/
|
|
135
|
-
private addWatchCondition;
|
|
136
139
|
}
|
|
137
140
|
|
|
138
141
|
declare class SQLiteIntentRepository implements IntentRepository {
|
|
@@ -146,10 +149,9 @@ declare class SQLiteIntentRepository implements IntentRepository {
|
|
|
146
149
|
});
|
|
147
150
|
private ensureInit;
|
|
148
151
|
private init;
|
|
149
|
-
private withTx;
|
|
150
152
|
clear(): Promise<void>;
|
|
151
153
|
saveIntent(intent: ArkIntent): Promise<void>;
|
|
152
|
-
|
|
154
|
+
getIntentsPage(filter: IntentPageFilter | undefined, page: PageRequest): Promise<PageResult<ArkIntent>>;
|
|
153
155
|
getLockedVtxoOutpoints(): Promise<Outpoint[]>;
|
|
154
156
|
[Symbol.asyncDispose](): Promise<void>;
|
|
155
157
|
}
|
|
@@ -166,7 +168,6 @@ declare class SQLiteVirtualTxRepository implements VirtualTxRepository {
|
|
|
166
168
|
});
|
|
167
169
|
private ensureInit;
|
|
168
170
|
private init;
|
|
169
|
-
private tx;
|
|
170
171
|
clear(): Promise<void>;
|
|
171
172
|
upsertVirtualTxs(txs: VirtualTx[]): Promise<void>;
|
|
172
173
|
getVirtualTx(txid: string): Promise<VirtualTx | null>;
|