@samurailegends/origins
v0.6.3
Published
The official Samurai Legends library for their api/contracts origins
Downloads
4
Maintainers
Readme
Samurai Legends | Origins
Introduction
The purpose of this package is to make Smart Contracts and API Endpoints more accessible. This package can be used in any JavaScript project. The goal being that everyone can build projects without it becoming a clutter of hardcoded contracts.
Installation
npm
npm install @samurailegends/origins --save
yarn
yarn add @samurailegends/origins
pnpm
pnpm i @samurailegends/origins
How to use
The package in itself is simple to use, it compiles at the initial runtime to set the environmentally-based values.
Importing and usage
These values can be accessed like shown below:
import { contracts } from '@samurailegends/origins';
console.log(contracts.nfts('development').kunoichiNinja.main);
// -> 0xff3263f51103a09e94df4Db6fbd7085387CdceAe
// or (depending on the variable)
console.log(contracts.nfts('production').kunoichiNinja.main);
// -> 0xcf5C4C321CcA54251ec672c5AF7B32832cF6439C