Bitski.js

Index

External modules


AuthenticationStatus

Connected

var Connected:  = "CONNECTED"

Defined in browser/src/bitski.ts:17

Expired

var Expired:  = "EXPIRED"

Defined in browser/src/bitski.ts:18

NotConnected

var NotConnected:  = "NOT_CONNECTED"

Defined in browser/src/bitski.ts:19

ConnectButtonSize

Large

var Large:  = "LARGE"

Defined in browser/src/components/connect-button.ts:10

Medium

var Medium:  = "MEDIUM"

Defined in browser/src/components/connect-button.ts:9

Small

var Small:  = "SMALL"

Defined in browser/src/components/connect-button.ts:8

OAuthSignInMethod

var Popup:  = "POPUP"

Defined in browser/src/bitski.ts:12

Redirect

var Redirect:  = "REDIRECT"

Defined in browser/src/bitski.ts:11

Silent

var Silent:  = "SILENT"

Defined in browser/src/bitski.ts:13

AccessToken

constructor

new AccessToken(token: string, expiresAt?: undefined | number, scope?: undefined | string): AccessToken
Parameters
Param Type Description
token string  
expiresAt (Optional) undefined ⎮number  
scope (Optional) undefined ⎮string  
Return Value

AccessToken


Properties

expiresAt

var expiresAt: undefined | number

Defined in browser/src/auth/access-token.ts:44

scope

var scope: undefined | string

Defined in browser/src/auth/access-token.ts:49

token

var token: string

Defined in browser/src/auth/access-token.ts:39


expired

getexpired(): boolean

Return Value

boolean


Methods

toStorageString

Declaration
function toStorageString(): string

Defined in browser/src/auth/access-token.ts:78

Return Value

string

fromString

Declaration
function fromString(s: string): AccessToken | undefined

Defined in browser/src/auth/access-token.ts:23

Parameters
Param Type Description
s string  
Return Value

AccessToken ⎮undefined

fromTokenResponse

Declaration
function fromTokenResponse(tokenResponse: TokenResponse): AccessToken

Defined in browser/src/auth/access-token.ts:11

Parameters
Param Type Description
tokenResponse TokenResponse  
Return Value

AccessToken



AuthenticatedCacheSubprovider

constructor

new AuthenticatedCacheSubprovider(authProvider: AuthProvider): AuthenticatedCacheSubprovider
Parameters
Param Type Description
authProvider AuthProvider  
Return Value

AuthenticatedCacheSubprovider


Properties


Methods

handleRequest

Declaration
function handleRequest(payload: any, next: any, end: any): any

Defined in browser/src/subproviders/authenticated-cache.ts:19

Parameters
Param Type Description
payload any  
next any  
end any  
Return Value

any


Relationships

Extends
  • Subprovider

«Abstract» AuthorizationHandler

constructor

new AuthorizationHandler(opts?: any): AuthorizationHandler
Parameters
Param Type Description
opts (Optional) any  
Return Value

AuthorizationHandler


Properties


Methods

handleAuthorization

Declaration
function handleAuthorization(payload: any, next: any, end: any)

Defined in browser/src/subproviders/authorization-handler.ts:25

Parameters
Param Type Description
payload any  
next any  
end any  

handleRequest

Declaration
function handleRequest(payload: any, next: any, end: any)

Defined in browser/src/subproviders/authorization-handler.ts:17

Parameters
Param Type Description
payload any  
next any  
end any  

Relationships

Extends
  • Subprovider

Bitski

constructor

new Bitski(clientId: string, redirectUri?: undefined | string, additionalScopes?: string[], options?: any): Bitski
Parameters
Param Type Description
clientId string  
redirectUri (Optional) undefined ⎮string  
additionalScopes (Optional) string[]  
options (Optional) any  
Return Value

Bitski


authStatus

getauthStatus(): AuthenticationStatus

Return Value

AuthenticationStatus


Methods

addSignOutHandler

Declaration
function addSignOutHandler(fn: function)

Defined in browser/src/bitski.ts:174

Parameters
Param Type Description
fn function  

connect

Declaration
function connect(): Promise<User>

Defined in browser/src/bitski.ts:151

Return Value

Promise<User>

getAuthStatus

Declaration
function getAuthStatus(): Promise<AuthenticationStatus>

Defined in browser/src/bitski.ts:130

Return Value

Promise<AuthenticationStatus>

getConnectButton

Declaration
function getConnectButton(options?: any, callback?: undefined | function): ConnectButton

Defined in browser/src/bitski.ts:100

Parameters
Param Type Description
options (Optional) any  
callback (Optional) undefined ⎮function  
Return Value

ConnectButton

getProvider

Declaration
function getProvider(options?: ProviderOptions | string): BitskiEngine

Defined in browser/src/bitski.ts:76

Parameters
Param Type Description
options (Optional) ProviderOptions ⎮string  
Return Value

BitskiEngine

getUser

Declaration
function getUser(): Promise<User>

Defined in browser/src/bitski.ts:144

Return Value

Promise<User>

redirectCallback

Declaration
function redirectCallback(): Promise<User>

Defined in browser/src/bitski.ts:165

Return Value

Promise<User>

removeSignOutHandler

Declaration
function removeSignOutHandler(fn: function)

Defined in browser/src/bitski.ts:182

Parameters
Param Type Description
fn function  

signIn

Declaration
function signIn(): Promise<User>

Defined in browser/src/bitski.ts:137

Return Value

Promise<User>

signInRedirect

Declaration
function signInRedirect()

Defined in browser/src/bitski.ts:158

signOut

Declaration
function signOut(): Promise<void>

Defined in browser/src/bitski.ts:192

Return Value

Promise<void>

start

Declaration
function start(): Promise<User>

Defined in browser/src/bitski.ts:115

Return Value

Promise<User>

callback

Declaration
function callback()

Defined in browser/src/bitski.ts:38



BitskiBrowserEngine

constructor

new BitskiBrowserEngine(clientId: string, tokenProvider: AccessTokenProvider, sdkVersion: string, networkName?: undefined | string, webBaseUrl?: undefined | string, rpcUrl?: undefined | string, options?: any): BitskiBrowserEngine
Parameters
Param Type Description
clientId string  
tokenProvider AccessTokenProvider  
sdkVersion string  
networkName (Optional) undefined ⎮string  
webBaseUrl (Optional) undefined ⎮string  
rpcUrl (Optional) undefined ⎮string  
options (Optional) any  
Return Value

BitskiBrowserEngine


Properties


Methods


Relationships

Extends
  • BitskiEngine
    Implements
  • Provider

BitskiDevelopmentEngine

constructor

new BitskiDevelopmentEngine(options: any, rpcUrl: any): BitskiDevelopmentEngine
Parameters
Param Type Description
options any  
rpcUrl any  
Return Value

BitskiDevelopmentEngine


Properties


Methods


Relationships

Extends
  • BitskiEngine
    Implements
  • Provider

ConnectButton

constructor

new ConnectButton(authProvider: AuthProvider, existingDiv?: HTMLElement, size?: ConnectButtonSize, authIntegrationType?: OAuthSignInMethod, callback?: undefined | function): ConnectButton
Parameters
Param Type Default value Description
authProvider AuthProvider -  
existingDiv (Optional) HTMLElement -  
size ConnectButtonSize ConnectButtonSize.Medium  
authIntegrationType OAuthSignInMethod OAuthSignInMethod.Popup  
callback (Optional) undefined ⎮function -  
Return Value

ConnectButton


Properties

callback

var callback: undefined | function

Defined in browser/src/components/connect-button.ts:19

element

var element: HTMLElement

Defined in browser/src/components/connect-button.ts:17

size

var size: ConnectButtonSize

Defined in browser/src/components/connect-button.ts:18


Methods

remove

Declaration
function remove()

Defined in browser/src/components/connect-button.ts:51



Dialog

constructor

new Dialog(content: HTMLElement | string, dynamicContent?: boolean): Dialog
Parameters
Param Type Default value Description
content HTMLElement ⎮string -  
dynamicContent boolean false  
Return Value

Dialog


Properties

onClose

var onClose: undefined | function

Defined in browser/src/components/dialog.ts:12


Methods

close

Declaration
function close()

Defined in browser/src/components/dialog.ts:69

dismiss

Declaration
function dismiss()

Defined in browser/src/components/dialog.ts:60

hide

Declaration
function hide()

Defined in browser/src/components/dialog.ts:53

setLoading

Declaration
function setLoading(loading: boolean)

Defined in browser/src/components/dialog.ts:80

Parameters
Param Type Description
loading boolean  

show

Declaration
function show()

Defined in browser/src/components/dialog.ts:47



IFrameSubprovider

constructor

new IFrameSubprovider(webBaseUrl: string, networkName: string, tokenProvider: AccessTokenProvider, sdkVersion: string): IFrameSubprovider
Parameters
Param Type Description
webBaseUrl string  
networkName string  
tokenProvider AccessTokenProvider  
sdkVersion string  
Return Value

IFrameSubprovider


Properties

currentRequestDialog

var currentRequestDialog: Dialog

Defined in browser/src/subproviders/iframe.ts:13


Methods

handleAuthorization

Declaration
function handleAuthorization(payload: any, _: any, end: any)

Defined in browser/src/subproviders/iframe.ts:29

Parameters
Param Type Description
payload any  
_ any  
end any  

receiveMessage

Declaration
function receiveMessage(event: MessageEvent)

Defined in browser/src/subproviders/iframe.ts:37

Parameters
Param Type Description
event MessageEvent  

Relationships

Extends

LocalDialogSubprovider

constructor

new LocalDialogSubprovider(opts?: any): LocalDialogSubprovider
Parameters
Param Type Description
opts (Optional) any  
Return Value

LocalDialogSubprovider


Properties


Methods

handleAuthorization

Declaration
function handleAuthorization(payload: any, next: any, end: any)

Defined in browser/src/subproviders/local-dialog.ts:20

Parameters
Param Type Description
payload any  
next any  
end any  

Relationships

Extends

NoHashQueryStringUtils

Methods

parse

Declaration
function parse(input: LocationLike, useHash?: undefined | false | true): StringMap

Defined in browser/src/utils/no-hash-query-string-utils.ts:8

Parameters
Param Type Description
input LocationLike  
useHash (Optional) undefined ⎮false ⎮true  
Return Value

StringMap


Relationships

Extends
  • BasicQueryStringUtils
    Implements
  • QueryStringUtils

OAuthManager

constructor

new OAuthManager(options: any): OAuthManager
Parameters
Param Type Description
options any  
Return Value

OAuthManager


Properties

configuration

var configuration: AuthorizationServiceConfiguration

Defined in browser/src/auth/oauth-manager.ts:39


Methods

redirectCallback

Declaration
function redirectCallback(): Promise<TokenResponse>

Defined in browser/src/auth/oauth-manager.ts:106

Return Value

Promise<TokenResponse>

refreshAccessToken

Declaration
function refreshAccessToken(refreshToken: string): Promise<TokenResponse>

Defined in browser/src/auth/oauth-manager.ts:131

Parameters
Param Type Description
refreshToken string  
Return Value

Promise<TokenResponse>

requestAccessToken

Declaration
function requestAccessToken(code: string): Promise<TokenResponse>

Defined in browser/src/auth/oauth-manager.ts:122

Parameters
Param Type Description
code string  
Return Value

Promise<TokenResponse>

requestSignOut

Declaration
function requestSignOut(accessToken: string): Promise<any>

Defined in browser/src/auth/oauth-manager.ts:140

Parameters
Param Type Description
accessToken string  
Return Value

Promise<any>

requestUserInfo

Declaration
function requestUserInfo(accessToken: string): Promise<UserInfoResponse>

Defined in browser/src/auth/oauth-manager.ts:157

Parameters
Param Type Description
accessToken string  
Return Value

Promise<UserInfoResponse>

signInPopup

Declaration
function signInPopup(): Promise<TokenResponse>

Defined in browser/src/auth/oauth-manager.ts:73

Return Value

Promise<TokenResponse>

signInRedirect

Declaration
function signInRedirect(): Promise<AuthorizationResponse>

Defined in browser/src/auth/oauth-manager.ts:89

Return Value

Promise<AuthorizationResponse>



OpenidAuthProvider

constructor

new OpenidAuthProvider(clientId: string, redirectUri: string, additionalScopes?: string[], opts?: any): OpenidAuthProvider
Parameters
Param Type Description
clientId string  
redirectUri string  
additionalScopes (Optional) string[]  
opts (Optional) any  
Return Value

OpenidAuthProvider


Properties

oauthManager

var oauthManager: OAuthManager

Defined in browser/src/auth/openid-auth-provider.ts:11

signOutCallback

var signOutCallback: undefined | function

Defined in browser/src/auth/openid-auth-provider.ts:14

tokenStore

var tokenStore: TokenStore

Defined in browser/src/auth/openid-auth-provider.ts:12

userStore

var userStore: UserStore

Defined in browser/src/auth/openid-auth-provider.ts:13


authStatus

getauthStatus(): AuthenticationStatus

Return Value

AuthenticationStatus


Methods

connect

Declaration
function connect(): Promise<User>

Defined in browser/src/auth/openid-auth-provider.ts:96

Return Value

Promise<User>

getAccessToken

Declaration
function getAccessToken(): Promise<string>

Defined in browser/src/auth/openid-auth-provider.ts:42

Return Value

Promise<string>

getUser

Declaration
function getUser(): Promise<User>

Defined in browser/src/auth/openid-auth-provider.ts:102

Return Value

Promise<User>

invalidateToken

Declaration
function invalidateToken(): Promise<void>

Defined in browser/src/auth/openid-auth-provider.ts:52

Return Value

Promise<void>

redirectCallback

Declaration
function redirectCallback(): Promise<User>

Defined in browser/src/auth/openid-auth-provider.ts:120

Return Value

Promise<User>

refreshAccessToken

Declaration
function refreshAccessToken(): Promise<string>

Defined in browser/src/auth/openid-auth-provider.ts:62

Return Value

Promise<string>

signIn

Declaration
function signIn(method: OAuthSignInMethod): Promise<User>

Defined in browser/src/auth/openid-auth-provider.ts:77

Parameters
Param Type Description
method OAuthSignInMethod  
Return Value

Promise<User>

signInOrConnect

Declaration
function signInOrConnect(signInMethod?: OAuthSignInMethod): Promise<User>

Defined in browser/src/auth/openid-auth-provider.ts:106

Parameters
Param Type Default value Description
signInMethod OAuthSignInMethod OAuthSignInMethod.Popup  
Return Value

Promise<User>

signOut

Declaration
function signOut(): Promise<any>

Defined in browser/src/auth/openid-auth-provider.ts:127

Return Value

Promise<any>


Relationships

Implements
  • AccessTokenProvider
  • browser.AuthProvider

PopupRequestHandler

constructor

new PopupRequestHandler(utils?: BasicQueryStringUtils, crypto?: DefaultCrypto): PopupRequestHandler
Parameters
Param Type Default value Description
utils BasicQueryStringUtils new BasicQueryStringUtils()  
crypto DefaultCrypto new DefaultCrypto()  
Return Value

PopupRequestHandler


Properties


Methods

callback

Declaration
function callback(url: Location)

Defined in browser/src/auth/popup-handler.ts:42

Parameters
Param Type Description
url Location  

completeAuthorizationRequest

Declaration
function completeAuthorizationRequest(): Promise<AuthorizationRequestResponse | null>

Defined in browser/src/auth/popup-handler.ts:47

Return Value

Promise<AuthorizationRequestResponse ⎮null>

performAuthorizationRequest

Declaration
function performAuthorizationRequest(configuration: AuthorizationServiceConfiguration, request: AuthorizationRequest)

Defined in browser/src/auth/popup-handler.ts:30

Parameters
Param Type Description
configuration AuthorizationServiceConfiguration  
request AuthorizationRequest  

Relationships

Extends
  • AuthorizationRequestHandler

TokenStore

constructor

new TokenStore(clientId: string): TokenStore
Parameters
Param Type Description
clientId string  
Return Value

TokenStore


currentToken

getcurrentToken(): string | undefined

Return Value

string ⎮undefined

refreshToken

getrefreshToken(): string | undefined

Return Value

string ⎮undefined


Methods

clear

Declaration
function clear()

Defined in browser/src/auth/token-store.ts:60

invalidateCurrentToken

Declaration
function invalidateCurrentToken()

Defined in browser/src/auth/token-store.ts:55

persistTokenResponse

Declaration
function persistTokenResponse(response: TokenResponse)

Defined in browser/src/auth/token-store.ts:46

Parameters
Param Type Description
response TokenResponse  


User

constructor

new User(id: string, accounts?: string[], email?: undefined | string, emailVerified?: undefined | false | true, phone?: undefined | string, phoneNumberVerified?: undefined | false | true): User
Parameters
Param Type Description
id string  
accounts (Optional) string[]  
email (Optional) undefined ⎮string  
emailVerified (Optional) undefined ⎮false ⎮true  
phone (Optional) undefined ⎮string  
phoneNumberVerified (Optional) undefined ⎮false ⎮true  
Return Value

User


Properties

accounts

var accounts: string[]

Defined in browser/src/auth/user.ts:30

email

var email: undefined | string

Defined in browser/src/auth/user.ts:31

emailVerified

var emailVerified: undefined | false | true

Defined in browser/src/auth/user.ts:32

id

var id: string

Defined in browser/src/auth/user.ts:29

phoneNumber

var phoneNumber: undefined | string

Defined in browser/src/auth/user.ts:33

phoneNumberVerified

var phoneNumberVerified: undefined | false | true

Defined in browser/src/auth/user.ts:34


Methods

toStorageString

Declaration
function toStorageString(): string

Defined in browser/src/auth/user.ts:45

Return Value

string

fromJson

Declaration
function fromJson(json: UserInfoResponse): User

Defined in browser/src/auth/user.ts:12

Parameters
Param Type Description
json UserInfoResponse  
Return Value

User

fromString

Declaration
function fromString(s: string): User | undefined

Defined in browser/src/auth/user.ts:16

Parameters
Param Type Description
s string  
Return Value

User ⎮undefined



UserStore

constructor

new UserStore(clientId: string): UserStore
Parameters
Param Type Description
clientId string  
Return Value

UserStore


currentUser

getcurrentUser(): User | undefined

Return Value

User ⎮undefined


Methods

clear

Declaration
function clear()

Defined in browser/src/auth/user-store.ts:28

set

Declaration
function set(user: User | undefined)

Defined in browser/src/auth/user-store.ts:23

Parameters
Param Type Description
user User ⎮undefined  


AuthProvider

Properties

authStatus

var authStatus: AuthenticationStatus

Defined in browser/src/auth/auth-provider.ts:5

Methods

connect

Declaration
function connect(): Promise<User>

Defined in browser/src/auth/auth-provider.ts:7

Return Value

Promise<User>

getUser

Declaration
function getUser(): Promise<User>

Defined in browser/src/auth/auth-provider.ts:9

Return Value

Promise<User>

redirectCallback

Declaration
function redirectCallback(): Promise<User>

Defined in browser/src/auth/auth-provider.ts:10

Return Value

Promise<User>

signIn

Declaration
function signIn(method: OAuthSignInMethod): Promise<User>

Defined in browser/src/auth/auth-provider.ts:6

Parameters
Param Type Description
method OAuthSignInMethod  
Return Value

Promise<User>

signInOrConnect

Declaration
function signInOrConnect(signInMethod?: OAuthSignInMethod): Promise<User>

Defined in browser/src/auth/auth-provider.ts:8

Parameters
Param Type Description
signInMethod (Optional) OAuthSignInMethod  
Return Value

Promise<User>

signOut

Declaration
function signOut(): Promise<User>

Defined in browser/src/auth/auth-provider.ts:11

Return Value

Promise<User>

ProviderOptions

Properties

networkName

var networkName: undefined | string

Defined in browser/src/bitski.ts:25

pollingInterval

var pollingInterval: undefined | number

Defined in browser/src/bitski.ts:28

rpcUrl

var rpcUrl: undefined | string

Defined in browser/src/bitski.ts:26

webBaseUrl

var webBaseUrl: undefined | string

Defined in browser/src/bitski.ts:27

UserInfoResponse

Properties

accounts

var accounts: string[]

Defined in browser/src/auth/user.ts:3

email

var email: undefined | string

Defined in browser/src/auth/user.ts:4

email_verified

var email_verified: undefined | false | true

Defined in browser/src/auth/user.ts:7

phone_number

var phone_number: undefined | string

Defined in browser/src/auth/user.ts:5

phone_number_verified

var phone_number_verified: undefined | false | true

Defined in browser/src/auth/user.ts:6

sub

var sub: string

Defined in browser/src/auth/user.ts:2

Request

var Request: [any, any]

Defined in browser/src/subproviders/iframe.ts:7

Request

var Request: [any, any]

Defined in browser/src/subproviders/local-dialog.ts:5

«Const» ACCESS_TOKEN_KEY

var ACCESS_TOKEN_KEY: "bitski.access_token" = "bitski.access_token"

Defined in browser/src/auth/token-store.ts:5

«Const» BITSKI_USER_API_HOST

var BITSKI_USER_API_HOST: "https://www.bitski.com/v1" = "https://www.bitski.com/v1"

Defined in browser/src/auth/oauth-manager.ts:22

«Const» CACHED_METHODS

var CACHED_METHODS: string[] =  ['eth_accounts']

Defined in browser/src/subproviders/authenticated-cache.ts:4

«Const» CheckForPopupClosedInterval

var CheckForPopupClosedInterval: 500 = 500

Defined in browser/src/auth/popup-handler.ts:14

«Const» DEFAULT_AUTHORIZED_METHODS

var DEFAULT_AUTHORIZED_METHODS: string[] =  ['eth_sendTransaction', 'eth_sign', 'eth_signTypedData', 'personal_sign']

Defined in browser/src/subproviders/authorization-handler.ts:3

«Const» DEFAULT_CONFIGURATION

var DEFAULT_CONFIGURATION: AuthorizationServiceConfiguration =  new AuthorizationServiceConfiguration({
  authorization_endpoint: 'https://account.bitski.com/oauth2/auth',
  revocation_endpoint: '',
  token_endpoint: 'https://account.bitski.com/oauth2/token',
  userinfo_endpoint: 'https://account.bitski.com/userinfo',
})

Defined in browser/src/auth/oauth-manager.ts:24

«Const» DEFAULT_SCOPES

var DEFAULT_SCOPES: string[] =  ['openid']

Defined in browser/src/auth/oauth-manager.ts:31

«Const» DefaultPopupFeatures

var DefaultPopupFeatures: "location=no,toolbar=no,width=500,height=500,left=100,top=100;" = "location=no,toolbar=no,width=500,height=500,left=100,top=100;"

Defined in browser/src/auth/popup-handler.ts:15

«Const» REFRESH_TOKEN_KEY

var REFRESH_TOKEN_KEY: "bitski.refresh_token" = "bitski.refresh_token"

Defined in browser/src/auth/token-store.ts:4

«Const» TEMPLATE

var TEMPLATE: "
  <div class='bitski-dialog'>
      <button class='close-button'>Close</button>
      <div class='bitski-dialog-body'></div>
  </div>
" =  `
  <div class='bitski-dialog'>
      <button class='close-button'>Close</button>
      <div class='bitski-dialog-body'></div>
  </div>
`

Defined in browser/src/components/dialog.ts:1

«Const» USER_KEY

var USER_KEY: "bitski.user" = "bitski.user"

Defined in browser/src/auth/user-store.ts:3

Functions

isAuthProvider

Declaration
function isAuthProvider(object: any): boolean

Defined in browser/src/providers/bitski-browser-engine.ts:7

Parameters
Param Type Description
object any  
Return Value

boolean


AccessToken

constructor

new AccessToken(token: string, expiresIn?: undefined | number): AccessToken
Parameters
Param Type Description
token string  
expiresIn (Optional) undefined ⎮number  
Return Value

AccessToken


Properties

expiresAt

var expiresAt: undefined | number =  undefined

Defined in provider/src/auth/access-token.ts:6

token

var token: string

Defined in provider/src/auth/access-token.ts:5


expired

getexpired(): boolean

Return Value

boolean



AuthenticatedFetchSubprovider

constructor

new AuthenticatedFetchSubprovider(rpcUrl: string, debug: boolean, accessTokenProvider: AccessTokenProvider, defaultHeaders?: object): AuthenticatedFetchSubprovider
Parameters
Param Type Default value Description
rpcUrl string -  
debug boolean -  
accessTokenProvider AccessTokenProvider -  
defaultHeaders object {}  
Return Value

AuthenticatedFetchSubprovider


Methods

handleAuthenticatedRequest

Declaration
function handleAuthenticatedRequest(payload: any, next: any, end: any)

Defined in provider/src/subproviders/authenticated-fetch.ts:64

Parameters
Param Type Description
payload any  
next any  
end any  

handleRequest

Declaration
function handleRequest(payload: any, next: any, end: any)

Defined in provider/src/subproviders/authenticated-fetch.ts:56

Parameters
Param Type Description
payload any  
next any  
end any  

handleUnauthenticatedRequest

Declaration
function handleUnauthenticatedRequest(payload: any, next: any, end: any)

Defined in provider/src/subproviders/authenticated-fetch.ts:73

Parameters
Param Type Description
payload any  
next any  
end any  

Relationships

Extends
  • any

BitskiEngine

constructor

new BitskiEngine(options: any): BitskiEngine
Parameters
Param Type Description
options any  
Return Value

BitskiEngine


Properties


Methods

send

Declaration
function send(payload: JSONRPCRequestPayload)

Defined in provider/src/bitski-engine.ts:34

Parameters
Param Type Description
payload JSONRPCRequestPayload  

Relationships

Extends
  • Web3ProviderEngine
    Implements
  • Provider

NonceTrackerSubprovider

constructor

new NonceTrackerSubprovider(): NonceTrackerSubprovider
Return Value

NonceTrackerSubprovider


Properties


Methods

handleRequest

Declaration
function handleRequest(payload: any, next: any, end: any)

Defined in provider/src/subproviders/nonce-tracker.ts:17

Parameters
Param Type Description
payload any  
next any  
end any  

Relationships

Extends
  • Subprovider

TransactionValidatorSubprovider

Properties


Methods

handleRequest

Declaration
function handleRequest(payload: any, next: any, end: any)

Defined in provider/src/subproviders/transaction-validator.ts:10

Parameters
Param Type Description
payload any  
next any  
end any  

Relationships

Extends
  • Subprovider

AccessTokenProvider

Methods

getAccessToken

Declaration
function getAccessToken(): Promise<string>

Defined in provider/src/auth/access-token-provider.ts:2

Return Value

Promise<string>

invalidateToken

Declaration
function invalidateToken(): Promise<void>

Defined in provider/src/auth/access-token-provider.ts:3

Return Value

Promise<void>

«Const» AUTHENTICATED_METHODS

var AUTHENTICATED_METHODS: string[] =  [
    'eth_accounts',
    'eth_sendTransaction',
    'eth_signTransaction',
    'eth_signTypedData',
    'personal_sign',
    'eth_sign',
]

Defined in provider/src/subproviders/authenticated-fetch.ts:17

«Const» RETRIABLE_ERRORS

var RETRIABLE_ERRORS: string[] =  [
    // ignore server overload errors
    'Gateway timeout',
    'ETIMEDOUT',
    // ignore server sent html error pages
    // or truncated json responses
    'SyntaxError',
    'ECONNRESET',
]

Defined in provider/src/subproviders/authenticated-fetch.ts:7

«Const» UNAUTHORIZED_ERRORS

var UNAUTHORIZED_ERRORS: string[] =  [
    'Missing auth', // No token sent
    'Invalid client id', // Wrong client id, or invalid access token
    'Not Authorized',
]

Defined in provider/src/subproviders/authenticated-fetch.ts:26

Functions

isErrorRetriable

Declaration
function isErrorRetriable(err: any): boolean

Defined in provider/src/subproviders/authenticated-fetch.ts:32

Parameters
Param Type Description
err any  
Return Value

boolean

isUnauthorizedError

Declaration
function isUnauthorizedError(err: Error): boolean

Defined in provider/src/subproviders/authenticated-fetch.ts:37

Parameters
Param Type Description
err Error  
Return Value

boolean