Orderly SDKs / Modules / @orderly.network/core / BaseSigner

Class: BaseSigner

@orderly.network/core.BaseSigner

Singer interface

Example

const signer = new BaseSigner(keyStore);
const payload = await signer.sign({
 url: "https://api.orderly.io/get_account?address=0x1234567890&brokerId=orderly",
  method: "GET",
  data: {
    address: "0x1234567890",
    brokerId: "orderly",
   },
 });

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new BaseSigner(keyStore)

Parameters

NameType
keyStoreOrderlyKeyStore

Defined in

packages/core/src/signer.ts:43

Properties

keyStore

Private Readonly keyStore: OrderlyKeyStore

Defined in

packages/core/src/signer.ts:43

Methods

sign

sign(message, timestamp?): Promise<SignedMessagePayload>

Parameters

NameType
messageMessageFactor
timestampnumber

Returns

Promise<SignedMessagePayload>

Implementation of

Signer.sign

Defined in

packages/core/src/signer.ts:45


signText

signText(text): Promise<{ publicKey: string ; signature: string }>

Parameters

NameType
textstring

Returns

Promise<{ publicKey: string ; signature: string }>

Implementation of

Signer.signText

Defined in

packages/core/src/signer.ts:68