Skip to main content

bsv.Message

scrypt-ts / bsv / Message

Class: Message

bsv.Message

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Message(message)

Parameters

NameType
messagestring | Buffer

Defined in

node_modules/bsv/index.d.ts:1083

Properties

messageBuffer

Readonly messageBuffer: Buffer

Defined in

node_modules/bsv/index.d.ts:1085


MAGIC_BYTES

Static MAGIC_BYTES: Buffer

Defined in

node_modules/bsv/index.d.ts:1100

Methods

inspect

inspect(): string

Returns

string

Defined in

node_modules/bsv/index.d.ts:1092


sign

sign(privateKey): string

Parameters

NameType
privateKeyPrivateKey

Returns

string

Defined in

node_modules/bsv/index.d.ts:1087


toJSON

toJSON(): string

Returns

string

Defined in

node_modules/bsv/index.d.ts:1090


toObject

toObject(): object

Returns

object

Defined in

node_modules/bsv/index.d.ts:1089


toString

toString(): string

Returns

string

Defined in

node_modules/bsv/index.d.ts:1091


verify

verify(address, signature): boolean

Parameters

NameType
addressstring | Address
signaturestring

Returns

boolean

Defined in

node_modules/bsv/index.d.ts:1088


fromJSON

Static fromJSON(json): Message

Parameters

NameType
jsonstring

Returns

Message

Defined in

node_modules/bsv/index.d.ts:1103


fromObject

Static fromObject(obj): Message

Parameters

NameType
objobject

Returns

Message

Defined in

node_modules/bsv/index.d.ts:1104


fromString

Static fromString(str): Message

Parameters

NameType
strstring

Returns

Message

Defined in

node_modules/bsv/index.d.ts:1102


magicHash

Static magicHash(): string

Returns

string

Defined in

node_modules/bsv/index.d.ts:1101


sign

Static sign(message, privateKey): string

Parameters

NameType
messagestring | Buffer
privateKeyPrivateKey

Returns

string

Defined in

node_modules/bsv/index.d.ts:1094


verify

Static verify(message, address, signature): boolean

Parameters

NameType
messagestring | Buffer
addressstring | Address
signaturestring

Returns

boolean

Defined in

node_modules/bsv/index.d.ts:1095