Address
@harmoniclabs/cardano-ledger-ts • Docs
@harmoniclabs/cardano-ledger-ts / Address
Class: Address
shelley specification in cardano-ledger; page 113
Implements
ToData
ToCbor
Constructors
new Address()
new Address(
network
,paymentCreds
,stakeCreds
?,type
?):Address
Parameters
• network: NetworkT
• paymentCreds: Credential
<CredentialType
>
• stakeCreds?: StakeCredentials
<StakeCredentialsType
>
• type?: AddressType
Returns
Defined in
Properties
network
readonly
network:NetworkT
Defined in
paymentCreds
readonly
paymentCreds:Credential
<CredentialType
>
Defined in
stakeCreds?
readonly
optional
stakeCreds:StakeCredentials
<StakeCredentialsType
>
Defined in
type
readonly
type:AddressType
Defined in
Accessors
fake
get
static
fake():Address
Returns
Defined in
Methods
clone()
clone():
Address
Returns
Defined in
toBuffer()
toBuffer():
Uint8Array
Returns
Uint8Array
Defined in
toBytes()
toBytes():
byte
[]
Returns
byte
[]
Defined in
toCbor()
toCbor():
CborString
Returns
CborString
Implementation of
ToCbor.toCbor
Defined in
toCborObj()
toCborObj():
CborObj
Returns
CborObj
Implementation of
ToCbor.toCborObj
Defined in
toData()
toData():
Data
Returns
Data
Implementation of
ToData.toData
Defined in
toJson()
toJson(): `addr1${string}` | `addr_test1${string}`
Returns
`addr1${string}` | `addr_test1${string}`
Defined in
toString()
toString(): `addr1${string}` | `addr_test1${string}`
Returns a string representation of an object.
Returns
`addr1${string}` | `addr_test1${string}`
Defined in
fromBuffer()
static
fromBuffer(buff
):Address
Parameters
• buff: string
| Uint8Array
Returns
Defined in
fromBytes()
static
fromBytes(bs
):Address
Parameters
• bs: string
| Uint8Array
| byte
[]
Returns
Defined in
fromCbor()
static
fromCbor(cbor
):Address
Parameters
• cbor: CanBeCborString
Returns
Defined in
fromCborObj()
static
fromCborObj(buff
):Address
Parameters
• buff: CborObj
Returns
Defined in
fromEntropy()
static
fromEntropy(entropy
,network
):Address
generates an XPrv
from entropy and calls Addres.fromXPrv
gets the standard address for single address wallets
payment key at path "m/1852'/1815'/0'/0/0" stake key at path "m/1852'/1815'/0'/2/0"
Parameters
• entropy: string
| Uint8Array
• network: NetworkT
= "mainnet"
Returns
Defined in
fromString()
static
fromString(addr
):Address
Parameters
• addr: string
Returns
Defined in
fromXPrv()
static
fromXPrv(xprv
,network
):Address
gets the standard address for single address wallets
payment key at path "m/1852'/1815'/0'/0/0" stake key at path "m/1852'/1815'/0'/2/0"
Parameters
• xprv: XPrv
• network: NetworkT
= "mainnet"
Returns
Defined in
mainnet()
static
mainnet(paymentCreds
,stakeCreds
?,type
?):Address
Parameters
• paymentCreds: Credential
<CredentialType
>
• stakeCreds?: StakeCredentials
<StakeCredentialsType
>
• type?: AddressType
Returns
Defined in
testnet()
static
testnet(paymentCreds
,stakeCreds
?,type
?):Address
Parameters
• paymentCreds: Credential
<CredentialType
>
• stakeCreds?: StakeCredentials
<StakeCredentialsType
>
• type?: AddressType