Constructors
constructor
- new default(baseURL: string, opts?: { retryCount?: number; retryOn404?: boolean }): default
Parameters
baseURL: string
Optional opts: { retryCount?: number; retryOn404?: boolean }
Optional retryCount?: number
Optional retryOn404?: boolean
Properties
Private axios
axios: AxiosInstance
Methods
createHotspot
- createHotspot(opts: { payer?: string; transaction: string }): Promise<Response<{ solanaTransactions: number[][] }>>
Parameters
opts: { payer?: string; transaction: string }
Optional payer?: string
transaction: string
Returns Promise<Response<{ solanaTransactions: number[][] }>>
Private execute
- execute<T>(method: Method, path: string, params?: Object): Promise<Response<T>>
Type Parameters
Parameters
method: Method
path: string
Optional params: Object
Returns Promise<Response<T>>
Private get
- get<T>(path: string, params?: Object): Promise<Response<T>>
Type Parameters
Parameters
path: string
params: Object = {}
Returns Promise<Response<T>>
getFirmware
- getFirmware(): Promise<Response<{ version: string }>>
Returns Promise<Response<{ version: string }>>
getMakers
- getMakers(): Promise<Response<Maker[]>>
Returns Promise<Response<Maker[]>>
getOnboardingRecord
- getOnboardingRecord(gatewayAddress: string): Promise<Response<OnboardingRecord>>
onboard
- onboard(opts: { hotspotAddress: string; payer?: string; type: HotspotType } & Partial<Metadata>): Promise<Response<{ solanaTransactions: number[][] }>>
Parameters
opts: { hotspotAddress: string; payer?: string; type: HotspotType } & Partial<Metadata>
Returns Promise<Response<{ solanaTransactions: number[][] }>>
onboardIot
- onboardIot(opts: { hotspotAddress: string; payer?: string } & Partial<Metadata>): Promise<Response<{ solanaTransactions: number[][] }>>
Parameters
opts: { hotspotAddress: string; payer?: string } & Partial<Metadata>
Returns Promise<Response<{ solanaTransactions: number[][] }>>
onboardMobile
- onboardMobile(opts: { hotspotAddress: string; payer?: string } & Partial<Metadata>): Promise<Response<{ solanaTransactions: number[][] }>>
Parameters
opts: { hotspotAddress: string; payer?: string } & Partial<Metadata>
Returns Promise<Response<{ solanaTransactions: number[][] }>>
Private post
- post<T>(path: string, params?: Object): Promise<Response<T>>
Type Parameters
Parameters
path: string
params: Object = {}
Returns Promise<Response<T>>
postPaymentTransaction
- postPaymentTransaction(gatewayAddress: string, transaction: string): Promise<Response<{ solanaTransactions?: string[]; transaction: string }>>
Parameters
gatewayAddress: string
transaction: string
Returns Promise<Response<{ solanaTransactions?: string[]; transaction: string }>>
updateIotMetadata
- updateIotMetadata(opts: Metadata & { hotspotAddress: string; payer?: string; solanaAddress: string }): Promise<Response<{ solanaTransactions: number[][] }>>
Parameters
opts: Metadata & { hotspotAddress: string; payer?: string; solanaAddress: string }
Returns Promise<Response<{ solanaTransactions: number[][] }>>
updateMetadata
- updateMetadata(__namedParameters: Metadata & { hotspotAddress: string; payer?: string; solanaAddress: string; type: HotspotType }): Promise<Response<{ solanaTransactions: number[][] }>>
Parameters
__namedParameters: Metadata & { hotspotAddress: string; payer?: string; solanaAddress: string; type: HotspotType }
Returns Promise<Response<{ solanaTransactions: number[][] }>>
updateMobileMetadata
- updateMobileMetadata(opts: Metadata & { hotspotAddress: string; payer?: string; solanaAddress: string }): Promise<Response<{ solanaTransactions: number[][] }>>
Parameters
opts: Metadata & { hotspotAddress: string; payer?: string; solanaAddress: string }
Returns Promise<Response<{ solanaTransactions: number[][] }>>