BsvApi
scrypt-ts / BsvApi
Class: BsvApi
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new BsvApi(_core
)
Parameters
Name | Type |
---|---|
_core | Core |
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
Name | Type |
---|---|
address | Address |
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
Name | Type |
---|---|
txId | string |
Returns
Promise
<Transaction
>
Defined in
dist/client/apis/bsv-api.d.ts:8
listUnspent
▸ listUnspent(address
, options?
): Promise
<IUnspentOutput
[]>
Parameters
Name | Type |
---|---|
address | Address |
options? | UtxoQueryOptions |
Returns
Promise
<IUnspentOutput
[]>
Defined in
dist/client/apis/bsv-api.d.ts:19
sendRawTransaction
▸ sendRawTransaction(txHex
): Promise
<string
>
Parameters
Name | Type |
---|---|
txHex | string |
Returns
Promise
<string
>
Defined in
dist/client/apis/bsv-api.d.ts:18