bsv.Address
Class: Address
bsv.Address
Table of contents
Constructors
Properties
Methods
- isValid
- toBuffer
- toByteString
- toHex
- toObject
- toString
- fromHex
- fromPrivateKey
- fromPublicKey
- fromPublicKeyHash
- fromScriptHash
- fromString
Constructors
constructor
• new Address(data, network?, type?)
Parameters
| Name | Type |
|---|---|
data | string | object | Uint8Array | Buffer |
network? | string | Network |
type? | string |
Defined in
node_modules/bsv/index.d.ts:1401
Properties
hashBuffer
• Readonly hashBuffer: Buffer
Defined in
node_modules/bsv/index.d.ts:1397
network
• Readonly network: Network
Defined in
node_modules/bsv/index.d.ts:1398
type
• Readonly type: string
Defined in
node_modules/bsv/index.d.ts:1399
Methods
isValid
▸ isValid(data, network?, type?): boolean
Parameters
| Name | Type |
|---|---|
data | string | object | Uint8Array | Buffer |
network? | string | Network |
type? | string |
Returns
boolean
Defined in
node_modules/bsv/index.d.ts:1421
toBuffer
▸ toBuffer(): Buffer
Returns
Buffer
Defined in
node_modules/bsv/index.d.ts:1426
toByteString
▸ toByteString(): ByteString
Returns
Defined in
dist/smart-contract/bsv/address.d.ts:5
toHex
▸ toHex(): string
Returns
string
Defined in
node_modules/bsv/index.d.ts:1427
toObject
▸ toObject(): Object
Returns
Object
| Name | Type |
|---|---|
hash | string |
network | string |
type | string |
Defined in
node_modules/bsv/index.d.ts:1429
toString
▸ toString(): string
Returns
string
Defined in
node_modules/bsv/index.d.ts:1428
fromHex
▸ Static fromHex(hex, network?): Address
Parameters
| Name | Type |
|---|---|
hex | string |
network? | Type |
Returns
Defined in
node_modules/bsv/index.d.ts:1407
fromPrivateKey
▸ Static fromPrivateKey(privateKey, network?): Address
Parameters
| Name | Type |
|---|---|
privateKey | PrivateKey |
network? | Type |
Returns
Defined in
node_modules/bsv/index.d.ts:1409
fromPublicKey
▸ Static fromPublicKey(data, network?): Address
Parameters
| Name | Type |
|---|---|
data | PublicKey |
network? | Type |
Returns
Defined in
node_modules/bsv/index.d.ts:1408
fromPublicKeyHash
▸ Static fromPublicKeyHash(hash, network?): Address
Parameters
| Name | Type |
|---|---|
hash | Uint8Array | Buffer |
network? | Type |
Returns
Defined in
node_modules/bsv/index.d.ts:1413
fromScriptHash
▸ Static fromScriptHash(hash, network?): Address
Parameters
| Name | Type |
|---|---|
hash | Uint8Array | Buffer |
network? | Type |
Returns
Defined in
node_modules/bsv/index.d.ts:1417
fromString
▸ Static fromString(address, network?): Address
Parameters
| Name | Type |
|---|---|
address | string |
network? | Type |
Returns
Defined in
node_modules/bsv/index.d.ts:1406