Class

Address

Address(address)

Create a new Address object.

Address represents a single address in the Stellar network. An address can represent an account or a contract.

Constructor

# new Address(address)

Parameters:
Name Type Description
address string

ID of the account (ex. GB3KJPLFUYN5VL6R3GU3EGCGVCKFDSD7BEDX42HWG5BWFKB3KQGJJRMA). If you provide a muxed account address, this will throw; use MuxedAccount instead.

View Source js-stellar-base/src/address.js, line 17

Classes

Address

Methods

# toBuffer() → {Buffer}

Return the raw public key bytes for this address.

View Source js-stellar-base/src/address.js, line 135

Buffer

# toScAddress() → {xdr.ScAddress}

Convert this Address to an xdr.ScAddress type.

View Source js-stellar-base/src/address.js, line 117

xdr.ScAddress

# toScVal() → {xdr.ScVal}

Convert this Address to an xdr.ScVal type.

View Source js-stellar-base/src/address.js, line 108

xdr.ScVal

# toString() → {string}

Serialize an address to string.

View Source js-stellar-base/src/address.js, line 92

string

# static account(buffer) → {Address}

Creates a new account Address object from a buffer of raw bytes.

Parameters:
Name Type Description
buffer Buffer

The bytes of an address to parse.

View Source js-stellar-base/src/address.js, line 46

Address

# static contract(buffer) → {Address}

Creates a new contract Address object from a buffer of raw bytes.

Parameters:
Name Type Description
buffer Buffer

The bytes of an address to parse.

View Source js-stellar-base/src/address.js, line 56

Address

# static fromScAddress(scAddress) → {Address}

Convert this from an xdr.ScAddress type

Parameters:
Name Type Description
scAddress xdr.ScAddress

The xdr.ScAddress type to parse

View Source js-stellar-base/src/address.js, line 76

Address

# static fromScVal(scVal) → {Address}

Convert this from an xdr.ScVal type

Parameters:
Name Type Description
scVal xdr.ScVal

The xdr.ScVal type to parse

View Source js-stellar-base/src/address.js, line 66

Address

# static fromString(address) → {Address}

Parses a string and returns an Address object.

Parameters:
Name Type Description
address string

The address to parse. ex. GB3KJPLFUYN5VL6R3GU3EGCGVCKFDSD7BEDX42HWG5BWFKB3KQGJJRMA

View Source js-stellar-base/src/address.js, line 36

Address