Code Monkey home page Code Monkey logo

idl-to-typescript-generator's People

Contributors

zhe-t avatar mcintyre94 avatar 0xcen avatar

Stargazers

 avatar beeman avatar daksh avatar  avatar Thales avatar  avatar

Forkers

0xcen mcintyre94

idl-to-typescript-generator's Issues

TypeError: e.types is not iterable

I got a console error that e.types is not iterable

Example IDL
{
  "version": "0.1.0",
  "name": "pydraw",
  "instructions": [
    {
      "name": "createPixel",
      "accounts": [
        {
          "name": "pixel",
          "isMut": true,
          "isSigner": false,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "type": "string",
                "value": "pixel"
              },
              {
                "kind": "arg",
                "type": "u8",
                "path": "pos_x"
              },
              {
                "kind": "arg",
                "type": "u8",
                "path": "pos_y"
              }
            ]
          }
        },
        {
          "name": "user",
          "isMut": true,
          "isSigner": true
        },
        {
          "name": "rent",
          "isMut": false,
          "isSigner": false
        },
        {
          "name": "systemProgram",
          "isMut": false,
          "isSigner": false
        }
      ],
      "args": [
        {
          "name": "posX",
          "type": "u8"
        },
        {
          "name": "posY",
          "type": "u8"
        },
        {
          "name": "initColR",
          "type": "u8"
        },
        {
          "name": "initColG",
          "type": "u8"
        },
        {
          "name": "initColB",
          "type": "u8"
        }
      ]
    },
    {
      "name": "updatePixel",
      "accounts": [
        {
          "name": "pixel",
          "isMut": true,
          "isSigner": false
        }
      ],
      "args": [
        {
          "name": "newColR",
          "type": "u8"
        },
        {
          "name": "newColG",
          "type": "u8"
        },
        {
          "name": "newColB",
          "type": "u8"
        }
      ]
    }
  ],
  "accounts": [
    {
      "name": "Pixel",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "posX",
            "type": "u8"
          },
          {
            "name": "posY",
            "type": "u8"
          },
          {
            "name": "colR",
            "type": "u8"
          },
          {
            "name": "colG",
            "type": "u8"
          },
          {
            "name": "colB",
            "type": "u8"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    }
  ],
  "events": [
    {
      "name": "PixelChanged",
      "fields": [
        {
          "name": "posX",
          "type": "u8",
          "index": false
        },
        {
          "name": "posY",
          "type": "u8",
          "index": false
        },
        {
          "name": "colR",
          "type": "u8",
          "index": false
        },
        {
          "name": "colG",
          "type": "u8",
          "index": false
        },
        {
          "name": "colB",
          "type": "u8",
          "index": false
        }
      ]
    }
  ]
}

Comes from this Anchor program: https://github.com/mcintyre94/pydraw/tree/main/pydraw/programs/pydraw

Built using Anchor 0.28.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.