stellar-turret-sdk

0.0.3 • Public • Published

stellar-turret-sdk

build status code coverage code style styled with prettier made with lass license npm downloads

An SDK to interact with stellar-turrets

Table of Contents

Install

npm:

npm install stellar-turret-sdk

yarn:

yarn add stellar-turret-sdk

Usage

import { TurretSDK } from 'stellar-turret-sdk';

(async () => {
  // Turret configuration to initialize.
  const config = { config: { domain_name: 'WORKER URL', auth_key: 'ACCOUNT SECRET KEY' }}
  const turret = new TurretSDK(config);
  // After creating the class you need to run setup method.
  await turret.setup()

  // Path to contract file.
  const contractPath = "path/to/file"
  // Array with function fields.
  const txFunctionFields = [
      {
          name: 'name',
          type: 'string',
          description: 'This is a param',
          rule: 'Required'
      }
  ]
  return await turret.uploadContract(contractPath, txFunctionFields);
})()
// script

Contributors

License

Package Sidebar

Install

npm i stellar-turret-sdk

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

36.2 kB

Total Files

22

Last publish

Collaborators

  • julianclatro