Skip to content

cardano-web3-js / Connector

Class: Connector

Constructors

new Connector()

new Connector(): Connector

Returns

Connector

Properties

__api

__api: any

Defined in

src/core/connector.ts:11

Methods

getBalance()

getBalance(): Promise<string>

Get wallet balance

Returns

Promise<string>

Wallet balance

Defined in

src/core/connector.ts:85


getChangeAddress()

getChangeAddress(): Promise<string>

Get wallet change address

Returns

Promise<string>

Change address

Defined in

src/core/connector.ts:110


getCollateral()

getCollateral(): Promise<string[]>

Get wallet collaterals

Returns

Promise<string[]>

List of collaterals

Defined in

src/core/connector.ts:77


getExtensions()

getExtensions(): Promise<any[]>

Get wallet extensions

Returns

Promise<any[]>

Wallet extensions

Defined in

src/core/connector.ts:51


getNetworkId()

getNetworkId(): Promise<number>

Get wallet network ID

Returns

Promise<number>

Wallet network ID (0 or 1)

Defined in

src/core/connector.ts:59


getRewardAddresses()

getRewardAddresses(): Promise<string[]>

Get wallet staking addresses

Returns

Promise<string[]>

Staking addresses

Defined in

src/core/connector.ts:118


getUnusedAddresses()

getUnusedAddresses(): Promise<string[]>

Get wallet unused addresses

Returns

Promise<string[]>

Array of unused addresses

Defined in

src/core/connector.ts:102


getUsedAddresses()

getUsedAddresses(paginate?): Promise<string[]>

Get wallet used addresses

Parameters

paginate?: ConnectorPaginate

Pagination options

Returns

Promise<string[]>

Array of used addresses

Defined in

src/core/connector.ts:94


getUtxos()

getUtxos(amount?, paginate?): Promise<string[]>

Get wallet UTXOs

Parameters

amount?: string

Amount to filter UTXOs

paginate?: ConnectorPaginate

Pagination options

Returns

Promise<string[]>

List of UTXOs

Defined in

src/core/connector.ts:69


signData()

signData(addr, payload): Promise<SignedMessage>

Sign a message

Parameters

addr: string

Address to sign message

payload: string

Message to sign

Returns

Promise<SignedMessage>

Signed message

Defined in

src/core/connector.ts:138


signTx()

signTx(tx, partialSign): Promise<string>

Sign a transaction

Parameters

tx: string

Transaction to sign in CBOR format

partialSign: boolean = false

Partial sign flag (boolean)

Returns

Promise<string>

Staking key

Defined in

src/core/connector.ts:128


submitTx()

submitTx(tx): Promise<string>

Submit a transaction

Parameters

tx: string

Transaction to submit in CBOR format

Returns

Promise<string>

Transaction hash

Defined in

src/core/connector.ts:147


init()

static init(wallet, extensions?): Promise<Connector>

Initialize a wallet connector

Parameters

wallet: string

Wallet name

extensions?: any

Wallet extensions

Returns

Promise<Connector>

Connector instance

Defined in

src/core/connector.ts:38


isEnabled()

static isEnabled(wallet): Promise<string[]>

Check if a wallet is enabled

Parameters

wallet: string

Wallet name

Returns

Promise<string[]>

True if wallet is enabled

Defined in

src/core/connector.ts:27


list()

static list(): Promise<string[]>

List available wallets

Returns

Promise<string[]>

List of available wallets

Defined in

src/core/connector.ts:17

Released under the MIT License