@loopring-web/loopring-sdk / Exports / WalletAPI

Class: WalletAPI

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new WalletAPI(param, timeout?)

Parameters

Name Type Default value
param InitParam undefined
timeout number 3000

Inherited from

BaseAPI.constructor

Defined in

api/base_api.ts:86

Properties

baseUrl

Protected baseUrl: string = ""

Inherited from

BaseAPI.baseUrl

Defined in

api/base_api.ts:37


chainId

Protected chainId: ChainId = ChainId.MAINNET

Inherited from

BaseAPI.chainId

Defined in

api/base_api.ts:38


KEY_MESSAGE

Static KEY_MESSAGE: string = KEY_MESSAGE

Inherited from

BaseAPI.KEY_MESSAGE

Defined in

api/base_api.ts:36

Methods

genErr

genErr(err): RESULT_INFO

Parameters

Name Type
err Error

Returns

RESULT_INFO

Inherited from

BaseAPI.genErr

Defined in

api/base_api.ts:39


getAddressByENS

getAddressByENS<R, T>(request): Promise<{ address: undefined | string ; raw_data: R }>

Type parameters

Name Type
R extends unknown
T extends string

Parameters

Name Type
request GetEnsAddressRequest

Returns

Promise<{ address: undefined | string ; raw_data: R }>

Defined in

api/wallet_api.ts:316


getApproveTypedData

Private getApproveTypedData(chainId, guardiaContractAddress, wallet, validUntil, newOwner): Object

Parameters

Name Type
chainId ChainId
guardiaContractAddress any
wallet any
validUntil any
newOwner any

Returns

Object

Name Type
domain { chainId: ChainId = chainId; name: string = "GuardianModule"; verifyingContract: any = guardiaContractAddress; version: string = "1.2.0" }
domain.chainId ChainId
domain.name string
domain.verifyingContract any
domain.version string
message { newOwner: any = newOwner; validUntil: any = validUntil; wallet: any = wallet }
message.newOwner any
message.validUntil any
message.wallet any
primaryType string
types { EIP712Domain: { name: string = "name"; type: string = "string" }[] ; recover: { name: string = "wallet"; type: string = "address" }[] }
types.EIP712Domain { name: string = "name"; type: string = "string" }[]
types.recover { name: string = "wallet"; type: string = "address" }[]

Defined in

api/wallet_api.ts:66


getAvailableBroker

getAvailableBroker(): Promise<{ broker: string }>

Returns

Promise<{ broker: string }>

Inherited from

BaseAPI.getAvailableBroker

Defined in

api/base_api.ts:97


getCounterFactualInfo

getCounterFactualInfo<T>(request): Promise<{ counterFactualInfo: undefined | CounterFactualInfo ; error?: RESULT_INFO ; raw_data: T }>

Type parameters

Name Type
T extends unknown

Parameters

Name Type
request GetCounterFactualInfoRequest

Returns

Promise<{ counterFactualInfo: undefined | CounterFactualInfo ; error?: RESULT_INFO ; raw_data: T }>

Inherited from

BaseAPI.getCounterFactualInfo

Defined in

api/base_api.ts:108


getEnsByAddress

getEnsByAddress<R, T>(request): Promise<{ ensName: undefined | string ; raw_data: R }>

Type parameters

Name Type
R extends unknown
T extends string

Parameters

Name Type
request GetEnsNameRequest

Returns

Promise<{ ensName: undefined | string ; raw_data: R }>

Defined in

api/wallet_api.ts:374


getGuardianApproveList

getGuardianApproveList<R, T>(request): Promise<{ guardiansArray: T[] ; raw_data: R }>

Type parameters

Name Type
R extends unknown
T extends Guardian

Parameters

Name Type
request GetGuardianApproveListRequest

Returns

Promise<{ guardiansArray: T[] ; raw_data: R }>

Defined in

api/wallet_api.ts:484


getHebaoConfig

getHebaoConfig(): Promise<any>

Returns

Promise<any>

Defined in

api/wallet_api.ts:447


getHebaoOperationLogs

getHebaoOperationLogs<R, T>(request): Promise<{ operationArray: T[] ; raw_data: R }>

Type parameters

Name Type
R extends unknown
T extends HebaoOperationLog

Parameters

Name Type
request HebaoOperationLogs

Returns

Promise<{ operationArray: T[] ; raw_data: R }>

Defined in

api/wallet_api.ts:564


getLatestTokenPrices

getLatestTokenPrices(request?): Promise<any>

Parameters

Name Type
request? getLatestTokenPricesRequest

Returns

Promise<any>

Defined in

api/wallet_api.ts:654


getProtectors

getProtectors<R, T>(request, apiKey): Promise<{ protectorArray: T[] ; raw_data: R }>

getProtectors

Type parameters

Name Type
R extends unknown
T extends Protector

Parameters

Name Type
request GetProtectorRequest
apiKey string

Returns

Promise<{ protectorArray: T[] ; raw_data: R }>

Defined in

api/wallet_api.ts:527


getTokenPrices

getTokenPrices(request): Promise<any>

Parameters

Name Type
request GetTokenPricesRequest

Returns

Promise<any>

Defined in

api/wallet_api.ts:618


getUserAssets

getUserAssets(request): Promise<any>

Parameters

Name Type
request GetUserAssetsRequest

Returns

Promise<any>

Defined in

api/wallet_api.ts:30


getUserTradeAmount

getUserTradeAmount(request): Promise<any>

Parameters

Name Type
request GetUserTradeAmount

Returns

Promise<any>

Defined in

api/wallet_api.ts:594


getWalletType

getWalletType<T>(__namedParameters): Promise<{ raw_data: T ; walletType: undefined | WalletType }>

Type parameters

Name Type
T extends unknown

Parameters

Name Type
__namedParameters GET_WALLET_TYPE

Returns

Promise<{ raw_data: T ; walletType: undefined | WalletType }>

Defined in

api/wallet_api.ts:343


lockHebaoWallet

lockHebaoWallet(__namedParameters): Promise<any>

Parameters

Name Type
__namedParameters LockHebaoHebaoParam

Returns

Promise<any>

Defined in

api/wallet_api.ts:401


makeReq

Protected makeReq(): Request

Returns

Request

Inherited from

BaseAPI.makeReq

Defined in

api/base_api.ts:151


rejectApproveHash

rejectApproveHash(request): string

Parameters

Name Type
request Object
request.approveRecordId any
request.signer any

Returns

string

Defined in

api/wallet_api.ts:109


rejectHebao

rejectHebao(req): Promise<any>

Parameters

Name Type
req RejectHebaoRequestV3WithPatch

Returns

Promise<any>

Defined in

api/wallet_api.ts:129


returnTxHash

Protected returnTxHash<T>(raw_data): RESULT_INFO | Omit<T, "resultInfo"> & { raw_data: Omit<T, "resultInfo"> }

Type parameters

Name Type
T extends TX_HASH_API

Parameters

Name Type
raw_data T

Returns

RESULT_INFO | Omit<T, "resultInfo"> & { raw_data: Omit<T, "resultInfo"> }

Inherited from

BaseAPI.returnTxHash

Defined in

api/base_api.ts:66


sendMetaTx

sendMetaTx<R, T>(request, apiKey): Promise<{ raw_data: R }>

Type parameters

Name Type
R extends unknown
T extends unknown

Parameters

Name Type
request SendMetaTxRequest
apiKey string

Returns

Promise<{ raw_data: R }>

Defined in

api/wallet_api.ts:462


setBaseUrl

setBaseUrl(baseUrl): void

Parameters

Name Type
baseUrl string

Returns

void

Inherited from

BaseAPI.setBaseUrl

Defined in

api/base_api.ts:147


setChainId

setChainId(chainId): void

Parameters

Name Type
chainId ChainId

Returns

void

Inherited from

BaseAPI.setChainId

Defined in

api/base_api.ts:142


signHebaoApproveWithDataStructureForContract

signHebaoApproveWithDataStructureForContract(web3, owner, guardian, chainId, newOwner?): Promise<{ sig: any = result.ecdsaSig }>

Parameters

Name Type Default value
web3 default undefined
owner string undefined
guardian Guardian undefined
chainId ChainId undefined
newOwner string ""

Returns

Promise<{ sig: any = result.ecdsaSig }>

Defined in

api/wallet_api.ts:191


signHebaoApproveWithoutDataStructure

signHebaoApproveWithoutDataStructure(web3, owner, guardian, chainId, walletType): Promise<unknown>

Parameters

Name Type
web3 default
owner string
guardian Guardian
chainId ChainId
walletType ConnectorNames

Returns

Promise<unknown>

Defined in

api/wallet_api.ts:173


submitApproveSignature

submitApproveSignature<R, T>(req): Promise<{ hash: undefined | string ; raw_data: R }>

Type parameters

Name Type
R extends unknown
T extends string

Parameters

Name Type
req SubmitApproveSignatureRequestWithPatch

Returns

Promise<{ hash: undefined | string ; raw_data: R }>

Defined in

api/wallet_api.ts:219

results matching ""

    No results matching ""