title | description | category | published | requiresReview | order |
---|---|---|---|---|---|
Starter Kits |
Starter kits to jumpstart your development on Antelope blockchains with Wharfkit. |
Utilities |
true |
true |
6 |
The starter kits exist to facilitate the initial setup of developers wanting to use Wharfkit in their applications. The kits, including come with all the essential Wharfkit packages, as well as pre-configured sessionKit
instances that can be used to quickly instantiate Wharf sessions. The available starter kits are:
@wharfkit/starter
: Used to interact with any of the main Antelope blockchains.@wharfkit/starter-eos
: Used to interact with the EOS blockchain.@wharfkit/starter-telos
: Used to interact with the Telos blockchain.@wharfkit/starter-wax
: Used to interact with the WAX blockchain.@wharfkit/starter-jungle
: Used to interact with the Jungle Testnet.
You can install any of these starter kits via npm or yarn. Here are the installation instructions for each one:
yarn add @wharfkit/starter
# or
npm install --save @wharfkit/starter
yarn add @wharfkit/starter-eos
# or
npm install --save @wharfkit/starter-eos
yarn add @wharfkit/starter-telos
# or
npm install --save @wharfkit/starter-telos
yarn add @wharfkit/starter-wax
# or
npm install --save @wharfkit/starter-wax
yarn add @wharfkit/starter-jungle
# or
npm install --save @wharfkit/starter-jungle
Once installed, you can start importing and using the core Wharfkit modules that you need in your project. For example:
import {SessionKit, ContractKit, AccountKit} from '@wharfkit/starter';
// ... or any additional modules that are needed
-
General Starter Kit: The
@wharfkit/starter
includes a pre-configuredSessionKit
instance that can be generated quickly using thecreateSessionKit
method. TheSessionKit
instance can then be used to transact with any of the main Antelope blockchains.import { createSessionKit } from '@wharfkit/starter'; const sessionKit = await createSessionKit(); await sessionKit.login(); // Send a login request that can be used to login to any of the main Antelope blockchains
-
Blockchain-Specific Kits: Similarly, the blockchain-specific starter kits have pre-configured
SessionKit
instances that can be used to transact with the designated blockchain.import { createSessionKit } from '@wharfkit/starter-jungle'; const sessionKit = await createSessionKit(); await sessionKit.login(); // Send a login request specific to Jungle accounts
For detailed guidance on how to use the sessionKit
instance, refer to the SessionKit documentation. This comprehensive resource provides insights and examples for effectively creating and utilizing Wharf session across different blockchain environments.
For blockchain-specific starter kits, you can also use the createContractKit
method to generate a pre-configured ContractKit
instance that are configured to work with the designated blockchain.
```ts
import { createContractKit } from '@wharfkit/starter-jungle';
const contractKit = await createContractKit();
const contract = await contractKit.load('eosio.token');
// loads the eosio.token contract that is deployed on Jungle 4 and instantiates a Contract instance
```
For detailed guidance on how to use the ContractKit
instances, refer to the ContractKit documentation.
For blockchain-specific starter kits, you can also use the createAccountKit
method to generate a pre-configured AccountKit
instance that is configured to work with the designated blockchain.
```ts
import { createAccountKit } from '@wharfkit/starter-jungle';
const accountKit = await createAccountKit();
const account = await accountKit.load('myaccount.gm');
// loads the myaccount.gm account that is deployed on Jungle 4 and instantiates an Account instance
```
For detailed guidance on how to use the AccountKit
instances, refer to the AccountKit documentation.