cardano-web3-js / Connector
Class: Connector
Constructors
new Connector()
new Connector():
Connector
Returns
Properties
__api
__api:
any
Defined in
Methods
getBalance()
getBalance():
Promise
<string
>
Get wallet balance
Returns
Promise
<string
>
Wallet balance
Defined in
getChangeAddress()
getChangeAddress():
Promise
<string
>
Get wallet change address
Returns
Promise
<string
>
Change address
Defined in
getCollateral()
getCollateral():
Promise
<string
[]>
Get wallet collaterals
Returns
Promise
<string
[]>
List of collaterals
Defined in
getExtensions()
getExtensions():
Promise
<any
[]>
Get wallet extensions
Returns
Promise
<any
[]>
Wallet extensions
Defined in
getNetworkId()
getNetworkId():
Promise
<number
>
Get wallet network ID
Returns
Promise
<number
>
Wallet network ID (0 or 1)
Defined in
getRewardAddresses()
getRewardAddresses():
Promise
<string
[]>
Get wallet staking addresses
Returns
Promise
<string
[]>
Staking addresses
Defined in
getUnusedAddresses()
getUnusedAddresses():
Promise
<string
[]>
Get wallet unused addresses
Returns
Promise
<string
[]>
Array of unused addresses
Defined in
getUsedAddresses()
getUsedAddresses(
paginate
?):Promise
<string
[]>
Get wallet used addresses
Parameters
• paginate?: ConnectorPaginate
Pagination options
Returns
Promise
<string
[]>
Array of used addresses
Defined in
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
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
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
submitTx()
submitTx(
tx
):Promise
<string
>
Submit a transaction
Parameters
• tx: string
Transaction to submit in CBOR format
Returns
Promise
<string
>
Transaction hash
Defined in
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
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
list()
static
list():Promise
<string
[]>
List available wallets
Returns
Promise
<string
[]>
List of available wallets