Bitski.js

Index

External modules


AccessToken

constructor

new AccessToken(token: string, expiresAt: undefined | number, scope: undefined | string): AccessToken
Parameters
Param Type Description
token string the access token
expiresAt undefined ⎮number the token expiration date (in seconds) (optional)
scope undefined ⎮string the scopes this token represents (optional)
Return Value

AccessToken


Properties

expiresAt

var expiresAt: undefined | number

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

scope

var scope: undefined | string

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

token

var token: string

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


expired

var expired: 

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


Methods

toStorageString

Declaration
function toStorageString(): string

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

Return Value

string

fromString

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

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

Parameters
Param Type Description
s string JSON string representing the token
Return Value

AccessToken ⎮undefined

fromTokenResponse

Declaration
function fromTokenResponse(tokenResponse: TokenResponse): AccessToken<>

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

Parameters
Param Type Description
tokenResponse TokenResponse The token response object to build a token from
Return Value

AccessToken




AuthProvider

Properties

authStatus

var authStatus: AuthenticationStatus

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

Methods

connect

Declaration
function connect(): Promise<User>

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

Return Value

Promise<User>

getUser

Declaration
function getUser(): Promise<User>

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

Return Value

Promise<User>

redirectCallback

Declaration
function redirectCallback(): Promise<User>

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

Return Value

Promise<User>

signIn

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

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

Parameters
Param Type Description
method OAuthSignInMethod -
opts SignInOptions -
Return Value

Promise<User>

signInOrConnect

Declaration
function signInOrConnect(signInMethod: OAuthSignInMethod, opts: SignInOptions): Promise<User>

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

Parameters
Param Type Description
signInMethod OAuthSignInMethod -
opts SignInOptions -
Return Value

Promise<User>

signOut

Declaration
function signOut(): Promise<User>

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

Return Value

Promise<User>


OAuthManager

constructor

new OAuthManager(options: OAuthManagerOptions): OAuthManager
Parameters
Param Type Description
options OAuthManagerOptions Settings object
Return Value

OAuthManager


Properties

configuration

var configuration: AuthorizationServiceConfiguration

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


Methods

redirectCallback

Declaration
function redirectCallback(): Promise<TokenResponse>

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

Return Value

Promise<TokenResponse>

refreshAccessToken

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

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

Parameters
Param Type Description
refreshToken string The refresh token to use for authorization
Return Value

Promise<TokenResponse>

requestAccessToken

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

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

Parameters
Param Type Description
code string The authorization code to exchange
Return Value

Promise<TokenResponse>

requestSignOut

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

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

Parameters
Param Type Description
accessToken string The access token to sign out with
Return Value

Promise<any>

requestUserInfo

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

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

Parameters
Param Type Description
accessToken string The access token for the user
Return Value

Promise<UserInfoResponse>

signInPopup

Declaration
function signInPopup(opts: SignInOptions): Promise<TokenResponse>

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

Parameters
Param Type Description
opts SignInOptions -
Return Value

Promise<TokenResponse>

signInRedirect

Declaration
function signInRedirect(opts: SignInOptions): Promise<AuthorizationResponse>

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

Parameters
Param Type Description
opts SignInOptions -
Return Value

Promise<AuthorizationResponse>



OAuthManagerOptions

Properties

additionalScopes

var additionalScopes: string[]

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

clientId

var clientId: string

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

configuration

var configuration: AuthorizationServiceConfiguration

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

redirectUri

var redirectUri: string

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

SignInOptions

Properties

login_hint

var login_hint: undefined | string

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

«Const» LOGIN_HINT_SIGNUP

var LOGIN_HINT_SIGNUP: "signup" = "signup"

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


OpenidAuthProvider

constructor

new OpenidAuthProvider(clientId: string, redirectUri: string, additionalScopes: string[], opts: BitskiSDKOptions): OpenidAuthProvider
Parameters
Param Type Description
clientId string -
redirectUri string -
additionalScopes string[] -
opts BitskiSDKOptions -
Return Value

OpenidAuthProvider


Properties

oauthManager

var oauthManager: OAuthManager

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

signOutCallback

var signOutCallback: undefined | function

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

tokenStore

var tokenStore: TokenStore

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

userStore

var userStore: UserStore

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


authStatus

var authStatus: 

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


Methods

connect

Declaration
function connect(): Promise<User>

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

Return Value

Promise<User>

getAccessToken

Declaration
function getAccessToken(): Promise<string>

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

Return Value

Promise<string>

getRefreshToken

Declaration
function getRefreshToken(): Promise<string>

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

Return Value

Promise<string>

getUser

Declaration
function getUser(): Promise<User>

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

Return Value

Promise<User>

invalidateToken

Declaration
function invalidateToken(): Promise<void>

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

Return Value

Promise<void>

redirectCallback

Declaration
function redirectCallback(): Promise<User>

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

Return Value

Promise<User>

refreshAccessToken

Declaration
function refreshAccessToken(): Promise<string>

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

Return Value

Promise<string>

signIn

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

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

Parameters
Param Type Description
method OAuthSignInMethod -
opts SignInOptions -
Return Value

Promise<User>

signInOrConnect

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

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

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

Promise<User>

signOut

Declaration
function signOut(): Promise<any>

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

Return Value

Promise<any>


Relationships

Implements


PopupBlockedError

constructor

new PopupBlockedError(): PopupBlockedError
Return Value

PopupBlockedError


Properties


Methods


Relationships

Extends
  • AuthorizationError

PopupClosedError

constructor

new PopupClosedError(): PopupClosedError
Return Value

PopupClosedError


Properties


Methods


Relationships

Extends
  • AuthorizationError

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 packages/browser/src/auth/popup-handler.ts:105

Parameters
Param Type Description
url Location -

completeAuthorizationRequest

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

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

Return Value

Promise<AuthorizationRequestResponse ⎮null>

completeAuthorizationRequestIfPossible

Declaration
function completeAuthorizationRequestIfPossible(): Promise<void>

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

Return Value

Promise<void>

performAuthorizationRequest

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

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

Parameters
Param Type Description
configuration AuthorizationServiceConfiguration -
request AuthorizationRequest -

Relationships

Extends
  • AuthorizationRequestHandler

Functions

createCenteredPopupFeatures

Declaration
function createCenteredPopupFeatures(): any

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

Return Value

any

createPopupFeatureString

Declaration
function createPopupFeatureString(features: any): string

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

Parameters
Param Type Description
features any -
Return Value

string


TokenStore

constructor

new TokenStore(clientId: string, store: Store): TokenStore
Parameters
Param Type Description
clientId string -
store Store -
Return Value

TokenStore


currentToken

var currentToken: 

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

refreshToken

var refreshToken: 

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


Methods

clear

Declaration
function clear()

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

invalidateCurrentToken

Declaration
function invalidateCurrentToken()

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

persistTokenResponse

Declaration
function persistTokenResponse(response: TokenResponse)

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

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 string[] -
email undefined ⎮string -
emailVerified undefined ⎮false ⎮true -
phone undefined ⎮string -
phoneNumberVerified undefined ⎮false ⎮true -
Return Value

User


Properties

accounts

var accounts: string[]

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

email

var email: undefined | string

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

emailVerified

var emailVerified: undefined | false | true

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

id

var id: string

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

phoneNumber

var phoneNumber: undefined | string

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

phoneNumberVerified

var phoneNumberVerified: undefined | false | true

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


Methods

toStorageString

Declaration
function toStorageString(): string

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

Return Value

string

fromJson

Declaration
function fromJson(json: UserInfoResponse): User

Defined in packages/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 packages/browser/src/auth/user.ts:16

Parameters
Param Type Description
s string -
Return Value

User ⎮undefined



UserInfoResponse

Properties

accounts

var accounts: string[]

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

email

var email: undefined | string

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

email_verified

var email_verified: undefined | false | true

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

phone_number

var phone_number: undefined | string

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

phone_number_verified

var phone_number_verified: undefined | false | true

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

sub

var sub: string

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


UserStore

constructor

new UserStore(clientId: string, store: Store): UserStore
Parameters
Param Type Description
clientId string -
store Store -
Return Value

UserStore


currentUser

var currentUser: 

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


Methods

clear

Declaration
function clear()

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

set

Declaration
function set(user: User | undefined)

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

Parameters
Param Type Description
user User ⎮undefined -



AuthenticationStatus

Connected

var Connected:  = "CONNECTED"

Defined in packages/browser/src/bitski.ts:21

Expired

var Expired:  = "EXPIRED"

Defined in packages/browser/src/bitski.ts:22

NotConnected

var NotConnected:  = "NOT_CONNECTED"

Defined in packages/browser/src/bitski.ts:23

OAuthSignInMethod

var Popup:  = "POPUP"

Defined in packages/browser/src/bitski.ts:16

Redirect

var Redirect:  = "REDIRECT"

Defined in packages/browser/src/bitski.ts:15

Silent

var Silent:  = "SILENT"

Defined in packages/browser/src/bitski.ts:17

Bitski

constructor

new Bitski(clientId: string, redirectUri: undefined | string, additionalScopes: string[], options: BitskiSDKOptions): Bitski
Parameters
Param Type Description
clientId string OAuth Client ID
redirectUri undefined ⎮string Redirect uri, defaults to the current url. This should be the location of your callback html file.
additionalScopes string[] To use custom scopes, add them here. The default value is [‘offline’].Note: Make sure your app is approved for the scopes you are requesting first.
options BitskiSDKOptions Other OAuth settings. Don’t change these unless you know what you are doing.
Return Value

Bitski


authStatus

var authStatus: 

Defined in packages/browser/src/bitski.ts:152


Methods

addSignOutHandler

Declaration
function addSignOutHandler(fn: function)

Defined in packages/browser/src/bitski.ts:220

Parameters
Param Type Description
fn function Your callback function

connect

Declaration
function connect(): Promise<User>

Defined in packages/browser/src/bitski.ts:181

Return Value

Promise<User>

getConnectButton

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

Defined in packages/browser/src/bitski.ts:135

Parameters
Param Type Description
options ConnectButtonOptions Optional configuration for the button
callback undefined ⎮function Post-login callback. Called when sign in is complete. Not applicable for redirect login method.
Return Value

ConnectButton

getCurrentAccessToken

Declaration
function getCurrentAccessToken(): Promise<string>

Defined in packages/browser/src/bitski.ts:203

Return Value

Promise<string>

getCurrentRefreshToken

Declaration
function getCurrentRefreshToken(): Promise<string>

Defined in packages/browser/src/bitski.ts:211

Return Value

Promise<string>

getProvider

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

Defined in packages/browser/src/bitski.ts:106

Parameters
Param Type Description
options ProviderOptions ⎮string options for the provider, or a network name
Return Value

BitskiEngine

getUser

Declaration
function getUser(): Promise<User>

Defined in packages/browser/src/bitski.ts:174

Return Value

Promise<User>

redirectCallback

Declaration
function redirectCallback(): Promise<User>

Defined in packages/browser/src/bitski.ts:196

Return Value

Promise<User>

removeSignOutHandler

Declaration
function removeSignOutHandler(fn: function)

Defined in packages/browser/src/bitski.ts:228

Parameters
Param Type Description
fn function Your callback function

signIn

Declaration
function signIn(options: SignInOptions): Promise<User>

Defined in packages/browser/src/bitski.ts:167

Parameters
Param Type Description
options SignInOptions Optionally provide additional options for the sign in request.You can use the options parameter to request that we show the sign up form instead of the sign in form:javascriptimport { LOGIN_HINT_SIGNUP } from 'bitski';await bitski.signIn({ login_hint: LOGIN_HINT_SIGNUP });
Return Value

Promise<User>

signInRedirect

Declaration
function signInRedirect(options: SignInOptions)

Defined in packages/browser/src/bitski.ts:189

Parameters
Param Type Description
options SignInOptions Optionally provide additional options for the sign in request. See signIn() for more info.

signOut

Declaration
function signOut(): Promise<void>

Defined in packages/browser/src/bitski.ts:238

Return Value

Promise<void>

start

Declaration
function start(options: SignInOptions): Promise<User>

Defined in packages/browser/src/bitski.ts:145

Parameters
Param Type Description
options SignInOptions Provide SignInOptions for the sign in request. See signIn() for more info.
Return Value

Promise<User>

callback

Declaration
function callback()

Defined in packages/browser/src/bitski.ts:71



BitskiSDKOptions

Properties

configuration

var configuration: AuthorizationServiceConfiguration

Defined in packages/browser/src/bitski.ts:45

store

var store: Store

Defined in packages/browser/src/bitski.ts:47

ProviderOptions

Properties

additionalHeaders

var additionalHeaders: undefined | object

Defined in packages/browser/src/bitski.ts:57

apiBaseUrl

var apiBaseUrl: undefined | string

Defined in packages/browser/src/bitski.ts:59

callbackURL

var callbackURL: undefined | string

Defined in packages/browser/src/bitski.ts:61

disableBlockTracking

var disableBlockTracking: undefined | false | true

Defined in packages/browser/src/bitski.ts:56

disableCaching

var disableCaching: undefined | false | true

Defined in packages/browser/src/bitski.ts:54

disableValidation

var disableValidation: undefined | false | true

Defined in packages/browser/src/bitski.ts:55

minGasPrice

var minGasPrice: undefined | number

Defined in packages/browser/src/bitski.ts:60

network

var network: Network

Defined in packages/browser/src/bitski.ts:52

networkName

var networkName: undefined | string

Defined in packages/browser/src/bitski.ts:51

pollingInterval

var pollingInterval: undefined | number

Defined in packages/browser/src/bitski.ts:53

webBaseUrl

var webBaseUrl: undefined | string

Defined in packages/browser/src/bitski.ts:58



ConnectButtonSize

Large

var Large:  = "LARGE"

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

Medium

var Medium:  = "MEDIUM"

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

Small

var Small:  = "SMALL"

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

ConnectButton

constructor

new ConnectButton(authProvider: AuthProvider, options: ConnectButtonOptions, callback: undefined | function): ConnectButton
Parameters
Param Type Description
authProvider AuthProvider An instance of an AuthProvider to process sign in requests.
options ConnectButtonOptions Optional ConnectButtonOptions to configure your button.
callback undefined ⎮function Optional callback to be called after successful or failed log in attempt.You can also set this directly later with the callback property.
Return Value

ConnectButton


Properties

callback

var callback: undefined | function

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

element

var element: HTMLElement

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

onCancel

var onCancel: undefined | function

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

size

var size: ConnectButtonSize

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


Methods

remove

Declaration
function remove()

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



ConnectButtonOptions

Properties

authMethod

var authMethod: OAuthSignInMethod

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

container

var container: HTMLElement

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

signInOptions

var signInOptions: SignInOptions

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

size

var size: ConnectButtonSize

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


Dialog

constructor

new Dialog(content: HTMLElement | string, dynamicContent?: boolean): Dialog
Parameters
Param Type Default value Description
content HTMLElement ⎮string - The content (HTMLElement, selector, or text) to embed in the dialog
dynamicContent boolean false Set to true to show loading state
Return Value

Dialog


Properties

onClose

var onClose: undefined | function

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


Methods

close

Declaration
function close()

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

dismiss

Declaration
function dismiss()

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

hide

Declaration
function hide()

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

setLoading

Declaration
function setLoading(loading: boolean)

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

Parameters
Param Type Description
loading boolean Whether or not to display the spinner

show

Declaration
function show()

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



«Const» TEMPLATE

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

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


«Const» ACCESS_TOKEN_KEY

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

Defined in packages/browser/src/constants.ts:34

«Const» BITSKI_RPC_BASE_URL

var BITSKI_RPC_BASE_URL: "https://api.bitski.com/v1/web3" = "https://api.bitski.com/v1/web3"

Defined in packages/browser/src/constants.ts:7

«Const» BITSKI_TRANSACTION_API_BASE_URL

var BITSKI_TRANSACTION_API_BASE_URL: "https://api.bitski.com/v1" = "https://api.bitski.com/v1"

Defined in packages/browser/src/constants.ts:6

«Const» BITSKI_USER_API_HOST

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

Defined in packages/browser/src/constants.ts:5

«Const» BITSKI_WEB_BASE_URL

var BITSKI_WEB_BASE_URL: "https://sign.bitski.com" = "https://sign.bitski.com"

Defined in packages/browser/src/constants.ts:8

«Const» CACHED_METHODS

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

Defined in packages/browser/src/constants.ts:38

«Const» CHECK_FOR_POPUP_CLOSE_INTERVAL

var CHECK_FOR_POPUP_CLOSE_INTERVAL: 500 = 500

Defined in packages/browser/src/constants.ts:22

«Const» DEFAULT_AUTHORIZED_METHODS

var DEFAULT_AUTHORIZED_METHODS: string[] =  [
  'eth_sendTransaction',
  'eth_signTransaction',
  'eth_sign',
  'personal_sign',
  'eth_signTypedData',
  'eth_signTypedData_v3', // For metamask compatibility
]

Defined in packages/browser/src/constants.ts:39

«Const» DEFAULT_OPTIONAL_SCOPES

var DEFAULT_OPTIONAL_SCOPES: string[] =  ['offline']

Defined in packages/browser/src/constants.ts:19

«Const» DEFAULT_SCOPES

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

Defined in packages/browser/src/constants.ts:18

«Const» IFRAME_MESSAGE_ORIGIN_INCLUDES

var IFRAME_MESSAGE_ORIGIN_INCLUDES: ".bitski.com" = ".bitski.com"

Defined in packages/browser/src/constants.ts:9

«Const» REFRESH_TOKEN_KEY

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

Defined in packages/browser/src/constants.ts:33

«Const» SDK_VERSION

var SDK_VERSION: "0.10.8" = "0.10.8"

Defined in packages/browser/src/constants.ts:2

«Const» USER_KEY

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

Defined in packages/browser/src/constants.ts:35

DEFAULT_OAUTH_CONFIGURATION

authorization_endpoint

var authorization_endpoint: string = "https://account.bitski.com/oauth2/auth"

Defined in packages/browser/src/constants.ts:13

revocation_endpoint

var revocation_endpoint: string = ""

Defined in packages/browser/src/constants.ts:14

token_endpoint

var token_endpoint: string = "https://account.bitski.com/oauth2/token"

Defined in packages/browser/src/constants.ts:15

userinfo_endpoint

var userinfo_endpoint: string = "https://account.bitski.com/userinfo"

Defined in packages/browser/src/constants.ts:16

DEFAULT_POPUP_FEATURES

height

var height: number = 500

Defined in packages/browser/src/constants.ts:27

left

var left: number = 100

Defined in packages/browser/src/constants.ts:28

location

var location: string = "no"

Defined in packages/browser/src/constants.ts:24

toolbar

var toolbar: string = "no"

Defined in packages/browser/src/constants.ts:25

top

var top: number = 100

Defined in packages/browser/src/constants.ts:29

width

var width: number = 500

Defined in packages/browser/src/constants.ts:26


AuthenticationErrorCode

InvalidConfiguration

var InvalidConfiguration:  = 1005

Defined in packages/browser/src/errors/authentication-error.ts:14

NoRefreshToken

var NoRefreshToken:  = 1002

Defined in packages/browser/src/errors/authentication-error.ts:8

NotSignedIn

var NotSignedIn:  = 1000

Defined in packages/browser/src/errors/authentication-error.ts:4

PopupBlocked

var PopupBlocked:  = 1006

Defined in packages/browser/src/errors/authentication-error.ts:16

ServerError

var ServerError:  = 1004

Defined in packages/browser/src/errors/authentication-error.ts:12

UnsupportedAuthenticationMethod

var UnsupportedAuthenticationMethod:  = 1003

Defined in packages/browser/src/errors/authentication-error.ts:10

UserCancelled

var UserCancelled:  = 1001

Defined in packages/browser/src/errors/authentication-error.ts:6

AuthenticationError

constructor

new AuthenticationError(message: string, code: AuthenticationErrorCode): AuthenticationError
Parameters
Param Type Description
message string -
code AuthenticationErrorCode -
Return Value

AuthenticationError


Properties

code

var code: AuthenticationErrorCode

Defined in packages/browser/src/errors/authentication-error.ts:63

description

var description: undefined | string

Defined in packages/browser/src/errors/authentication-error.ts:64

name

var name: string = "AuthenticationError"

Defined in packages/browser/src/errors/authentication-error.ts:62

Error

var Error: ErrorConstructor

Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:984


Methods

InvalidConfiguration

Declaration
function InvalidConfiguration(reason: string): AuthenticationError<>

Defined in packages/browser/src/errors/authentication-error.ts:58

Parameters
Param Type Description
reason string -
Return Value

AuthenticationError

NoRefreshToken

Declaration
function NoRefreshToken(): AuthenticationError<>

Defined in packages/browser/src/errors/authentication-error.ts:35

Return Value

AuthenticationError

NotSignedIn

Declaration
function NotSignedIn(): AuthenticationError<>

Defined in packages/browser/src/errors/authentication-error.ts:25

Return Value

AuthenticationError

PopupBlocked

Declaration
function PopupBlocked(baseUrl: string): AuthenticationError<>

Defined in packages/browser/src/errors/authentication-error.ts:45

Parameters
Param Type Description
baseUrl string -
Return Value

AuthenticationError

ServerError

Declaration
function ServerError(message: string, description: undefined | string): AuthenticationError<>

Defined in packages/browser/src/errors/authentication-error.ts:51

Parameters
Param Type Description
message string -
description undefined ⎮string -
Return Value

AuthenticationError

UnsupportedAuthenticationMethod

Declaration
function UnsupportedAuthenticationMethod(): AuthenticationError<>

Defined in packages/browser/src/errors/authentication-error.ts:40

Return Value

AuthenticationError

UserCancelled

Declaration
function UserCancelled(): AuthenticationError<>

Defined in packages/browser/src/errors/authentication-error.ts:30

Return Value

AuthenticationError


Relationships

Extends
  • Error


ParseErrorCode

InvalidJSON

var InvalidJSON:  = 2000

Defined in packages/browser/src/errors/parse-error.ts:4

NoErrorBody

var NoErrorBody:  = 2001

Defined in packages/browser/src/errors/parse-error.ts:7

ParseError

constructor

new ParseError(message: string, code: ParseErrorCode): ParseError
Parameters
Param Type Description
message string -
code ParseErrorCode -
Return Value

ParseError


Properties

code

var code: ParseErrorCode

Defined in packages/browser/src/errors/parse-error.ts:23

name

var name: string = "ParseError"

Defined in packages/browser/src/errors/parse-error.ts:22

Error

var Error: ErrorConstructor

Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:984


Methods

InvalidJSON

Declaration
function InvalidJSON(): ParseError<>

Defined in packages/browser/src/errors/parse-error.ts:14

Return Value

ParseError

UnknownError

Declaration
function UnknownError(): ParseError<>

Defined in packages/browser/src/errors/parse-error.ts:18

Return Value

ParseError


Relationships

Extends
  • Error


SignerErrorCode

MissingFrom

var MissingFrom:  = 3004

Defined in packages/browser/src/errors/signer-error.ts:14

MissingMessage

var MissingMessage:  = 3003

Defined in packages/browser/src/errors/signer-error.ts:12

MissingTransaction

var MissingTransaction:  = 3002

Defined in packages/browser/src/errors/signer-error.ts:9

MissingTypedData

var MissingTypedData:  = 3005

Defined in packages/browser/src/errors/signer-error.ts:17

UnsupportedMethod

var UnsupportedMethod:  = 3000

Defined in packages/browser/src/errors/signer-error.ts:4

UserCancelled

var UserCancelled:  = 3001

Defined in packages/browser/src/errors/signer-error.ts:6

SignerError

constructor

new SignerError(message: string, code: SignerErrorCode): SignerError
Parameters
Param Type Description
message string -
code SignerErrorCode -
Return Value

SignerError


Properties

code

var code: SignerErrorCode

Defined in packages/browser/src/errors/signer-error.ts:47

name

var name: string = "TransactionError"

Defined in packages/browser/src/errors/signer-error.ts:46

Error

var Error: ErrorConstructor

Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:984


Methods

MissingFrom

Declaration
function MissingFrom(): SignerError<>

Defined in packages/browser/src/errors/signer-error.ts:38

Return Value

SignerError

MissingMessage

Declaration
function MissingMessage(): SignerError<>

Defined in packages/browser/src/errors/signer-error.ts:34

Return Value

SignerError

MissingTransaction

Declaration
function MissingTransaction(): SignerError<>

Defined in packages/browser/src/errors/signer-error.ts:30

Return Value

SignerError

MissingTypedData

Declaration
function MissingTypedData(): SignerError<>

Defined in packages/browser/src/errors/signer-error.ts:42

Return Value

SignerError

UnsupportedMethod

Declaration
function UnsupportedMethod(): SignerError<>

Defined in packages/browser/src/errors/signer-error.ts:22

Return Value

SignerError

UserCancelled

Declaration
function UserCancelled(): SignerError<>

Defined in packages/browser/src/errors/signer-error.ts:26

Return Value

SignerError


Relationships

Extends
  • Error


BitskiBrowserEngine

constructor

new BitskiBrowserEngine(clientId: string, tokenProvider: AccessTokenProvider, sdkVersion: string, network: Network, options?: ProviderOptions): BitskiBrowserEngine
Parameters
Param Type Default value Description
clientId string - -
tokenProvider AccessTokenProvider - -
sdkVersion string - -
network Network - -
options ProviderOptions {} -
Return Value

BitskiBrowserEngine


Properties


Methods


Relationships

Extends
  • BitskiEngine

Functions

isAuthProvider

Declaration
function isAuthProvider(object: any): object is AuthProvider

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

Parameters
Param Type Description
object any -
Return Value

object


BitskiTransactionSigner

constructor

new BitskiTransactionSigner(webBaseUrl: string, apiBaseUrl: string, defaultHeaders: any, callbackURL: string | undefined): BitskiTransactionSigner
Parameters
Param Type Description
webBaseUrl string -
apiBaseUrl string -
defaultHeaders any -
callbackURL string ⎮undefined -
Return Value

BitskiTransactionSigner


Methods

sign

Declaration
function sign(transaction: Transaction, accessToken: string): Promise<string>

Defined in packages/browser/src/signing/transaction-signer.ts:45

Parameters
Param Type Description
transaction Transaction -
accessToken string -
Return Value

Promise<string>



JSONTransactionObject

Properties

transaction

var transaction: Transaction

Defined in packages/browser/src/signing/transaction-signer.ts:9


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 packages/browser/src/subproviders/authenticated-cache.ts:18

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

any


Relationships

Extends
  • Subprovider


RemoteAccountSubprovider


Properties


Methods

handleRequest

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

Defined in packages/browser/src/subproviders/remote-accounts.ts:7

Parameters
Param Type Description
payload any -
next any -
end any -

Relationships

Extends
  • AuthenticatedFetchSubprovider


RestFetchSubprovider

constructor

new RestFetchSubprovider(opts: RestFetchSubproviderOptions): RestFetchSubprovider
Parameters
Param Type Description
opts RestFetchSubproviderOptions -
Return Value

RestFetchSubprovider


Properties


Methods

handleRequest

Declaration
function handleRequest(payload: JSONRPCRequest, next: NextHandler, end: CompletionHandler)

Defined in packages/browser/src/subproviders/rest-fetch.ts:39

Parameters
Param Type Description
payload JSONRPCRequest -
next NextHandler -
end CompletionHandler -

Relationships

Extends
  • Subprovider

RestFetchSubproviderOptions

Properties

defaultHeaders

var defaultHeaders: undefined | object

Defined in packages/browser/src/subproviders/rest-fetch.ts:22

originHttpHeaderKey

var originHttpHeaderKey: undefined | string

Defined in packages/browser/src/subproviders/rest-fetch.ts:23

rpcUrl

var rpcUrl: string

Defined in packages/browser/src/subproviders/rest-fetch.ts:21

«Const» MATCHING_METHODS

var MATCHING_METHODS: string[] =  ['eth_getBlockByNumber', 'eth_blockNumber', 'net_Version', 'eth_getLogs']

Defined in packages/browser/src/subproviders/rest-fetch.ts:18

«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',
]

Defined in packages/browser/src/subproviders/rest-fetch.ts:9

Functions

createRatelimitError

Declaration
function createRatelimitError(): any

Defined in packages/browser/src/subproviders/rest-fetch.ts:135

Return Value

any

createTimeoutError

Declaration
function createTimeoutError(): any

Defined in packages/browser/src/subproviders/rest-fetch.ts:141

Return Value

any

isErrorRetriable

Declaration
function isErrorRetriable(err: any): boolean

Defined in packages/browser/src/subproviders/rest-fetch.ts:130

Parameters
Param Type Description
err any -
Return Value

boolean


TransactionKind

SendTransaction

var SendTransaction:  = "ETH_SEND_TRANSACTION"

Defined in packages/browser/src/subproviders/signature.ts:12

Sign

var Sign:  = "ETH_SIGN"

Defined in packages/browser/src/subproviders/signature.ts:14

SignTransaction

var SignTransaction:  = "ETH_SIGN_TRANSACTION"

Defined in packages/browser/src/subproviders/signature.ts:13

SignTypedData

var SignTypedData:  = "ETH_SIGN_TYPED_DATA"

Defined in packages/browser/src/subproviders/signature.ts:15

SignatureSubprovider

constructor

new SignatureSubprovider(network: Network, signer: BitskiTransactionSigner, tokenProvider: AccessTokenProvider, signatureMethods: string[]): SignatureSubprovider
Parameters
Param Type Description
network Network -
signer BitskiTransactionSigner -
tokenProvider AccessTokenProvider -
signatureMethods string[] -
Return Value

SignatureSubprovider


Properties


Methods

handleRequest

Declaration
function handleRequest(payload: JSONRPCRequestPayload, next: function, end: JSONRPCResponseHandler)

Defined in packages/browser/src/subproviders/signature.ts:136

Parameters
Param Type Description
payload JSONRPCRequestPayload RPC request payload
next function Callback to skip handling this request
end JSONRPCResponseHandler Completion handler

handleSignatureRequest

Declaration
function handleSignatureRequest(payload: JSONRPCRequestPayload, callback: JSONRPCResponseHandler): Promise<void>

Defined in packages/browser/src/subproviders/signature.ts:149

Parameters
Param Type Description
payload JSONRPCRequestPayload The JSON-RPC request
callback JSONRPCResponseHandler The callback to call when the request has been handled
Return Value

Promise<void>


Relationships

Extends
  • Subprovider

SignaturePayload

Properties

from

var from: string

Defined in packages/browser/src/subproviders/signature.ts:32

message

var message: string

Defined in packages/browser/src/subproviders/signature.ts:33

Transaction

Properties

context

var context: TransactionContext

Defined in packages/browser/src/subproviders/signature.ts:22

id

var id: string

Defined in packages/browser/src/subproviders/signature.ts:19

kind

var kind: TransactionKind

Defined in packages/browser/src/subproviders/signature.ts:20

payload

var payload: TransactionPayload | SignaturePayload

Defined in packages/browser/src/subproviders/signature.ts:21

TransactionContext

Properties

chainId

var chainId: undefined | number

Defined in packages/browser/src/subproviders/signature.ts:26

currentBalance

var currentBalance: undefined | string

Defined in packages/browser/src/subproviders/signature.ts:27

from

var from: undefined | string

Defined in packages/browser/src/subproviders/signature.ts:28

TransactionPayload

Properties

data

var data: undefined | string

Defined in packages/browser/src/subproviders/signature.ts:40

from

var from: string

Defined in packages/browser/src/subproviders/signature.ts:37

gas

var gas: undefined | string

Defined in packages/browser/src/subproviders/signature.ts:42

gasPrice

var gasPrice: undefined | string

Defined in packages/browser/src/subproviders/signature.ts:43

nonce

var nonce: undefined | string

Defined in packages/browser/src/subproviders/signature.ts:41

to

var to: undefined | string

Defined in packages/browser/src/subproviders/signature.ts:38

value

var value: undefined | string

Defined in packages/browser/src/subproviders/signature.ts:39

TypedDataDefinition

Properties

name

var name: string

Defined in packages/browser/src/subproviders/signature.ts:47

type

var type: string

Defined in packages/browser/src/subproviders/signature.ts:48

TypedDataPayload

Properties

domain

var domain: object

Defined in packages/browser/src/subproviders/signature.ts:98

message

var message: object

Defined in packages/browser/src/subproviders/signature.ts:100

primaryType

var primaryType: string

Defined in packages/browser/src/subproviders/signature.ts:99

types

var types: object

Defined in packages/browser/src/subproviders/signature.ts:94

Type declaration

EIP712Domain: TypedDataDefinition[]

JSONRPCResponseHandler

var JSONRPCResponseHandler: function

Defined in packages/browser/src/subproviders/signature.ts:9

Type declaration

function (error: JsonRpcError, result: any)

Parameters
Param Type Description
error JsonRpcError -
result any -

LocalStorageStore

constructor

new LocalStorageStore(storage?: Storage): LocalStorageStore
Parameters
Param Type Default value Description
storage Storage localStorage -
Return Value

LocalStorageStore


Methods

clear

Declaration
function clear()

Defined in packages/browser/src/utils/localstorage-store.ts:13

clearItem

Declaration
function clearItem(key: string)

Defined in packages/browser/src/utils/localstorage-store.ts:25

Parameters
Param Type Description
key string -

getItem

Declaration
function getItem(key: string): any

Defined in packages/browser/src/utils/localstorage-store.ts:17

Parameters
Param Type Description
key string -
Return Value

any

setItem

Declaration
function setItem(key: string, value: any)

Defined in packages/browser/src/utils/localstorage-store.ts:21

Parameters
Param Type Description
key string -
value any -

Relationships

Implements


NoHashQueryStringUtils

Methods

parse

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

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

Parameters
Param Type Description
input LocationLike -
useHash undefined ⎮false ⎮true -
Return Value

StringMap


Relationships

Extends
  • BasicQueryStringUtils
    Implements
  • QueryStringUtils


PopupValidator

constructor

new PopupValidator(errorHandler: function): PopupValidator
Parameters
Param Type Description
errorHandler function -
Return Value

PopupValidator


Methods

check

Declaration
function check(popup: Window | null)

Defined in packages/browser/src/utils/popup-validator.ts:17

Parameters
Param Type Description
popup Window ⎮null -



Functions

parseResponse

Declaration
function parseResponseT(response: Response): Promise<T>

Defined in packages/browser/src/utils/request-utils.ts:8

Type parameters

T

Parameters
Param Type Description
response Response the fetch response to parse
Return Value

Promise<T>


Store

Methods

clear

Declaration
function clear(): any

Defined in packages/browser/src/utils/store.ts:5

Return Value

any

clearItem

Declaration
function clearItem(key: any): any

Defined in packages/browser/src/utils/store.ts:14

Parameters
Param Type Description
key any -
Return Value

any

getItem

Declaration
function getItem(key: any): any

Defined in packages/browser/src/utils/store.ts:8

Parameters
Param Type Description
key any -
Return Value

any

setItem

Declaration
function setItem(key: any, value: any): any

Defined in packages/browser/src/utils/store.ts:11

Parameters
Param Type Description
key any -
value any -
Return Value

any


AccessToken

constructor

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

AccessToken


Properties

expiresAt

var expiresAt: undefined | number =  undefined

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

token

var token: string

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


expired

var expired: 

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




AccessTokenProvider

Methods

getAccessToken

Declaration
function getAccessToken(): Promise<string>

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

Return Value

Promise<string>

invalidateToken

Declaration
function invalidateToken(): Promise<void>

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

Return Value

Promise<void>


BitskiEngine

constructor

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

BitskiEngine


Properties


Methods

subscribe

Declaration
function subscribe(subscribeMethod?: string, subscriptionMethod: string, parameters: any[]): Promise<string>

Defined in packages/provider/src/bitski-engine.ts:77

Parameters
Param Type Default value Description
subscribeMethod string "eth_subscribe" -
subscriptionMethod string - -
parameters any[] - -
Return Value

Promise<string>

supportsSubscriptions

Declaration
function supportsSubscriptions(): boolean

Defined in packages/provider/src/bitski-engine.ts:73

Return Value

boolean

unsubscribe

Declaration
function unsubscribe(subscriptionId: string, unsubscribeMethod?: string): Promise<boolean>

Defined in packages/provider/src/bitski-engine.ts:83

Parameters
Param Type Default value Description
subscriptionId string - -
unsubscribeMethod string "eth_unsubscribe" -
Return Value

Promise<boolean>


Relationships

Extends
  • Web3ProviderEngine

BitskiEngineOptions

Properties

disableBlockTracking

var disableBlockTracking: undefined | false | true

Defined in packages/provider/src/bitski-engine.ts:23

disableCaching

var disableCaching: undefined | false | true

Defined in packages/provider/src/bitski-engine.ts:19

disableValidation

var disableValidation: undefined | false | true

Defined in packages/provider/src/bitski-engine.ts:21

minGasPrice

var minGasPrice: undefined | number

Defined in packages/provider/src/bitski-engine.ts:25

pollingInterval

var pollingInterval: undefined | number

Defined in packages/provider/src/bitski-engine.ts:17


«Const» AUTHENTICATED_METHODS

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

Defined in packages/provider/src/constants.ts:2

«Const» RETRIABLE_ERRORS

var RETRIABLE_ERRORS: string[] =  [
  // ignore server overload errors
  'Gateway timeout',
  'ETIMEDOUT',
  'ENOTFOUND', // DNS error
  // ignore server sent html error pages
  // or truncated json responses
  'SyntaxError',
  'ECONNRESET',
  'EHOSTUNREACH',
  'Timeout out while waiting for response', // Actix timeout
]

Defined in packages/provider/src/constants.ts:12

«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 packages/provider/src/constants.ts:26


ProviderErrorCode

InvalidRequest

var InvalidRequest:  = 4001

Defined in packages/provider/src/errors/provider-error.ts:5

SubscriptionsUnavailable

var SubscriptionsUnavailable:  = 4000

Defined in packages/provider/src/errors/provider-error.ts:3

ProviderError

constructor

new ProviderError(message: string, code: ProviderErrorCode): ProviderError
Parameters
Param Type Description
message string -
code ProviderErrorCode -
Return Value

ProviderError


Properties

code

var code: ProviderErrorCode

Defined in packages/provider/src/errors/provider-error.ts:19

name

var name: string = "ProviderError"

Defined in packages/provider/src/errors/provider-error.ts:18

Error

var Error: ErrorConstructor

Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:984


Methods

InvalidRequest

Declaration
function InvalidRequest(reason: string): ProviderError<>

Defined in packages/provider/src/errors/provider-error.ts:14

Parameters
Param Type Description
reason string -
Return Value

ProviderError

SubscriptionsUnavailable

Declaration
function SubscriptionsUnavailable(): ProviderError<>

Defined in packages/provider/src/errors/provider-error.ts:10

Return Value

ProviderError


Relationships

Extends
  • Error


ServerError

constructor

new ServerError(message: string, code: number, requestURI: string, retried?: boolean): ServerError
Parameters
Param Type Default value Description
message string - -
code number - -
requestURI string - -
retried boolean false -
Return Value

ServerError


Properties

code

var code: number

Defined in packages/provider/src/errors/server-error.ts:10

name

var name: string = "ServerError"

Defined in packages/provider/src/errors/server-error.ts:7

requestURI

var requestURI: string

Defined in packages/provider/src/errors/server-error.ts:16

retried

var retried: boolean

Defined in packages/provider/src/errors/server-error.ts:13

Error

var Error: ErrorConstructor

Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:984


Relationships

Extends
  • Error


JSONRPCRequestPayload

Properties

id

var id: number

Defined in packages/provider/src/index.ts:12

jsonrpc

var jsonrpc: string

Defined in packages/provider/src/index.ts:13

method

var method: string

Defined in packages/provider/src/index.ts:11

params

var params: any[]

Defined in packages/provider/src/index.ts:10

JSONRPCResponsePayload

Properties

id

var id: number

Defined in packages/provider/src/index.ts:18

jsonrpc

var jsonrpc: string

Defined in packages/provider/src/index.ts:19

result

var result: any

Defined in packages/provider/src/index.ts:17


Network

Properties

chainId

var chainId: number

Defined in packages/provider/src/network.ts:3

rpcUrl

var rpcUrl: string

Defined in packages/provider/src/network.ts:2

Kovan

chainId

var chainId: number = 42

Defined in packages/provider/src/network.ts:17

rpcUrl

var rpcUrl: string = "https://api.bitski.com/v1/web3/kovan"

Defined in packages/provider/src/network.ts:18

Mainnet

chainId

var chainId: number = 1

Defined in packages/provider/src/network.ts:7

rpcUrl

var rpcUrl: string = "https://api.bitski.com/v1/web3/mainnet"

Defined in packages/provider/src/network.ts:8

Rinkeby

chainId

var chainId: number = 4

Defined in packages/provider/src/network.ts:12

rpcUrl

var rpcUrl: string = "https://api.bitski.com/v1/web3/rinkeby"

Defined in packages/provider/src/network.ts:13


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


Properties


Methods

handleAuthenticatedRequest

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

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

Parameters
Param Type Description
payload any -
next any -
end any -

handleRequest

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

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

Parameters
Param Type Description
payload any -
next any -
end any -

handleUnauthenticatedRequest

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

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

Parameters
Param Type Description
payload any -
next any -
end any -

Relationships

Extends
  • FetchSubprovider


NonceTrackerSubprovider

constructor

new NonceTrackerSubprovider(): NonceTrackerSubprovider
Return Value

NonceTrackerSubprovider


Properties


Methods

handleRequest

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

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

Parameters
Param Type Description
payload any -
next any -
end any -

Relationships

Extends
  • Subprovider


TransactionValidatorSubprovider

constructor

new TransactionValidatorSubprovider(minGasPrice?: number): TransactionValidatorSubprovider
Parameters
Param Type Default value Description
minGasPrice number 0 -
Return Value

TransactionValidatorSubprovider


Properties


Methods

handleRequest

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

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

Parameters
Param Type Description
payload any -
next any -
_ any -

Relationships

Extends
  • Subprovider


TypedDataSanitizerSubprovider

Properties


Methods

handleRequest

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

Defined in packages/provider/src/subproviders/typed-data.ts:33

Parameters
Param Type Description
payload JSONRPCRequestPayload -
next function -
end function -

Relationships

Extends
  • Subprovider

PropertyDef

Properties

name

var name: string

Defined in packages/provider/src/subproviders/typed-data.ts:7

type

var type: string

Defined in packages/provider/src/subproviders/typed-data.ts:8

TypeMapping

var TypeMapping: 

Defined in packages/provider/src/subproviders/typed-data.ts:25

TypedData

Properties

domain

var domain: any

Defined in packages/provider/src/subproviders/typed-data.ts:20

message

var message: any

Defined in packages/provider/src/subproviders/typed-data.ts:22

primaryType

var primaryType: string

Defined in packages/provider/src/subproviders/typed-data.ts:21

types

var types: TypedDataTypes

Defined in packages/provider/src/subproviders/typed-data.ts:19

TypedDataTypes

Properties

EIP712Domain

var EIP712Domain: TypeDefinition

Defined in packages/provider/src/subproviders/typed-data.ts:14

TypeDefinition

var TypeDefinition: PropertyDef[]

Defined in packages/provider/src/subproviders/typed-data.ts:11

Functions

createTypeMapping

Declaration
function createTypeMapping(typedData: TypedData): TypeMapping

Defined in packages/provider/src/subproviders/typed-data.ts:182

Parameters
Param Type Description
typedData TypedData The TypedData to map
Return Value

TypeMapping

the mapped data schema

isArray

Declaration
function isArray(typeName: string): boolean

Defined in packages/provider/src/subproviders/typed-data.ts:159

Parameters
Param Type Description
typeName string solidity type name
Return Value

boolean

sanitizeDomain

Declaration
function sanitizeDomain(typedData: TypedData, typeMapping: TypeMapping)

Defined in packages/provider/src/subproviders/typed-data.ts:77

Parameters
Param Type Description
typedData TypedData TypedData payload
typeMapping TypeMapping a TypeMapping pre-generated from the TypedData

sanitizeMessage

Declaration
function sanitizeMessage(typedData: TypedData, typeMapping: TypeMapping)

Defined in packages/provider/src/subproviders/typed-data.ts:93

Parameters
Param Type Description
typedData TypedData TypedData payload
typeMapping TypeMapping a TypeMapping pre-generated from the TypedData

sanitizeType

Declaration
function sanitizeType(typeName: string, values: any, typeMapping: TypeMapping)

Defined in packages/provider/src/subproviders/typed-data.ts:114

Parameters
Param Type Description
typeName string Name of the type we are starting from
values any The root object containing the keys and values
typeMapping TypeMapping The type mapping that represents this data

Functions

encodeNumber

Declaration
function encodeNumber(num: string | number | BN, type: string, compact?: boolean): string

Defined in packages/provider/src/utils/parse-utils.ts:53

Parameters
Param Type Default value Description
num string ⎮number ⎮BN - The value to convert
type string - The solidity ABI type to format the data as (eg. uint256, int8, etc). Only supports int and uint variants.
compact boolean false boolean (default false). Whether to use compact encoding for uints, or pad with zeroes.
Return Value

string

A hex string formatted as the specified type.

parseBitWidth

Declaration
function parseBitWidth(type: string, offset: number): number

Defined in packages/provider/src/utils/parse-utils.ts:30

Parameters
Param Type Description
type string -
offset number -
Return Value

number

parseNumber

Declaration
function parseNumber(arg: string | number | BN): BN

Defined in packages/provider/src/utils/parse-utils.ts:12

Parameters
Param Type Description
arg string ⎮number ⎮BN A number value to convert to hex.Can be a regular number, base-10 string, base-16 string, or BN instance.
Return Value

BN

BN instance representing the number

(Adapted from ethereumjs-abi)