Module: "kit"
Index
Classes
Interfaces
Type aliases
Variables
Functions
Type aliases
HttpProviderOptions
Ƭ HttpProviderOptions: HttpProviderOptions
Defined in packages/sdk/contractkit/src/kit.ts:35
Variables
Const
API_KEY_HEADER_KEY
• API_KEY_HEADER_KEY: "apiKey" = "apiKey"
Defined in packages/sdk/contractkit/src/kit.ts:36
Functions
newKit
▸ newKit(url
: string, wallet?
: ReadOnlyWallet, options?
: HttpProviderOptions): ContractKit‹›
Defined in packages/sdk/contractkit/src/kit.ts:44
Creates a new instance of ContractKit
given a nodeUrl
optional
wallet to reuse or add a wallet different than the default (example ledger-wallet)
optional
options to pass to the Web3 HttpProvider constructor
Parameters:
Name | Type | Description |
---|---|---|
url |
string | CeloBlockchain node url |
wallet? |
ReadOnlyWallet | - |
options? |
HttpProviderOptions | - |
Returns: ContractKit‹›
newKitFromWeb3
▸ newKitFromWeb3(web3
: Web3, wallet
: ReadOnlyWallet): ContractKit‹›
Defined in packages/sdk/contractkit/src/kit.ts:76
Creates a new instance of the ContractKit
with a web3 instance
Parameters:
Name | Type | Default | Description |
---|---|---|---|
web3 |
Web3 | - | Web3 instance |
wallet |
ReadOnlyWallet | new LocalWallet() | - |
Returns: ContractKit‹›
newKitWithApiKey
▸ newKitWithApiKey(url
: string, apiKey
: string, wallet?
: ReadOnlyWallet): ContractKit‹›
Defined in packages/sdk/contractkit/src/kit.ts:62
Creates a new instance of ContractKit
given a nodeUrl and apiKey
optional
wallet to reuse or add a wallet different than the default (example ledger-wallet)
Parameters:
Name | Type | Description |
---|---|---|
url |
string | CeloBlockchain node url |
apiKey |
string | to include in the http request header |
wallet? |
ReadOnlyWallet | - |
Returns: ContractKit‹›