DAPI-Client
Classes
Functions
- broadcastTransactionFactory(grpcTransport) ⇒
broadcastTransaction
- generateToAddressFactory(jsonRpcTransport) ⇒
generateToAddress
- getBestBlockHashFactory(jsonRpcTransport) ⇒
getBestBlockHash
- getBlockByHashFactory(grpcTransport) ⇒
getBlockByHash
- getBlockByHeightFactory(grpcTransport) ⇒
getBlockByHeight
- getBlockHashFactory(jsonRpcTransport) ⇒
getBlockHash
- getMnListDiffFactory(jsonRpcTransport) ⇒
getMnListDiff
- getStatusFactory(grpcTransport) ⇒
getStatus
- subscribeToTransactionsWithProofsFactory(grpcTransport) ⇒
subscribeToTransactionsWithProofs
Typedefs
- DAPIClientOptions :
DAPIClientOptions
- BroadcastTransactionOptions :
object
- subscribeToTransactionsWithProofsOptions :
object
DAPIClient
new DAPIClient([options])
Param | Type |
---|---|
[options] | DAPIClientOptions |
CoreMethodsFacade
new CoreMethodsFacade(jsonRpcTransport, grpcTransport)
Param | Type |
---|---|
jsonRpcTransport | JsonRpcTransport |
grpcTransport | GrpcTransport |
PlatformMethodsFacade
new PlatformMethodsFacade(grpcTransport)
Param | Type |
---|---|
grpcTransport | GrpcTransport |
SimplifiedMasternodeListProvider
Kind: global class
- SimplifiedMasternodeListProvider
- new SimplifiedMasternodeListProvider(jsonRpcTransport, [options])
- .getSimplifiedMNList() ⇒
Promise.<SimplifiedMNList>
new SimplifiedMasternodeListProvider(jsonRpcTransport, [options])
Param | Type | Default | Description |
---|---|---|---|
jsonRpcTransport | JsonRpcTransport | JsonRpcTransport instance | |
[options] | object | Options | |
[options.updateInterval] | number | 60000 | |
[options.network] | string |
simplifiedMasternodeListProvider.getSimplifiedMNList() ⇒ Promise.<SimplifiedMNList>
Promise.<SimplifiedMNList>
Returns simplified masternode list
Kind: instance method of SimplifiedMasternodeListProvider
broadcastTransactionFactory(grpcTransport) ⇒ broadcastTransaction
broadcastTransaction
Kind: global function
Param | Type |
---|---|
grpcTransport | GrpcTransport |
broadcastTransactionFactory~broadcastTransaction ⇒ string
string
Broadcast Transaction
Kind: inner typedef of broadcastTransactionFactory
Param | Type |
---|---|
transaction | Buffer |
[options] | DAPIClientOptions | BroadcastTransactionOptions |
generateToAddressFactory(jsonRpcTransport) ⇒ generateToAddress
generateToAddress
Kind: global function
Param | Type |
---|---|
jsonRpcTransport | JsonRpcTransport |
generateToAddressFactory~generateToAddress ⇒ Promise.<Array.<string>>
Promise.<Array.<string>>
ONLY FOR TESTING PURPOSES WITH REGTEST. WILL NOT WORK ON TESTNET/LIVENET.
Kind: inner typedef of generateToAddressFactory
Returns: Promise.<Array.<string>>
- - block hashes
Param | Type | Description |
---|---|---|
blocksNumber | number | Number of blocks to generate |
address | string | The address that will receive the newly generated Dash |
[options] | DAPIClientOptions |
getBestBlockHashFactory(jsonRpcTransport) ⇒ getBestBlockHash
getBestBlockHash
Kind: global function
Param | Type |
---|---|
jsonRpcTransport | JsonRpcTransport |
getBestBlockHashFactory~getBestBlockHash ⇒ Promise.<string>
Promise.<string>
Returns block hash of chaintip
Kind: inner typedef of getBestBlockHashFactory
Param | Type |
---|---|
[options] | DAPIClientOptions |
getBlockByHashFactory(grpcTransport) ⇒ getBlockByHash
getBlockByHash
Kind: global function
Param | Type |
---|---|
grpcTransport | GrpcTransport |
getBlockByHashFactory~getBlockByHash ⇒ Promise.<(null|Buffer)>
Promise.<(null|Buffer)>
Get block by hash
Kind: inner typedef of getBlockByHashFactory
Param | Type |
---|---|
hash | string |
[options] | DAPIClientOptions |
getBlockByHeightFactory(grpcTransport) ⇒ getBlockByHeight
getBlockByHeight
Kind: global function
Param | Type |
---|---|
grpcTransport | GrpcTransport |
getBlockByHeightFactory~getBlockByHeight ⇒ Promise.<(null|Buffer)>
Promise.<(null|Buffer)>
Get block by height
Kind: inner typedef of getBlockByHeightFactory
Param | Type |
---|---|
height | number |
[options] | DAPIClientOptions |
getBlockHashFactory(jsonRpcTransport) ⇒ getBlockHash
getBlockHash
Kind: global function
Param | Type |
---|---|
jsonRpcTransport | JsonRpcTransport |
getBlockHashFactory~getBlockHash ⇒ Promise.<string>
Promise.<string>
Returns block hash for the given height
Kind: inner typedef of getBlockHashFactory
Returns: Promise.<string>
- - block hash
Param | Type |
---|---|
height | number |
[options] | DAPIClientOptions |
getMnListDiffFactory(jsonRpcTransport) ⇒ getMnListDiff
getMnListDiff
Kind: global function
Param | Type |
---|---|
jsonRpcTransport | JsonRpcTransport |
getMnListDiffFactory~getMnListDiff ⇒ Promise.<object>
Promise.<object>
Get deterministic masternodelist diff
Kind: inner typedef of getMnListDiffFactory
Param | Type | Description |
---|---|---|
baseBlockHash | string | hash or height of start block |
blockHash | string | hash or height of end block |
[options] | DAPIClientOptions |
getStatusFactory(grpcTransport) ⇒ getStatus
getStatus
Kind: global function
Param | Type |
---|---|
grpcTransport | GrpcTransport |
getStatusFactory~getStatus ⇒ Promise.<object>
Promise.<object>
Get Core chain status
Kind: inner typedef of getStatusFactory
Param | Type |
---|---|
[options] | DAPIClientOptions |
subscribeToTransactionsWithProofsFactory(grpcTransport) ⇒ subscribeToTransactionsWithProofs
subscribeToTransactionsWithProofs
Kind: global function
Param | Type |
---|---|
grpcTransport | GrpcTransport |
subscribeToTransactionsWithProofsFactory~subscribeToTransactionsWithProofs ⇒ EventEmitter
| !grpc.web.ClientReadableStream.<!TransactionsWithProofsResponse>
EventEmitter
| !grpc.web.ClientReadableStream.<!TransactionsWithProofsResponse>
Kind: inner typedef of subscribeToTransactionsWithProofsFactory
Param | Type | Description |
---|---|---|
bloomFilter | object | |
bloomFilter.vData | Uint8Array | Array | The filter itself is simply a bit field of arbitrary byte-aligned size. The maximum size is 36,000 bytes. |
bloomFilter.nHashFuncs | number | The number of hash functions to use in this filter. The maximum value allowed in this field is 50. |
bloomFilter.nTweak | number | A random value to add to the seed value in the hash function used by the bloom filter. |
bloomFilter.nFlags | number | A set of flags that control how matched items are added to the filter. |
[options] | DAPIClientOptions | subscribeToTransactionsWithProofsOptions |
DAPIClientOptions : DAPIClientOptions
DAPIClientOptions
Kind: global typedef
Properties
Name | Type | Default |
---|---|---|
[dapiAddressProvider] | DAPIAddressProvider | |
[dapiAddresses] | Array.<(RawDAPIAddress|DAPIAddress|string)> | |
[seeds] | Array.<(RawDAPIAddress|DAPIAddress|string)> | |
[dapiAddressesWhiteList] | Array.<(RawDAPIAddress|DAPIAddress|string)> | |
[network] | string | Network | "testnet" |
[timeout] | number | 2000 |
[retries] | number | 3 |
[baseBanTime] | number | 60000 |
[throwDeadlineExceeded] | boolean |
BroadcastTransactionOptions : object
object
Kind: global typedef
Properties
Name | Type | Default |
---|---|---|
[allowHighFees] | boolean | false |
[bypassLimits] | boolean | false |
subscribeToTransactionsWithProofsOptions : object
object
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
[fromBlockHash] | string | Specifies block hash to start syncing from | |
[fromBlockHeight] | number | Specifies block height to start syncing from | |
[count] | number | 0 | Number of blocks to sync, if set to 0 syncing is continuously sends new data as well |
Updated over 3 years ago