@arkade-os/sdk 0.4.26 → 0.4.28
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 +36 -125
- package/dist/adapters/asyncStorage.cjs +48 -0
- package/dist/adapters/asyncStorage.cjs.map +1 -0
- package/dist/adapters/asyncStorage.d.cts +16 -0
- package/dist/{types/storage → adapters}/asyncStorage.d.ts +5 -2
- package/dist/adapters/asyncStorage.js +46 -0
- package/dist/adapters/asyncStorage.js.map +1 -0
- package/dist/adapters/expo.cjs +19 -0
- package/dist/adapters/expo.cjs.map +1 -0
- package/dist/adapters/expo.d.cts +48 -0
- package/dist/adapters/expo.d.ts +48 -0
- package/dist/adapters/expo.js +6 -0
- package/dist/adapters/expo.js.map +1 -0
- package/dist/adapters/fileSystem.cjs +116 -0
- package/dist/adapters/fileSystem.cjs.map +1 -0
- package/dist/adapters/fileSystem.d.cts +17 -0
- package/dist/{types/storage → adapters}/fileSystem.d.ts +5 -2
- package/dist/adapters/fileSystem.js +93 -0
- package/dist/adapters/fileSystem.js.map +1 -0
- package/dist/adapters/indexedDB.cjs +103 -0
- package/dist/adapters/indexedDB.cjs.map +1 -0
- package/dist/adapters/indexedDB.d.cts +18 -0
- package/dist/{types/storage → adapters}/indexedDB.d.ts +5 -2
- package/dist/adapters/indexedDB.js +101 -0
- package/dist/adapters/indexedDB.js.map +1 -0
- package/dist/adapters/localStorage.cjs +50 -0
- package/dist/adapters/localStorage.cjs.map +1 -0
- package/dist/{types/storage/inMemory.d.ts → adapters/localStorage.d.cts} +6 -3
- package/dist/{types/storage → adapters}/localStorage.d.ts +5 -2
- package/dist/adapters/localStorage.js +48 -0
- package/dist/adapters/localStorage.js.map +1 -0
- package/dist/ark-TZ1gXAXU.d.cts +3880 -0
- package/dist/ark-TZ1gXAXU.d.ts +3880 -0
- package/dist/{types/worker/expo/asyncStorageTaskQueue.d.ts → asyncStorageTaskQueue-Cb1F_Z9s.d.ts} +6 -3
- package/dist/asyncStorageTaskQueue-EFqSmYTg.d.cts +49 -0
- package/dist/chunk-5BLDMQED.cjs +18 -0
- package/dist/chunk-5BLDMQED.cjs.map +1 -0
- package/dist/chunk-5PG7DV7A.cjs +805 -0
- package/dist/chunk-5PG7DV7A.cjs.map +1 -0
- package/dist/chunk-A3EMF7RN.js +95 -0
- package/dist/chunk-A3EMF7RN.js.map +1 -0
- package/dist/chunk-ADV27S4N.cjs +2701 -0
- package/dist/chunk-ADV27S4N.cjs.map +1 -0
- package/dist/chunk-BQLHADL7.js +13805 -0
- package/dist/chunk-BQLHADL7.js.map +1 -0
- package/dist/chunk-CFZMTDWI.js +209 -0
- package/dist/chunk-CFZMTDWI.js.map +1 -0
- package/dist/chunk-FG5ACJJW.cjs +212 -0
- package/dist/chunk-FG5ACJJW.cjs.map +1 -0
- package/dist/chunk-HW3JJ323.js +768 -0
- package/dist/chunk-HW3JJ323.js.map +1 -0
- package/dist/chunk-I3DGUUCT.cjs +838 -0
- package/dist/chunk-I3DGUUCT.cjs.map +1 -0
- package/dist/chunk-IPX2R7FR.cjs +100 -0
- package/dist/chunk-IPX2R7FR.cjs.map +1 -0
- package/dist/chunk-NSBPE2FW.js +15 -0
- package/dist/chunk-NSBPE2FW.js.map +1 -0
- package/dist/chunk-T64LAI7L.js +829 -0
- package/dist/chunk-T64LAI7L.js.map +1 -0
- package/dist/chunk-ZBUDLTBO.js +2671 -0
- package/dist/chunk-ZBUDLTBO.js.map +1 -0
- package/dist/chunk-ZLO6NETT.cjs +13910 -0
- package/dist/chunk-ZLO6NETT.cjs.map +1 -0
- package/dist/contracts/handlers/index.cjs +26 -0
- package/dist/contracts/handlers/index.cjs.map +1 -0
- package/dist/contracts/handlers/index.d.cts +7 -0
- package/dist/contracts/handlers/index.d.ts +7 -0
- package/dist/contracts/handlers/index.js +5 -0
- package/dist/contracts/handlers/index.js.map +1 -0
- package/dist/delegate-BFZs69hp.d.cts +84 -0
- package/dist/delegate-aaVGfWsV.d.ts +84 -0
- package/dist/index-B22cA64m.d.cts +199 -0
- package/dist/{types/storage/index.d.ts → index-C0IanN1m.d.cts} +3 -1
- package/dist/index-C0IanN1m.d.ts +11 -0
- package/dist/index-NDla_UoJ.d.ts +199 -0
- package/dist/index.cjs +480 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3343 -0
- package/dist/index.d.ts +3343 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/repositories/realm/index.cjs +513 -0
- package/dist/repositories/realm/index.cjs.map +1 -0
- package/dist/repositories/realm/index.d.cts +217 -0
- package/dist/{types/repositories/realm/schemas.d.ts → repositories/realm/index.d.ts} +80 -112
- package/dist/repositories/realm/index.js +507 -0
- package/dist/repositories/realm/index.js.map +1 -0
- package/dist/repositories/sqlite/index.cjs +588 -0
- package/dist/repositories/sqlite/index.cjs.map +1 -0
- package/dist/repositories/sqlite/index.d.cts +118 -0
- package/dist/{types/repositories/sqlite/walletRepository.d.ts → repositories/sqlite/index.d.ts} +58 -5
- package/dist/repositories/sqlite/index.js +585 -0
- package/dist/repositories/sqlite/index.js.map +1 -0
- package/dist/taskRunner-C6Ff4OaU.d.cts +114 -0
- package/dist/taskRunner-yvPN8Z0K.d.ts +114 -0
- package/dist/wallet/expo/background.cjs +93 -0
- package/dist/wallet/expo/background.cjs.map +1 -0
- package/dist/wallet/expo/background.d.cts +84 -0
- package/dist/wallet/expo/background.d.ts +84 -0
- package/dist/wallet/expo/background.js +68 -0
- package/dist/wallet/expo/background.js.map +1 -0
- package/dist/wallet/expo/index.cjs +171 -0
- package/dist/wallet/expo/index.cjs.map +1 -0
- package/dist/wallet/expo/index.d.cts +122 -0
- package/dist/{types/wallet/expo/wallet.d.ts → wallet/expo/index.d.ts} +45 -22
- package/dist/wallet/expo/index.js +169 -0
- package/dist/wallet/expo/index.js.map +1 -0
- package/dist/wallet-AF-p-OWj.d.cts +774 -0
- package/dist/wallet-D9NBRqvC.d.ts +774 -0
- package/dist/worker/expo/index.cjs +140 -0
- package/dist/worker/expo/index.cjs.map +1 -0
- package/dist/worker/expo/index.d.cts +29 -0
- package/dist/worker/expo/index.d.ts +29 -0
- package/dist/worker/expo/index.js +121 -0
- package/dist/worker/expo/index.js.map +1 -0
- package/package.json +110 -76
- package/dist/cjs/adapters/asyncStorage.js +0 -5
- package/dist/cjs/adapters/expo.js +0 -8
- package/dist/cjs/adapters/fileSystem.js +0 -5
- package/dist/cjs/adapters/indexedDB.js +0 -5
- package/dist/cjs/adapters/localStorage.js +0 -5
- package/dist/cjs/arkfee/celenv.js +0 -43
- package/dist/cjs/arkfee/estimator.js +0 -143
- package/dist/cjs/arkfee/index.js +0 -5
- package/dist/cjs/arkfee/types.js +0 -26
- package/dist/cjs/arknote/index.js +0 -128
- package/dist/cjs/bip322/index.js +0 -270
- package/dist/cjs/contracts/arkcontract.js +0 -147
- package/dist/cjs/contracts/contractManager.js +0 -629
- package/dist/cjs/contracts/contractWatcher.js +0 -598
- package/dist/cjs/contracts/handlers/default.js +0 -93
- package/dist/cjs/contracts/handlers/delegate.js +0 -90
- package/dist/cjs/contracts/handlers/helpers.js +0 -115
- package/dist/cjs/contracts/handlers/index.js +0 -19
- package/dist/cjs/contracts/handlers/registry.js +0 -89
- package/dist/cjs/contracts/handlers/vhtlc.js +0 -194
- package/dist/cjs/contracts/index.js +0 -41
- package/dist/cjs/contracts/types.js +0 -2
- package/dist/cjs/contracts/vtxoOwnership.js +0 -78
- package/dist/cjs/extension/asset/assetGroup.js +0 -228
- package/dist/cjs/extension/asset/assetId.js +0 -152
- package/dist/cjs/extension/asset/assetInput.js +0 -222
- package/dist/cjs/extension/asset/assetOutput.js +0 -174
- package/dist/cjs/extension/asset/assetRef.js +0 -148
- package/dist/cjs/extension/asset/index.js +0 -23
- package/dist/cjs/extension/asset/metadata.js +0 -187
- package/dist/cjs/extension/asset/packet.js +0 -114
- package/dist/cjs/extension/asset/types.js +0 -22
- package/dist/cjs/extension/asset/utils.js +0 -105
- package/dist/cjs/extension/index.js +0 -254
- package/dist/cjs/extension/packet.js +0 -20
- package/dist/cjs/forfeit.js +0 -45
- package/dist/cjs/identity/descriptor.js +0 -169
- package/dist/cjs/identity/descriptorProvider.js +0 -2
- package/dist/cjs/identity/hdCapableIdentity.js +0 -2
- package/dist/cjs/identity/index.js +0 -38
- package/dist/cjs/identity/seedIdentity.js +0 -461
- package/dist/cjs/identity/serialize.js +0 -171
- package/dist/cjs/identity/singleKey.js +0 -126
- package/dist/cjs/identity/staticDescriptorProvider.js +0 -65
- package/dist/cjs/index.js +0 -200
- package/dist/cjs/intent/index.js +0 -259
- package/dist/cjs/musig2/index.js +0 -11
- package/dist/cjs/musig2/keys.js +0 -57
- package/dist/cjs/musig2/nonces.js +0 -48
- package/dist/cjs/musig2/sign.js +0 -102
- package/dist/cjs/networks.js +0 -26
- package/dist/cjs/package.json +0 -3
- package/dist/cjs/providers/ark.js +0 -577
- package/dist/cjs/providers/delegator.js +0 -85
- package/dist/cjs/providers/electrum.js +0 -869
- package/dist/cjs/providers/errors.js +0 -59
- package/dist/cjs/providers/expoArk.js +0 -82
- package/dist/cjs/providers/expoIndexer.js +0 -111
- package/dist/cjs/providers/expoUtils.js +0 -124
- package/dist/cjs/providers/indexer.js +0 -630
- package/dist/cjs/providers/onchain.js +0 -262
- package/dist/cjs/providers/utils.js +0 -121
- package/dist/cjs/repositories/contractRepository.js +0 -2
- package/dist/cjs/repositories/inMemory/contractRepository.js +0 -55
- package/dist/cjs/repositories/inMemory/walletRepository.js +0 -115
- package/dist/cjs/repositories/index.js +0 -34
- package/dist/cjs/repositories/indexedDB/contractRepository.js +0 -187
- package/dist/cjs/repositories/indexedDB/db.js +0 -19
- package/dist/cjs/repositories/indexedDB/manager.js +0 -100
- package/dist/cjs/repositories/indexedDB/schema.js +0 -204
- package/dist/cjs/repositories/indexedDB/walletRepository.js +0 -474
- package/dist/cjs/repositories/indexedDB/websqlAdapter.js +0 -144
- package/dist/cjs/repositories/migrations/contractRepositoryImpl.js +0 -127
- package/dist/cjs/repositories/migrations/fromStorageAdapter.js +0 -66
- package/dist/cjs/repositories/migrations/walletRepositoryImpl.js +0 -184
- package/dist/cjs/repositories/realm/contractRepository.js +0 -116
- package/dist/cjs/repositories/realm/index.js +0 -11
- package/dist/cjs/repositories/realm/schemas.js +0 -157
- package/dist/cjs/repositories/realm/types.js +0 -7
- package/dist/cjs/repositories/realm/walletRepository.js +0 -305
- package/dist/cjs/repositories/scriptFromAddress.js +0 -16
- package/dist/cjs/repositories/serialization.js +0 -82
- package/dist/cjs/repositories/sqlite/contractRepository.js +0 -135
- package/dist/cjs/repositories/sqlite/index.js +0 -7
- package/dist/cjs/repositories/sqlite/types.js +0 -2
- package/dist/cjs/repositories/sqlite/walletRepository.js +0 -441
- package/dist/cjs/repositories/walletRepository.js +0 -2
- package/dist/cjs/script/address.js +0 -108
- package/dist/cjs/script/base.js +0 -185
- package/dist/cjs/script/default.js +0 -57
- package/dist/cjs/script/delegate.js +0 -53
- package/dist/cjs/script/tapscript.js +0 -619
- package/dist/cjs/script/vhtlc.js +0 -170
- package/dist/cjs/storage/asyncStorage.js +0 -50
- package/dist/cjs/storage/fileSystem.js +0 -141
- package/dist/cjs/storage/inMemory.js +0 -24
- package/dist/cjs/storage/index.js +0 -2
- package/dist/cjs/storage/indexedDB.js +0 -101
- package/dist/cjs/storage/localStorage.js +0 -51
- package/dist/cjs/tree/signingSession.js +0 -229
- package/dist/cjs/tree/txTree.js +0 -192
- package/dist/cjs/tree/validation.js +0 -107
- package/dist/cjs/utils/anchor.js +0 -35
- package/dist/cjs/utils/arkTransaction.js +0 -271
- package/dist/cjs/utils/bip21.js +0 -127
- package/dist/cjs/utils/syncCursors.js +0 -128
- package/dist/cjs/utils/timelock.js +0 -59
- package/dist/cjs/utils/transaction.js +0 -28
- package/dist/cjs/utils/transactionHistory.js +0 -183
- package/dist/cjs/utils/txSizeEstimator.js +0 -132
- package/dist/cjs/utils/unknownFields.js +0 -174
- package/dist/cjs/wallet/asset-manager.js +0 -330
- package/dist/cjs/wallet/asset.js +0 -119
- package/dist/cjs/wallet/batch.js +0 -183
- package/dist/cjs/wallet/delegator.js +0 -302
- package/dist/cjs/wallet/expo/background.js +0 -116
- package/dist/cjs/wallet/expo/index.js +0 -9
- package/dist/cjs/wallet/expo/wallet.js +0 -230
- package/dist/cjs/wallet/hdDescriptorProvider.js +0 -159
- package/dist/cjs/wallet/index.js +0 -82
- package/dist/cjs/wallet/onchain.js +0 -290
- package/dist/cjs/wallet/ramps.js +0 -216
- package/dist/cjs/wallet/serviceWorker/wallet-message-handler.js +0 -953
- package/dist/cjs/wallet/serviceWorker/wallet.js +0 -1173
- package/dist/cjs/wallet/unroll.js +0 -289
- package/dist/cjs/wallet/utils.js +0 -111
- package/dist/cjs/wallet/validation.js +0 -154
- package/dist/cjs/wallet/vtxo-manager.js +0 -1142
- package/dist/cjs/wallet/wallet.js +0 -2049
- package/dist/cjs/worker/browser/service-worker-manager.js +0 -183
- package/dist/cjs/worker/browser/utils.js +0 -67
- package/dist/cjs/worker/errors.js +0 -16
- package/dist/cjs/worker/expo/asyncStorageTaskQueue.js +0 -78
- package/dist/cjs/worker/expo/index.js +0 -13
- package/dist/cjs/worker/expo/processors/contractPollProcessor.js +0 -62
- package/dist/cjs/worker/expo/processors/index.js +0 -6
- package/dist/cjs/worker/expo/taskQueue.js +0 -41
- package/dist/cjs/worker/expo/taskRunner.js +0 -73
- package/dist/cjs/worker/messageBus.js +0 -473
- package/dist/esm/adapters/asyncStorage.js +0 -1
- package/dist/esm/adapters/expo.js +0 -3
- package/dist/esm/adapters/fileSystem.js +0 -1
- package/dist/esm/adapters/indexedDB.js +0 -1
- package/dist/esm/adapters/localStorage.js +0 -1
- package/dist/esm/arkfee/celenv.js +0 -40
- package/dist/esm/arkfee/estimator.js +0 -139
- package/dist/esm/arkfee/index.js +0 -1
- package/dist/esm/arkfee/types.js +0 -22
- package/dist/esm/arknote/index.js +0 -124
- package/dist/esm/bip322/index.js +0 -267
- package/dist/esm/contracts/arkcontract.js +0 -140
- package/dist/esm/contracts/contractManager.js +0 -625
- package/dist/esm/contracts/contractWatcher.js +0 -594
- package/dist/esm/contracts/handlers/default.js +0 -90
- package/dist/esm/contracts/handlers/delegate.js +0 -87
- package/dist/esm/contracts/handlers/helpers.js +0 -110
- package/dist/esm/contracts/handlers/index.js +0 -12
- package/dist/esm/contracts/handlers/registry.js +0 -86
- package/dist/esm/contracts/handlers/vhtlc.js +0 -191
- package/dist/esm/contracts/index.js +0 -13
- package/dist/esm/contracts/types.js +0 -1
- package/dist/esm/contracts/vtxoOwnership.js +0 -69
- package/dist/esm/extension/asset/assetGroup.js +0 -224
- package/dist/esm/extension/asset/assetId.js +0 -148
- package/dist/esm/extension/asset/assetInput.js +0 -217
- package/dist/esm/extension/asset/assetOutput.js +0 -169
- package/dist/esm/extension/asset/assetRef.js +0 -144
- package/dist/esm/extension/asset/index.js +0 -8
- package/dist/esm/extension/asset/metadata.js +0 -182
- package/dist/esm/extension/asset/packet.js +0 -110
- package/dist/esm/extension/asset/types.js +0 -19
- package/dist/esm/extension/asset/utils.js +0 -99
- package/dist/esm/extension/index.js +0 -248
- package/dist/esm/extension/packet.js +0 -16
- package/dist/esm/forfeit.js +0 -41
- package/dist/esm/identity/descriptor.js +0 -161
- package/dist/esm/identity/descriptorProvider.js +0 -1
- package/dist/esm/identity/hdCapableIdentity.js +0 -1
- package/dist/esm/identity/index.js +0 -12
- package/dist/esm/identity/seedIdentity.js +0 -453
- package/dist/esm/identity/serialize.js +0 -164
- package/dist/esm/identity/singleKey.js +0 -121
- package/dist/esm/identity/staticDescriptorProvider.js +0 -61
- package/dist/esm/index.js +0 -87
- package/dist/esm/intent/index.js +0 -255
- package/dist/esm/musig2/index.js +0 -3
- package/dist/esm/musig2/keys.js +0 -21
- package/dist/esm/musig2/nonces.js +0 -11
- package/dist/esm/musig2/sign.js +0 -63
- package/dist/esm/networks.js +0 -22
- package/dist/esm/package.json +0 -3
- package/dist/esm/providers/ark.js +0 -572
- package/dist/esm/providers/delegator.js +0 -81
- package/dist/esm/providers/electrum.js +0 -864
- package/dist/esm/providers/errors.js +0 -54
- package/dist/esm/providers/expoArk.js +0 -78
- package/dist/esm/providers/expoIndexer.js +0 -107
- package/dist/esm/providers/expoUtils.js +0 -87
- package/dist/esm/providers/indexer.js +0 -626
- package/dist/esm/providers/onchain.js +0 -258
- package/dist/esm/providers/utils.js +0 -117
- package/dist/esm/repositories/contractRepository.js +0 -1
- package/dist/esm/repositories/inMemory/contractRepository.js +0 -51
- package/dist/esm/repositories/inMemory/walletRepository.js +0 -111
- package/dist/esm/repositories/index.js +0 -10
- package/dist/esm/repositories/indexedDB/contractRepository.js +0 -183
- package/dist/esm/repositories/indexedDB/db.js +0 -4
- package/dist/esm/repositories/indexedDB/manager.js +0 -95
- package/dist/esm/repositories/indexedDB/schema.js +0 -199
- package/dist/esm/repositories/indexedDB/walletRepository.js +0 -470
- package/dist/esm/repositories/indexedDB/websqlAdapter.js +0 -138
- package/dist/esm/repositories/migrations/contractRepositoryImpl.js +0 -121
- package/dist/esm/repositories/migrations/fromStorageAdapter.js +0 -58
- package/dist/esm/repositories/migrations/walletRepositoryImpl.js +0 -180
- package/dist/esm/repositories/realm/contractRepository.js +0 -112
- package/dist/esm/repositories/realm/index.js +0 -3
- package/dist/esm/repositories/realm/schemas.js +0 -153
- package/dist/esm/repositories/realm/types.js +0 -6
- package/dist/esm/repositories/realm/walletRepository.js +0 -301
- package/dist/esm/repositories/scriptFromAddress.js +0 -13
- package/dist/esm/repositories/serialization.js +0 -67
- package/dist/esm/repositories/sqlite/contractRepository.js +0 -131
- package/dist/esm/repositories/sqlite/index.js +0 -2
- package/dist/esm/repositories/sqlite/types.js +0 -1
- package/dist/esm/repositories/sqlite/walletRepository.js +0 -437
- package/dist/esm/repositories/walletRepository.js +0 -1
- package/dist/esm/script/address.js +0 -104
- package/dist/esm/script/base.js +0 -179
- package/dist/esm/script/default.js +0 -54
- package/dist/esm/script/delegate.js +0 -50
- package/dist/esm/script/tapscript.js +0 -615
- package/dist/esm/script/vhtlc.js +0 -167
- package/dist/esm/storage/asyncStorage.js +0 -46
- package/dist/esm/storage/fileSystem.js +0 -104
- package/dist/esm/storage/inMemory.js +0 -20
- package/dist/esm/storage/index.js +0 -1
- package/dist/esm/storage/indexedDB.js +0 -97
- package/dist/esm/storage/localStorage.js +0 -47
- package/dist/esm/tree/signingSession.js +0 -191
- package/dist/esm/tree/txTree.js +0 -188
- package/dist/esm/tree/validation.js +0 -101
- package/dist/esm/utils/anchor.js +0 -31
- package/dist/esm/utils/arkTransaction.js +0 -264
- package/dist/esm/utils/bip21.js +0 -123
- package/dist/esm/utils/syncCursors.js +0 -119
- package/dist/esm/utils/timelock.js +0 -22
- package/dist/esm/utils/transaction.js +0 -24
- package/dist/esm/utils/transactionHistory.js +0 -180
- package/dist/esm/utils/txSizeEstimator.js +0 -128
- package/dist/esm/utils/unknownFields.js +0 -169
- package/dist/esm/wallet/asset-manager.js +0 -325
- package/dist/esm/wallet/asset.js +0 -113
- package/dist/esm/wallet/batch.js +0 -180
- package/dist/esm/wallet/delegator.js +0 -297
- package/dist/esm/wallet/expo/background.js +0 -111
- package/dist/esm/wallet/expo/index.js +0 -2
- package/dist/esm/wallet/expo/wallet.js +0 -193
- package/dist/esm/wallet/hdDescriptorProvider.js +0 -155
- package/dist/esm/wallet/index.js +0 -75
- package/dist/esm/wallet/onchain.js +0 -285
- package/dist/esm/wallet/ramps.js +0 -212
- package/dist/esm/wallet/serviceWorker/wallet-message-handler.js +0 -946
- package/dist/esm/wallet/serviceWorker/wallet.js +0 -1168
- package/dist/esm/wallet/unroll.js +0 -285
- package/dist/esm/wallet/utils.js +0 -103
- package/dist/esm/wallet/validation.js +0 -142
- package/dist/esm/wallet/vtxo-manager.js +0 -1136
- package/dist/esm/wallet/wallet.js +0 -2041
- package/dist/esm/worker/browser/service-worker-manager.js +0 -177
- package/dist/esm/worker/browser/utils.js +0 -63
- package/dist/esm/worker/errors.js +0 -11
- package/dist/esm/worker/expo/asyncStorageTaskQueue.js +0 -74
- package/dist/esm/worker/expo/index.js +0 -4
- package/dist/esm/worker/expo/processors/contractPollProcessor.js +0 -59
- package/dist/esm/worker/expo/processors/index.js +0 -1
- package/dist/esm/worker/expo/taskQueue.js +0 -37
- package/dist/esm/worker/expo/taskRunner.js +0 -69
- package/dist/esm/worker/messageBus.js +0 -469
- package/dist/types/adapters/asyncStorage.d.ts +0 -2
- package/dist/types/adapters/expo.d.ts +0 -4
- package/dist/types/adapters/fileSystem.d.ts +0 -2
- package/dist/types/adapters/indexedDB.d.ts +0 -2
- package/dist/types/adapters/localStorage.d.ts +0 -2
- package/dist/types/arkfee/celenv.d.ts +0 -25
- package/dist/types/arkfee/estimator.d.ts +0 -49
- package/dist/types/arkfee/index.d.ts +0 -2
- package/dist/types/arkfee/types.d.ts +0 -38
- package/dist/types/arknote/index.d.ts +0 -84
- package/dist/types/bip322/index.d.ts +0 -55
- package/dist/types/contracts/arkcontract.d.ts +0 -99
- package/dist/types/contracts/contractManager.d.ts +0 -381
- package/dist/types/contracts/contractWatcher.d.ts +0 -217
- package/dist/types/contracts/handlers/default.d.ts +0 -19
- package/dist/types/contracts/handlers/delegate.d.ts +0 -21
- package/dist/types/contracts/handlers/helpers.d.ts +0 -19
- package/dist/types/contracts/handlers/index.d.ts +0 -7
- package/dist/types/contracts/handlers/registry.d.ts +0 -65
- package/dist/types/contracts/handlers/vhtlc.d.ts +0 -32
- package/dist/types/contracts/index.d.ts +0 -14
- package/dist/types/contracts/types.d.ts +0 -233
- package/dist/types/contracts/vtxoOwnership.d.ts +0 -33
- package/dist/types/extension/asset/assetGroup.d.ts +0 -119
- package/dist/types/extension/asset/assetId.d.ts +0 -83
- package/dist/types/extension/asset/assetInput.d.ts +0 -64
- package/dist/types/extension/asset/assetOutput.d.ts +0 -54
- package/dist/types/extension/asset/assetRef.d.ts +0 -91
- package/dist/types/extension/asset/index.d.ts +0 -8
- package/dist/types/extension/asset/metadata.d.ts +0 -52
- package/dist/types/extension/asset/packet.d.ts +0 -41
- package/dist/types/extension/asset/types.d.ts +0 -16
- package/dist/types/extension/asset/utils.d.ts +0 -21
- package/dist/types/extension/index.d.ts +0 -56
- package/dist/types/extension/packet.d.ts +0 -21
- package/dist/types/forfeit.d.ts +0 -18
- package/dist/types/identity/descriptor.d.ts +0 -61
- package/dist/types/identity/descriptorProvider.d.ts +0 -35
- package/dist/types/identity/hdCapableIdentity.d.ts +0 -44
- package/dist/types/identity/index.d.ts +0 -56
- package/dist/types/identity/seedIdentity.d.ts +0 -254
- package/dist/types/identity/serialize.d.ts +0 -96
- package/dist/types/identity/singleKey.d.ts +0 -62
- package/dist/types/identity/staticDescriptorProvider.d.ts +0 -18
- package/dist/types/index.d.ts +0 -59
- package/dist/types/intent/index.d.ts +0 -86
- package/dist/types/musig2/index.d.ts +0 -4
- package/dist/types/musig2/keys.d.ts +0 -9
- package/dist/types/musig2/nonces.d.ts +0 -14
- package/dist/types/musig2/sign.d.ts +0 -27
- package/dist/types/networks.d.ts +0 -16
- package/dist/types/providers/ark.d.ts +0 -369
- package/dist/types/providers/delegator.d.ts +0 -82
- package/dist/types/providers/electrum.d.ts +0 -312
- package/dist/types/providers/errors.d.ts +0 -13
- package/dist/types/providers/expoArk.d.ts +0 -22
- package/dist/types/providers/expoIndexer.d.ts +0 -18
- package/dist/types/providers/expoUtils.d.ts +0 -18
- package/dist/types/providers/indexer.d.ts +0 -301
- package/dist/types/providers/onchain.d.ts +0 -148
- package/dist/types/providers/utils.d.ts +0 -12
- package/dist/types/repositories/contractRepository.d.ts +0 -32
- package/dist/types/repositories/inMemory/contractRepository.d.ts +0 -17
- package/dist/types/repositories/inMemory/walletRepository.d.ts +0 -29
- package/dist/types/repositories/index.d.ts +0 -9
- package/dist/types/repositories/indexedDB/contractRepository.d.ts +0 -21
- package/dist/types/repositories/indexedDB/db.d.ts +0 -4
- package/dist/types/repositories/indexedDB/manager.d.ts +0 -25
- package/dist/types/repositories/indexedDB/schema.d.ts +0 -9
- package/dist/types/repositories/indexedDB/walletRepository.d.ts +0 -28
- package/dist/types/repositories/indexedDB/websqlAdapter.d.ts +0 -49
- package/dist/types/repositories/migrations/contractRepositoryImpl.d.ts +0 -24
- package/dist/types/repositories/migrations/fromStorageAdapter.d.ts +0 -19
- package/dist/types/repositories/migrations/walletRepositoryImpl.d.ts +0 -27
- package/dist/types/repositories/realm/contractRepository.d.ts +0 -24
- package/dist/types/repositories/realm/index.d.ts +0 -4
- package/dist/types/repositories/realm/types.d.ts +0 -16
- package/dist/types/repositories/realm/walletRepository.d.ts +0 -34
- package/dist/types/repositories/scriptFromAddress.d.ts +0 -9
- package/dist/types/repositories/serialization.d.ts +0 -65
- package/dist/types/repositories/sqlite/contractRepository.d.ts +0 -33
- package/dist/types/repositories/sqlite/index.d.ts +0 -3
- package/dist/types/repositories/sqlite/types.d.ts +0 -18
- package/dist/types/repositories/walletRepository.d.ts +0 -72
- package/dist/types/script/address.d.ts +0 -67
- package/dist/types/script/base.d.ts +0 -105
- package/dist/types/script/default.d.ts +0 -44
- package/dist/types/script/delegate.d.ts +0 -40
- package/dist/types/script/tapscript.d.ts +0 -169
- package/dist/types/script/vhtlc.d.ts +0 -66
- package/dist/types/tree/signingSession.d.ts +0 -37
- package/dist/types/tree/txTree.d.ts +0 -28
- package/dist/types/tree/validation.d.ts +0 -15
- package/dist/types/utils/anchor.d.ts +0 -19
- package/dist/types/utils/arkTransaction.d.ts +0 -49
- package/dist/types/utils/bip21.d.ts +0 -38
- package/dist/types/utils/syncCursors.d.ts +0 -60
- package/dist/types/utils/timelock.d.ts +0 -9
- package/dist/types/utils/transaction.d.ts +0 -13
- package/dist/types/utils/transactionHistory.d.ts +0 -15
- package/dist/types/utils/txSizeEstimator.d.ts +0 -40
- package/dist/types/utils/unknownFields.d.ts +0 -83
- package/dist/types/wallet/asset-manager.d.ts +0 -69
- package/dist/types/wallet/asset.d.ts +0 -21
- package/dist/types/wallet/batch.d.ts +0 -107
- package/dist/types/wallet/delegator.d.ts +0 -48
- package/dist/types/wallet/expo/background.d.ts +0 -66
- package/dist/types/wallet/expo/index.d.ts +0 -4
- package/dist/types/wallet/hdDescriptorProvider.d.ts +0 -93
- package/dist/types/wallet/index.d.ts +0 -755
- package/dist/types/wallet/onchain.d.ts +0 -109
- package/dist/types/wallet/ramps.d.ts +0 -64
- package/dist/types/wallet/serviceWorker/wallet-message-handler.d.ts +0 -543
- package/dist/types/wallet/serviceWorker/wallet.d.ts +0 -238
- package/dist/types/wallet/unroll.d.ts +0 -114
- package/dist/types/wallet/utils.d.ts +0 -36
- package/dist/types/wallet/validation.d.ts +0 -24
- package/dist/types/wallet/vtxo-manager.d.ts +0 -476
- package/dist/types/wallet/wallet.d.ts +0 -360
- package/dist/types/worker/browser/service-worker-manager.d.ts +0 -32
- package/dist/types/worker/browser/utils.d.ts +0 -17
- package/dist/types/worker/errors.d.ts +0 -7
- package/dist/types/worker/expo/index.d.ts +0 -7
- package/dist/types/worker/expo/processors/contractPollProcessor.d.ts +0 -19
- package/dist/types/worker/expo/processors/index.d.ts +0 -1
- package/dist/types/worker/expo/taskQueue.d.ts +0 -50
- package/dist/types/worker/expo/taskRunner.d.ts +0 -66
- package/dist/types/worker/messageBus.d.ts +0 -188
package/dist/types/index.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Transaction } from "./utils/transaction.js";
|
|
2
|
-
import { SingleKey, ReadonlySingleKey } from "./identity/singleKey.js";
|
|
3
|
-
import { SeedIdentity, MnemonicIdentity, ReadonlyDescriptorIdentity } from "./identity/seedIdentity.js";
|
|
4
|
-
import type { SeedIdentityOptions, MnemonicOptions, NetworkOptions, DescriptorOptions } from "./identity/seedIdentity.js";
|
|
5
|
-
import { Identity, ReadonlyIdentity, BatchSignableIdentity, SignRequest, isBatchSignable } from "./identity/index.js";
|
|
6
|
-
import { ArkAddress } from "./script/address.js";
|
|
7
|
-
import { VHTLC } from "./script/vhtlc.js";
|
|
8
|
-
import { DefaultVtxo } from "./script/default.js";
|
|
9
|
-
import { DelegateVtxo } from "./script/delegate.js";
|
|
10
|
-
import { MessageHandler, RequestEnvelope, ResponseEnvelope, MessageBus } from "./worker/messageBus.js";
|
|
11
|
-
import { VtxoScript, EncodedVtxoScript, TapLeafScript, TapTreeCoder, getSequence } from "./script/base.js";
|
|
12
|
-
import { TxType, IWallet, IReadonlyWallet, BaseWalletConfig, WalletConfig, ReadonlyWalletConfig, ProviderClass, ArkTransaction, Coin, ExtendedCoin, ExtendedVirtualCoin, WalletBalance, SendBitcoinParams, SettleParams, Status, VirtualStatus, Outpoint, VirtualCoin, TxKey, GetVtxosFilter, TapLeaves, StorageConfig, isSpendable, isSubdust, isRecoverable, isExpired, Asset, Recipient, IssuanceParams, IssuanceResult, ReissuanceParams, BurnParams, AssetDetails, AssetMetadata, KnownMetadata } from "./wallet/index.js";
|
|
13
|
-
import { Batch } from "./wallet/batch.js";
|
|
14
|
-
import { Wallet, ReadonlyWallet, waitForIncomingFunds, IncomingFunds } from "./wallet/wallet.js";
|
|
15
|
-
import { TxTree, TxTreeNode } from "./tree/txTree.js";
|
|
16
|
-
import { SignerSession, TreeNonces, TreePartialSigs } from "./tree/signingSession.js";
|
|
17
|
-
import { Ramps } from "./wallet/ramps.js";
|
|
18
|
-
import { HDDescriptorProvider } from "./wallet/hdDescriptorProvider.js";
|
|
19
|
-
import { isVtxoExpiringSoon, VtxoManager } from "./wallet/vtxo-manager.js";
|
|
20
|
-
import type { IVtxoManager, SettlementConfig } from "./wallet/vtxo-manager.js";
|
|
21
|
-
import { ServiceWorkerWallet, ServiceWorkerReadonlyWallet, DEFAULT_MESSAGE_TIMEOUTS } from "./wallet/serviceWorker/wallet.js";
|
|
22
|
-
import type { MessageTimeouts } from "./wallet/serviceWorker/wallet.js";
|
|
23
|
-
import { OnchainWallet } from "./wallet/onchain.js";
|
|
24
|
-
import { setupServiceWorker } from "./worker/browser/utils.js";
|
|
25
|
-
import { ESPLORA_URL, EsploraProvider, OnchainProvider, ExplorerTransaction } from "./providers/onchain.js";
|
|
26
|
-
import { ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ElectrumOnchainProvider, WsElectrumChainSource } from "./providers/electrum.js";
|
|
27
|
-
import type { TransactionHistory as ElectrumTransactionHistory, BlockHeader as ElectrumBlockHeader, Unspent as ElectrumUnspent } from "./providers/electrum.js";
|
|
28
|
-
import { RestArkProvider, ArkProvider, SettlementEvent, SettlementEventType, ArkInfo, SignedIntent, Output, TxNotification, BatchFinalizationEvent, BatchFinalizedEvent, BatchFailedEvent, TreeSigningStartedEvent, TreeNoncesEvent, BatchStartedEvent, TreeTxEvent, TreeSignatureEvent, ScheduledSession, FeeInfo } from "./providers/ark.js";
|
|
29
|
-
import { DelegatorProvider, DelegateInfo, DelegateOptions, RestDelegatorProvider } from "./providers/delegator.js";
|
|
30
|
-
import { CLTVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, CSVMultisigTapscript, decodeTapscript, MultisigTapscript, TapscriptType, ArkTapscript, RelativeTimelock } from "./script/tapscript.js";
|
|
31
|
-
import { hasBoardingTxExpired, buildOffchainTx, verifyTapscriptSignatures, ArkTxInput, OffchainTx, combineTapscriptSigs, isValidArkAddress } from "./utils/arkTransaction.js";
|
|
32
|
-
import { VtxoTaprootTree, ConditionWitness, getArkPsbtFields, setArkPsbtField, ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, CosignerPublicKey, VtxoTreeExpiry } from "./utils/unknownFields.js";
|
|
33
|
-
import { Intent } from "./intent/index.js";
|
|
34
|
-
import { BIP322 } from "./bip322/index.js";
|
|
35
|
-
import { ArkNote } from "./arknote/index.js";
|
|
36
|
-
import { networks, Network, NetworkName } from "./networks.js";
|
|
37
|
-
import { RestIndexerProvider, IndexerProvider, IndexerTxType, ChainTxType, PageResponse, BatchInfo, ChainTx, CommitmentTx, TxHistoryRecord, VtxoChain, Tx, Vtxo, PaginationOptions, SubscriptionResponse, SubscriptionHeartbeat, SubscriptionEvent } from "./providers/indexer.js";
|
|
38
|
-
import { Nonces } from "./musig2/nonces.js";
|
|
39
|
-
import { PartialSig } from "./musig2/sign.js";
|
|
40
|
-
import { AnchorBumper, P2A } from "./utils/anchor.js";
|
|
41
|
-
import { TxWeightEstimator, type VSize } from "./utils/txSizeEstimator.js";
|
|
42
|
-
import { Unroll } from "./wallet/unroll.js";
|
|
43
|
-
import { ArkError, maybeArkError } from "./providers/errors.js";
|
|
44
|
-
import { validateVtxoTxGraph, validateConnectorsTxGraph } from "./tree/validation.js";
|
|
45
|
-
import { buildForfeitTx } from "./forfeit.js";
|
|
46
|
-
import { IndexedDBWalletRepository, IndexedDBContractRepository, InMemoryWalletRepository, InMemoryContractRepository, MIGRATION_KEY, migrateWalletRepository, requiresMigration, getMigrationStatus, rollbackMigration, WalletRepositoryImpl, ContractRepositoryImpl, WalletRepository, ContractRepository } from "./repositories/index.js";
|
|
47
|
-
import type { MigrationStatus } from "./repositories/index.js";
|
|
48
|
-
import { DelegatorManagerImpl, IDelegatorManager } from "./wallet/delegator.js";
|
|
49
|
-
export * from "./arkfee/index.js";
|
|
50
|
-
export * as asset from "./extension/asset/index.js";
|
|
51
|
-
import { ContractManager, ContractWatcher, contractHandlers, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, encodeArkContract, decodeArkContract, contractFromArkContract, contractFromArkContractWithAddress, isArkContract } from "./contracts/index.js";
|
|
52
|
-
import type { Contract, ContractVtxo, ContractState, ContractEvent, ContractEventCallback, ContractBalance, ContractWithVtxos, ContractHandler, PathSelection, PathContext, ContractManagerConfig, CreateContractParams, ContractWatcherConfig, ParsedArkContract, DefaultContractParams, DelegateContractParams, VHTLCContractParams } from "./contracts/index.js";
|
|
53
|
-
import { IContractManager } from "./contracts/contractManager.js";
|
|
54
|
-
import { timelockToSequence, sequenceToTimelock } from "./utils/timelock.js";
|
|
55
|
-
import { closeDatabase, openDatabase } from "./repositories/indexedDB/manager.js";
|
|
56
|
-
import { WalletMessageHandler, WalletNotInitializedError, ReadonlyWalletError, DelegatorNotConfiguredError } from "./wallet/serviceWorker/wallet-message-handler.js";
|
|
57
|
-
import { MESSAGE_BUS_NOT_INITIALIZED, MessageBusNotInitializedError, ServiceWorkerTimeoutError } from "./worker/errors.js";
|
|
58
|
-
export { Wallet, ReadonlyWallet, SingleKey, ReadonlySingleKey, SeedIdentity, MnemonicIdentity, ReadonlyDescriptorIdentity, isBatchSignable, OnchainWallet, Ramps, VtxoManager, HDDescriptorProvider, DelegatorManagerImpl, RestDelegatorProvider, ESPLORA_URL, EsploraProvider, ELECTRUM_WS_URL, ELECTRUM_TCP_HOST, ElectrumOnchainProvider, WsElectrumChainSource, RestArkProvider, RestIndexerProvider, ArkAddress, DefaultVtxo, DelegateVtxo, VtxoScript, VHTLC, TxType, IndexerTxType, ChainTxType, SettlementEventType, setupServiceWorker, MessageBus, WalletMessageHandler, WalletNotInitializedError, ReadonlyWalletError, DelegatorNotConfiguredError, MESSAGE_BUS_NOT_INITIALIZED, MessageBusNotInitializedError, ServiceWorkerTimeoutError, ServiceWorkerWallet, ServiceWorkerReadonlyWallet, DEFAULT_MESSAGE_TIMEOUTS, decodeTapscript, MultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, CLTVMultisigTapscript, TapTreeCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, setArkPsbtField, getArkPsbtFields, CosignerPublicKey, VtxoTreeExpiry, VtxoTaprootTree, ConditionWitness, buildOffchainTx, verifyTapscriptSignatures, waitForIncomingFunds, hasBoardingTxExpired, combineTapscriptSigs, isVtxoExpiringSoon, isValidArkAddress, ArkNote, networks, closeDatabase, openDatabase, IndexedDBWalletRepository, IndexedDBContractRepository, InMemoryWalletRepository, InMemoryContractRepository, MIGRATION_KEY, migrateWalletRepository, requiresMigration, getMigrationStatus, rollbackMigration, WalletRepositoryImpl, ContractRepositoryImpl, Intent, BIP322, TxTree, P2A, Unroll, Transaction, TxWeightEstimator, timelockToSequence, sequenceToTimelock, ArkError, maybeArkError, Batch, validateVtxoTxGraph, validateConnectorsTxGraph, buildForfeitTx, isRecoverable, isSpendable, isSubdust, isExpired, getSequence, ContractManager, ContractWatcher, contractHandlers, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, encodeArkContract, decodeArkContract, contractFromArkContract, contractFromArkContractWithAddress, isArkContract, };
|
|
59
|
-
export type { Identity, ReadonlyIdentity, BatchSignableIdentity, SignRequest, IWallet, IReadonlyWallet, BaseWalletConfig, WalletConfig, ReadonlyWalletConfig, ProviderClass, ArkTransaction, Coin, ExtendedCoin, ExtendedVirtualCoin, WalletBalance, SendBitcoinParams, SettleParams, Status, VirtualStatus, Outpoint, VirtualCoin, TxKey, TapscriptType, ArkTxInput, OffchainTx, TapLeaves, IncomingFunds, SeedIdentityOptions, MnemonicOptions, NetworkOptions, DescriptorOptions, IndexerProvider, PageResponse, BatchInfo, ChainTx, CommitmentTx, TxHistoryRecord, Vtxo, VtxoChain, Tx, OnchainProvider, ArkProvider, SettlementEvent, FeeInfo, ArkInfo, SignedIntent, Output, TxNotification, ExplorerTransaction, ElectrumTransactionHistory, ElectrumBlockHeader, ElectrumUnspent, BatchFinalizationEvent, BatchFinalizedEvent, BatchFailedEvent, TreeSigningStartedEvent, TreeNoncesEvent, BatchStartedEvent, TreeTxEvent, TreeSignatureEvent, ScheduledSession, PaginationOptions, SubscriptionResponse, SubscriptionHeartbeat, SubscriptionEvent, Network, NetworkName, ArkTapscript, RelativeTimelock, EncodedVtxoScript, TapLeafScript, SignerSession, TreeNonces, TreePartialSigs, GetVtxosFilter, SettlementConfig, IVtxoManager, Asset, Recipient, IssuanceParams, IssuanceResult, ReissuanceParams, BurnParams, AssetDetails, AssetMetadata, KnownMetadata, Nonces, PartialSig, ArkPsbtFieldCoder, TxTreeNode, AnchorBumper, VSize, StorageConfig, Contract, ContractVtxo, ContractState, ContractEvent, ContractEventCallback, ContractBalance, ContractWithVtxos, ContractHandler, IContractManager, PathSelection, PathContext, ContractManagerConfig, CreateContractParams, ContractWatcherConfig, ParsedArkContract, DefaultContractParams, DelegateContractParams, VHTLCContractParams, MessageHandler, RequestEnvelope, ResponseEnvelope, MessageTimeouts, IDelegatorManager, DelegatorProvider, DelegateInfo, DelegateOptions, WalletRepository, ContractRepository, MigrationStatus, };
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { TransactionInput, TransactionOutput } from "@scure/btc-signer/psbt.js";
|
|
2
|
-
import { Transaction } from "../utils/transaction.js";
|
|
3
|
-
import { ExtendedCoin } from "../wallet/index.js";
|
|
4
|
-
/**
|
|
5
|
-
* Intent proof implementation for Bitcoin message signing.
|
|
6
|
-
*
|
|
7
|
-
* Intent proof defines a standard for signing Bitcoin messages as well as proving
|
|
8
|
-
* ownership of outputs.
|
|
9
|
-
*
|
|
10
|
-
* This namespace provides utilities for creating and validating Intent proof.
|
|
11
|
-
*
|
|
12
|
-
* It is greatly inspired by BIP322.
|
|
13
|
-
* @see https://github.com/bitcoin/bips/blob/master/bip-0322.mediawiki
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* // Create a Intent proof
|
|
18
|
-
* const proof = Intent.create(
|
|
19
|
-
* "Hello Bitcoin!",
|
|
20
|
-
* [input],
|
|
21
|
-
* [output]
|
|
22
|
-
* );
|
|
23
|
-
*
|
|
24
|
-
* // Sign the proof
|
|
25
|
-
* const signedProof = await identity.sign(proof);
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
export declare namespace Intent {
|
|
29
|
-
type Proof = Transaction;
|
|
30
|
-
/**
|
|
31
|
-
* Creates a new Intent proof unsigned transaction.
|
|
32
|
-
*
|
|
33
|
-
* This function constructs a special transaction that can be signed to prove
|
|
34
|
-
* ownership of onchain and virtual outputs. The proof includes the message to be
|
|
35
|
-
* signed and the inputs/outputs that demonstrate ownership.
|
|
36
|
-
*
|
|
37
|
-
* @param message - The Intent message to be signed, either raw string of Message object
|
|
38
|
-
* @param ins - Array of transaction inputs to prove ownership of
|
|
39
|
-
* @param outputs - Optional array of transaction outputs
|
|
40
|
-
* @returns An unsigned Intent proof transaction
|
|
41
|
-
*/
|
|
42
|
-
function create(message: string | Message, ins: (TransactionInput | ExtendedCoin)[], outputs?: TransactionOutput[]): Proof;
|
|
43
|
-
/**
|
|
44
|
-
* Compute the fee paid by an intent proof transaction.
|
|
45
|
-
*
|
|
46
|
-
* @param proof - Intent proof transaction
|
|
47
|
-
* @returns The fee in satoshis
|
|
48
|
-
*/
|
|
49
|
-
function fee(proof: Proof): number;
|
|
50
|
-
type RegisterMessage = {
|
|
51
|
-
type: "register";
|
|
52
|
-
onchain_output_indexes: number[];
|
|
53
|
-
valid_at: number;
|
|
54
|
-
expire_at: number;
|
|
55
|
-
cosigners_public_keys: string[];
|
|
56
|
-
};
|
|
57
|
-
type DeleteMessage = {
|
|
58
|
-
type: "delete";
|
|
59
|
-
expire_at: number;
|
|
60
|
-
};
|
|
61
|
-
type GetPendingTxMessage = {
|
|
62
|
-
type: "get-pending-tx";
|
|
63
|
-
expire_at: number;
|
|
64
|
-
};
|
|
65
|
-
type Message = RegisterMessage | DeleteMessage | GetPendingTxMessage;
|
|
66
|
-
/**
|
|
67
|
-
* Serialize an intent message to the canonical JSON string used for signing.
|
|
68
|
-
*
|
|
69
|
-
* @param message - Intent message payload
|
|
70
|
-
* @returns Canonical string form of the message
|
|
71
|
-
*/
|
|
72
|
-
function encodeMessage(message: Message): string;
|
|
73
|
-
}
|
|
74
|
-
export declare const OP_RETURN_EMPTY_PKSCRIPT: Uint8Array<ArrayBuffer>;
|
|
75
|
-
export declare const TAG_INTENT_PROOF = "ark-intent-proof-message";
|
|
76
|
-
/**
|
|
77
|
-
* Creates the "to_spend" transaction used by both intent proofs and BIP-322.
|
|
78
|
-
*
|
|
79
|
-
* The message is hashed with the given tagged-hash tag before being placed
|
|
80
|
-
* into the scriptSig as `OP_0 <hash>`.
|
|
81
|
-
*
|
|
82
|
-
* @param message - The message to embed
|
|
83
|
-
* @param pkScript - The scriptPubKey of the signer's address
|
|
84
|
-
* @param tag - Tagged-hash tag (defaults to the Arkade intent proof tag)
|
|
85
|
-
*/
|
|
86
|
-
export declare function craftToSpendTx(message: string, pkScript: Uint8Array, tag?: string): Transaction;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
interface KeyAggOptions {
|
|
2
|
-
taprootTweak?: Uint8Array;
|
|
3
|
-
}
|
|
4
|
-
export interface AggregateKey {
|
|
5
|
-
preTweakedKey: Uint8Array;
|
|
6
|
-
finalKey: Uint8Array;
|
|
7
|
-
}
|
|
8
|
-
export declare function aggregateKeys(publicKeys: Uint8Array[], sort: boolean, options?: Partial<KeyAggOptions>): AggregateKey;
|
|
9
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MuSig2 nonce pair containing public and secret values.
|
|
3
|
-
* Public nonces are two compressed points (33 bytes each).
|
|
4
|
-
* Secret nonces are the corresponding private scalars plus pubkey.
|
|
5
|
-
*/
|
|
6
|
-
export type Nonces = {
|
|
7
|
-
pubNonce: Uint8Array;
|
|
8
|
-
secNonce: Uint8Array;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Generates a pair of public and secret nonces for MuSig2 signing
|
|
12
|
-
*/
|
|
13
|
-
export declare function generateNonces(publicKey: Uint8Array): Nonces;
|
|
14
|
-
export declare function aggregateNonces(pubNonces: Uint8Array[]): Uint8Array;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare class PartialSignatureError extends Error {
|
|
2
|
-
constructor(message: string);
|
|
3
|
-
}
|
|
4
|
-
interface SignOptions {
|
|
5
|
-
sortKeys?: boolean;
|
|
6
|
-
taprootTweak?: Uint8Array;
|
|
7
|
-
}
|
|
8
|
-
export declare class PartialSig {
|
|
9
|
-
s: Uint8Array;
|
|
10
|
-
R: Uint8Array;
|
|
11
|
-
constructor(s: Uint8Array, R: Uint8Array);
|
|
12
|
-
/**
|
|
13
|
-
* Encodes the partial signature into bytes
|
|
14
|
-
* Returns a 32-byte array containing just the s value
|
|
15
|
-
*/
|
|
16
|
-
encode(): Uint8Array;
|
|
17
|
-
/**
|
|
18
|
-
* Decodes a partial signature from bytes
|
|
19
|
-
* @param bytes - 32-byte array containing s value
|
|
20
|
-
*/
|
|
21
|
-
static decode(bytes: Uint8Array): PartialSig;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Generates a MuSig2 partial signature
|
|
25
|
-
*/
|
|
26
|
-
export declare function sign(secNonce: Uint8Array, privateKey: Uint8Array, combinedNonce: Uint8Array, publicKeys: Uint8Array[], message: Uint8Array, options?: SignOptions): PartialSig;
|
|
27
|
-
export {};
|
package/dist/types/networks.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export type NetworkName = "bitcoin" | "testnet" | "signet" | "mutinynet" | "regtest";
|
|
2
|
-
export interface Network {
|
|
3
|
-
hrp: string;
|
|
4
|
-
bech32: string;
|
|
5
|
-
pubKeyHash: number;
|
|
6
|
-
scriptHash: number;
|
|
7
|
-
wif: number;
|
|
8
|
-
}
|
|
9
|
-
export declare const getNetwork: (network: NetworkName) => Network;
|
|
10
|
-
export declare const networks: {
|
|
11
|
-
bitcoin: Network;
|
|
12
|
-
testnet: Network;
|
|
13
|
-
signet: Network;
|
|
14
|
-
mutinynet: Network;
|
|
15
|
-
regtest: Network;
|
|
16
|
-
};
|
|
@@ -1,369 +0,0 @@
|
|
|
1
|
-
import { TxTreeNode } from "../tree/txTree.js";
|
|
2
|
-
import { TreeNonces, TreePartialSigs } from "../tree/signingSession.js";
|
|
3
|
-
import { Vtxo } from "./indexer.js";
|
|
4
|
-
import type { IntentFeeConfig } from "../arkfee/index.js";
|
|
5
|
-
import { Intent } from "../intent/index.js";
|
|
6
|
-
/** Output requested during settlement or transaction submission. */
|
|
7
|
-
export type Output = {
|
|
8
|
-
/** Destination address, either onchain or Arkade (offchain). */
|
|
9
|
-
address: string;
|
|
10
|
-
/** Amount to send in satoshis. */
|
|
11
|
-
amount: bigint;
|
|
12
|
-
};
|
|
13
|
-
export declare enum SettlementEventType {
|
|
14
|
-
BatchStarted = "batch_started",
|
|
15
|
-
BatchFinalization = "batch_finalization",
|
|
16
|
-
BatchFinalized = "batch_finalized",
|
|
17
|
-
BatchFailed = "batch_failed",
|
|
18
|
-
TreeSigningStarted = "tree_signing_started",
|
|
19
|
-
TreeNonces = "tree_nonces",
|
|
20
|
-
TreeTx = "tree_tx",
|
|
21
|
-
TreeSignature = "tree_signature",
|
|
22
|
-
StreamStarted = "stream_started"
|
|
23
|
-
}
|
|
24
|
-
export type BatchFinalizationEvent = {
|
|
25
|
-
type: SettlementEventType.BatchFinalization;
|
|
26
|
-
id: string;
|
|
27
|
-
commitmentTx: string;
|
|
28
|
-
};
|
|
29
|
-
export type BatchFinalizedEvent = {
|
|
30
|
-
type: SettlementEventType.BatchFinalized;
|
|
31
|
-
id: string;
|
|
32
|
-
commitmentTxid: string;
|
|
33
|
-
};
|
|
34
|
-
export type BatchFailedEvent = {
|
|
35
|
-
type: SettlementEventType.BatchFailed;
|
|
36
|
-
id: string;
|
|
37
|
-
reason: string;
|
|
38
|
-
};
|
|
39
|
-
export type TreeSigningStartedEvent = {
|
|
40
|
-
type: SettlementEventType.TreeSigningStarted;
|
|
41
|
-
id: string;
|
|
42
|
-
cosignersPublicKeys: string[];
|
|
43
|
-
unsignedCommitmentTx: string;
|
|
44
|
-
};
|
|
45
|
-
export type TreeNoncesEvent = {
|
|
46
|
-
type: SettlementEventType.TreeNonces;
|
|
47
|
-
id: string;
|
|
48
|
-
topic: string[];
|
|
49
|
-
txid: string;
|
|
50
|
-
/** Musig2 public nonces keyed by cosigner public key. */
|
|
51
|
-
nonces: TreeNonces;
|
|
52
|
-
};
|
|
53
|
-
export type BatchStartedEvent = {
|
|
54
|
-
type: SettlementEventType.BatchStarted;
|
|
55
|
-
id: string;
|
|
56
|
-
intentIdHashes: string[];
|
|
57
|
-
batchExpiry: bigint;
|
|
58
|
-
};
|
|
59
|
-
export type TreeTxEvent = {
|
|
60
|
-
type: SettlementEventType.TreeTx;
|
|
61
|
-
id: string;
|
|
62
|
-
topic: string[];
|
|
63
|
-
batchIndex: number;
|
|
64
|
-
chunk: TxTreeNode;
|
|
65
|
-
};
|
|
66
|
-
export type TreeSignatureEvent = {
|
|
67
|
-
type: SettlementEventType.TreeSignature;
|
|
68
|
-
id: string;
|
|
69
|
-
topic: string[];
|
|
70
|
-
batchIndex: number;
|
|
71
|
-
txid: string;
|
|
72
|
-
signature: string;
|
|
73
|
-
};
|
|
74
|
-
export type StreamStartedEvent = {
|
|
75
|
-
type: SettlementEventType.StreamStarted;
|
|
76
|
-
id: string;
|
|
77
|
-
};
|
|
78
|
-
export type SettlementEvent = BatchFinalizationEvent | BatchFinalizedEvent | BatchFailedEvent | TreeSigningStartedEvent | TreeNoncesEvent | BatchStartedEvent | TreeTxEvent | TreeSignatureEvent | StreamStartedEvent;
|
|
79
|
-
export interface ScheduledSession {
|
|
80
|
-
duration: bigint;
|
|
81
|
-
fees: FeeInfo;
|
|
82
|
-
nextEndTime: bigint;
|
|
83
|
-
nextStartTime: bigint;
|
|
84
|
-
period: bigint;
|
|
85
|
-
}
|
|
86
|
-
export interface FeeInfo {
|
|
87
|
-
intentFee: IntentFeeConfig;
|
|
88
|
-
txFeeRate: string;
|
|
89
|
-
}
|
|
90
|
-
export interface PendingTx {
|
|
91
|
-
arkTxid: string;
|
|
92
|
-
finalArkTx: string;
|
|
93
|
-
signedCheckpointTxs: string[];
|
|
94
|
-
}
|
|
95
|
-
export interface DeprecatedSigner {
|
|
96
|
-
cutoffDate: bigint;
|
|
97
|
-
pubkey: string;
|
|
98
|
-
}
|
|
99
|
-
export type ServiceStatus = Record<string, string>;
|
|
100
|
-
export interface ArkInfo {
|
|
101
|
-
boardingExitDelay: bigint;
|
|
102
|
-
checkpointTapscript: string;
|
|
103
|
-
deprecatedSigners: DeprecatedSigner[];
|
|
104
|
-
digest: string;
|
|
105
|
-
dust: bigint;
|
|
106
|
-
fees: FeeInfo;
|
|
107
|
-
forfeitAddress: string;
|
|
108
|
-
forfeitPubkey: string;
|
|
109
|
-
network: string;
|
|
110
|
-
scheduledSession?: ScheduledSession;
|
|
111
|
-
serviceStatus: ServiceStatus;
|
|
112
|
-
sessionDuration: bigint;
|
|
113
|
-
signerPubkey: string;
|
|
114
|
-
unilateralExitDelay: bigint;
|
|
115
|
-
/**
|
|
116
|
-
* Maximum boarding input amount.
|
|
117
|
-
*
|
|
118
|
-
* @remarks
|
|
119
|
-
* `-1` means unlimited, while `0` disables boarding.
|
|
120
|
-
*/
|
|
121
|
-
utxoMaxAmount: bigint;
|
|
122
|
-
utxoMinAmount: bigint;
|
|
123
|
-
version: string;
|
|
124
|
-
/**
|
|
125
|
-
* Maximum virtual output amount.
|
|
126
|
-
*
|
|
127
|
-
* @remarks
|
|
128
|
-
* `-1` means unlimited.
|
|
129
|
-
*/
|
|
130
|
-
vtxoMaxAmount: bigint;
|
|
131
|
-
vtxoMinAmount: bigint;
|
|
132
|
-
}
|
|
133
|
-
/** Signed intent payload sent to the Arkade server. */
|
|
134
|
-
export interface SignedIntent<T extends Intent.Message> {
|
|
135
|
-
/** Base64-encoded signed proof transaction. */
|
|
136
|
-
proof: string;
|
|
137
|
-
/** Intent message payload associated with the proof. */
|
|
138
|
-
message: T;
|
|
139
|
-
}
|
|
140
|
-
/** Transaction notification emitted by the Arkade server stream. */
|
|
141
|
-
export interface TxNotification {
|
|
142
|
-
/** Transaction id. */
|
|
143
|
-
txid: string;
|
|
144
|
-
/** Raw transaction payload. */
|
|
145
|
-
tx: string;
|
|
146
|
-
/** Virtual outputs spent by the transaction. */
|
|
147
|
-
spentVtxos: Vtxo[];
|
|
148
|
-
/** Virtual outputs made spendable by the transaction. */
|
|
149
|
-
spendableVtxos: Vtxo[];
|
|
150
|
-
/** Optional checkpoint transactions associated with the notification. */
|
|
151
|
-
checkpointTxs?: Record<string, {
|
|
152
|
-
txid: string;
|
|
153
|
-
tx: string;
|
|
154
|
-
}>;
|
|
155
|
-
}
|
|
156
|
-
export interface ArkProvider {
|
|
157
|
-
/** Fetch Arkade server configuration and fee settings. */
|
|
158
|
-
getInfo(): Promise<ArkInfo>;
|
|
159
|
-
/** Submit a signed Arkade transaction and its checkpoint transactions. */
|
|
160
|
-
submitTx(signedArkTx: string, checkpointTxs: string[]): Promise<{
|
|
161
|
-
arkTxid: string;
|
|
162
|
-
finalArkTx: string;
|
|
163
|
-
signedCheckpointTxs: string[];
|
|
164
|
-
}>;
|
|
165
|
-
/** Finalize a previously submitted Arkade transaction. */
|
|
166
|
-
finalizeTx(arkTxid: string, finalCheckpointTxs: string[]): Promise<void>;
|
|
167
|
-
/** Register a signed intent with the Arkade server. */
|
|
168
|
-
registerIntent(intent: SignedIntent<Intent.RegisterMessage>): Promise<string>;
|
|
169
|
-
/** Delete a previously registered intent. */
|
|
170
|
-
deleteIntent(intent: SignedIntent<Intent.DeleteMessage>): Promise<void>;
|
|
171
|
-
/** Confirm an already registered intent id. */
|
|
172
|
-
confirmRegistration(intentId: string): Promise<void>;
|
|
173
|
-
/** Submit musig2 tree nonces for a batch signing session. */
|
|
174
|
-
submitTreeNonces(batchId: string, pubkey: string, nonces: TreeNonces): Promise<void>;
|
|
175
|
-
/** Submit musig2 partial signatures for a batch signing session. */
|
|
176
|
-
submitTreeSignatures(batchId: string, pubkey: string, signatures: TreePartialSigs): Promise<void>;
|
|
177
|
-
/** Submit signed forfeit transactions for cooperative settlement. */
|
|
178
|
-
submitSignedForfeitTxs(signedForfeitTxs: string[], signedCommitmentTx?: string): Promise<void>;
|
|
179
|
-
/** Open the settlement event stream for the given topics. */
|
|
180
|
-
getEventStream(signal: AbortSignal, topics: string[]): AsyncIterableIterator<SettlementEvent>;
|
|
181
|
-
/** Stream transaction notifications emitted by the Arkade server. */
|
|
182
|
-
getTransactionsStream(signal: AbortSignal): AsyncIterableIterator<{
|
|
183
|
-
commitmentTx?: TxNotification;
|
|
184
|
-
arkTx?: TxNotification;
|
|
185
|
-
}>;
|
|
186
|
-
/** Fetch pending transactions for a signed get-pending-tx intent. */
|
|
187
|
-
getPendingTxs(intent: SignedIntent<Intent.GetPendingTxMessage>): Promise<PendingTx[]>;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* REST-based Arkade provider implementation.
|
|
191
|
-
*
|
|
192
|
-
* @see https://buf.build/arkade-os/arkd/docs/main:ark.v1#ark.v1.ArkService
|
|
193
|
-
* @example
|
|
194
|
-
* ```typescript
|
|
195
|
-
* const provider = new RestArkProvider('https://arkade.computer');
|
|
196
|
-
* const info = await provider.getInfo();
|
|
197
|
-
* ```
|
|
198
|
-
*/
|
|
199
|
-
export declare class RestArkProvider implements ArkProvider {
|
|
200
|
-
serverUrl: string;
|
|
201
|
-
constructor(serverUrl: string);
|
|
202
|
-
getInfo(): Promise<ArkInfo>;
|
|
203
|
-
submitTx(signedArkTx: string, checkpointTxs: string[]): Promise<{
|
|
204
|
-
arkTxid: string;
|
|
205
|
-
finalArkTx: string;
|
|
206
|
-
signedCheckpointTxs: string[];
|
|
207
|
-
}>;
|
|
208
|
-
finalizeTx(arkTxid: string, finalCheckpointTxs: string[]): Promise<void>;
|
|
209
|
-
registerIntent(intent: SignedIntent<Intent.RegisterMessage>): Promise<string>;
|
|
210
|
-
deleteIntent(intent: SignedIntent<Intent.DeleteMessage>): Promise<void>;
|
|
211
|
-
confirmRegistration(intentId: string): Promise<void>;
|
|
212
|
-
submitTreeNonces(batchId: string, pubkey: string, nonces: TreeNonces): Promise<void>;
|
|
213
|
-
submitTreeSignatures(batchId: string, pubkey: string, signatures: TreePartialSigs): Promise<void>;
|
|
214
|
-
submitSignedForfeitTxs(signedForfeitTxs: string[], signedCommitmentTx?: string): Promise<void>;
|
|
215
|
-
getEventStream(signal: AbortSignal, topics: string[]): AsyncIterableIterator<SettlementEvent>;
|
|
216
|
-
getTransactionsStream(signal: AbortSignal): AsyncIterableIterator<{
|
|
217
|
-
commitmentTx?: TxNotification;
|
|
218
|
-
arkTx?: TxNotification;
|
|
219
|
-
}>;
|
|
220
|
-
getPendingTxs(intent: SignedIntent<Intent.GetPendingTxMessage>): Promise<PendingTx[]>;
|
|
221
|
-
protected parseSettlementEvent(data: ProtoTypes.GetEventStreamResponse): SettlementEvent | null;
|
|
222
|
-
protected parseTransactionNotification(data: ProtoTypes.GetTransactionsStreamResponse): {
|
|
223
|
-
commitmentTx?: TxNotification;
|
|
224
|
-
arkTx?: TxNotification;
|
|
225
|
-
} | null;
|
|
226
|
-
}
|
|
227
|
-
declare namespace ProtoTypes {
|
|
228
|
-
interface BatchStartedEvent {
|
|
229
|
-
id: string;
|
|
230
|
-
intentIdHashes: string[];
|
|
231
|
-
batchExpiry: number;
|
|
232
|
-
}
|
|
233
|
-
interface BatchFailed {
|
|
234
|
-
id: string;
|
|
235
|
-
reason: string;
|
|
236
|
-
}
|
|
237
|
-
export interface BatchFinalizationEvent {
|
|
238
|
-
id: string;
|
|
239
|
-
commitmentTx: string;
|
|
240
|
-
}
|
|
241
|
-
interface BatchFinalizedEvent {
|
|
242
|
-
id: string;
|
|
243
|
-
commitmentTxid: string;
|
|
244
|
-
}
|
|
245
|
-
interface TreeSigningStartedEvent {
|
|
246
|
-
id: string;
|
|
247
|
-
cosignersPubkeys: string[];
|
|
248
|
-
unsignedCommitmentTx: string;
|
|
249
|
-
}
|
|
250
|
-
interface TreeNoncesAggregatedEvent {
|
|
251
|
-
id: string;
|
|
252
|
-
treeNonces: Record<string, string>;
|
|
253
|
-
}
|
|
254
|
-
interface TreeNoncesEvent {
|
|
255
|
-
id: string;
|
|
256
|
-
topic: string[];
|
|
257
|
-
txid: string;
|
|
258
|
-
nonces: Record<string, string>;
|
|
259
|
-
}
|
|
260
|
-
interface TreeTxEvent {
|
|
261
|
-
id: string;
|
|
262
|
-
topic: string[];
|
|
263
|
-
batchIndex: number;
|
|
264
|
-
txid: string;
|
|
265
|
-
tx: string;
|
|
266
|
-
children: Record<string, string>;
|
|
267
|
-
}
|
|
268
|
-
interface TreeSignatureEvent {
|
|
269
|
-
id: string;
|
|
270
|
-
topic: string[];
|
|
271
|
-
batchIndex: number;
|
|
272
|
-
txid: string;
|
|
273
|
-
signature: string;
|
|
274
|
-
}
|
|
275
|
-
interface StreamStartedEvent {
|
|
276
|
-
id: string;
|
|
277
|
-
}
|
|
278
|
-
interface Heartbeat {
|
|
279
|
-
}
|
|
280
|
-
export interface VtxoData {
|
|
281
|
-
outpoint: {
|
|
282
|
-
txid: string;
|
|
283
|
-
vout: number;
|
|
284
|
-
};
|
|
285
|
-
amount: string;
|
|
286
|
-
script: string;
|
|
287
|
-
createdAt: string;
|
|
288
|
-
expiresAt: string | null;
|
|
289
|
-
commitmentTxids: string[];
|
|
290
|
-
isPreconfirmed: boolean;
|
|
291
|
-
isSwept: boolean;
|
|
292
|
-
isUnrolled: boolean;
|
|
293
|
-
isSpent: boolean;
|
|
294
|
-
spentBy: string;
|
|
295
|
-
settledBy?: string;
|
|
296
|
-
arkTxid?: string;
|
|
297
|
-
}
|
|
298
|
-
export interface GetEventStreamResponse {
|
|
299
|
-
batchStarted?: BatchStartedEvent;
|
|
300
|
-
batchFailed?: BatchFailed;
|
|
301
|
-
batchFinalization?: BatchFinalizationEvent;
|
|
302
|
-
batchFinalized?: BatchFinalizedEvent;
|
|
303
|
-
treeSigningStarted?: TreeSigningStartedEvent;
|
|
304
|
-
treeNoncesAggregated?: TreeNoncesAggregatedEvent;
|
|
305
|
-
treeNonces?: TreeNoncesEvent;
|
|
306
|
-
treeTx?: TreeTxEvent;
|
|
307
|
-
treeSignature?: TreeSignatureEvent;
|
|
308
|
-
streamStarted?: StreamStartedEvent;
|
|
309
|
-
heartbeat?: Heartbeat;
|
|
310
|
-
}
|
|
311
|
-
export interface GetTransactionsStreamResponse {
|
|
312
|
-
commitmentTx?: {
|
|
313
|
-
txid: string;
|
|
314
|
-
tx: string;
|
|
315
|
-
spentVtxos: VtxoData[];
|
|
316
|
-
spendableVtxos: VtxoData[];
|
|
317
|
-
checkpointTxs?: Record<string, {
|
|
318
|
-
txid: string;
|
|
319
|
-
tx: string;
|
|
320
|
-
}>;
|
|
321
|
-
};
|
|
322
|
-
arkTx?: {
|
|
323
|
-
txid: string;
|
|
324
|
-
tx: string;
|
|
325
|
-
spentVtxos: VtxoData[];
|
|
326
|
-
spendableVtxos: VtxoData[];
|
|
327
|
-
checkpointTxs?: Record<string, {
|
|
328
|
-
txid: string;
|
|
329
|
-
tx: string;
|
|
330
|
-
}>;
|
|
331
|
-
};
|
|
332
|
-
heartbeat?: Heartbeat;
|
|
333
|
-
}
|
|
334
|
-
export interface EventData {
|
|
335
|
-
batchStarted?: BatchStartedEvent;
|
|
336
|
-
batchFailed?: BatchFailed;
|
|
337
|
-
batchFinalization?: BatchFinalizationEvent;
|
|
338
|
-
batchFinalized?: BatchFinalizedEvent;
|
|
339
|
-
treeSigningStarted?: TreeSigningStartedEvent;
|
|
340
|
-
treeNoncesAggregated?: TreeNoncesAggregatedEvent;
|
|
341
|
-
treeTx?: TreeTxEvent;
|
|
342
|
-
treeSignature?: TreeSignatureEvent;
|
|
343
|
-
}
|
|
344
|
-
export interface TransactionData {
|
|
345
|
-
commitmentTx?: {
|
|
346
|
-
txid: string;
|
|
347
|
-
tx: string;
|
|
348
|
-
spentVtxos: VtxoData[];
|
|
349
|
-
spendableVtxos: VtxoData[];
|
|
350
|
-
checkpointTxs?: Record<string, {
|
|
351
|
-
txid: string;
|
|
352
|
-
tx: string;
|
|
353
|
-
}>;
|
|
354
|
-
};
|
|
355
|
-
arkTx?: {
|
|
356
|
-
txid: string;
|
|
357
|
-
tx: string;
|
|
358
|
-
spentVtxos: VtxoData[];
|
|
359
|
-
spendableVtxos: VtxoData[];
|
|
360
|
-
checkpointTxs?: Record<string, {
|
|
361
|
-
txid: string;
|
|
362
|
-
tx: string;
|
|
363
|
-
}>;
|
|
364
|
-
};
|
|
365
|
-
}
|
|
366
|
-
export {};
|
|
367
|
-
}
|
|
368
|
-
export declare function isFetchTimeoutError(err: any): boolean;
|
|
369
|
-
export {};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { Intent } from "../intent/index.js";
|
|
2
|
-
import { SignedIntent } from "./ark.js";
|
|
3
|
-
/**
|
|
4
|
-
* Delegate identity and fee information returned by `getDelegateInfo`.
|
|
5
|
-
*/
|
|
6
|
-
export interface DelegateInfo {
|
|
7
|
-
/** Delegate public key. */
|
|
8
|
-
pubkey: string;
|
|
9
|
-
/** Delegate fee amount or expression returned by the delegation service. */
|
|
10
|
-
fee: string;
|
|
11
|
-
/**
|
|
12
|
-
* Address controlled by the delegation service.
|
|
13
|
-
* Naming is confusing: should be thought of as a "delegate address".
|
|
14
|
-
*/
|
|
15
|
-
delegatorAddress: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Optional delegate behavior flags.
|
|
19
|
-
*/
|
|
20
|
-
export interface DelegateOptions {
|
|
21
|
-
/**
|
|
22
|
-
* Instruct the delegate not to replace an existing delegation
|
|
23
|
-
* (meaning a signed register intent and its forfeit transactions)
|
|
24
|
-
* that already includes at least one virtual output from this request.
|
|
25
|
-
*
|
|
26
|
-
* @defaultValue `false`
|
|
27
|
-
*/
|
|
28
|
-
rejectReplace?: boolean;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Provider interface for remote delegation services.
|
|
32
|
-
*/
|
|
33
|
-
export interface DelegatorProvider {
|
|
34
|
-
/**
|
|
35
|
-
* Request delegation for a signed register intent and its forfeit transactions.
|
|
36
|
-
*
|
|
37
|
-
* @param intent - Signed register intent to delegate
|
|
38
|
-
* @param forfeitTxs - Forfeit transactions associated with the delegation request
|
|
39
|
-
* @param options - Optional delegate behavior flags
|
|
40
|
-
*/
|
|
41
|
-
delegate(intent: SignedIntent<Intent.RegisterMessage>, forfeitTxs: string[], options?: DelegateOptions): Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* Fetch delegate metadata such as pubkey, fee, and delegate address.
|
|
44
|
-
*
|
|
45
|
-
* @returns Delegate identity and fee information
|
|
46
|
-
*/
|
|
47
|
-
getDelegateInfo(): Promise<DelegateInfo>;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* REST-based delegation provider implementation.
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* const provider = new RestDelegatorProvider('https://delegator.example.com');
|
|
54
|
-
* const info = await provider.getDelegateInfo();
|
|
55
|
-
* await provider.delegate(intent, forfeitTxs);
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
export declare class RestDelegatorProvider implements DelegatorProvider {
|
|
59
|
-
url: string;
|
|
60
|
-
/**
|
|
61
|
-
* Create a REST delegation provider targeting the given base URL.
|
|
62
|
-
*
|
|
63
|
-
* @param url - Base URL of the delegation service
|
|
64
|
-
*/
|
|
65
|
-
constructor(url: string);
|
|
66
|
-
/**
|
|
67
|
-
* Submit a delegation request to the remote delegation service.
|
|
68
|
-
*
|
|
69
|
-
* @param intent - Signed register intent to delegate
|
|
70
|
-
* @param forfeitTxs - Forfeit transactions associated with the delegation request
|
|
71
|
-
* @param options - Optional delegate behavior flags
|
|
72
|
-
* @throws Error if the remote service rejects the request
|
|
73
|
-
*/
|
|
74
|
-
delegate(intent: SignedIntent<Intent.RegisterMessage>, forfeitTxs: string[], options?: DelegateOptions): Promise<void>;
|
|
75
|
-
/**
|
|
76
|
-
* Fetch delegate metadata exposed by the remote delegation service.
|
|
77
|
-
*
|
|
78
|
-
* @returns Delegate identity and fee information
|
|
79
|
-
* @throws Error if the remote service returns invalid data
|
|
80
|
-
*/
|
|
81
|
-
getDelegateInfo(): Promise<DelegateInfo>;
|
|
82
|
-
}
|