Skip to main content

Class: Bundlr

Hierarchy

Constructors

constructor

new Bundlr()

Defined in

src/common/bundlr.ts:23

Properties

address

address: any

Defined in

src/common/bundlr.ts:18


api

api: Api

Defined in

src/common/bundlr.ts:14


currency

currency: any

Defined in

src/common/bundlr.ts:19


currencyConfig

currencyConfig: Currency

Defined in

src/common/bundlr.ts:20


funder

funder: Fund

Defined in

src/common/bundlr.ts:17


uploader

uploader: Uploader

Defined in

src/common/bundlr.ts:16


utils

utils: Utils

Defined in

src/common/bundlr.ts:15

Accessors

signer

get signer(): Signer

Returns

Signer

Defined in

src/common/bundlr.ts:25

Methods

createTransaction

createTransaction(data, opts?): BundlrTransaction

Create a new BundlrTransactions (flex currency arbundles dataItem)

Parameters

NameTypeDescription
datastring | Uint8Array
opts?DataItemCreateOptionsdataItemCreateOptions

Returns

BundlrTransaction

  • a new BundlrTransaction instance

Defined in

src/common/bundlr.ts:73


fund

fund(amount, multiplier?): Promise<FundResponse>

Sends amount atomic units to the specified bundler

Parameters

NameTypeDescription
amountValueamount to send in atomic units
multiplier?number-

Returns

Promise<FundResponse>

details about the fund transaction

Defined in

src/common/bundlr.ts:54


getBalance

getBalance(address): Promise<BigNumber>

Gets the balance for the specified address

Parameters

NameTypeDescription
addressstringaddress to query for

Returns

Promise<BigNumber>

the balance (in winston)

Defined in

src/common/bundlr.ts:45


getLoadedBalance

getLoadedBalance(): Promise<BigNumber>

Gets the balance for the loaded wallet

Returns

Promise<BigNumber>

balance (in winston)

Defined in

src/common/bundlr.ts:37


getPrice

getPrice(bytes): Promise<BigNumber>

Calculates the price for [bytes] bytes for the loaded currency and Bundlr node.

Parameters

NameType
bytesnumber

Returns

Promise<BigNumber>

Defined in

src/common/bundlr.ts:63


getSigner

getSigner(): Signer

Returns the signer for the loaded currency

Returns

Signer

Defined in

src/common/bundlr.ts:80


ready

ready(): Promise<void>

Returns

Promise<void>

Defined in

src/common/bundlr.ts:88


upload

upload(data, opts?): Promise<UploadResponse>

Parameters

NameType
datastring | Buffer | Readable
opts?CreateAndUploadOptions

Returns

Promise<UploadResponse>

Defined in

src/common/bundlr.ts:84


withdrawBalance

withdrawBalance(amount): Promise<WithdrawalResponse>

Parameters

NameType
amountValue

Returns

Promise<WithdrawalResponse>

Defined in

src/common/bundlr.ts:29