@arkade-os/sdk 0.4.64 → 0.4.66
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 +5 -5
- package/dist/adapters/expo.d.cts +3 -6
- package/dist/adapters/expo.d.ts +3 -6
- package/dist/adapters/expo.js +3 -3
- package/dist/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{asyncStorageTaskQueue-Dq_UcvDx.d.ts → asyncStorageTaskQueue-B6SijMi3.d.ts} +1 -1
- package/dist/{asyncStorageTaskQueue-Chwe60Ce.d.cts → asyncStorageTaskQueue-BZcIN7sA.d.cts} +1 -1
- package/dist/{chunk-HQ2DDMQN.js → chunk-2JZGPXU4.js} +170 -6
- package/dist/chunk-2JZGPXU4.js.map +1 -0
- package/dist/{chunk-RXITDAV4.cjs → chunk-3S3JZUEN.cjs} +184 -19
- package/dist/chunk-3S3JZUEN.cjs.map +1 -0
- package/dist/{chunk-USXWE2EJ.js → chunk-55ZZ6RBL.js} +4 -4
- package/dist/{chunk-USXWE2EJ.js.map → chunk-55ZZ6RBL.js.map} +1 -1
- package/dist/{chunk-LPEE2H2M.cjs → chunk-5E6IZNRG.cjs} +656 -774
- package/dist/chunk-5E6IZNRG.cjs.map +1 -0
- package/dist/{chunk-LN2VZP63.js → chunk-CYOI4PEA.js} +162 -15
- package/dist/chunk-CYOI4PEA.js.map +1 -0
- package/dist/{chunk-WJN2BLEI.js → chunk-DSC3G6QZ.js} +253 -379
- package/dist/chunk-DSC3G6QZ.js.map +1 -0
- package/dist/{chunk-4N45WCSJ.cjs → chunk-IM6IKNSL.cjs} +17 -17
- package/dist/{chunk-4N45WCSJ.cjs.map → chunk-IM6IKNSL.cjs.map} +1 -1
- package/dist/{chunk-XJCBV4AA.js → chunk-J33ZEM3A.js} +26 -18
- package/dist/chunk-J33ZEM3A.js.map +1 -0
- package/dist/{chunk-35YIP6OA.cjs → chunk-LL47QIHD.cjs} +10 -10
- package/dist/{chunk-35YIP6OA.cjs.map → chunk-LL47QIHD.cjs.map} +1 -1
- package/dist/{chunk-WXCVS6PD.cjs → chunk-PXPPZF5K.cjs} +207 -59
- package/dist/chunk-PXPPZF5K.cjs.map +1 -0
- package/dist/{chunk-ZUEGFM3T.js → chunk-R5POS3RS.js} +4 -4
- package/dist/{chunk-ZUEGFM3T.js.map → chunk-R5POS3RS.js.map} +1 -1
- package/dist/{chunk-FZFSGOTZ.cjs → chunk-ZIRFXBKL.cjs} +26 -18
- package/dist/chunk-ZIRFXBKL.cjs.map +1 -0
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-Dv_9OVHv.d.ts → delegate-T-vgxMYZ.d.ts} +1 -1
- package/dist/{delegate-BBQW61ym.d.cts → delegate-YXupcWWJ.d.cts} +1 -1
- package/dist/{index-Bxe9kBFs.d.ts → index-D_FgwLH9.d.ts} +111 -2
- package/dist/{index-aZycGEsQ.d.cts → index-e7LYXk1d.d.cts} +111 -2
- package/dist/{index-CFOMyVMt.d.cts → index-uUE_uQPn.d.cts} +70 -33
- package/dist/{index-CFOMyVMt.d.ts → index-uUE_uQPn.d.ts} +70 -33
- package/dist/index.cjs +308 -268
- package/dist/index.d.cts +214 -19
- package/dist/index.d.ts +214 -19
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +19 -19
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +18 -18
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-CIKOS2OO.d.cts → taskRunner-BOVcIH1N.d.cts} +1 -1
- package/dist/{taskRunner-BDzWbpct.d.ts → taskRunner-DNyD1kXG.d.ts} +1 -1
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +14 -14
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +5 -5
- package/dist/{wallet-C2NvHjWB.d.cts → wallet-CNibc3yJ.d.ts} +3 -3
- package/dist/{wallet-DJUnN939.d.ts → wallet-DJN1QgFt.d.cts} +3 -3
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-FZFSGOTZ.cjs.map +0 -1
- package/dist/chunk-HQ2DDMQN.js.map +0 -1
- package/dist/chunk-LN2VZP63.js.map +0 -1
- package/dist/chunk-LPEE2H2M.cjs.map +0 -1
- package/dist/chunk-RXITDAV4.cjs.map +0 -1
- package/dist/chunk-WJN2BLEI.js.map +0 -1
- package/dist/chunk-WXCVS6PD.cjs.map +0 -1
- package/dist/chunk-XJCBV4AA.js.map +0 -1
|
@@ -290,6 +290,11 @@ type PaginationOptions = {
|
|
|
290
290
|
pageIndex?: number;
|
|
291
291
|
pageSize?: number;
|
|
292
292
|
};
|
|
293
|
+
/**
|
|
294
|
+
* Page size {@link RestIndexerProvider.getVtxos} uses when the caller named no
|
|
295
|
+
* pagination of its own and it pages the query out itself.
|
|
296
|
+
*/
|
|
297
|
+
declare const DEFAULT_VTXO_PAGE_SIZE = 500;
|
|
293
298
|
declare enum IndexerTxType {
|
|
294
299
|
INDEXER_TX_TYPE_UNSPECIFIED = 0,
|
|
295
300
|
INDEXER_TX_TYPE_RECEIVED = 1,
|
|
@@ -586,6 +591,12 @@ declare class RestIndexerProvider implements IndexerProvider {
|
|
|
586
591
|
vtxos: VirtualCoin[];
|
|
587
592
|
page?: PageResponse;
|
|
588
593
|
}>;
|
|
594
|
+
/**
|
|
595
|
+
* Fetch a single page of vtxos. Callers paging to exhaustion get no
|
|
596
|
+
* deliberate inter-page backoff here: `indexerFetch` already enforces
|
|
597
|
+
* politeness through the rate gate, so don't add a redundant sleep.
|
|
598
|
+
*/
|
|
599
|
+
private fetchVtxosPage;
|
|
589
600
|
getAssetDetails(assetId: string): Promise<AssetDetails>;
|
|
590
601
|
subscribeForScripts(scripts: string[], subscriptionId?: string): Promise<string>;
|
|
591
602
|
unsubscribeForScripts(subscriptionId: string, scripts?: string[]): Promise<void>;
|
|
@@ -836,6 +847,23 @@ interface ArkInfo {
|
|
|
836
847
|
* satisfy any floor comparison.
|
|
837
848
|
*/
|
|
838
849
|
vtxoTreeExpiry?: bigint;
|
|
850
|
+
/**
|
|
851
|
+
* Weight budget an ark transaction must stay under; the server answers
|
|
852
|
+
* `TX_TOO_LARGE` past it.
|
|
853
|
+
*
|
|
854
|
+
* `undefined` when not advertised — a server that omits the field and one
|
|
855
|
+
* that sends `0` both mean "no limit stated". Never `0n`, which would read
|
|
856
|
+
* as a server that accepts no transaction at all.
|
|
857
|
+
*/
|
|
858
|
+
maxTxWeight?: bigint;
|
|
859
|
+
/**
|
|
860
|
+
* Maximum OP_RETURN outputs the server accepts per transaction.
|
|
861
|
+
*
|
|
862
|
+
* `undefined` when not advertised — a server that omits the field and one
|
|
863
|
+
* that sends `0` both mean "no limit stated". Never `0n`, which would read
|
|
864
|
+
* as a server that forbids them outright.
|
|
865
|
+
*/
|
|
866
|
+
maxOpReturnOutputs?: bigint;
|
|
839
867
|
/**
|
|
840
868
|
* Maximum boarding input amount.
|
|
841
869
|
*
|
|
@@ -877,6 +905,28 @@ interface TxNotification {
|
|
|
877
905
|
tx: string;
|
|
878
906
|
}>;
|
|
879
907
|
}
|
|
908
|
+
/**
|
|
909
|
+
* A `sweepTx` notification. Only a sweep carries swept outpoints, so only this
|
|
910
|
+
* arm declares them: reading `sweptVtxos` off another arm is a type error, and
|
|
911
|
+
* a sweep handler never has to narrow the field it came for.
|
|
912
|
+
*/
|
|
913
|
+
interface SweepTxNotification extends TxNotification {
|
|
914
|
+
/**
|
|
915
|
+
* Outpoints the transaction swept — outpoints rather than virtual outputs,
|
|
916
|
+
* because a swept output is gone: the server has nothing left to describe
|
|
917
|
+
* beyond where it was. Empty when the sweep touched none of them.
|
|
918
|
+
*/
|
|
919
|
+
sweptVtxos: Outpoint[];
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* One frame of {@link ArkProvider.getTransactionsStream}. Exactly one arm is
|
|
923
|
+
* set; an unrecognized frame is dropped rather than yielded.
|
|
924
|
+
*/
|
|
925
|
+
interface TxNotificationEvent {
|
|
926
|
+
commitmentTx?: TxNotification;
|
|
927
|
+
arkTx?: TxNotification;
|
|
928
|
+
sweepTx?: SweepTxNotification;
|
|
929
|
+
}
|
|
880
930
|
interface ArkProvider {
|
|
881
931
|
/** Fetch Arkade server configuration and fee settings. */
|
|
882
932
|
getInfo(): Promise<ArkInfo>;
|
|
@@ -903,10 +953,7 @@ interface ArkProvider {
|
|
|
903
953
|
/** Open the settlement event stream for the given topics. */
|
|
904
954
|
getEventStream(signal: AbortSignal, topics: string[]): AsyncIterableIterator<SettlementEvent>;
|
|
905
955
|
/** Stream transaction notifications emitted by the Arkade server. */
|
|
906
|
-
getTransactionsStream(signal: AbortSignal): AsyncIterableIterator<
|
|
907
|
-
commitmentTx?: TxNotification;
|
|
908
|
-
arkTx?: TxNotification;
|
|
909
|
-
}>;
|
|
956
|
+
getTransactionsStream(signal: AbortSignal): AsyncIterableIterator<TxNotificationEvent>;
|
|
910
957
|
/** Fetch pending transactions for a signed get-pending-tx intent. */
|
|
911
958
|
getPendingTxs(intent: SignedIntent<Intent.GetPendingTxMessage>): Promise<PendingTx[]>;
|
|
912
959
|
}
|
|
@@ -965,16 +1012,10 @@ declare class RestArkProvider implements ArkProvider {
|
|
|
965
1012
|
submitTreeSignatures(batchId: string, pubkey: string, signatures: TreePartialSigs): Promise<void>;
|
|
966
1013
|
submitSignedForfeitTxs(signedForfeitTxs: string[], signedCommitmentTx?: string): Promise<void>;
|
|
967
1014
|
getEventStream(signal: AbortSignal, topics: string[]): AsyncIterableIterator<SettlementEvent>;
|
|
968
|
-
getTransactionsStream(signal: AbortSignal): AsyncIterableIterator<
|
|
969
|
-
commitmentTx?: TxNotification;
|
|
970
|
-
arkTx?: TxNotification;
|
|
971
|
-
}>;
|
|
1015
|
+
getTransactionsStream(signal: AbortSignal): AsyncIterableIterator<TxNotificationEvent>;
|
|
972
1016
|
getPendingTxs(intent: SignedIntent<Intent.GetPendingTxMessage>): Promise<PendingTx[]>;
|
|
973
1017
|
protected parseSettlementEvent(data: ProtoTypes.GetEventStreamResponse): SettlementEvent | null;
|
|
974
|
-
protected parseTransactionNotification(data: ProtoTypes.GetTransactionsStreamResponse):
|
|
975
|
-
commitmentTx?: TxNotification;
|
|
976
|
-
arkTx?: TxNotification;
|
|
977
|
-
} | null;
|
|
1018
|
+
protected parseTransactionNotification(data: ProtoTypes.GetTransactionsStreamResponse): TxNotificationEvent | null;
|
|
978
1019
|
}
|
|
979
1020
|
declare namespace ProtoTypes {
|
|
980
1021
|
interface BatchStartedEvent {
|
|
@@ -1060,27 +1101,24 @@ declare namespace ProtoTypes {
|
|
|
1060
1101
|
streamStarted?: StreamStartedEvent;
|
|
1061
1102
|
heartbeat?: Heartbeat;
|
|
1062
1103
|
}
|
|
1063
|
-
export interface
|
|
1064
|
-
|
|
1104
|
+
export interface TxNotificationData {
|
|
1105
|
+
txid: string;
|
|
1106
|
+
tx: string;
|
|
1107
|
+
spentVtxos: VtxoData[];
|
|
1108
|
+
spendableVtxos: VtxoData[];
|
|
1109
|
+
checkpointTxs?: Record<string, {
|
|
1065
1110
|
txid: string;
|
|
1066
1111
|
tx: string;
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
checkpointTxs?: Record<string, {
|
|
1070
|
-
txid: string;
|
|
1071
|
-
tx: string;
|
|
1072
|
-
}>;
|
|
1073
|
-
};
|
|
1074
|
-
arkTx?: {
|
|
1112
|
+
}>;
|
|
1113
|
+
sweptVtxos?: {
|
|
1075
1114
|
txid: string;
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
};
|
|
1115
|
+
vout: number;
|
|
1116
|
+
}[];
|
|
1117
|
+
}
|
|
1118
|
+
export interface GetTransactionsStreamResponse {
|
|
1119
|
+
commitmentTx?: TxNotificationData;
|
|
1120
|
+
arkTx?: TxNotificationData;
|
|
1121
|
+
sweepTx?: TxNotificationData;
|
|
1084
1122
|
heartbeat?: Heartbeat;
|
|
1085
1123
|
}
|
|
1086
1124
|
export interface EventData {
|
|
@@ -1873,8 +1911,7 @@ interface SignerSet {
|
|
|
1873
1911
|
/**
|
|
1874
1912
|
* Normalize a server signer pubkey hex to the x-only (32-byte) form contract
|
|
1875
1913
|
* scripts and `params.serverPubKey` use. A 33-byte compressed key drops its
|
|
1876
|
-
* parity prefix; a 32-byte key is canonicalized to lowercase.
|
|
1877
|
-
* wallet's `hex.decode(info.signerPubkey).slice(1)` setup path so the active
|
|
1914
|
+
* parity prefix; a 32-byte key is canonicalized to lowercase. The active
|
|
1878
1915
|
* signer and the deprecated signers (which arkd may advertise compressed)
|
|
1879
1916
|
* compare equal to the x-only `params.serverPubKey` persisted on contracts.
|
|
1880
1917
|
*/
|
|
@@ -5935,4 +5972,4 @@ interface IReadonlyWallet {
|
|
|
5935
5972
|
clear(): Promise<void>;
|
|
5936
5973
|
}
|
|
5937
5974
|
|
|
5938
|
-
export { type TreeTxEvent as $, type ArkTransaction as A, type IntentFilter as B, type ContractRepository as C, type VirtualTxRepository as D, type ExtendedCoin as E, type VirtualTx as F, type GetVtxosFilter as G, type VtxoBranch as H, type IWallet as I, ChainedTxType as J, type DescriptorProvider as K, type Network as L, CSVMultisigTapscript as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type BatchStartedEvent as P, type TreeSigningStartedEvent as Q, type Recipient as R, type SendBitcoinParams as S, type
|
|
5975
|
+
export { type TreeTxEvent as $, type ArkTransaction as A, type IntentFilter as B, type ContractRepository as C, type VirtualTxRepository as D, type ExtendedCoin as E, type VirtualTx as F, type GetVtxosFilter as G, type VtxoBranch as H, type IWallet as I, ChainedTxType as J, type DescriptorProvider as K, type Network as L, CSVMultisigTapscript as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type BatchStartedEvent as P, type TreeSigningStartedEvent as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotificationEvent as T, TxTree as U, VtxoScript as V, type WalletRepository as W, type TreeNoncesEvent as X, type BatchFinalizationEvent as Y, type BatchFinalizedEvent as Z, type BatchFailedEvent as _, type Identity as a, BITCOIN_EMULATOR_PUBKEY as a$, type TreeSignatureEvent as a0, type IReadonlyWallet as a1, type ReadonlyIdentity as a2, type OnchainProvider as a3, type DelegateProvider as a4, type ReadonlyWalletConfig as a5, type ExitCaptureMode as a6, type ExitDataSource as a7, type IReadonlyAssetManager as a8, type ContractSyncState as a9, type GetContractsFilter as aA, type GetSpendablePathsOptions as aB, type GetAllSpendingPathsOptions as aC, type IssuanceParams as aD, type ReissuanceParams as aE, type BurnParams as aF, type RenewVtxosOptions as aG, type PathSelection as aH, type ContractEvent as aI, type AssetDetails as aJ, type IssuanceResult as aK, type DelegateInfo as aL, type MigrationGlobalSkipReason as aM, type MigrationLegSkipReason as aN, type SignerStatus as aO, type StorageConfig as aP, type IVtxoManager as aQ, type ExplorerTransaction as aR, type EncodedVtxoScript as aS, type Status as aT, type ChainTx as aU, type PathContext as aV, type ActivityIntent as aW, type ActivityResolver as aX, type ArkIntentState as aY, type ArkTapscript as aZ, type AssetMetadata as a_, type RecipientAddressContext as aa, type NetworkName as ab, type ArkInfo as ac, ArkAddress as ad, type ContractWithVtxos as ae, selectPendingRecoveryOutpoints as af, type Coin as ag, ContractManager as ah, type ContractManagerConfig as ai, type SettlementConfig as aj, VtxoManager as ak, type SignerSession as al, type SignedIntent as am, Intent as an, type TimeHeight as ao, type DescriptorSigningRequest as ap, Transaction as aq, type IntentFeeConfig as ar, type OffchainInput as as, FeeAmount as at, type OnchainInput as au, type FeeOutput as av, type ContractWatcherConfig as aw, type Asset as ax, type FeeInfo as ay, type CreateContractParams as az, type WalletConfig as b, type SweepTxNotification as b$, type BaseWalletConfig as b0, type BatchInfo as b1, type BatchSignableIdentity as b2, CLTVMultisigTapscript as b3, type CandidateDeps as b4, ChainTxType as b5, type CommitmentTx as b6, ConditionCSVMultisigTapscript as b7, ConditionMultisigTapscript as b8, type ContractBalance as b9, type IDelegatorManager as bA, INTENT_TERMINAL_STATES as bB, IndexerTxType as bC, type KnownMetadata as bD, MUTINYNET_EMULATOR_PUBKEY as bE, type MigrateDeprecatedSignerOptions as bF, type MigrationLegReport as bG, type MigrationVtxoRef as bH, MultisigTapscript as bI, type Nonces as bJ, type Output as bK, type PageResponse as bL, type PaginationOptions as bM, PartialSig as bN, type ProviderClass as bO, REGTEST_EMULATOR_PUBKEY as bP, RestDelegateProvider as bQ, RestDelegatorProvider as bR, type ScanContractsOptions as bS, type ScanResult as bT, type ScheduledSession as bU, SettlementEventType as bV, type SignRequest as bW, type SignerClassification as bX, type SignerSet as bY, type SubscriptionEvent as bZ, type SubscriptionHeartbeat as b_, type ContractEventCallback as ba, type ContractHandler as bb, type ContractState as bc, type ContractVtxo as bd, ContractWatcher as be, DEFAULT_VTXO_PAGE_SIZE as bf, DelegateManagerImpl as bg, type DelegateOptions as bh, DelegatorManagerImpl as bi, type DelegatorProvider as bj, type DeprecatedSignerMigrationReport as bk, type DeprecatedSignerReport as bl, DigestMismatchError as bm, type Discoverable as bn, type DiscoveredContract as bo, type DiscoveryDeps as bp, ESPLORA_URL as bq, EsploraProvider as br, type EventSourceCapable as bs, type EventSourceFactory as bt, type EventSourceLike as bu, EventSourceUnavailableError as bv, type ExitChainResolver as bw, type ExtendedContractVtxo as bx, type GroupMembership as by, type HandlerError as bz, type WalletBalance as c, type TapLeaves as c0, TapTreeCoder as c1, TapscriptType as c2, type TreeNonces as c3, type TreePartialSigs as c4, type Tx as c5, type TxHistoryRecord as c6, type TxKey as c7, type TxNotification as c8, type TxTag as c9, isCooperativelyMigratable as cA, isDiscoverable as cB, isEventSourceUnavailableError as cC, isExpired as cD, isPastExpiry as cE, isRecoverable as cF, isSigningIdentity as cG, isSpendable as cH, isSubdust as cI, isTerminalIntentState as cJ, isVirtualCoin as cK, isVtxoExpiringSoon as cL, networks as cM, resolveEmulatorPubkey as cN, resolveEventSource as cO, scriptFromTapLeafScript as cP, signerSetFromInfo as cQ, toXOnlySignerHex as cR, type TapscriptDeriving as cS, type TxTreeNode as ca, TxType as cb, type VirtualStatus as cc, type Vtxo as cd, type VtxoChain as ce, type VtxoType as cf, type WalletMode as cg, assetMintResolver as ch, boardingResolver as ci, canRecoverOnchain as cj, canSpendOffchain as ck, classifyAgainstSignerSet as cl, classifyContractSigner as cm, collabExitResolver as cn, configureEventSource as co, createDefaultActivityRegistry as cp, createExitChainResolver as cq, decodeTapscript as cr, defaultEmulatorPubkey as cs, getConfiguredEventSource as ct, getNetwork as cu, getRandomId as cv, getSequence as cw, hasCandidates as cx, hasTerminalSpend as cy, isBatchSignable as cz, ActivityRegistry as d, type Activity as e, type IContractManager as f, type IDelegateManager as g, type SettleParams as h, type SettlementEvent as i, type SendParams as j, type IAssetManager as k, RestArkProvider as l, RestIndexerProvider as m, type SubscriptionResponse as n, type ArkProvider as o, type IndexerProvider as p, type RelativeTimelock as q, type TapLeafScript as r, type VirtualCoin as s, type Contract as t, type ExtendedVirtualCoin as u, type VtxoRepositoryKey as v, type WalletState as w, type ContractFilter as x, type IntentRepository as y, type ArkIntent as z };
|