TorqueSDK

@torque-labs/sdk


@torque-labs/sdk / TorqueSDK

Class: TorqueSDK

Defined in: sdk/src/modules/main.ts:36

The TorqueSDK class is used to interact with the Torque API.

Param

The options for the SDK

Constructors

new TorqueSDK()

new TorqueSDK(options): TorqueSDK

Defined in: sdk/src/modules/main.ts:67

Parameters

Parameter
Type

Returns

TorqueSDK

Properties

Property
Type
Description

_connection

Connection

The connection for the SDK instance

_signer

| undefined | Adapter | Keypair | PrivySolanaWallet

The signer for the SDK instance

_transactions

The tranactions module for the SDK instance

apiUrl

string

The base URL of the Torque API

offers

The offers module for the SDK instance

user

undefined | TorqueUserModule

The user module for the SDK instance

Methods

authenticate()

authenticate(
   signer, 
   authOptions?, 
authInput?): Promise<string>

Defined in: sdk/src/modules/main.ts:87

Authenticate the user with the API using the provided login data.

Parameters

Parameter
Type
Description

signer

| Adapter | Keypair | PrivySolanaWallet

The signer to use for the authentication

authOptions?

The authentication options

authInput?

The authentication input

Returns

Promise<string>

Last updated