@@ -130,6 +130,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
130130| --- |
131131| [ ServiceCollection] ( #class-servicecollection ) |
132132| [ Services] ( #class-services ) |
133+ | [ WhatsOnChain] ( #class-whatsonchain ) |
133134
134135Links: [ API] ( #api ) , [ Interfaces] ( #interfaces ) , [ Classes] ( #classes ) , [ Functions] ( #functions ) , [ Types] ( #types ) , [ Variables] ( #variables )
135136
@@ -173,6 +174,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
173174export class Services implements sdk .WalletServices {
174175 static createDefaultOptions(chain : sdk .Chain ): sdk .WalletServicesOptions
175176 options: sdk .WalletServicesOptions ;
177+ whatsonchain: WhatsOnChain ;
176178 getMerklePathServices: ServiceCollection <sdk .GetMerklePathService >;
177179 getRawTxServices: ServiceCollection <sdk .GetRawTxService >;
178180 postTxsServices: ServiceCollection <sdk .PostTxsService >;
@@ -204,7 +206,7 @@ export class Services implements sdk.WalletServices {
204206}
205207```
206208
207- See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [FiatExchangeRates](./client.md#interface-fiatexchangerates), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetMerklePathService](./client.md#type-getmerklepathservice), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetRawTxService](./client.md#type-getrawtxservice), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [GetUtxoStatusService](./client.md#type-getutxostatusservice), [PostBeefResult](./client.md#interface-postbeefresult), [PostBeefService](./client.md#type-postbeefservice), [PostTxsResult](./client.md#interface-posttxsresult), [PostTxsService](./client.md#type-posttxsservice), [ServiceCollection](./services.md#class-servicecollection), [UpdateFiatExchangeRateService](./client.md#type-updatefiatexchangerateservice), [WalletServices](./client.md#interface-walletservices), [WalletServicesOptions](./client.md#interface-walletservicesoptions)
209+ See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [FiatExchangeRates](./client.md#interface-fiatexchangerates), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetMerklePathService](./client.md#type-getmerklepathservice), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetRawTxService](./client.md#type-getrawtxservice), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [GetUtxoStatusService](./client.md#type-getutxostatusservice), [PostBeefResult](./client.md#interface-postbeefresult), [PostBeefService](./client.md#type-postbeefservice), [PostTxsResult](./client.md#interface-posttxsresult), [PostTxsService](./client.md#type-posttxsservice), [ServiceCollection](./services.md#class-servicecollection), [UpdateFiatExchangeRateService](./client.md#type-updatefiatexchangerateservice), [WalletServices](./client.md#interface-walletservices), [WalletServicesOptions](./client.md#interface-walletservicesoptions), [WhatsOnChain](./services.md#class-whatsonchain)
208210
209211###### Method postTxs
210212
@@ -220,104 +222,118 @@ See also: [PostTxsResult](./client.md#interface-posttxsresult)
220222Links: [ API] ( #api ) , [ Interfaces] ( #interfaces ) , [ Classes] ( #classes ) , [ Functions] ( #functions ) , [ Types] ( #types ) , [ Variables] ( #variables )
221223
222224---
223- #### Functions
225+ ##### Class: WhatsOnChain
224226
225- | | |
226- | --- | --- |
227- | [ createDefaultWalletServicesOptions ] ( #function-createdefaultwalletservicesoptions ) | [ makePostBeefToTaalARC ] ( #function-makepostbeeftotaalarc ) |
228- | [ getExchangeRatesIo ] ( #function-getexchangeratesio ) | [ makePostTxsToTaalARC ] ( #function-makeposttxstotaalarc ) |
229- | [ getMerklePathFromTaalARC ] ( #function-getmerklepathfromtaalarc ) | [ postBeefToArcMiner ] ( #function-postbeeftoarcminer ) |
230- | [ getMerklePathFromWhatsOnChainTsc ] ( #function-getmerklepathfromwhatsonchaintsc ) | [ postBeefToTaalArcMiner ] ( #function-postbeeftotaalarcminer ) |
231- | [ getRawTxFromWhatsOnChain ] ( #function-getrawtxfromwhatsonchain ) | [ postTxsToTaalArcMiner ] ( #function-posttxstotaalarcminer ) |
232- | [ getTaalArcServiceConfig ] ( #function-gettaalarcserviceconfig ) | [ toBinaryBaseBlockHeader ] ( #function-tobinarybaseblockheader ) |
233- | [ getUtxoStatusFromWhatsOnChain ] ( #function-getutxostatusfromwhatsonchain ) | [ updateBsvExchangeRate] ( #function-updatebsvexchangerate ) |
234- | [ makeErrorResult ] ( #function-makeerrorresult ) | [ updateChaintracksFiatExchangeRates ] ( #function-updatechaintracksfiatexchangerates ) |
235- | [ makeGetMerklePathFromTaalARC ] ( #function-makegetmerklepathfromtaalarc ) | [ updateExchangeratesapi ] ( #function-updateexchangeratesapi ) |
236- | [ makePostBeefResult ] ( #function-makepostbeefresult ) | [ validateScriptHash ] ( #function-validatescripthash ) |
227+ ``` ts
228+ export class WhatsOnChain extends SdkWhatsOnChain {
229+ constructor ( chain : sdk . Chain = " main " , config : WhatsOnChainConfig = {})
230+ async getTxPropagation( txid : string ) : Promise < number >
231+ async getRawTx( txid : string ) : Promise < string | undefined >
232+ async getRawTxResult( txid : string ) : Promise < sdk . GetRawTxResult >
233+ async postRawTx( rawTx : HexString ) : Promise < string >
234+ async getMerklePath( txid : string , services : sdk . WalletServices ) : Promise < sdk . GetMerklePathResult >
235+ async updateBsvExchangeRate( rate ? : sdk . BsvExchangeRate , updateMsecs ? : number ) : Promise < sdk . BsvExchangeRate >
236+ async getUtxoStatus( output : string , outputFormat ? : sdk . GetUtxoStatusOutputFormat ) : Promise < sdk . GetUtxoStatusResult >
237+ }
238+ ```
237239
238- Links : [ API ] ( #api ) , [ Interfaces ] ( #interfaces ) , [ Classes ] ( #classes ) , [ Functions ] ( #functions ) , [ Types ] ( #types ) , [ Variables ] ( #variables )
240+ See also : [ BsvExchangeRate ] ( ./client.md#interface-bsvexchangerate ) , [ Chain ] ( ./client.md#type-chain ) , [ GetMerklePathResult ] ( ./client.md#interface-getmerklepathresult ) , [ GetRawTxResult ] ( ./client.md#interface-getrawtxresult ) , [ GetUtxoStatusOutputFormat ] ( ./client.md#type-getutxostatusoutputformat ) , [ GetUtxoStatusResult ] ( ./client.md#interface-getutxostatusresult ) , [ WalletServices ] ( ./client.md#interface-walletservices )
239241
240- ---
242+ ###### Method getRawTx
241243
242- ##### Function: createDefaultWalletServicesOptions
244+ May return undefined for unmined transactions that are in the mempool.
243245
244246``` ts
245- export function createDefaultWalletServicesOptions( chain : sdk . Chain ): sdk . WalletServicesOptions
247+ async getRawTx ( txid : string ): Promise < string | undefined >
246248```
247249
248- See also : [ Chain ](. / client . md # type - chain ), [ WalletServicesOptions ](. / client . md # interface - walletservicesoptions )
250+ Returns
249251
250- Links : [ API ](# api ), [ Interfaces ](# interfaces ), [ Classes ](# classes ), [ Functions ](# functions ), [ Types ](# types ), [ Variables ](# variables )
252+ raw transaction as hex string or undefined if txid not found in mined block.
251253
252- -- -
253- ##### Function : getExchangeRatesIo
254+ ###### Method getTxPropagation
255+
256+ 2025-02-16 throwing internal server error 500.
254257
255258``` ts
256- export async function getExchangeRatesIo(key : string): Promise<ExchangeRatesIoApi >
259+ async getTxPropagation ( txid : string ): Promise < number >
257260```
258261
259- See also : [ExchangeRatesIoApi ](./ services .md #interface - exchangeratesioapi )
260-
261- Links : [API ](#api ), [Interfaces ](#interfaces ), [Classes ](#classes ), [Functions ](#functions ), [Types ](#types ), [Variables ](#variables )
262-
263- -- -
264- ##### Function : getMerklePathFromTaalARC
262+ ###### Method postRawTx
265263
266264``` ts
267- export async function getMerklePathFromTaalARC(txid: string, config: ArcServiceConfig, services: sdk.WalletServices ): Promise<sdk.GetMerklePathResult >
265+ async postRawTx ( rawTx : HexString ): Promise < string >
268266```
269267
270- See also : [ArcServiceConfig ](./ services .md #interface - arcserviceconfig ), [GetMerklePathResult ](./ client .md #interface - getmerklepathresult ), [WalletServices ](./ client .md #interface - walletservices )
268+ Returns
269+
270+ txid returned by transaction processor of transaction broadcast
271+
272+ Argument Details
273+
274+ + ** rawTx**
275+ + raw transaction to broadcast as hex string
271276
272277Links: [ API] ( #api ) , [ Interfaces] ( #interfaces ) , [ Classes] ( #classes ) , [ Functions] ( #functions ) , [ Types] ( #types ) , [ Variables] ( #variables )
273278
274279---
275- ##### Function : getMerklePathFromWhatsOnChainTsc
280+ #### Functions
281+
282+ | | |
283+ | --- | --- |
284+ | [ createDefaultWalletServicesOptions] ( #function-createdefaultwalletservicesoptions ) | [ makePostTxsToTaalARC] ( #function-makeposttxstotaalarc ) |
285+ | [ getExchangeRatesIo] ( #function-getexchangeratesio ) | [ postBeefToArcMiner] ( #function-postbeeftoarcminer ) |
286+ | [ getMerklePathFromTaalARC] ( #function-getmerklepathfromtaalarc ) | [ postBeefToTaalArcMiner] ( #function-postbeeftotaalarcminer ) |
287+ | [ getTaalArcServiceConfig] ( #function-gettaalarcserviceconfig ) | [ postTxsToTaalArcMiner] ( #function-posttxstotaalarcminer ) |
288+ | [ makeErrorResult] ( #function-makeerrorresult ) | [ toBinaryBaseBlockHeader] ( #function-tobinarybaseblockheader ) |
289+ | [ makeGetMerklePathFromTaalARC] ( #function-makegetmerklepathfromtaalarc ) | [ updateChaintracksFiatExchangeRates] ( #function-updatechaintracksfiatexchangerates ) |
290+ | [ makePostBeefResult] ( #function-makepostbeefresult ) | [ updateExchangeratesapi] ( #function-updateexchangeratesapi ) |
291+ | [ makePostBeefToTaalARC] ( #function-makepostbeeftotaalarc ) | [ validateScriptHash] ( #function-validatescripthash ) |
276292
277- WhatOnChain .com has their own " hash/pos/R/L" proof format and a more TSC compliant proof format .
293+ Links: [ API] ( #api ) , [ Interfaces] ( #interfaces ) , [ Classes] ( #classes ) , [ Functions] ( #functions ) , [ Types] ( #types ) , [ Variables] ( #variables )
294+
295+ ---
278296
279- The " /proof/tsc" endpoint is much closer to the TSC specification . It provides " index" directly and each node is just the provided hash value .
280- The " targetType" is unspecified and thus defaults to block header hash , requiring a Chaintracks lookup to get the merkleRoot ...
281- Duplicate hash values are provided in full instead of being replaced by " *" .
297+ ##### Function: createDefaultWalletServicesOptions
282298
283299``` ts
284- export async function getMerklePathFromWhatsOnChainTsc(txid: string, chain: sdk.Chain, services: sdk.WalletServices ): Promise< sdk.GetMerklePathResult>
300+ export function createDefaultWalletServicesOptions( chain : sdk .Chain ): sdk .WalletServicesOptions
285301```
286302
287- See also : [Chain ](./ client .md #type - chain ), [GetMerklePathResult ](./ client .md #interface - getmerklepathresult ), [ WalletServices ](. / client . md # interface - walletservices )
303+ See also : [Chain ](./ client .md #type - chain ), [WalletServicesOptions ](./ client .md #interface - walletservicesoptions )
288304
289305Links : [API ](#api ), [Interfaces ](#interfaces ), [Classes ](#classes ), [Functions ](#functions ), [Types ](#types ), [Variables ](#variables )
290306
291307-- -
292- ##### Function : getRawTxFromWhatsOnChain
308+ ##### Function : getExchangeRatesIo
293309
294310` ` ` ts
295- export async function getRawTxFromWhatsOnChain(txid : string, chain: sdk.Chain ): Promise<sdk.GetRawTxResult >
311+ export async function getExchangeRatesIo(key : string): Promise<ExchangeRatesIoApi >
296312` ` `
297313
298- See also : [Chain ](./ client .md #type - chain ), [ GetRawTxResult ](. / client . md # interface - getrawtxresult )
314+ See also : [ExchangeRatesIoApi ](./ services .md #interface - exchangeratesioapi )
299315
300316Links : [API ](#api ), [Interfaces ](#interfaces ), [Classes ](#classes ), [Functions ](#functions ), [Types ](#types ), [Variables ](#variables )
301317
302318-- -
303- ##### Function : getTaalArcServiceConfig
319+ ##### Function : getMerklePathFromTaalARC
304320
305321` ` ` ts
306- export function getTaalArcServiceConfig(chain: sdk.Chain, apiKey: string ): ArcServiceConfig
322+ export async function getMerklePathFromTaalARC(txid: string, config: ArcServiceConfig, services: sdk.WalletServices ): Promise<sdk.GetMerklePathResult>
307323` ` `
308324
309- See also : [ArcServiceConfig ](./ services .md #interface - arcserviceconfig ), [Chain ](./ client .md #type - chain )
325+ See also : [ArcServiceConfig ](./ services .md #interface - arcserviceconfig ), [GetMerklePathResult ](./ client .md #interface - getmerklepathresult ), [ WalletServices ](. / client . md # interface - walletservices )
310326
311327Links : [API ](#api ), [Interfaces ](#interfaces ), [Classes ](#classes ), [Functions ](#functions ), [Types ](#types ), [Variables ](#variables )
312328
313329-- -
314- ##### Function : getUtxoStatusFromWhatsOnChain
330+ ##### Function : getTaalArcServiceConfig
315331
316332` ` ` ts
317- export async function getUtxoStatusFromWhatsOnChain(output: string, chain: sdk.Chain, outputFormat?: sdk.GetUtxoStatusOutputFormat ): Promise<sdk.GetUtxoStatusResult>
333+ export function getTaalArcServiceConfig( chain: sdk.Chain, apiKey: string ): ArcServiceConfig
318334` ` `
319335
320- See also : [Chain ](./ client .md #type - chain ), [GetUtxoStatusOutputFormat ](./ client .md #type - getutxostatusoutputformat ), [ GetUtxoStatusResult ](. / client . md # interface - getutxostatusresult )
336+ See also : [ArcServiceConfig ](./ services .md #interface - arcserviceconfig ), [Chain ](./ client .md #type - chain )
321337
322338Links : [API ](#api ), [Interfaces ](#interfaces ), [Classes ](#classes ), [Functions ](#functions ), [Types ](#types ), [Variables ](#variables )
323339
@@ -444,17 +460,6 @@ Returns
444460
445461Links: [API](#api ), [Interfaces](#interfaces ), [Classes](#classes ), [Functions](#functions ), [Types](#types ), [Variables](#variables )
446462
447- ---
448- ##### Function: updateBsvExchangeRate
449-
450- ```ts
451- export async function updateBsvExchangeRate(rate ? : sdk .BsvExchangeRate , updateMsecs ? : number ): Promise <sdk .BsvExchangeRate >
452- ```
453-
454- See also: [BsvExchangeRate](./client.md#interface -bsvexchangerate )
455-
456- Links: [API](#api ), [Interfaces](#interfaces ), [Classes](#classes ), [Functions](#functions ), [Types](#types ), [Variables](#variables )
457-
458463---
459464##### Function: updateChaintracksFiatExchangeRates
460465
0 commit comments