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:87


getChangeAddress()

getChangeAddress(): Promise<string>

Get wallet change address

Returns

Promise<string>

Change address

Defined in

src/core/connector.ts:112


getCollateral()

getCollateral(): Promise<string[]>

Get wallet collaterals

Returns

Promise<string[]>

List of collaterals

Defined in

src/core/connector.ts:79


getExtensions()

getExtensions(): Promise<any[]>

Get wallet extensions

Returns

Promise<any[]>

Wallet extensions

Defined in

src/core/connector.ts:53


getNetworkId()

getNetworkId(): Promise<0 | 1>

Get wallet network ID

Returns

Promise<0 | 1>

Wallet network ID (0 or 1)

Defined in

src/core/connector.ts:61


getRewardAddresses()

getRewardAddresses(): Promise<string[]>

Get wallet staking addresses

Returns

Promise<string[]>

Staking addresses

Defined in

src/core/connector.ts:120


getUnusedAddresses()

getUnusedAddresses(): Promise<string[]>

Get wallet unused addresses

Returns

Promise<string[]>

Array of unused addresses

Defined in

src/core/connector.ts:104


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:96


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:71


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:140


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:130


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:149


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:40


isEnabled()

static isEnabled(wallet): Promise<boolean>

Check if a wallet is enabled

Parameters

wallet: string

Wallet name

Returns

Promise<boolean>

True if wallet is enabled

Defined in

src/core/connector.ts:29


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