Getting started
Overview
ArkProject Core is a VanillaJS library for arkchain. You can learn more about the rationale behind the project in the What is the ArkProject section.
Package manager
Install the required packages.
pnpm add @arkproject/core
Create config
Create and export a new ArkProject config using createConfig.
import { createConfig, networks } from '@arkproject/core'
export const config = createConfig({
starknetNetwork: 'dev',
starknetExecutorContract: contracts.executor,
starknetCurrencyContract: contracts.eth,
})
Use ArkProject Core
Now that everything is set up, you can pass the config
to use actions.
import { createOffer } from '@arkproject/core'
import { config, account, brokerAddress } from './config'
const { orderHash } = await createOffer(config, {
account,
brokerAddress,
tokenAddress:
'0x02acee8c430f62333cf0e0e7a94b2347b5513b4c25f699461dd8d7b23c072478',
tokenId: BigInt(1),
amount: BigInt(1000),
})