Skip to main content

BsvApi

scrypt-ts / BsvApi

Class: BsvApi

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new BsvApi(_core)

Parameters

NameType
_coreCore

Defined in

dist/client/apis/bsv-api.d.ts:7

Properties

_core

Private Readonly _core: any

Defined in

dist/client/apis/bsv-api.d.ts:6

Methods

connect

connect(): Promise<{ error: string ; success: boolean }>

Returns

Promise<{ error: string ; success: boolean }>

Defined in

dist/client/apis/bsv-api.d.ts:14


getBalance

getBalance(address): Promise<{ confirmed: number ; unconfirmed: number }>

Parameters

NameType
addressAddress

Returns

Promise<{ confirmed: number ; unconfirmed: number }>

Defined in

dist/client/apis/bsv-api.d.ts:9


getFeePerKB

getFeePerKB(): Promise<number>

Returns

Promise<number>

Defined in

dist/client/apis/bsv-api.d.ts:13


getTransaction

getTransaction(txId): Promise<Transaction>

Parameters

NameType
txIdstring

Returns

Promise<Transaction>

Defined in

dist/client/apis/bsv-api.d.ts:8


listUnspent

listUnspent(address, options?): Promise<IUnspentOutput[]>

Parameters

NameType
addressAddress
options?UtxoQueryOptions

Returns

Promise<IUnspentOutput[]>

Defined in

dist/client/apis/bsv-api.d.ts:19


sendRawTransaction

sendRawTransaction(txHex): Promise<string>

Parameters

NameType
txHexstring

Returns

Promise<string>

Defined in

dist/client/apis/bsv-api.d.ts:18