Procházet zdrojové kódy

Remove all renderers from the monorepo (#849)

Loris Leiva před 2 měsíci
rodič
revize
0d01e254b6
100 změnil soubory, kde provedl 1 přidání a 7762 odebrání
  1. 0 7
      .github/dependabot.yml
  2. 1 1
      packages/renderers-core/README.md
  3. 0 1
      packages/renderers-demo/.gitignore
  4. 0 5
      packages/renderers-demo/.prettierignore
  5. 0 22
      packages/renderers-demo/LICENSE
  6. 0 32
      packages/renderers-demo/README.md
  7. 0 72
      packages/renderers-demo/package.json
  8. 0 36
      packages/renderers-demo/src/fragments/accountPage.ts
  9. 0 28
      packages/renderers-demo/src/fragments/definedTypePage.ts
  10. 0 9
      packages/renderers-demo/src/fragments/index.ts
  11. 0 23
      packages/renderers-demo/src/fragments/instructionAccounts.ts
  12. 0 33
      packages/renderers-demo/src/fragments/instructionPage.ts
  13. 0 17
      packages/renderers-demo/src/fragments/pdaFunctionUsage.ts
  14. 0 22
      packages/renderers-demo/src/fragments/pdaPage.ts
  15. 0 33
      packages/renderers-demo/src/fragments/pdaSeeds.ts
  16. 0 12
      packages/renderers-demo/src/fragments/programErrors.ts
  17. 0 52
      packages/renderers-demo/src/fragments/programPage.ts
  18. 0 4
      packages/renderers-demo/src/index.ts
  19. 0 6
      packages/renderers-demo/src/types/global.d.ts
  20. 0 28
      packages/renderers-demo/src/utils/codecs.ts
  21. 0 86
      packages/renderers-demo/src/utils/fragment.ts
  22. 0 48
      packages/renderers-demo/src/utils/importMap.ts
  23. 0 4
      packages/renderers-demo/src/utils/index.ts
  24. 0 9
      packages/renderers-demo/src/utils/options.ts
  25. 0 90
      packages/renderers-demo/src/visitors/getRenderMapVisitor.ts
  26. 0 283
      packages/renderers-demo/src/visitors/getTypeVisitor.ts
  27. 0 106
      packages/renderers-demo/src/visitors/getValueVisitor.ts
  28. 0 4
      packages/renderers-demo/src/visitors/index.ts
  29. 0 18
      packages/renderers-demo/src/visitors/renderVisitor.ts
  30. 0 10
      packages/renderers-demo/test/e2e/system/codama.json
  31. 0 54
      packages/renderers-demo/test/e2e/system/docs/README.md
  32. 0 25
      packages/renderers-demo/test/e2e/system/docs/accounts/nonce.md
  33. 0 12
      packages/renderers-demo/test/e2e/system/docs/definedTypes/nonceState.md
  34. 0 12
      packages/renderers-demo/test/e2e/system/docs/definedTypes/nonceVersion.md
  35. 0 20
      packages/renderers-demo/test/e2e/system/docs/instructions/advanceNonceAccount.md
  36. 0 18
      packages/renderers-demo/test/e2e/system/docs/instructions/allocate.md
  37. 0 25
      packages/renderers-demo/test/e2e/system/docs/instructions/allocateWithSeed.md
  38. 0 18
      packages/renderers-demo/test/e2e/system/docs/instructions/assign.md
  39. 0 19
      packages/renderers-demo/test/e2e/system/docs/instructions/assignWithSeed.md
  40. 0 19
      packages/renderers-demo/test/e2e/system/docs/instructions/authorizeNonceAccount.md
  41. 0 24
      packages/renderers-demo/test/e2e/system/docs/instructions/createAccount.md
  42. 0 27
      packages/renderers-demo/test/e2e/system/docs/instructions/createAccountWithSeed.md
  43. 0 20
      packages/renderers-demo/test/e2e/system/docs/instructions/initializeNonceAccount.md
  44. 0 19
      packages/renderers-demo/test/e2e/system/docs/instructions/transferSol.md
  45. 0 20
      packages/renderers-demo/test/e2e/system/docs/instructions/transferSolWithSeed.md
  46. 0 18
      packages/renderers-demo/test/e2e/system/docs/instructions/upgradeNonceAccount.md
  47. 0 22
      packages/renderers-demo/test/e2e/system/docs/instructions/withdrawNonceAccount.md
  48. 0 1048
      packages/renderers-demo/test/e2e/system/idl.json
  49. 0 15
      packages/renderers-demo/test/e2e/system/package.json
  50. 0 5
      packages/renderers-demo/test/e2e/test.sh
  51. 0 10
      packages/renderers-demo/test/e2e/token/codama.json
  52. 0 79
      packages/renderers-demo/test/e2e/token/docs/README.md
  53. 0 20
      packages/renderers-demo/test/e2e/token/docs/accounts/mint.md
  54. 0 14
      packages/renderers-demo/test/e2e/token/docs/accounts/multisig.md
  55. 0 27
      packages/renderers-demo/test/e2e/token/docs/accounts/token.md
  56. 0 12
      packages/renderers-demo/test/e2e/token/docs/definedTypes/accountState.md
  57. 0 12
      packages/renderers-demo/test/e2e/token/docs/definedTypes/authorityType.md
  58. 0 27
      packages/renderers-demo/test/e2e/token/docs/instructions/amountToUiAmount.md
  59. 0 23
      packages/renderers-demo/test/e2e/token/docs/instructions/approve.md
  60. 0 28
      packages/renderers-demo/test/e2e/token/docs/instructions/approveChecked.md
  61. 0 23
      packages/renderers-demo/test/e2e/token/docs/instructions/burn.md
  62. 0 27
      packages/renderers-demo/test/e2e/token/docs/instructions/burnChecked.md
  63. 0 23
      packages/renderers-demo/test/e2e/token/docs/instructions/closeAccount.md
  64. 0 22
      packages/renderers-demo/test/e2e/token/docs/instructions/freezeAccount.md
  65. 0 24
      packages/renderers-demo/test/e2e/token/docs/instructions/getAccountDataSize.md
  66. 0 32
      packages/renderers-demo/test/e2e/token/docs/instructions/initializeAccount.md
  67. 0 25
      packages/renderers-demo/test/e2e/token/docs/instructions/initializeAccount2.md
  68. 0 21
      packages/renderers-demo/test/e2e/token/docs/instructions/initializeAccount3.md
  69. 0 26
      packages/renderers-demo/test/e2e/token/docs/instructions/initializeImmutableOwner.md
  70. 0 32
      packages/renderers-demo/test/e2e/token/docs/instructions/initializeMint.md
  71. 0 25
      packages/renderers-demo/test/e2e/token/docs/instructions/initializeMint2.md
  72. 0 31
      packages/renderers-demo/test/e2e/token/docs/instructions/initializeMultisig.md
  73. 0 20
      packages/renderers-demo/test/e2e/token/docs/instructions/initializeMultisig2.md
  74. 0 22
      packages/renderers-demo/test/e2e/token/docs/instructions/mintTo.md
  75. 0 26
      packages/renderers-demo/test/e2e/token/docs/instructions/mintToChecked.md
  76. 0 21
      packages/renderers-demo/test/e2e/token/docs/instructions/revoke.md
  77. 0 25
      packages/renderers-demo/test/e2e/token/docs/instructions/setAuthority.md
  78. 0 24
      packages/renderers-demo/test/e2e/token/docs/instructions/syncNative.md
  79. 0 22
      packages/renderers-demo/test/e2e/token/docs/instructions/thawAccount.md
  80. 0 24
      packages/renderers-demo/test/e2e/token/docs/instructions/transfer.md
  81. 0 29
      packages/renderers-demo/test/e2e/token/docs/instructions/transferChecked.md
  82. 0 25
      packages/renderers-demo/test/e2e/token/docs/instructions/uiAmountToAmount.md
  83. 0 2861
      packages/renderers-demo/test/e2e/token/idl.json
  84. 0 15
      packages/renderers-demo/test/e2e/token/package.json
  85. 0 7
      packages/renderers-demo/test/exports/commonjs.cjs
  86. 0 10
      packages/renderers-demo/test/exports/module.mjs
  87. 0 138
      packages/renderers-demo/test/fragments/accountPage.test.ts
  88. 0 70
      packages/renderers-demo/test/fragments/definedTypePage.test.ts
  89. 0 124
      packages/renderers-demo/test/fragments/instructionPage.test.ts
  90. 0 99
      packages/renderers-demo/test/fragments/pdaPage.test.ts
  91. 0 131
      packages/renderers-demo/test/fragments/programPage.test.ts
  92. 0 322
      packages/renderers-demo/test/visitors/getTypeVisitor.test.ts
  93. 0 130
      packages/renderers-demo/test/visitors/getValueVisitor.test.ts
  94. 0 10
      packages/renderers-demo/tsconfig.declarations.json
  95. 0 7
      packages/renderers-demo/tsconfig.json
  96. 0 5
      packages/renderers-demo/tsup.config.ts
  97. 0 8
      packages/renderers-demo/vitest.config.mts
  98. 0 1
      packages/renderers-js-umi/.gitignore
  99. 0 5
      packages/renderers-js-umi/.prettierignore
  100. 0 477
      packages/renderers-js-umi/CHANGELOG.md

+ 0 - 7
.github/dependabot.yml

@@ -7,10 +7,3 @@ updates:
       time: '01:00'
       timezone: America/Los_Angeles
     open-pull-requests-limit: 10
-  - package-ecosystem: 'npm'
-    directory: 'packages/renderers-js/e2e'
-    schedule:
-      interval: daily
-      time: '01:00'
-      timezone: America/Los_Angeles
-    open-pull-requests-limit: 10

+ 1 - 1
packages/renderers-core/README.md

@@ -7,7 +7,7 @@
 [npm-image]: https://img.shields.io/npm/v/@codama/renderers-core.svg?style=flat&label=%40codama%2Frenderers-core
 [npm-url]: https://www.npmjs.com/package/@codama/renderers-core
 
-This package provides the core utility for generating clients from Codama IDLs. Its aim is mainly to provide helpers for other renderer packages such as [`@codama/renderers-js`](../renderers-js) and [`@codama/renderers-rust`](../renderers-rust).
+This package provides the core utility for generating clients from Codama IDLs. Its aim is mainly to provide helpers for other renderer packages such as [`@codama/renderers-js`](https://github.com/codama-idl/renderers-js) and [`@codama/renderers-rust`](https://github.com/codama-idl/renderers-rust).
 
 ## Installation
 

+ 0 - 1
packages/renderers-demo/.gitignore

@@ -1 +0,0 @@
-dist/

+ 0 - 5
packages/renderers-demo/.prettierignore

@@ -1,5 +0,0 @@
-dist/
-test/e2e/
-test-ledger/
-target/
-CHANGELOG.md

+ 0 - 22
packages/renderers-demo/LICENSE

@@ -1,22 +0,0 @@
-MIT License
-
-Copyright (c) 2025 Codama
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 0 - 32
packages/renderers-demo/README.md

@@ -1,32 +0,0 @@
-# Codama ➤ Renderers ➤ Demo
-
-[![npm][npm-image]][npm-url]
-[![npm-downloads][npm-downloads-image]][npm-url]
-
-[npm-downloads-image]: https://img.shields.io/npm/dm/@codama/renderers-demo.svg?style=flat
-[npm-image]: https://img.shields.io/npm/v/@codama/renderers-demo.svg?style=flat&label=%40codama%2Frenderers-demo
-[npm-url]: https://www.npmjs.com/package/@codama/renderers-demo
-
-This package provides a demo implementation of a Codama renderer to help developers create their own.
-
-## Installation
-
-```sh
-pnpm install @codama/renderers-demo
-```
-
-## Usage
-
-Add the following script to your Codama configuration file.
-
-```json
-{
-    // ...
-    "scripts": {
-        "demo": {
-            "from": "@codama/renderers-demo",
-            "args": ["docs"]
-        }
-    }
-}
-```

+ 0 - 72
packages/renderers-demo/package.json

@@ -1,72 +0,0 @@
-{
-    "name": "@codama/renderers-demo",
-    "version": "1.0.2",
-    "description": "Demo renderer to help creating new ones",
-    "exports": {
-        "types": "./dist/types/index.d.ts",
-        "react-native": "./dist/index.react-native.mjs",
-        "browser": {
-            "import": "./dist/index.browser.mjs",
-            "require": "./dist/index.browser.cjs"
-        },
-        "node": {
-            "import": "./dist/index.node.mjs",
-            "require": "./dist/index.node.cjs"
-        }
-    },
-    "browser": {
-        "./dist/index.node.cjs": "./dist/index.browser.cjs",
-        "./dist/index.node.mjs": "./dist/index.browser.mjs"
-    },
-    "main": "./dist/index.node.cjs",
-    "module": "./dist/index.node.mjs",
-    "react-native": "./dist/index.react-native.mjs",
-    "types": "./dist/types/index.d.ts",
-    "type": "commonjs",
-    "files": [
-        "./dist/types",
-        "./dist/index.*"
-    ],
-    "sideEffects": false,
-    "keywords": [
-        "solana",
-        "framework",
-        "standard",
-        "renderers",
-        "demo"
-    ],
-    "scripts": {
-        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
-        "dev": "vitest --project node",
-        "lint": "eslint . && prettier --check .",
-        "lint:fix": "eslint --fix . && prettier --write .",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit && pnpm test:e2e && pnpm test:exports",
-        "test:e2e": "./test/e2e/test.sh",
-        "test:exports": "node ./test/exports/module.mjs && node ./test/exports/commonjs.cjs",
-        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
-        "test:types": "tsc --noEmit",
-        "test:unit": "vitest run"
-    },
-    "dependencies": {
-        "@codama/errors": "workspace:*",
-        "@codama/nodes": "workspace:*",
-        "@codama/renderers-core": "workspace:*",
-        "@codama/visitors-core": "workspace:*",
-        "@solana/codecs": "^3.0.3"
-    },
-    "devDependencies": {
-        "@codama/cli": "workspace:*"
-    },
-    "license": "MIT",
-    "repository": {
-        "type": "git",
-        "url": "https://github.com/codama-idl/codama"
-    },
-    "bugs": {
-        "url": "http://github.com/codama-idl/codama/issues"
-    },
-    "browserslist": [
-        "supports bigint and not dead",
-        "maintained node versions"
-    ]
-}

+ 0 - 36
packages/renderers-demo/src/fragments/accountPage.ts

@@ -1,36 +0,0 @@
-import { AccountNode, PdaNode, titleCase } from '@codama/nodes';
-import { visit } from '@codama/visitors-core';
-
-import {
-    Fragment,
-    fragment,
-    getCodeBlockFragment,
-    getFrontmatterFragment,
-    getPageFragment,
-    getTitleAndDescriptionFragment,
-} from '../utils';
-import { TypeVisitor } from '../visitors/getTypeVisitor';
-import { getPdaFunctionUsageFragment } from './pdaFunctionUsage';
-
-export function getAccountPageFragment(
-    node: AccountNode,
-    typeVisitor: TypeVisitor,
-    size?: number,
-    pda?: PdaNode,
-): Fragment {
-    const title = titleCase(node.name);
-    const type = visit(node, typeVisitor);
-
-    return getPageFragment(
-        [
-            getFrontmatterFragment(title, `Overview of the ${title} account`),
-            getTitleAndDescriptionFragment(title, node.docs),
-            fragment`## Account data`,
-            getCodeBlockFragment(type, 'ts'),
-            ...(size ? [fragment`This account has a fixed size of ${size} bytes.`] : []),
-            ...(pda ? [fragment`## PDA`, getCodeBlockFragment(getPdaFunctionUsageFragment(pda), 'ts')] : []),
-        ],
-        // Generated accounts are within the same directory.
-        { generatedAccounts: '.' },
-    );
-}

+ 0 - 28
packages/renderers-demo/src/fragments/definedTypePage.ts

@@ -1,28 +0,0 @@
-import { DefinedTypeNode, titleCase } from '@codama/nodes';
-import { visit } from '@codama/visitors-core';
-
-import {
-    Fragment,
-    fragment,
-    getCodeBlockFragment,
-    getFrontmatterFragment,
-    getPageFragment,
-    getTitleAndDescriptionFragment,
-} from '../utils';
-import { TypeVisitor } from '../visitors/getTypeVisitor';
-
-export function getDefinedTypePageFragment(node: DefinedTypeNode, typeVisitor: TypeVisitor): Fragment {
-    const title = titleCase(node.name);
-    const type = visit(node, typeVisitor);
-
-    return getPageFragment(
-        [
-            getFrontmatterFragment(title, `Overview of the ${title} type`),
-            getTitleAndDescriptionFragment(title, node.docs),
-            fragment`## Type definition`,
-            getCodeBlockFragment(type, 'ts'),
-        ],
-        // Generated types are within the same directory.
-        { generatedTypes: '.' },
-    );
-}

+ 0 - 9
packages/renderers-demo/src/fragments/index.ts

@@ -1,9 +0,0 @@
-export * from './accountPage';
-export * from './definedTypePage';
-export * from './instructionAccounts';
-export * from './instructionPage';
-export * from './pdaFunctionUsage';
-export * from './pdaPage';
-export * from './pdaSeeds';
-export * from './programErrors';
-export * from './programPage';

+ 0 - 23
packages/renderers-demo/src/fragments/instructionAccounts.ts

@@ -1,23 +0,0 @@
-import { camelCase, InstructionAccountNode } from '@codama/nodes';
-
-import { Fragment, getTableFragment } from '../utils';
-
-export function getInstructionAccountsFragment(accounts: InstructionAccountNode[]): Fragment | undefined {
-    if (accounts.length === 0) return;
-
-    const hasDescriptions = (accounts ?? []).some(account => account.docs && account.docs.length > 0);
-    const accountHeaders = ['Name', 'Signer', 'Writable', 'Required', ...(hasDescriptions ? ['Description'] : [])];
-    const accountRows = accounts.map(account => [
-        `\`${camelCase(account.name)}\``,
-        formatBoolean(account.isSigner ?? false),
-        formatBoolean(account.isWritable ?? false),
-        formatBoolean(!(account.isOptional ?? false)),
-        ...(hasDescriptions ? [(account.docs ?? []).join(' ')] : []),
-    ]);
-
-    return getTableFragment(accountHeaders, accountRows);
-}
-
-function formatBoolean(value: boolean | 'either') {
-    return value === 'either' ? value : value ? '✅' : '❌';
-}

+ 0 - 33
packages/renderers-demo/src/fragments/instructionPage.ts

@@ -1,33 +0,0 @@
-import { InstructionNode, titleCase } from '@codama/nodes';
-import { visit } from '@codama/visitors-core';
-
-import {
-    Fragment,
-    fragment,
-    getCodeBlockFragment,
-    getFrontmatterFragment,
-    getPageFragment,
-    getTitleAndDescriptionFragment,
-} from '../utils';
-import { TypeVisitor } from '../visitors/getTypeVisitor';
-import { getInstructionAccountsFragment } from './instructionAccounts';
-
-export function getInstructionPageFragment(node: InstructionNode, typeVisitor: TypeVisitor): Fragment {
-    const title = titleCase(node.name);
-    const type = visit(node, typeVisitor);
-    const accountsFragment = getInstructionAccountsFragment(node.accounts);
-    const hasArguments = node.arguments.length > 0;
-
-    return getPageFragment(
-        [
-            getFrontmatterFragment(title, `Overview of the ${title} instruction`),
-            getTitleAndDescriptionFragment(title, node.docs),
-            fragment`## Instruction accounts`,
-            accountsFragment ? accountsFragment : fragment`_This instruction has no accounts._`,
-            fragment`## Instruction arguments`,
-            hasArguments ? getCodeBlockFragment(type, 'ts') : fragment`_This instruction has no arguments._`,
-        ],
-        // Generated instructions are within the same directory.
-        { generatedInstructions: '.' },
-    );
-}

+ 0 - 17
packages/renderers-demo/src/fragments/pdaFunctionUsage.ts

@@ -1,17 +0,0 @@
-import { isNode, pascalCase, PdaNode } from '@codama/nodes';
-
-import { addFragmentImports, Fragment, fragment } from '../utils';
-
-export function getPdaFunctionUsageFragment(node: PdaNode): Fragment {
-    const functionName = `find${pascalCase(node.name)}Pda`;
-    const variableSeedNames = node.seeds.filter(s => isNode(s, 'variablePdaSeedNode')).map(s => s.name);
-    const seedObject =
-        variableSeedNames.length > 2
-            ? `{\n${variableSeedNames.join(',\n')},\n}`
-            : `{ ${variableSeedNames.join(', ')} }`;
-    return addFragmentImports(
-        fragment`const [address, bump] = await ${functionName}(${seedObject});`,
-        'generatedPdas',
-        pascalCase(node.name),
-    );
-}

+ 0 - 22
packages/renderers-demo/src/fragments/pdaPage.ts

@@ -1,22 +0,0 @@
-import { PdaNode, titleCase } from '@codama/nodes';
-
-import { Fragment, fragment, getFrontmatterFragment, getPageFragment, getTitleAndDescriptionFragment } from '../utils';
-import { TypeVisitor } from '../visitors/getTypeVisitor';
-import { ValueVisitor } from '../visitors/getValueVisitor';
-import { getPdaSeedsFragment } from './pdaSeeds';
-
-export function getPdaPageFragment(node: PdaNode, typeVisitor: TypeVisitor, valueVisitor: ValueVisitor): Fragment {
-    const title = `${titleCase(node.name)} PDA`;
-    const seeds = getPdaSeedsFragment(node.seeds, typeVisitor, valueVisitor);
-
-    return getPageFragment(
-        [
-            getFrontmatterFragment(title, `Overview of the ${title}`),
-            getTitleAndDescriptionFragment(title, node.docs),
-            fragment`## Seeds`,
-            seeds ? seeds : fragment`_This PDA has no seeds._`,
-        ],
-        // Generated PDAs are within the same directory.
-        { generatedPdas: '.' },
-    );
-}

+ 0 - 33
packages/renderers-demo/src/fragments/pdaSeeds.ts

@@ -1,33 +0,0 @@
-import { camelCase, isNode, PdaSeedNode } from '@codama/nodes';
-import { mapFragmentContent } from '@codama/renderers-core';
-import { pipe, visit } from '@codama/visitors-core';
-
-import { Fragment, getTableFragment } from '../utils';
-import { TypeVisitor } from '../visitors/getTypeVisitor';
-import { ValueVisitor } from '../visitors/getValueVisitor';
-
-export function getPdaSeedsFragment(
-    seeds: PdaSeedNode[],
-    typeVisitor: TypeVisitor,
-    valueVisitor: ValueVisitor,
-): Fragment | undefined {
-    if (seeds.length === 0) return;
-
-    const seedHeaders = ['Seed', 'Type', 'Value'];
-    const seedRows = seeds.map(seed => {
-        const type = pipe(
-            visit(seed.type, typeVisitor),
-            f => mapFragmentContent(f, c => c.replace(/\n\s*/g, ' ')),
-            f => mapFragmentContent(f, c => `\`${c}\``),
-        );
-
-        if (isNode(seed, 'variablePdaSeedNode')) {
-            return [`\`${camelCase(seed.name)}\``, type, seed.docs?.join(' ') ?? ''];
-        }
-
-        const value = pipe(visit(seed.value, valueVisitor), f => mapFragmentContent(f, c => `\`${c}\``));
-        return ['_constant_', type, value];
-    });
-
-    return getTableFragment(seedHeaders, seedRows);
-}

+ 0 - 12
packages/renderers-demo/src/fragments/programErrors.ts

@@ -1,12 +0,0 @@
-import { ErrorNode, titleCase } from '@codama/nodes';
-
-import { Fragment, getTableFragment } from '../utils';
-
-export function getProgramErrorsFragment(errors: ErrorNode[]): Fragment | undefined {
-    if (errors.length === 0) return;
-
-    const errorHeaders = ['Name', 'Code', 'Message'];
-    const errorRows = errors.map(error => [titleCase(error.name), `\`${error.code}\``, error.message]);
-
-    return getTableFragment(errorHeaders, errorRows);
-}

+ 0 - 52
packages/renderers-demo/src/fragments/programPage.ts

@@ -1,52 +0,0 @@
-import { camelCase, ProgramNode, titleCase } from '@codama/nodes';
-import { joinPath } from '@codama/renderers-core';
-
-import {
-    Fragment,
-    fragment,
-    getFrontmatterFragment,
-    getPageFragment,
-    getTitleAndDescriptionFragment,
-    mergeFragments,
-} from '../utils';
-import { getProgramErrorsFragment } from './programErrors';
-
-export function getProgramPageFragment(node: ProgramNode): Fragment {
-    const title = `${titleCase(node.name)} Program`;
-    const errors = getProgramErrorsFragment(node.errors);
-
-    return getPageFragment(
-        [
-            getFrontmatterFragment(title, `Overview of the ${title}`),
-            getTitleAndDescriptionFragment(title, node.docs),
-            fragment`## Information`,
-            fragment`- Address: \`${node.publicKey}\`\n- Version: \`${node.version}\``,
-            fragment`## Accounts`,
-            getLinksFragment(node.accounts, 'accounts'),
-            fragment`## Instructions`,
-            getLinksFragment(node.instructions, 'instructions'),
-            fragment`## PDAs`,
-            getLinksFragment(node.pdas, 'pdas', 'PDAs'),
-            fragment`## Defined types`,
-            getLinksFragment(node.definedTypes, 'definedTypes', 'defined types'),
-            fragment`## Errors`,
-            errors ? errors : fragment`_This program has no errors._`,
-        ],
-        // Generated items are nested in sibling directories.
-        {
-            generatedAccounts: 'accounts',
-            generatedInstructions: 'instructions',
-            generatedPdas: 'pdas',
-            generatedTypes: 'types',
-        },
-    );
-}
-
-function getLinksFragment(items: { name: string }[], folder: string, identifier?: string): Fragment {
-    if (items.length === 0) return fragment`_This program has no ${identifier ?? folder}._`;
-    const links = items.map(item => {
-        const link = joinPath(folder, `${camelCase(item.name)}.md`);
-        return fragment`- [${titleCase(item.name)}](${link})`;
-    });
-    return mergeFragments(links, cs => cs.join('\n'));
-}

+ 0 - 4
packages/renderers-demo/src/index.ts

@@ -1,4 +0,0 @@
-export * from './visitors/getRenderMapVisitor';
-export * from './visitors/renderVisitor';
-
-export { renderVisitor as default } from './visitors/renderVisitor';

+ 0 - 6
packages/renderers-demo/src/types/global.d.ts

@@ -1,6 +0,0 @@
-declare const __BROWSER__: boolean;
-declare const __ESM__: boolean;
-declare const __NODEJS__: boolean;
-declare const __REACTNATIVE__: boolean;
-declare const __TEST__: boolean;
-declare const __VERSION__: string;

+ 0 - 28
packages/renderers-demo/src/utils/codecs.ts

@@ -1,28 +0,0 @@
-import { BytesEncoding } from '@codama/nodes';
-import {
-    getBase16Decoder,
-    getBase16Encoder,
-    getBase58Encoder,
-    getBase64Encoder,
-    getUtf8Encoder,
-    ReadonlyUint8Array,
-} from '@solana/codecs';
-
-export function encodeStringValue(encoding: BytesEncoding, data: string): ReadonlyUint8Array {
-    switch (encoding) {
-        case 'utf8':
-            return getUtf8Encoder().encode(data);
-        case 'base16':
-            return getBase16Encoder().encode(data);
-        case 'base58':
-            return getBase58Encoder().encode(data);
-        case 'base64':
-        default:
-            return getBase64Encoder().encode(data);
-    }
-}
-
-export function getStringValueAsHexadecimals(encoding: BytesEncoding, data: string): string {
-    if (encoding === 'base16') return '0x' + data;
-    return '0x' + getBase16Decoder().decode(encodeStringValue(encoding, data));
-}

+ 0 - 86
packages/renderers-demo/src/utils/fragment.ts

@@ -1,86 +0,0 @@
-import { Docs } from '@codama/nodes';
-import { BaseFragment, createFragmentTemplate, mapFragmentContent, Path } from '@codama/renderers-core';
-
-import {
-    addToImportMap,
-    createImportMap,
-    getImportMapLinks,
-    ImportMap,
-    mergeImportMaps,
-    PathOverrides,
-} from './importMap';
-
-export type Fragment = BaseFragment & Readonly<{ imports: ImportMap }>;
-
-function createFragment(content: string): Fragment {
-    return Object.freeze({ content, imports: createImportMap() });
-}
-
-function isFragment(value: unknown): value is Fragment {
-    return typeof value === 'object' && value !== null && 'content' in value;
-}
-
-export function fragment(template: TemplateStringsArray, ...items: unknown[]): Fragment {
-    return createFragmentTemplate(template, items, isFragment, mergeFragments);
-}
-
-export function mergeFragments(
-    fragments: (Fragment | undefined)[],
-    mergeContent: (contents: string[]) => string,
-): Fragment {
-    const filteredFragments = fragments.filter((f): f is Fragment => f !== undefined);
-    return Object.freeze({
-        content: mergeContent(filteredFragments.map(fragment => fragment.content)),
-        imports: mergeImportMaps(filteredFragments.map(fragment => fragment.imports)),
-    });
-}
-
-export function addFragmentImports(fragment: Fragment, path: Path, names: string[] | string): Fragment {
-    return Object.freeze({ ...fragment, imports: addToImportMap(fragment.imports, path, names) });
-}
-
-export function getFrontmatterFragment(title: string, description: string): Fragment {
-    return fragment`---\ntitle: ${title}\ndescription: ${description}\n---`;
-}
-
-export function getTitleAndDescriptionFragment(title: string, docs?: Docs): Fragment {
-    return mergeFragments(
-        [fragment`# ${title}`, docs && docs.length > 0 ? fragment`${docs.join('\n')}` : undefined],
-        cs => cs.join('\n\n'),
-    );
-}
-
-export function getCodeBlockFragment(code: Fragment, language: string = ''): Fragment {
-    return mapFragmentContent(code, c => `\`\`\`${language}\n${c}\n\`\`\``);
-}
-
-export function getTableFragment(headers: (Fragment | string)[], rows: (Fragment | string)[][]): Fragment {
-    const toFragment = (cell: Fragment | string) => (typeof cell === 'string' ? createFragment(cell) : cell);
-    const headerFragments = headers.map(toFragment);
-    const rowFragments = rows.map(row => row.map(toFragment));
-    const colWidths = headerFragments.map((header, colIndex) =>
-        Math.max(header.content.length, ...rowFragments.map(row => row[colIndex]?.content?.length ?? 0)),
-    );
-    const padCells = (f: Fragment, colIndex: number) => mapFragmentContent(f, c => c.padEnd(colWidths[colIndex] ?? 0));
-    const mergeCells = (fs: Fragment[]) => mergeFragments(fs, cs => cs.join(' | '));
-    const lines = [
-        mergeCells(headerFragments.map(padCells)),
-        mergeCells(headerFragments.map((_, colIndex) => createFragment('-'.repeat(colWidths[colIndex])))),
-        ...rowFragments.map(row => mergeCells(row.map(padCells))),
-    ];
-    return mergeFragments(
-        lines.map(line => mapFragmentContent(line, c => `| ${c} |`)),
-        cs => cs.join('\n'),
-    );
-}
-
-export function getCommentFragment(lines: string[]): Fragment {
-    return fragment`<!--\n${lines.join('\n')}\n-->`;
-}
-
-export function getPageFragment(fragments: Fragment[], pathOverrides: PathOverrides = {}): Fragment {
-    const page = mergeFragments(fragments, cs => cs.join('\n\n'));
-    const links = getImportMapLinks(page.imports, pathOverrides);
-    if (links.length === 0) return page;
-    return fragment`${page}\n\n## See also\n\n${links.join('\n')}`;
-}

+ 0 - 48
packages/renderers-demo/src/utils/importMap.ts

@@ -1,48 +0,0 @@
-import { camelCase } from '@codama/nodes';
-import { joinPath, Path } from '@codama/renderers-core';
-
-export type ImportMap = ReadonlyMap<Path, ReadonlySet<string>>;
-
-export function createImportMap(imports: [Path, string[] | string][] = []): ImportMap {
-    return Object.freeze(
-        new Map(imports.map(([path, names]) => [path, new Set(typeof names === 'string' ? [names] : names)])),
-    );
-}
-
-export function addToImportMap(map: ImportMap, path: Path, names: string[] | string): ImportMap {
-    return mergeImportMaps([map, createImportMap([[path, names]])]);
-}
-
-export function mergeImportMaps(importMaps: ImportMap[]): ImportMap {
-    const merged = new Map(importMaps[0]);
-    for (const map of importMaps.slice(1)) {
-        for (const [key, value] of map) {
-            merged.set(key, new Set([...(merged.get(key) ?? []), ...value]));
-        }
-    }
-    return Object.freeze(merged);
-}
-
-export type PathOverrides = Record<Path, Path>;
-
-export function getImportMapLinks(importMap: ImportMap, pathOverrides: PathOverrides = {}): string[] {
-    return [...resolvePaths(importMap, pathOverrides).entries()].flatMap(([path, names]) =>
-        [...names].map(name => `- [${name}](${joinPath(path, camelCase(name))}.md)`),
-    );
-}
-
-function resolvePaths(importMap: ImportMap, pathOverrides: PathOverrides = {}): ImportMap {
-    const DEFAULT_PATH_OVERRIDES: PathOverrides = {
-        generatedAccounts: joinPath('..', 'accounts'),
-        generatedInstructions: joinPath('..', 'instructions'),
-        generatedPdas: joinPath('..', 'pdas'),
-        generatedTypes: joinPath('..', 'types'),
-    };
-
-    pathOverrides = { ...DEFAULT_PATH_OVERRIDES, ...pathOverrides };
-    const newEntries = [...importMap.entries()].map(([path, names]) => {
-        return [pathOverrides[path] ?? path, names] as const;
-    });
-
-    return Object.freeze(new Map(newEntries));
-}

+ 0 - 4
packages/renderers-demo/src/utils/index.ts

@@ -1,4 +0,0 @@
-export * from './codecs';
-export * from './fragment';
-export * from './importMap';
-export * from './options';

+ 0 - 9
packages/renderers-demo/src/utils/options.ts

@@ -1,9 +0,0 @@
-export type RenderOptions = RenderMapOptions & {
-    deleteFolderBeforeRendering?: boolean;
-};
-
-export type RenderMapOptions = {
-    extension?: string;
-    indexFilename?: string;
-    typeIndent?: string;
-};

+ 0 - 90
packages/renderers-demo/src/visitors/getRenderMapVisitor.ts

@@ -1,90 +0,0 @@
-import { camelCase } from '@codama/nodes';
-import { createRenderMap, mergeRenderMaps } from '@codama/renderers-core';
-import {
-    extendVisitor,
-    getByteSizeVisitor,
-    LinkableDictionary,
-    NodeStack,
-    pipe,
-    recordLinkablesOnFirstVisitVisitor,
-    recordNodeStackVisitor,
-    staticVisitor,
-    visit,
-} from '@codama/visitors-core';
-
-import {
-    getAccountPageFragment,
-    getDefinedTypePageFragment,
-    getInstructionPageFragment,
-    getPdaPageFragment,
-    getProgramPageFragment,
-} from '../fragments';
-import { RenderMapOptions } from '../utils';
-import { getTypeVisitor } from './getTypeVisitor';
-import { getValueVisitor } from './getValueVisitor';
-
-export function getRenderMapVisitor(options: RenderMapOptions = {}) {
-    const linkables = new LinkableDictionary();
-    const stack = new NodeStack();
-
-    const extension = options.extension ?? 'md';
-    const indexFilename = options.indexFilename ?? 'README';
-    const typeVisitor = getTypeVisitor({ stack, typeIndent: options.typeIndent });
-    const valueVisitor = getValueVisitor({ stack });
-    const byteSizeVisitor = getByteSizeVisitor(linkables, { stack });
-
-    return pipe(
-        staticVisitor(() => createRenderMap(), {
-            keys: ['rootNode', 'programNode', 'pdaNode', 'accountNode', 'definedTypeNode', 'instructionNode'],
-        }),
-        v =>
-            extendVisitor(v, {
-                visitAccount(node) {
-                    const pda = node.pda ? linkables.get([...stack.getPath(), node.pda]) : undefined;
-                    const size = visit(node, byteSizeVisitor);
-                    return createRenderMap(
-                        `accounts/${camelCase(node.name)}.${extension}`,
-                        getAccountPageFragment(node, typeVisitor, size ?? undefined, pda),
-                    );
-                },
-
-                visitDefinedType(node) {
-                    return createRenderMap(
-                        `definedTypes/${camelCase(node.name)}.${extension}`,
-                        getDefinedTypePageFragment(node, typeVisitor),
-                    );
-                },
-
-                visitInstruction(node) {
-                    return createRenderMap(
-                        `instructions/${camelCase(node.name)}.${extension}`,
-                        getInstructionPageFragment(node, typeVisitor),
-                    );
-                },
-
-                visitPda(node) {
-                    return createRenderMap(
-                        `pdas/${camelCase(node.name)}.${extension}`,
-                        getPdaPageFragment(node, typeVisitor, valueVisitor),
-                    );
-                },
-
-                visitProgram(node, { self }) {
-                    return mergeRenderMaps([
-                        createRenderMap(`${indexFilename}.${extension}`, getProgramPageFragment(node)),
-                        ...node.accounts.map(n => visit(n, self)),
-                        ...node.definedTypes.map(n => visit(n, self)),
-                        ...node.instructions.map(n => visit(n, self)),
-                        ...node.pdas.map(n => visit(n, self)),
-                    ]);
-                },
-
-                visitRoot(node, { self }) {
-                    // Here, we ignore `node.additionalPrograms` for simplicity.
-                    return visit(node.program, self);
-                },
-            }),
-        v => recordNodeStackVisitor(v, stack),
-        v => recordLinkablesOnFirstVisitVisitor(v, linkables),
-    );
-}

+ 0 - 283
packages/renderers-demo/src/visitors/getTypeVisitor.ts

@@ -1,283 +0,0 @@
-import {
-    camelCase,
-    definedTypeNode,
-    enumStructVariantTypeNode,
-    isNode,
-    isScalarEnum,
-    pascalCase,
-    REGISTERED_TYPE_NODE_KINDS,
-    resolveNestedTypeNode,
-    structFieldTypeNode,
-    structTypeNode,
-    structTypeNodeFromInstructionArgumentNodes,
-} from '@codama/nodes';
-import {
-    extendVisitor,
-    findLastNodeFromPath,
-    NodeStack,
-    pipe,
-    recordNodeStackVisitor,
-    staticVisitor,
-    visit,
-} from '@codama/visitors-core';
-
-import { addFragmentImports, Fragment, fragment, mergeFragments } from '../utils';
-
-export type TypeVisitor = ReturnType<typeof getTypeVisitor>;
-
-export function getTypeVisitor(input: { stack?: NodeStack; typeIndent?: string } = {}) {
-    const typeIndent = input.typeIndent ?? '    ';
-    const stack = input.stack ?? new NodeStack();
-
-    // Keeps track of the indentation level.
-    let indentLevel = 0;
-    const indent = () => typeIndent.repeat(indentLevel);
-    const shouldInline = (fragment: Fragment) => {
-        if (fragment.content.includes('\n')) return false;
-        return indent().length + fragment.content.length <= 100;
-    };
-
-    return pipe(
-        staticVisitor(() => fragment``, {
-            keys: [
-                ...REGISTERED_TYPE_NODE_KINDS,
-                'definedTypeLinkNode',
-                'definedTypeNode',
-                'accountNode',
-                'instructionNode',
-            ],
-        }),
-        visitor =>
-            extendVisitor(visitor, {
-                visitAccount(node, { self }) {
-                    return visit(definedTypeNode({ name: node.name, type: node.data }), self);
-                },
-
-                visitAmountType(node, { self }) {
-                    // Here, we ignore decimal and unit information for simplicity.
-                    return visit(node.number, self);
-                },
-
-                visitArrayType(node, { self }) {
-                    return fragment`Array<${visit(node.item, self)}>`;
-                },
-
-                visitBooleanType() {
-                    return fragment`boolean`;
-                },
-
-                visitBytesType() {
-                    return fragment`bytes`;
-                },
-
-                visitDateTimeType(node, { self }) {
-                    // Here, we ignore DateTime information for simplicity.
-                    return visit(node.number, self);
-                },
-
-                visitDefinedType(node, { self }) {
-                    const type = visit(node.type, self);
-                    return isNode(node.type, 'enumTypeNode') && isScalarEnum(node.type)
-                        ? fragment`enum ${pascalCase(node.name)} ${type}`
-                        : fragment`type ${pascalCase(node.name)} = ${type}`;
-                },
-
-                visitDefinedTypeLink(node) {
-                    const typeName = pascalCase(node.name);
-                    return addFragmentImports(fragment`${typeName}`, 'generatedTypes', typeName);
-                },
-
-                visitEnumEmptyVariantType(node) {
-                    const nodePath = stack.getPath('enumEmptyVariantTypeNode');
-                    const enumParent = findLastNodeFromPath(nodePath, 'enumTypeNode');
-                    if (!enumParent) throw new Error('Enum parent not found');
-
-                    if (isScalarEnum(enumParent)) return fragment`${pascalCase(node.name)}`;
-                    return fragment`{ __kind: "${pascalCase(node.name)}" }`;
-                },
-
-                visitEnumStructVariantType(node, { self }) {
-                    const fields = resolveNestedTypeNode(node.struct).fields;
-                    const kindField = fragment`__kind: "${pascalCase(node.name)}"`;
-
-                    const inlinedStruct = pipe(
-                        fields.map(field => visit(field, self)),
-                        fs => [kindField, ...fs],
-                        fs => mergeFragments(fs, cs => `{ ${cs.join('; ')} }`),
-                    );
-                    if (shouldInline(inlinedStruct)) return inlinedStruct;
-
-                    indentLevel++;
-                    const result = pipe(
-                        fields.map(field => visit(field, self)),
-                        fs => [kindField, ...fs],
-                        fs => mergeFragments(fs, cs => cs.map(c => `${indent()}${c};\n`).join('')),
-                    );
-                    indentLevel--;
-                    return fragment`{\n${result}${indent()}}`;
-                },
-
-                visitEnumTupleVariantType(node, { self }) {
-                    const structVariant = enumStructVariantTypeNode(
-                        node.name,
-                        structTypeNode([structFieldTypeNode({ name: 'fields', type: node.tuple })]),
-                        node.discriminator,
-                    );
-                    return visit(structVariant, self);
-                },
-
-                visitEnumType(node, { self }) {
-                    if (isScalarEnum(node)) {
-                        const inlinedEnum = pipe(
-                            node.variants.map(v => visit(v, self)),
-                            fs => mergeFragments(fs, cs => `{ ${cs.join(', ')} }`),
-                        );
-                        if (shouldInline(inlinedEnum)) return inlinedEnum;
-
-                        indentLevel++;
-                        const variants = pipe(
-                            node.variants.map(field => visit(field, self)),
-                            fs => mergeFragments(fs, cs => cs.map(c => `${indent()}${c},\n`).join('')),
-                        );
-                        indentLevel--;
-                        return fragment`{\n${variants}${indent()}}`;
-                    }
-
-                    const inlinedEnum = pipe(
-                        node.variants.map(v => visit(v, self)),
-                        fs => mergeFragments(fs, cs => cs.join(' | ')),
-                    );
-                    if (shouldInline(inlinedEnum)) return inlinedEnum;
-
-                    indentLevel++;
-                    const variants = pipe(
-                        node.variants.map(field => visit(field, self)),
-                        fs => mergeFragments(fs, cs => cs.map(c => `| ${c}`).join(`\n${indent()}`)),
-                    );
-                    indentLevel--;
-                    return variants;
-                },
-
-                visitFixedSizeType(node, { self }) {
-                    // Here, we ignore fixed size information for simplicity.
-                    return visit(node.type, self);
-                },
-
-                visitHiddenPrefixType(node, { self }) {
-                    // Here, we ignore hidden prefix information for simplicity.
-                    return visit(node.type, self);
-                },
-
-                visitHiddenSuffixType(node, { self }) {
-                    // Here, we ignore hidden suffix information for simplicity.
-                    return visit(node.type, self);
-                },
-
-                visitInstruction(node, { self }) {
-                    const definedTypeArguments = definedTypeNode({
-                        name: `${camelCase(node.name)}Instruction`,
-                        type: structTypeNodeFromInstructionArgumentNodes(node.arguments),
-                    });
-                    return visit(definedTypeArguments, self);
-                },
-
-                visitMapType(node, { self }) {
-                    const key = visit(node.key, self);
-                    const value = visit(node.value, self);
-                    return fragment`Map<${key}, ${value}>`;
-                },
-
-                visitNumberType(node) {
-                    return fragment`number /* ${node.format} */`;
-                },
-
-                visitOptionType(node, { self }) {
-                    return fragment`Option<${visit(node.item, self)}>`;
-                },
-
-                visitPostOffsetType(node, { self }) {
-                    // Here, we ignore post offset information for simplicity.
-                    return visit(node.type, self);
-                },
-
-                visitPreOffsetType(node, { self }) {
-                    // Here, we ignore pre offset information for simplicity.
-                    return visit(node.type, self);
-                },
-
-                visitPublicKeyType() {
-                    return fragment`Address`;
-                },
-
-                visitRemainderOptionType(node, { self }) {
-                    return fragment`Option<${visit(node.item, self)}>`;
-                },
-
-                visitSentinelType(node, { self }) {
-                    // Here, we ignore sentinel information for simplicity.
-                    return visit(node.type, self);
-                },
-
-                visitSetType(node, { self }) {
-                    return fragment`Set<${visit(node.item, self)}>`;
-                },
-
-                visitSizePrefixType(node, { self }) {
-                    // Here, we ignore size prefix information for simplicity.
-                    return visit(node.type, self);
-                },
-
-                visitSolAmountType(node, { self }) {
-                    // Here, we ignore sol amount information for simplicity.
-                    return visit(node.number, self);
-                },
-
-                visitStringType() {
-                    return fragment`string`;
-                },
-
-                visitStructFieldType(node, { self }) {
-                    return fragment`${camelCase(node.name)}: ${visit(node.type, self)}`;
-                },
-
-                visitStructType(node, { self }) {
-                    if (node.fields.length === 0) return fragment`{}`;
-
-                    const inlinedStruct = pipe(
-                        node.fields.map(field => visit(field, self)),
-                        fs => mergeFragments(fs, cs => `{ ${cs.join('; ')} }`),
-                    );
-                    if (shouldInline(inlinedStruct)) return inlinedStruct;
-
-                    indentLevel++;
-                    const fields = pipe(
-                        node.fields.map(field => visit(field, self)),
-                        fs => mergeFragments(fs, cs => cs.map(c => `${indent()}${c};\n`).join('')),
-                    );
-                    indentLevel--;
-                    return fragment`{\n${fields}${indent()}}`;
-                },
-
-                visitTupleType(node, { self }) {
-                    const inlinedTuple = pipe(
-                        node.items.map(item => visit(item, self)),
-                        fs => mergeFragments(fs, cs => `[${cs.join(', ')}]`),
-                    );
-                    if (shouldInline(inlinedTuple)) return inlinedTuple;
-
-                    indentLevel++;
-                    const items = pipe(
-                        node.items.map(item => visit(item, self)),
-                        fs => mergeFragments(fs, cs => cs.map(c => `${indent()}${c},\n`).join('')),
-                    );
-                    indentLevel--;
-                    return fragment`[\n${items}${indent()}]`;
-                },
-
-                visitZeroableOptionType(node, { self }) {
-                    return fragment`Option<${visit(node.item, self)}>`;
-                },
-            }),
-        visitor => recordNodeStackVisitor(visitor, stack),
-    );
-}

+ 0 - 106
packages/renderers-demo/src/visitors/getValueVisitor.ts

@@ -1,106 +0,0 @@
-import { pascalCase, REGISTERED_VALUE_NODE_KINDS } from '@codama/nodes';
-import { extendVisitor, NodeStack, pipe, recordNodeStackVisitor, staticVisitor, visit } from '@codama/visitors-core';
-
-import { addFragmentImports, fragment, getStringValueAsHexadecimals, mergeFragments } from '../utils';
-
-export type ValueVisitor = ReturnType<typeof getValueVisitor>;
-
-export function getValueVisitor(input: { stack?: NodeStack } = {}) {
-    const stack = input.stack ?? new NodeStack();
-
-    return pipe(
-        staticVisitor(() => fragment``, {
-            keys: [...REGISTERED_VALUE_NODE_KINDS, 'programIdValueNode'],
-        }),
-        visitor =>
-            extendVisitor(visitor, {
-                visitArrayValue(node, { self }) {
-                    return mergeFragments(
-                        node.items.map(item => visit(item, self)),
-                        cs => `[${cs.join(', ')}]`,
-                    );
-                },
-
-                visitBooleanValue(node) {
-                    return fragment`${node.boolean ? 'true' : 'false'}`;
-                },
-
-                visitBytesValue(node) {
-                    return fragment`${getStringValueAsHexadecimals(node.encoding, node.data)}`;
-                },
-
-                visitConstantValue(node, { self }) {
-                    return visit(node.value, self);
-                },
-
-                visitEnumValue(node) {
-                    const enumName = pascalCase(node.enum.name);
-                    const enumType = addFragmentImports(fragment`${enumName}`, 'generatedTypes', enumName);
-                    return fragment`${enumType}.${pascalCase(node.variant)}`;
-                },
-
-                visitMapEntryValue(node, { self }) {
-                    const key = visit(node.key, self);
-                    const value = visit(node.value, self);
-                    return fragment`[${key}, ${value}]`;
-                },
-
-                visitMapValue(node, { self }) {
-                    return mergeFragments(
-                        node.entries.map(entry => visit(entry, self)),
-                        cs => `new Map([${cs.join(', ')}])`,
-                    );
-                },
-
-                visitNoneValue() {
-                    return fragment`null`;
-                },
-
-                visitNumberValue(node) {
-                    return fragment`${node.number}`;
-                },
-
-                visitProgramIdValue() {
-                    return fragment`programId`;
-                },
-
-                visitPublicKeyValue(node) {
-                    return fragment`"${node.publicKey}"`;
-                },
-
-                visitSetValue(node, { self }) {
-                    return mergeFragments(
-                        node.items.map(item => visit(item, self)),
-                        cs => `new Set([${cs.join(', ')}])`,
-                    );
-                },
-
-                visitSomeValue(node, { self }) {
-                    return visit(node.value, self);
-                },
-
-                visitStringValue(node) {
-                    return fragment`"${node.string}"`;
-                },
-
-                visitStructFieldValue(node, { self }) {
-                    return fragment`${node.name}: ${visit(node.value, self)}`;
-                },
-
-                visitStructValue(node, { self }) {
-                    return mergeFragments(
-                        node.fields.map(field => visit(field, self)),
-                        cs => (cs.length > 0 ? `{ ${cs.join(', ')} }` : '{}'),
-                    );
-                },
-
-                visitTupleValue(node, { self }) {
-                    return mergeFragments(
-                        node.items.map(item => visit(item, self)),
-                        cs => `[${cs.join(', ')}]`,
-                    );
-                },
-            }),
-        visitor => recordNodeStackVisitor(visitor, stack),
-    );
-}

+ 0 - 4
packages/renderers-demo/src/visitors/index.ts

@@ -1,4 +0,0 @@
-export * from './getRenderMapVisitor';
-export * from './getTypeVisitor';
-export * from './getValueVisitor';
-export * from './renderVisitor';

+ 0 - 18
packages/renderers-demo/src/visitors/renderVisitor.ts

@@ -1,18 +0,0 @@
-import { deleteDirectory, writeRenderMap } from '@codama/renderers-core';
-import { rootNodeVisitor, visit } from '@codama/visitors-core';
-
-import { RenderOptions } from '../utils/options';
-import { getRenderMapVisitor } from './getRenderMapVisitor';
-
-export function renderVisitor(path: string, options: RenderOptions = {}) {
-    return rootNodeVisitor(root => {
-        // Delete existing generated folder.
-        if (options.deleteFolderBeforeRendering ?? true) {
-            deleteDirectory(path);
-        }
-
-        // Render the new files.
-        const renderMap = visit(root, getRenderMapVisitor(options));
-        writeRenderMap(renderMap, path);
-    });
-}

+ 0 - 10
packages/renderers-demo/test/e2e/system/codama.json

@@ -1,10 +0,0 @@
-{
-    "idl": "idl.json",
-    "before": [],
-    "scripts": {
-        "demo": {
-            "from": "@codama/renderers-demo",
-            "args": ["docs"]
-        }
-    }
-}

+ 0 - 54
packages/renderers-demo/test/e2e/system/docs/README.md

@@ -1,54 +0,0 @@
----
-title: System Program
-description: Overview of the System Program
----
-
-# System Program
-
-## Information
-
-- Address: `11111111111111111111111111111111`
-- Version: `0.0.1`
-
-## Accounts
-
-- [Nonce](accounts/nonce.md)
-
-## Instructions
-
-- [Create Account](instructions/createAccount.md)
-- [Assign](instructions/assign.md)
-- [Transfer Sol](instructions/transferSol.md)
-- [Create Account With Seed](instructions/createAccountWithSeed.md)
-- [Advance Nonce Account](instructions/advanceNonceAccount.md)
-- [Withdraw Nonce Account](instructions/withdrawNonceAccount.md)
-- [Initialize Nonce Account](instructions/initializeNonceAccount.md)
-- [Authorize Nonce Account](instructions/authorizeNonceAccount.md)
-- [Allocate](instructions/allocate.md)
-- [Allocate With Seed](instructions/allocateWithSeed.md)
-- [Assign With Seed](instructions/assignWithSeed.md)
-- [Transfer Sol With Seed](instructions/transferSolWithSeed.md)
-- [Upgrade Nonce Account](instructions/upgradeNonceAccount.md)
-
-## PDAs
-
-_This program has no PDAs._
-
-## Defined types
-
-- [Nonce Version](definedTypes/nonceVersion.md)
-- [Nonce State](definedTypes/nonceState.md)
-
-## Errors
-
-| Name                             | Code | Message                                                              |
-| -------------------------------- | ---- | -------------------------------------------------------------------- |
-| Account Already In Use           | `0`  | an account with the same address already exists                      |
-| Result With Negative Lamports    | `1`  | account does not have enough SOL to perform the operation            |
-| Invalid Program Id               | `2`  | cannot assign account to this program id                             |
-| Invalid Account Data Length      | `3`  | cannot allocate account data of this length                          |
-| Max Seed Length Exceeded         | `4`  | length of requested seed is too long                                 |
-| Address With Seed Mismatch       | `5`  | provided address does not match addressed derived from seed          |
-| Nonce No Recent Blockhashes      | `6`  | advancing stored nonce requires a populated RecentBlockhashes sysvar |
-| Nonce Blockhash Not Expired      | `7`  | stored nonce is still in recent_blockhashes                          |
-| Nonce Unexpected Blockhash Value | `8`  | specified nonce does not match stored nonce                          |

+ 0 - 25
packages/renderers-demo/test/e2e/system/docs/accounts/nonce.md

@@ -1,25 +0,0 @@
----
-title: Nonce
-description: Overview of the Nonce account
----
-
-# Nonce
-
-## Account data
-
-```ts
-type Nonce = {
-    version: NonceVersion;
-    state: NonceState;
-    authority: Address;
-    blockhash: Address;
-    lamportsPerSignature: number /* u64 */;
-}
-```
-
-This account has a fixed size of 80 bytes.
-
-## See also
-
-- [NonceVersion](../types/nonceVersion.md)
-- [NonceState](../types/nonceState.md)

+ 0 - 12
packages/renderers-demo/test/e2e/system/docs/definedTypes/nonceState.md

@@ -1,12 +0,0 @@
----
-title: Nonce State
-description: Overview of the Nonce State type
----
-
-# Nonce State
-
-## Type definition
-
-```ts
-enum NonceState { Uninitialized, Initialized }
-```

+ 0 - 12
packages/renderers-demo/test/e2e/system/docs/definedTypes/nonceVersion.md

@@ -1,12 +0,0 @@
----
-title: Nonce Version
-description: Overview of the Nonce Version type
----
-
-# Nonce Version
-
-## Type definition
-
-```ts
-enum NonceVersion { Legacy, Current }
-```

+ 0 - 20
packages/renderers-demo/test/e2e/system/docs/instructions/advanceNonceAccount.md

@@ -1,20 +0,0 @@
----
-title: Advance Nonce Account
-description: Overview of the Advance Nonce Account instruction
----
-
-# Advance Nonce Account
-
-## Instruction accounts
-
-| Name                      | Signer | Writable | Required |
-| ------------------------- | ------ | -------- | -------- |
-| `nonceAccount`            | ❌      | ✅        | ✅        |
-| `recentBlockhashesSysvar` | ❌      | ❌        | ✅        |
-| `nonceAuthority`          | ✅      | ❌        | ✅        |
-
-## Instruction arguments
-
-```ts
-type AdvanceNonceAccountInstruction = { discriminator: number /* u32 */ }
-```

+ 0 - 18
packages/renderers-demo/test/e2e/system/docs/instructions/allocate.md

@@ -1,18 +0,0 @@
----
-title: Allocate
-description: Overview of the Allocate instruction
----
-
-# Allocate
-
-## Instruction accounts
-
-| Name         | Signer | Writable | Required |
-| ------------ | ------ | -------- | -------- |
-| `newAccount` | ✅      | ✅        | ✅        |
-
-## Instruction arguments
-
-```ts
-type AllocateInstruction = { discriminator: number /* u32 */; space: number /* u64 */ }
-```

+ 0 - 25
packages/renderers-demo/test/e2e/system/docs/instructions/allocateWithSeed.md

@@ -1,25 +0,0 @@
----
-title: Allocate With Seed
-description: Overview of the Allocate With Seed instruction
----
-
-# Allocate With Seed
-
-## Instruction accounts
-
-| Name          | Signer | Writable | Required |
-| ------------- | ------ | -------- | -------- |
-| `newAccount`  | ❌      | ✅        | ✅        |
-| `baseAccount` | ✅      | ❌        | ✅        |
-
-## Instruction arguments
-
-```ts
-type AllocateWithSeedInstruction = {
-    discriminator: number /* u32 */;
-    base: Address;
-    seed: string;
-    space: number /* u64 */;
-    programAddress: Address;
-}
-```

+ 0 - 18
packages/renderers-demo/test/e2e/system/docs/instructions/assign.md

@@ -1,18 +0,0 @@
----
-title: Assign
-description: Overview of the Assign instruction
----
-
-# Assign
-
-## Instruction accounts
-
-| Name      | Signer | Writable | Required |
-| --------- | ------ | -------- | -------- |
-| `account` | ✅      | ✅        | ✅        |
-
-## Instruction arguments
-
-```ts
-type AssignInstruction = { discriminator: number /* u32 */; programAddress: Address }
-```

+ 0 - 19
packages/renderers-demo/test/e2e/system/docs/instructions/assignWithSeed.md

@@ -1,19 +0,0 @@
----
-title: Assign With Seed
-description: Overview of the Assign With Seed instruction
----
-
-# Assign With Seed
-
-## Instruction accounts
-
-| Name          | Signer | Writable | Required |
-| ------------- | ------ | -------- | -------- |
-| `account`     | ❌      | ✅        | ✅        |
-| `baseAccount` | ✅      | ❌        | ✅        |
-
-## Instruction arguments
-
-```ts
-type AssignWithSeedInstruction = { discriminator: number /* u32 */; base: Address; seed: string; programAddress: Address }
-```

+ 0 - 19
packages/renderers-demo/test/e2e/system/docs/instructions/authorizeNonceAccount.md

@@ -1,19 +0,0 @@
----
-title: Authorize Nonce Account
-description: Overview of the Authorize Nonce Account instruction
----
-
-# Authorize Nonce Account
-
-## Instruction accounts
-
-| Name             | Signer | Writable | Required |
-| ---------------- | ------ | -------- | -------- |
-| `nonceAccount`   | ❌      | ✅        | ✅        |
-| `nonceAuthority` | ✅      | ❌        | ✅        |
-
-## Instruction arguments
-
-```ts
-type AuthorizeNonceAccountInstruction = { discriminator: number /* u32 */; newNonceAuthority: Address }
-```

+ 0 - 24
packages/renderers-demo/test/e2e/system/docs/instructions/createAccount.md

@@ -1,24 +0,0 @@
----
-title: Create Account
-description: Overview of the Create Account instruction
----
-
-# Create Account
-
-## Instruction accounts
-
-| Name         | Signer | Writable | Required |
-| ------------ | ------ | -------- | -------- |
-| `payer`      | ✅      | ✅        | ✅        |
-| `newAccount` | ✅      | ✅        | ✅        |
-
-## Instruction arguments
-
-```ts
-type CreateAccountInstruction = {
-    discriminator: number /* u32 */;
-    lamports: number /* u64 */;
-    space: number /* u64 */;
-    programAddress: Address;
-}
-```

+ 0 - 27
packages/renderers-demo/test/e2e/system/docs/instructions/createAccountWithSeed.md

@@ -1,27 +0,0 @@
----
-title: Create Account With Seed
-description: Overview of the Create Account With Seed instruction
----
-
-# Create Account With Seed
-
-## Instruction accounts
-
-| Name          | Signer | Writable | Required |
-| ------------- | ------ | -------- | -------- |
-| `payer`       | ✅      | ✅        | ✅        |
-| `newAccount`  | ❌      | ✅        | ✅        |
-| `baseAccount` | ✅      | ❌        | ✅        |
-
-## Instruction arguments
-
-```ts
-type CreateAccountWithSeedInstruction = {
-    discriminator: number /* u32 */;
-    base: Address;
-    seed: string;
-    amount: number /* u64 */;
-    space: number /* u64 */;
-    programAddress: Address;
-}
-```

+ 0 - 20
packages/renderers-demo/test/e2e/system/docs/instructions/initializeNonceAccount.md

@@ -1,20 +0,0 @@
----
-title: Initialize Nonce Account
-description: Overview of the Initialize Nonce Account instruction
----
-
-# Initialize Nonce Account
-
-## Instruction accounts
-
-| Name                      | Signer | Writable | Required |
-| ------------------------- | ------ | -------- | -------- |
-| `nonceAccount`            | ❌      | ✅        | ✅        |
-| `recentBlockhashesSysvar` | ❌      | ❌        | ✅        |
-| `rentSysvar`              | ❌      | ❌        | ✅        |
-
-## Instruction arguments
-
-```ts
-type InitializeNonceAccountInstruction = { discriminator: number /* u32 */; nonceAuthority: Address }
-```

+ 0 - 19
packages/renderers-demo/test/e2e/system/docs/instructions/transferSol.md

@@ -1,19 +0,0 @@
----
-title: Transfer Sol
-description: Overview of the Transfer Sol instruction
----
-
-# Transfer Sol
-
-## Instruction accounts
-
-| Name          | Signer | Writable | Required |
-| ------------- | ------ | -------- | -------- |
-| `source`      | ✅      | ✅        | ✅        |
-| `destination` | ❌      | ✅        | ✅        |
-
-## Instruction arguments
-
-```ts
-type TransferSolInstruction = { discriminator: number /* u32 */; amount: number /* u64 */ }
-```

+ 0 - 20
packages/renderers-demo/test/e2e/system/docs/instructions/transferSolWithSeed.md

@@ -1,20 +0,0 @@
----
-title: Transfer Sol With Seed
-description: Overview of the Transfer Sol With Seed instruction
----
-
-# Transfer Sol With Seed
-
-## Instruction accounts
-
-| Name          | Signer | Writable | Required |
-| ------------- | ------ | -------- | -------- |
-| `source`      | ❌      | ✅        | ✅        |
-| `baseAccount` | ✅      | ❌        | ✅        |
-| `destination` | ❌      | ✅        | ✅        |
-
-## Instruction arguments
-
-```ts
-type TransferSolWithSeedInstruction = { discriminator: number /* u32 */; amount: number /* u64 */; fromSeed: string; fromOwner: Address }
-```

+ 0 - 18
packages/renderers-demo/test/e2e/system/docs/instructions/upgradeNonceAccount.md

@@ -1,18 +0,0 @@
----
-title: Upgrade Nonce Account
-description: Overview of the Upgrade Nonce Account instruction
----
-
-# Upgrade Nonce Account
-
-## Instruction accounts
-
-| Name           | Signer | Writable | Required |
-| -------------- | ------ | -------- | -------- |
-| `nonceAccount` | ❌      | ✅        | ✅        |
-
-## Instruction arguments
-
-```ts
-type UpgradeNonceAccountInstruction = { discriminator: number /* u32 */ }
-```

+ 0 - 22
packages/renderers-demo/test/e2e/system/docs/instructions/withdrawNonceAccount.md

@@ -1,22 +0,0 @@
----
-title: Withdraw Nonce Account
-description: Overview of the Withdraw Nonce Account instruction
----
-
-# Withdraw Nonce Account
-
-## Instruction accounts
-
-| Name                      | Signer | Writable | Required |
-| ------------------------- | ------ | -------- | -------- |
-| `nonceAccount`            | ❌      | ✅        | ✅        |
-| `recipientAccount`        | ❌      | ✅        | ✅        |
-| `recentBlockhashesSysvar` | ❌      | ❌        | ✅        |
-| `rentSysvar`              | ❌      | ❌        | ✅        |
-| `nonceAuthority`          | ✅      | ❌        | ✅        |
-
-## Instruction arguments
-
-```ts
-type WithdrawNonceAccountInstruction = { discriminator: number /* u32 */; withdrawAmount: number /* u64 */ }
-```

+ 0 - 1048
packages/renderers-demo/test/e2e/system/idl.json

@@ -1,1048 +0,0 @@
-{
-    "kind": "rootNode",
-    "program": {
-        "kind": "programNode",
-        "pdas": [],
-        "accounts": [
-            {
-                "kind": "accountNode",
-                "data": {
-                    "kind": "structTypeNode",
-                    "fields": [
-                        {
-                            "kind": "structFieldTypeNode",
-                            "name": "version",
-                            "type": { "kind": "definedTypeLinkNode", "name": "nonceVersion" },
-                            "docs": []
-                        },
-                        {
-                            "kind": "structFieldTypeNode",
-                            "name": "state",
-                            "type": { "kind": "definedTypeLinkNode", "name": "nonceState" },
-                            "docs": []
-                        },
-                        {
-                            "kind": "structFieldTypeNode",
-                            "name": "authority",
-                            "type": { "kind": "publicKeyTypeNode" },
-                            "docs": []
-                        },
-                        {
-                            "kind": "structFieldTypeNode",
-                            "name": "blockhash",
-                            "type": { "kind": "publicKeyTypeNode" },
-                            "docs": []
-                        },
-                        {
-                            "kind": "structFieldTypeNode",
-                            "name": "lamportsPerSignature",
-                            "type": {
-                                "kind": "solAmountTypeNode",
-                                "number": {
-                                    "kind": "numberTypeNode",
-                                    "format": "u64",
-                                    "endian": "le"
-                                }
-                            },
-                            "docs": []
-                        }
-                    ]
-                },
-                "name": "nonce",
-                "idlName": "Nonce",
-                "docs": [],
-                "size": 80
-            }
-        ],
-        "instructions": [
-            {
-                "kind": "instructionNode",
-                "accounts": [
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "payer",
-                        "isWritable": true,
-                        "isSigner": true,
-                        "isOptional": false,
-                        "docs": [],
-                        "defaultValue": { "kind": "payerValueNode" }
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "newAccount",
-                        "isWritable": true,
-                        "isSigner": true,
-                        "isOptional": false,
-                        "docs": []
-                    }
-                ],
-                "arguments": [
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "discriminator",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u32",
-                            "endian": "le"
-                        },
-                        "docs": [],
-                        "defaultValue": { "kind": "numberValueNode", "number": 0 },
-                        "defaultValueStrategy": "omitted"
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "lamports",
-                        "type": {
-                            "kind": "solAmountTypeNode",
-                            "number": {
-                                "kind": "numberTypeNode",
-                                "format": "u64",
-                                "endian": "le"
-                            }
-                        },
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "space",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u64",
-                            "endian": "le"
-                        },
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "programAddress",
-                        "type": { "kind": "publicKeyTypeNode" },
-                        "docs": []
-                    }
-                ],
-                "byteDeltas": [
-                    {
-                        "kind": "instructionByteDeltaNode",
-                        "value": { "kind": "argumentValueNode", "name": "space" },
-                        "withHeader": true
-                    }
-                ],
-                "discriminators": [
-                    {
-                        "kind": "fieldDiscriminatorNode",
-                        "name": "discriminator",
-                        "offset": 0
-                    }
-                ],
-                "name": "createAccount",
-                "idlName": "CreateAccount",
-                "docs": [],
-                "optionalAccountStrategy": "programId"
-            },
-            {
-                "kind": "instructionNode",
-                "accounts": [
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "account",
-                        "isWritable": true,
-                        "isSigner": true,
-                        "isOptional": false,
-                        "docs": []
-                    }
-                ],
-                "arguments": [
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "discriminator",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u32",
-                            "endian": "le"
-                        },
-                        "docs": [],
-                        "defaultValue": { "kind": "numberValueNode", "number": 1 },
-                        "defaultValueStrategy": "omitted"
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "programAddress",
-                        "type": { "kind": "publicKeyTypeNode" },
-                        "docs": []
-                    }
-                ],
-                "discriminators": [
-                    {
-                        "kind": "fieldDiscriminatorNode",
-                        "name": "discriminator",
-                        "offset": 0
-                    }
-                ],
-                "name": "assign",
-                "idlName": "Assign",
-                "docs": [],
-                "optionalAccountStrategy": "programId"
-            },
-            {
-                "kind": "instructionNode",
-                "accounts": [
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "source",
-                        "isWritable": true,
-                        "isSigner": true,
-                        "isOptional": false,
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "destination",
-                        "isWritable": true,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": []
-                    }
-                ],
-                "arguments": [
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "discriminator",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u32",
-                            "endian": "le"
-                        },
-                        "docs": [],
-                        "defaultValue": { "kind": "numberValueNode", "number": 2 },
-                        "defaultValueStrategy": "omitted"
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "amount",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u64",
-                            "endian": "le"
-                        },
-                        "docs": []
-                    }
-                ],
-                "discriminators": [
-                    {
-                        "kind": "fieldDiscriminatorNode",
-                        "name": "discriminator",
-                        "offset": 0
-                    }
-                ],
-                "name": "transferSol",
-                "idlName": "TransferSol",
-                "docs": [],
-                "optionalAccountStrategy": "programId"
-            },
-            {
-                "kind": "instructionNode",
-                "accounts": [
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "payer",
-                        "isWritable": true,
-                        "isSigner": true,
-                        "isOptional": false,
-                        "docs": [],
-                        "defaultValue": { "kind": "payerValueNode" }
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "newAccount",
-                        "isWritable": true,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "baseAccount",
-                        "isWritable": false,
-                        "isSigner": true,
-                        "isOptional": false,
-                        "docs": []
-                    }
-                ],
-                "arguments": [
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "discriminator",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u32",
-                            "endian": "le"
-                        },
-                        "docs": [],
-                        "defaultValue": { "kind": "numberValueNode", "number": 3 },
-                        "defaultValueStrategy": "omitted"
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "base",
-                        "type": { "kind": "publicKeyTypeNode" },
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "seed",
-                        "type": {
-                            "kind": "sizePrefixTypeNode",
-                            "type": { "kind": "stringTypeNode", "encoding": "utf8" },
-                            "prefix": {
-                                "kind": "numberTypeNode",
-                                "format": "u32",
-                                "endian": "le"
-                            }
-                        },
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "amount",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u64",
-                            "endian": "le"
-                        },
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "space",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u64",
-                            "endian": "le"
-                        },
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "programAddress",
-                        "type": { "kind": "publicKeyTypeNode" },
-                        "docs": []
-                    }
-                ],
-                "discriminators": [
-                    {
-                        "kind": "fieldDiscriminatorNode",
-                        "name": "discriminator",
-                        "offset": 0
-                    }
-                ],
-                "name": "createAccountWithSeed",
-                "idlName": "CreateAccountWithSeed",
-                "docs": [],
-                "optionalAccountStrategy": "programId"
-            },
-            {
-                "kind": "instructionNode",
-                "accounts": [
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "nonceAccount",
-                        "isWritable": true,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "recentBlockhashesSysvar",
-                        "isWritable": false,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": [],
-                        "defaultValue": {
-                            "kind": "publicKeyValueNode",
-                            "publicKey": "SysvarRecentB1ockHashes11111111111111111111"
-                        }
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "nonceAuthority",
-                        "isWritable": false,
-                        "isSigner": true,
-                        "isOptional": false,
-                        "docs": []
-                    }
-                ],
-                "arguments": [
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "discriminator",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u32",
-                            "endian": "le"
-                        },
-                        "docs": [],
-                        "defaultValue": { "kind": "numberValueNode", "number": 4 },
-                        "defaultValueStrategy": "omitted"
-                    }
-                ],
-                "discriminators": [
-                    {
-                        "kind": "fieldDiscriminatorNode",
-                        "name": "discriminator",
-                        "offset": 0
-                    }
-                ],
-                "name": "advanceNonceAccount",
-                "idlName": "AdvanceNonceAccount",
-                "docs": [],
-                "optionalAccountStrategy": "programId"
-            },
-            {
-                "kind": "instructionNode",
-                "accounts": [
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "nonceAccount",
-                        "isWritable": true,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "recipientAccount",
-                        "isWritable": true,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "recentBlockhashesSysvar",
-                        "isWritable": false,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": [],
-                        "defaultValue": {
-                            "kind": "publicKeyValueNode",
-                            "publicKey": "SysvarRecentB1ockHashes11111111111111111111"
-                        }
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "rentSysvar",
-                        "isWritable": false,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": [],
-                        "defaultValue": {
-                            "kind": "publicKeyValueNode",
-                            "publicKey": "SysvarRent111111111111111111111111111111111"
-                        }
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "nonceAuthority",
-                        "isWritable": false,
-                        "isSigner": true,
-                        "isOptional": false,
-                        "docs": []
-                    }
-                ],
-                "arguments": [
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "discriminator",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u32",
-                            "endian": "le"
-                        },
-                        "docs": [],
-                        "defaultValue": { "kind": "numberValueNode", "number": 5 },
-                        "defaultValueStrategy": "omitted"
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "withdrawAmount",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u64",
-                            "endian": "le"
-                        },
-                        "docs": []
-                    }
-                ],
-                "discriminators": [
-                    {
-                        "kind": "fieldDiscriminatorNode",
-                        "name": "discriminator",
-                        "offset": 0
-                    }
-                ],
-                "name": "withdrawNonceAccount",
-                "idlName": "WithdrawNonceAccount",
-                "docs": [],
-                "optionalAccountStrategy": "programId"
-            },
-            {
-                "kind": "instructionNode",
-                "accounts": [
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "nonceAccount",
-                        "isWritable": true,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "recentBlockhashesSysvar",
-                        "isWritable": false,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": [],
-                        "defaultValue": {
-                            "kind": "publicKeyValueNode",
-                            "publicKey": "SysvarRecentB1ockHashes11111111111111111111"
-                        }
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "rentSysvar",
-                        "isWritable": false,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": [],
-                        "defaultValue": {
-                            "kind": "publicKeyValueNode",
-                            "publicKey": "SysvarRent111111111111111111111111111111111"
-                        }
-                    }
-                ],
-                "arguments": [
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "discriminator",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u32",
-                            "endian": "le"
-                        },
-                        "docs": [],
-                        "defaultValue": { "kind": "numberValueNode", "number": 6 },
-                        "defaultValueStrategy": "omitted"
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "nonceAuthority",
-                        "type": { "kind": "publicKeyTypeNode" },
-                        "docs": []
-                    }
-                ],
-                "discriminators": [
-                    {
-                        "kind": "fieldDiscriminatorNode",
-                        "name": "discriminator",
-                        "offset": 0
-                    }
-                ],
-                "name": "initializeNonceAccount",
-                "idlName": "InitializeNonceAccount",
-                "docs": [],
-                "optionalAccountStrategy": "programId"
-            },
-            {
-                "kind": "instructionNode",
-                "accounts": [
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "nonceAccount",
-                        "isWritable": true,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "nonceAuthority",
-                        "isWritable": false,
-                        "isSigner": true,
-                        "isOptional": false,
-                        "docs": []
-                    }
-                ],
-                "arguments": [
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "discriminator",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u32",
-                            "endian": "le"
-                        },
-                        "docs": [],
-                        "defaultValue": { "kind": "numberValueNode", "number": 7 },
-                        "defaultValueStrategy": "omitted"
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "newNonceAuthority",
-                        "type": { "kind": "publicKeyTypeNode" },
-                        "docs": []
-                    }
-                ],
-                "discriminators": [
-                    {
-                        "kind": "fieldDiscriminatorNode",
-                        "name": "discriminator",
-                        "offset": 0
-                    }
-                ],
-                "name": "authorizeNonceAccount",
-                "idlName": "AuthorizeNonceAccount",
-                "docs": [],
-                "optionalAccountStrategy": "programId"
-            },
-            {
-                "kind": "instructionNode",
-                "accounts": [
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "newAccount",
-                        "isWritable": true,
-                        "isSigner": true,
-                        "isOptional": false,
-                        "docs": []
-                    }
-                ],
-                "arguments": [
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "discriminator",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u32",
-                            "endian": "le"
-                        },
-                        "docs": [],
-                        "defaultValue": { "kind": "numberValueNode", "number": 8 },
-                        "defaultValueStrategy": "omitted"
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "space",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u64",
-                            "endian": "le"
-                        },
-                        "docs": []
-                    }
-                ],
-                "discriminators": [
-                    {
-                        "kind": "fieldDiscriminatorNode",
-                        "name": "discriminator",
-                        "offset": 0
-                    }
-                ],
-                "name": "allocate",
-                "idlName": "Allocate",
-                "docs": [],
-                "optionalAccountStrategy": "programId"
-            },
-            {
-                "kind": "instructionNode",
-                "accounts": [
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "newAccount",
-                        "isWritable": true,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "baseAccount",
-                        "isWritable": false,
-                        "isSigner": true,
-                        "isOptional": false,
-                        "docs": []
-                    }
-                ],
-                "arguments": [
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "discriminator",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u32",
-                            "endian": "le"
-                        },
-                        "docs": [],
-                        "defaultValue": { "kind": "numberValueNode", "number": 9 },
-                        "defaultValueStrategy": "omitted"
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "base",
-                        "type": { "kind": "publicKeyTypeNode" },
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "seed",
-                        "type": {
-                            "kind": "sizePrefixTypeNode",
-                            "type": { "kind": "stringTypeNode", "encoding": "utf8" },
-                            "prefix": {
-                                "kind": "numberTypeNode",
-                                "format": "u32",
-                                "endian": "le"
-                            }
-                        },
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "space",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u64",
-                            "endian": "le"
-                        },
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "programAddress",
-                        "type": { "kind": "publicKeyTypeNode" },
-                        "docs": []
-                    }
-                ],
-                "discriminators": [
-                    {
-                        "kind": "fieldDiscriminatorNode",
-                        "name": "discriminator",
-                        "offset": 0
-                    }
-                ],
-                "name": "allocateWithSeed",
-                "idlName": "AllocateWithSeed",
-                "docs": [],
-                "optionalAccountStrategy": "programId"
-            },
-            {
-                "kind": "instructionNode",
-                "accounts": [
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "account",
-                        "isWritable": true,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "baseAccount",
-                        "isWritable": false,
-                        "isSigner": true,
-                        "isOptional": false,
-                        "docs": []
-                    }
-                ],
-                "arguments": [
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "discriminator",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u32",
-                            "endian": "le"
-                        },
-                        "docs": [],
-                        "defaultValue": { "kind": "numberValueNode", "number": 10 },
-                        "defaultValueStrategy": "omitted"
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "base",
-                        "type": { "kind": "publicKeyTypeNode" },
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "seed",
-                        "type": {
-                            "kind": "sizePrefixTypeNode",
-                            "type": { "kind": "stringTypeNode", "encoding": "utf8" },
-                            "prefix": {
-                                "kind": "numberTypeNode",
-                                "format": "u32",
-                                "endian": "le"
-                            }
-                        },
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "programAddress",
-                        "type": { "kind": "publicKeyTypeNode" },
-                        "docs": []
-                    }
-                ],
-                "discriminators": [
-                    {
-                        "kind": "fieldDiscriminatorNode",
-                        "name": "discriminator",
-                        "offset": 0
-                    }
-                ],
-                "name": "assignWithSeed",
-                "idlName": "AssignWithSeed",
-                "docs": [],
-                "optionalAccountStrategy": "programId"
-            },
-            {
-                "kind": "instructionNode",
-                "accounts": [
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "source",
-                        "isWritable": true,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "baseAccount",
-                        "isWritable": false,
-                        "isSigner": true,
-                        "isOptional": false,
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "destination",
-                        "isWritable": true,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": []
-                    }
-                ],
-                "arguments": [
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "discriminator",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u32",
-                            "endian": "le"
-                        },
-                        "docs": [],
-                        "defaultValue": { "kind": "numberValueNode", "number": 11 },
-                        "defaultValueStrategy": "omitted"
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "amount",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u64",
-                            "endian": "le"
-                        },
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "fromSeed",
-                        "type": {
-                            "kind": "sizePrefixTypeNode",
-                            "type": { "kind": "stringTypeNode", "encoding": "utf8" },
-                            "prefix": {
-                                "kind": "numberTypeNode",
-                                "format": "u32",
-                                "endian": "le"
-                            }
-                        },
-                        "docs": []
-                    },
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "fromOwner",
-                        "type": { "kind": "publicKeyTypeNode" },
-                        "docs": []
-                    }
-                ],
-                "discriminators": [
-                    {
-                        "kind": "fieldDiscriminatorNode",
-                        "name": "discriminator",
-                        "offset": 0
-                    }
-                ],
-                "name": "transferSolWithSeed",
-                "idlName": "TransferSolWithSeed",
-                "docs": [],
-                "optionalAccountStrategy": "programId"
-            },
-            {
-                "kind": "instructionNode",
-                "accounts": [
-                    {
-                        "kind": "instructionAccountNode",
-                        "name": "nonceAccount",
-                        "isWritable": true,
-                        "isSigner": false,
-                        "isOptional": false,
-                        "docs": []
-                    }
-                ],
-                "arguments": [
-                    {
-                        "kind": "instructionArgumentNode",
-                        "name": "discriminator",
-                        "type": {
-                            "kind": "numberTypeNode",
-                            "format": "u32",
-                            "endian": "le"
-                        },
-                        "docs": [],
-                        "defaultValue": { "kind": "numberValueNode", "number": 12 },
-                        "defaultValueStrategy": "omitted"
-                    }
-                ],
-                "discriminators": [
-                    {
-                        "kind": "fieldDiscriminatorNode",
-                        "name": "discriminator",
-                        "offset": 0
-                    }
-                ],
-                "name": "upgradeNonceAccount",
-                "idlName": "UpgradeNonceAccount",
-                "docs": [],
-                "optionalAccountStrategy": "programId"
-            }
-        ],
-        "definedTypes": [
-            {
-                "kind": "definedTypeNode",
-                "name": "nonceVersion",
-                "type": {
-                    "kind": "enumTypeNode",
-                    "variants": [
-                        { "kind": "enumEmptyVariantTypeNode", "name": "legacy" },
-                        { "kind": "enumEmptyVariantTypeNode", "name": "current" }
-                    ],
-                    "size": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
-                },
-                "idlName": "NonceVersion",
-                "docs": []
-            },
-            {
-                "kind": "definedTypeNode",
-                "name": "nonceState",
-                "type": {
-                    "kind": "enumTypeNode",
-                    "variants": [
-                        { "kind": "enumEmptyVariantTypeNode", "name": "uninitialized" },
-                        { "kind": "enumEmptyVariantTypeNode", "name": "initialized" }
-                    ],
-                    "size": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
-                },
-                "idlName": "NonceState",
-                "docs": []
-            }
-        ],
-        "errors": [
-            {
-                "kind": "errorNode",
-                "name": "accountAlreadyInUse",
-                "idlName": "AccountAlreadyInUse",
-                "code": 0,
-                "message": "an account with the same address already exists",
-                "docs": ["AccountAlreadyInUse: an account with the same address already exists"]
-            },
-            {
-                "kind": "errorNode",
-                "name": "resultWithNegativeLamports",
-                "idlName": "ResultWithNegativeLamports",
-                "code": 1,
-                "message": "account does not have enough SOL to perform the operation",
-                "docs": ["ResultWithNegativeLamports: account does not have enough SOL to perform the operation"]
-            },
-            {
-                "kind": "errorNode",
-                "name": "invalidProgramId",
-                "idlName": "InvalidProgramId",
-                "code": 2,
-                "message": "cannot assign account to this program id",
-                "docs": ["InvalidProgramId: cannot assign account to this program id"]
-            },
-            {
-                "kind": "errorNode",
-                "name": "invalidAccountDataLength",
-                "idlName": "InvalidAccountDataLength",
-                "code": 3,
-                "message": "cannot allocate account data of this length",
-                "docs": ["InvalidAccountDataLength: cannot allocate account data of this length"]
-            },
-            {
-                "kind": "errorNode",
-                "name": "maxSeedLengthExceeded",
-                "idlName": "MaxSeedLengthExceeded",
-                "code": 4,
-                "message": "length of requested seed is too long",
-                "docs": ["MaxSeedLengthExceeded: length of requested seed is too long"]
-            },
-            {
-                "kind": "errorNode",
-                "name": "addressWithSeedMismatch",
-                "idlName": "AddressWithSeedMismatch",
-                "code": 5,
-                "message": "provided address does not match addressed derived from seed",
-                "docs": ["AddressWithSeedMismatch: provided address does not match addressed derived from seed"]
-            },
-            {
-                "kind": "errorNode",
-                "name": "nonceNoRecentBlockhashes",
-                "idlName": "NonceNoRecentBlockhashes",
-                "code": 6,
-                "message": "advancing stored nonce requires a populated RecentBlockhashes sysvar",
-                "docs": [
-                    "NonceNoRecentBlockhashes: advancing stored nonce requires a populated RecentBlockhashes sysvar"
-                ]
-            },
-            {
-                "kind": "errorNode",
-                "name": "nonceBlockhashNotExpired",
-                "idlName": "NonceBlockhashNotExpired",
-                "code": 7,
-                "message": "stored nonce is still in recent_blockhashes",
-                "docs": ["NonceBlockhashNotExpired: stored nonce is still in recent_blockhashes"]
-            },
-            {
-                "kind": "errorNode",
-                "name": "nonceUnexpectedBlockhashValue",
-                "idlName": "NonceUnexpectedBlockhashValue",
-                "code": 8,
-                "message": "specified nonce does not match stored nonce",
-                "docs": ["NonceUnexpectedBlockhashValue: specified nonce does not match stored nonce"]
-            }
-        ],
-        "name": "system",
-        "prefix": "",
-        "publicKey": "11111111111111111111111111111111",
-        "version": "0.0.1",
-        "origin": "shank"
-    },
-    "additionalPrograms": [],
-    "standard": "codama",
-    "version": "1.0.0"
-}

+ 0 - 15
packages/renderers-demo/test/e2e/system/package.json

@@ -1,15 +0,0 @@
-{
-    "name": "@codama/renderers-demo-e2e-system",
-    "private": true,
-    "version": "0.0.0",
-    "type": "commonjs",
-    "sideEffects": false,
-    "license": "MIT",
-    "scripts": {
-        "test": "../../../node_modules/.bin/codama run demo"
-    },
-    "devDependencies": {
-        "@codama/renderers-demo": "workspace:*"
-    },
-    "packageManager": "pnpm@9.1.0"
-}

+ 0 - 5
packages/renderers-demo/test/e2e/test.sh

@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-set -eux
-
-(cd test/e2e/system && pnpm test)
-(cd test/e2e/token && pnpm test)

+ 0 - 10
packages/renderers-demo/test/e2e/token/codama.json

@@ -1,10 +0,0 @@
-{
-    "idl": "idl.json",
-    "before": [],
-    "scripts": {
-        "demo": {
-            "from": "@codama/renderers-demo",
-            "args": ["docs"]
-        }
-    }
-}

+ 0 - 79
packages/renderers-demo/test/e2e/token/docs/README.md

@@ -1,79 +0,0 @@
----
-title: Token Program
-description: Overview of the Token Program
----
-
-# Token Program
-
-## Information
-
-- Address: `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA`
-- Version: `3.3.0`
-
-## Accounts
-
-- [Mint](accounts/mint.md)
-- [Token](accounts/token.md)
-- [Multisig](accounts/multisig.md)
-
-## Instructions
-
-- [Initialize Mint](instructions/initializeMint.md)
-- [Initialize Account](instructions/initializeAccount.md)
-- [Initialize Multisig](instructions/initializeMultisig.md)
-- [Transfer](instructions/transfer.md)
-- [Approve](instructions/approve.md)
-- [Revoke](instructions/revoke.md)
-- [Set Authority](instructions/setAuthority.md)
-- [Mint To](instructions/mintTo.md)
-- [Burn](instructions/burn.md)
-- [Close Account](instructions/closeAccount.md)
-- [Freeze Account](instructions/freezeAccount.md)
-- [Thaw Account](instructions/thawAccount.md)
-- [Transfer Checked](instructions/transferChecked.md)
-- [Approve Checked](instructions/approveChecked.md)
-- [Mint To Checked](instructions/mintToChecked.md)
-- [Burn Checked](instructions/burnChecked.md)
-- [Initialize Account2](instructions/initializeAccount2.md)
-- [Sync Native](instructions/syncNative.md)
-- [Initialize Account3](instructions/initializeAccount3.md)
-- [Initialize Multisig2](instructions/initializeMultisig2.md)
-- [Initialize Mint2](instructions/initializeMint2.md)
-- [Get Account Data Size](instructions/getAccountDataSize.md)
-- [Initialize Immutable Owner](instructions/initializeImmutableOwner.md)
-- [Amount To Ui Amount](instructions/amountToUiAmount.md)
-- [Ui Amount To Amount](instructions/uiAmountToAmount.md)
-
-## PDAs
-
-_This program has no PDAs._
-
-## Defined types
-
-- [Account State](definedTypes/accountState.md)
-- [Authority Type](definedTypes/authorityType.md)
-
-## Errors
-
-| Name                               | Code | Message                                                      |
-| ---------------------------------- | ---- | ------------------------------------------------------------ |
-| Not Rent Exempt                    | `0`  | Lamport balance below rent-exempt threshold                  |
-| Insufficient Funds                 | `1`  | Insufficient funds                                           |
-| Invalid Mint                       | `2`  | Invalid Mint                                                 |
-| Mint Mismatch                      | `3`  | Account not associated with this Mint                        |
-| Owner Mismatch                     | `4`  | Owner does not match                                         |
-| Fixed Supply                       | `5`  | Fixed supply                                                 |
-| Already In Use                     | `6`  | Already in use                                               |
-| Invalid Number Of Provided Signers | `7`  | Invalid number of provided signers                           |
-| Invalid Number Of Required Signers | `8`  | Invalid number of required signers                           |
-| Uninitialized State                | `9`  | State is unititialized                                       |
-| Native Not Supported               | `10` | Instruction does not support native tokens                   |
-| Non Native Has Balance             | `11` | Non-native account can only be closed if its balance is zero |
-| Invalid Instruction                | `12` | Invalid instruction                                          |
-| Invalid State                      | `13` | State is invalid for requested operation                     |
-| Overflow                           | `14` | Operation overflowed                                         |
-| Authority Type Not Supported       | `15` | Account does not support specified authority type            |
-| Mint Cannot Freeze                 | `16` | This token mint cannot freeze accounts                       |
-| Account Frozen                     | `17` | Account is frozen                                            |
-| Mint Decimals Mismatch             | `18` | The provided decimals value different from the Mint decimals |
-| Non Native Not Supported           | `19` | Instruction does not support non-native tokens               |

+ 0 - 20
packages/renderers-demo/test/e2e/token/docs/accounts/mint.md

@@ -1,20 +0,0 @@
----
-title: Mint
-description: Overview of the Mint account
----
-
-# Mint
-
-## Account data
-
-```ts
-type Mint = {
-    mintAuthority: Option<Address>;
-    supply: number /* u64 */;
-    decimals: number /* u8 */;
-    isInitialized: boolean;
-    freezeAuthority: Option<Address>;
-}
-```
-
-This account has a fixed size of 82 bytes.

+ 0 - 14
packages/renderers-demo/test/e2e/token/docs/accounts/multisig.md

@@ -1,14 +0,0 @@
----
-title: Multisig
-description: Overview of the Multisig account
----
-
-# Multisig
-
-## Account data
-
-```ts
-type Multisig = { m: number /* u8 */; n: number /* u8 */; isInitialized: boolean; signers: Array<Address> }
-```
-
-This account has a fixed size of 355 bytes.

+ 0 - 27
packages/renderers-demo/test/e2e/token/docs/accounts/token.md

@@ -1,27 +0,0 @@
----
-title: Token
-description: Overview of the Token account
----
-
-# Token
-
-## Account data
-
-```ts
-type Token = {
-    mint: Address;
-    owner: Address;
-    amount: number /* u64 */;
-    delegate: Option<Address>;
-    state: AccountState;
-    isNative: Option<number /* u64 */>;
-    delegatedAmount: number /* u64 */;
-    closeAuthority: Option<Address>;
-}
-```
-
-This account has a fixed size of 165 bytes.
-
-## See also
-
-- [AccountState](../types/accountState.md)

+ 0 - 12
packages/renderers-demo/test/e2e/token/docs/definedTypes/accountState.md

@@ -1,12 +0,0 @@
----
-title: Account State
-description: Overview of the Account State type
----
-
-# Account State
-
-## Type definition
-
-```ts
-enum AccountState { Uninitialized, Initialized, Frozen }
-```

+ 0 - 12
packages/renderers-demo/test/e2e/token/docs/definedTypes/authorityType.md

@@ -1,12 +0,0 @@
----
-title: Authority Type
-description: Overview of the Authority Type type
----
-
-# Authority Type
-
-## Type definition
-
-```ts
-enum AuthorityType { MintTokens, FreezeAccount, AccountOwner, CloseAccount }
-```

+ 0 - 27
packages/renderers-demo/test/e2e/token/docs/instructions/amountToUiAmount.md

@@ -1,27 +0,0 @@
----
-title: Amount To Ui Amount
-description: Overview of the Amount To Ui Amount instruction
----
-
-# Amount To Ui Amount
-
-Convert an Amount of tokens to a UiAmount `string`, using the given
-mint. In this version of the program, the mint can only specify the
-number of decimals.
-
-Fails on an invalid mint.
-
-Return data can be fetched using `sol_get_return_data` and deserialized
-with `String::from_utf8`.
-
-## Instruction accounts
-
-| Name   | Signer | Writable | Required | Description                |
-| ------ | ------ | -------- | -------- | -------------------------- |
-| `mint` | ❌      | ❌        | ✅        | The mint to calculate for. |
-
-## Instruction arguments
-
-```ts
-type AmountToUiAmountInstruction = { discriminator: number /* u8 */; amount: number /* u64 */ }
-```

+ 0 - 23
packages/renderers-demo/test/e2e/token/docs/instructions/approve.md

@@ -1,23 +0,0 @@
----
-title: Approve
-description: Overview of the Approve instruction
----
-
-# Approve
-
-Approves a delegate. A delegate is given the authority over tokens on
-behalf of the source account's owner.
-
-## Instruction accounts
-
-| Name       | Signer | Writable | Required | Description                                             |
-| ---------- | ------ | -------- | -------- | ------------------------------------------------------- |
-| `source`   | ❌      | ✅        | ✅        | The source account.                                     |
-| `delegate` | ❌      | ❌        | ✅        | The delegate.                                           |
-| `owner`    | either | ❌        | ✅        | The source account owner or its multisignature account. |
-
-## Instruction arguments
-
-```ts
-type ApproveInstruction = { discriminator: number /* u8 */; amount: number /* u64 */ }
-```

+ 0 - 28
packages/renderers-demo/test/e2e/token/docs/instructions/approveChecked.md

@@ -1,28 +0,0 @@
----
-title: Approve Checked
-description: Overview of the Approve Checked instruction
----
-
-# Approve Checked
-
-Approves a delegate. A delegate is given the authority over tokens on
-behalf of the source account's owner.
-
-This instruction differs from Approve in that the token mint and
-decimals value is checked by the caller. This may be useful when
-creating transactions offline or within a hardware wallet.
-
-## Instruction accounts
-
-| Name       | Signer | Writable | Required | Description                                             |
-| ---------- | ------ | -------- | -------- | ------------------------------------------------------- |
-| `source`   | ❌      | ✅        | ✅        | The source account.                                     |
-| `mint`     | ❌      | ❌        | ✅        | The token mint.                                         |
-| `delegate` | ❌      | ❌        | ✅        | The delegate.                                           |
-| `owner`    | either | ❌        | ✅        | The source account owner or its multisignature account. |
-
-## Instruction arguments
-
-```ts
-type ApproveCheckedInstruction = { discriminator: number /* u8 */; amount: number /* u64 */; decimals: number /* u8 */ }
-```

+ 0 - 23
packages/renderers-demo/test/e2e/token/docs/instructions/burn.md

@@ -1,23 +0,0 @@
----
-title: Burn
-description: Overview of the Burn instruction
----
-
-# Burn
-
-Burns tokens by removing them from an account. `Burn` does not support
-accounts associated with the native mint, use `CloseAccount` instead.
-
-## Instruction accounts
-
-| Name        | Signer | Writable | Required | Description                                                 |
-| ----------- | ------ | -------- | -------- | ----------------------------------------------------------- |
-| `account`   | ❌      | ✅        | ✅        | The account to burn from.                                   |
-| `mint`      | ❌      | ✅        | ✅        | The token mint.                                             |
-| `authority` | either | ❌        | ✅        | The account's owner/delegate or its multisignature account. |
-
-## Instruction arguments
-
-```ts
-type BurnInstruction = { discriminator: number /* u8 */; amount: number /* u64 */ }
-```

+ 0 - 27
packages/renderers-demo/test/e2e/token/docs/instructions/burnChecked.md

@@ -1,27 +0,0 @@
----
-title: Burn Checked
-description: Overview of the Burn Checked instruction
----
-
-# Burn Checked
-
-Burns tokens by removing them from an account. `BurnChecked` does not
-support accounts associated with the native mint, use `CloseAccount` instead.
-
-This instruction differs from Burn in that the decimals value is checked
-by the caller. This may be useful when creating transactions offline or
-within a hardware wallet.
-
-## Instruction accounts
-
-| Name        | Signer | Writable | Required | Description                                                 |
-| ----------- | ------ | -------- | -------- | ----------------------------------------------------------- |
-| `account`   | ❌      | ✅        | ✅        | The account to burn from.                                   |
-| `mint`      | ❌      | ✅        | ✅        | The token mint.                                             |
-| `authority` | either | ❌        | ✅        | The account's owner/delegate or its multisignature account. |
-
-## Instruction arguments
-
-```ts
-type BurnCheckedInstruction = { discriminator: number /* u8 */; amount: number /* u64 */; decimals: number /* u8 */ }
-```

+ 0 - 23
packages/renderers-demo/test/e2e/token/docs/instructions/closeAccount.md

@@ -1,23 +0,0 @@
----
-title: Close Account
-description: Overview of the Close Account instruction
----
-
-# Close Account
-
-Close an account by transferring all its SOL to the destination account.
-Non-native accounts may only be closed if its token amount is zero.
-
-## Instruction accounts
-
-| Name          | Signer | Writable | Required | Description                                        |
-| ------------- | ------ | -------- | -------- | -------------------------------------------------- |
-| `account`     | ❌      | ✅        | ✅        | The account to close.                              |
-| `destination` | ❌      | ✅        | ✅        | The destination account.                           |
-| `owner`       | either | ❌        | ✅        | The account's owner or its multisignature account. |
-
-## Instruction arguments
-
-```ts
-type CloseAccountInstruction = { discriminator: number /* u8 */ }
-```

+ 0 - 22
packages/renderers-demo/test/e2e/token/docs/instructions/freezeAccount.md

@@ -1,22 +0,0 @@
----
-title: Freeze Account
-description: Overview of the Freeze Account instruction
----
-
-# Freeze Account
-
-Freeze an Initialized account using the Mint's freeze_authority (if set).
-
-## Instruction accounts
-
-| Name      | Signer | Writable | Required | Description                                              |
-| --------- | ------ | -------- | -------- | -------------------------------------------------------- |
-| `account` | ❌      | ✅        | ✅        | The account to freeze.                                   |
-| `mint`    | ❌      | ❌        | ✅        | The token mint.                                          |
-| `owner`   | either | ❌        | ✅        | The mint freeze authority or its multisignature account. |
-
-## Instruction arguments
-
-```ts
-type FreezeAccountInstruction = { discriminator: number /* u8 */ }
-```

+ 0 - 24
packages/renderers-demo/test/e2e/token/docs/instructions/getAccountDataSize.md

@@ -1,24 +0,0 @@
----
-title: Get Account Data Size
-description: Overview of the Get Account Data Size instruction
----
-
-# Get Account Data Size
-
-Gets the required size of an account for the given mint as a
-little-endian `u64`.
-
-Return data can be fetched using `sol_get_return_data` and deserializing
-the return data as a little-endian `u64`.
-
-## Instruction accounts
-
-| Name   | Signer | Writable | Required | Description                |
-| ------ | ------ | -------- | -------- | -------------------------- |
-| `mint` | ❌      | ❌        | ✅        | The mint to calculate for. |
-
-## Instruction arguments
-
-```ts
-type GetAccountDataSizeInstruction = { discriminator: number /* u8 */ }
-```

+ 0 - 32
packages/renderers-demo/test/e2e/token/docs/instructions/initializeAccount.md

@@ -1,32 +0,0 @@
----
-title: Initialize Account
-description: Overview of the Initialize Account instruction
----
-
-# Initialize Account
-
-Initializes a new account to hold tokens. If this account is associated
-with the native mint then the token balance of the initialized account
-will be equal to the amount of SOL in the account. If this account is
-associated with another mint, that mint must be initialized before this
-command can succeed.
-
-The `InitializeAccount` instruction requires no signers and MUST be
-included within the same Transaction as the system program's
-`CreateAccount` instruction that creates the account being initialized.
-Otherwise another party can acquire ownership of the uninitialized account.
-
-## Instruction accounts
-
-| Name      | Signer | Writable | Required | Description                                    |
-| --------- | ------ | -------- | -------- | ---------------------------------------------- |
-| `account` | ❌      | ✅        | ✅        | The account to initialize.                     |
-| `mint`    | ❌      | ❌        | ✅        | The mint this account will be associated with. |
-| `owner`   | ❌      | ❌        | ✅        | The new account's owner/multisignature.        |
-| `rent`    | ❌      | ❌        | ✅        | Rent sysvar.                                   |
-
-## Instruction arguments
-
-```ts
-type InitializeAccountInstruction = { discriminator: number /* u8 */ }
-```

+ 0 - 25
packages/renderers-demo/test/e2e/token/docs/instructions/initializeAccount2.md

@@ -1,25 +0,0 @@
----
-title: Initialize Account2
-description: Overview of the Initialize Account2 instruction
----
-
-# Initialize Account2
-
-Like InitializeAccount, but the owner pubkey is passed via instruction
-data rather than the accounts list. This variant may be preferable
-when using Cross Program Invocation from an instruction that does
-not need the owner's `AccountInfo` otherwise.
-
-## Instruction accounts
-
-| Name      | Signer | Writable | Required | Description                                    |
-| --------- | ------ | -------- | -------- | ---------------------------------------------- |
-| `account` | ❌      | ✅        | ✅        | The account to initialize.                     |
-| `mint`    | ❌      | ❌        | ✅        | The mint this account will be associated with. |
-| `rent`    | ❌      | ❌        | ✅        | Rent sysvar.                                   |
-
-## Instruction arguments
-
-```ts
-type InitializeAccount2Instruction = { discriminator: number /* u8 */; owner: Address }
-```

+ 0 - 21
packages/renderers-demo/test/e2e/token/docs/instructions/initializeAccount3.md

@@ -1,21 +0,0 @@
----
-title: Initialize Account3
-description: Overview of the Initialize Account3 instruction
----
-
-# Initialize Account3
-
-Like InitializeAccount2, but does not require the Rent sysvar to be provided.
-
-## Instruction accounts
-
-| Name      | Signer | Writable | Required | Description                                    |
-| --------- | ------ | -------- | -------- | ---------------------------------------------- |
-| `account` | ❌      | ✅        | ✅        | The account to initialize.                     |
-| `mint`    | ❌      | ❌        | ✅        | The mint this account will be associated with. |
-
-## Instruction arguments
-
-```ts
-type InitializeAccount3Instruction = { discriminator: number /* u8 */; owner: Address }
-```

+ 0 - 26
packages/renderers-demo/test/e2e/token/docs/instructions/initializeImmutableOwner.md

@@ -1,26 +0,0 @@
----
-title: Initialize Immutable Owner
-description: Overview of the Initialize Immutable Owner instruction
----
-
-# Initialize Immutable Owner
-
-Initialize the Immutable Owner extension for the given token account
-
-Fails if the account has already been initialized, so must be called
-before `InitializeAccount`.
-
-No-ops in this version of the program, but is included for compatibility
-with the Associated Token Account program.
-
-## Instruction accounts
-
-| Name      | Signer | Writable | Required | Description                |
-| --------- | ------ | -------- | -------- | -------------------------- |
-| `account` | ❌      | ✅        | ✅        | The account to initialize. |
-
-## Instruction arguments
-
-```ts
-type InitializeImmutableOwnerInstruction = { discriminator: number /* u8 */ }
-```

+ 0 - 32
packages/renderers-demo/test/e2e/token/docs/instructions/initializeMint.md

@@ -1,32 +0,0 @@
----
-title: Initialize Mint
-description: Overview of the Initialize Mint instruction
----
-
-# Initialize Mint
-
-Initializes a new mint and optionally deposits all the newly minted
-tokens in an account.
-
-The `InitializeMint` instruction requires no signers and MUST be
-included within the same Transaction as the system program's
-`CreateAccount` instruction that creates the account being initialized.
-Otherwise another party can acquire ownership of the uninitialized account.
-
-## Instruction accounts
-
-| Name   | Signer | Writable | Required | Description         |
-| ------ | ------ | -------- | -------- | ------------------- |
-| `mint` | ❌      | ✅        | ✅        | Token mint account. |
-| `rent` | ❌      | ❌        | ✅        | Rent sysvar.        |
-
-## Instruction arguments
-
-```ts
-type InitializeMintInstruction = {
-    discriminator: number /* u8 */;
-    decimals: number /* u8 */;
-    mintAuthority: Address;
-    freezeAuthority: Option<Address>;
-}
-```

+ 0 - 25
packages/renderers-demo/test/e2e/token/docs/instructions/initializeMint2.md

@@ -1,25 +0,0 @@
----
-title: Initialize Mint2
-description: Overview of the Initialize Mint2 instruction
----
-
-# Initialize Mint2
-
-Like [`InitializeMint`], but does not require the Rent sysvar to be provided.
-
-## Instruction accounts
-
-| Name   | Signer | Writable | Required | Description             |
-| ------ | ------ | -------- | -------- | ----------------------- |
-| `mint` | ❌      | ✅        | ✅        | The mint to initialize. |
-
-## Instruction arguments
-
-```ts
-type InitializeMint2Instruction = {
-    discriminator: number /* u8 */;
-    decimals: number /* u8 */;
-    mintAuthority: Address;
-    freezeAuthority: Option<Address>;
-}
-```

+ 0 - 31
packages/renderers-demo/test/e2e/token/docs/instructions/initializeMultisig.md

@@ -1,31 +0,0 @@
----
-title: Initialize Multisig
-description: Overview of the Initialize Multisig instruction
----
-
-# Initialize Multisig
-
-Initializes a multisignature account with N provided signers.
-
-Multisignature accounts can used in place of any single owner/delegate
-accounts in any token instruction that require an owner/delegate to be
-present. The variant field represents the number of signers (M)
-required to validate this multisignature account.
-
-The `InitializeMultisig` instruction requires no signers and MUST be
-included within the same Transaction as the system program's
-`CreateAccount` instruction that creates the account being initialized.
-Otherwise another party can acquire ownership of the uninitialized account.
-
-## Instruction accounts
-
-| Name       | Signer | Writable | Required | Description                               |
-| ---------- | ------ | -------- | -------- | ----------------------------------------- |
-| `multisig` | ❌      | ✅        | ✅        | The multisignature account to initialize. |
-| `rent`     | ❌      | ❌        | ✅        | Rent sysvar.                              |
-
-## Instruction arguments
-
-```ts
-type InitializeMultisigInstruction = { discriminator: number /* u8 */; m: number /* u8 */ }
-```

+ 0 - 20
packages/renderers-demo/test/e2e/token/docs/instructions/initializeMultisig2.md

@@ -1,20 +0,0 @@
----
-title: Initialize Multisig2
-description: Overview of the Initialize Multisig2 instruction
----
-
-# Initialize Multisig2
-
-Like InitializeMultisig, but does not require the Rent sysvar to be provided.
-
-## Instruction accounts
-
-| Name       | Signer | Writable | Required | Description                               |
-| ---------- | ------ | -------- | -------- | ----------------------------------------- |
-| `multisig` | ❌      | ✅        | ✅        | The multisignature account to initialize. |
-
-## Instruction arguments
-
-```ts
-type InitializeMultisig2Instruction = { discriminator: number /* u8 */; m: number /* u8 */ }
-```

+ 0 - 22
packages/renderers-demo/test/e2e/token/docs/instructions/mintTo.md

@@ -1,22 +0,0 @@
----
-title: Mint To
-description: Overview of the Mint To instruction
----
-
-# Mint To
-
-Mints new tokens to an account. The native mint does not support minting.
-
-## Instruction accounts
-
-| Name            | Signer | Writable | Required | Description                                                 |
-| --------------- | ------ | -------- | -------- | ----------------------------------------------------------- |
-| `mint`          | ❌      | ✅        | ✅        | The mint account.                                           |
-| `token`         | ❌      | ✅        | ✅        | The account to mint tokens to.                              |
-| `mintAuthority` | either | ❌        | ✅        | The mint's minting authority or its multisignature account. |
-
-## Instruction arguments
-
-```ts
-type MintToInstruction = { discriminator: number /* u8 */; amount: number /* u64 */ }
-```

+ 0 - 26
packages/renderers-demo/test/e2e/token/docs/instructions/mintToChecked.md

@@ -1,26 +0,0 @@
----
-title: Mint To Checked
-description: Overview of the Mint To Checked instruction
----
-
-# Mint To Checked
-
-Mints new tokens to an account. The native mint does not support minting.
-
-This instruction differs from MintTo in that the decimals value is
-checked by the caller. This may be useful when creating transactions
-offline or within a hardware wallet.
-
-## Instruction accounts
-
-| Name            | Signer | Writable | Required | Description                                                 |
-| --------------- | ------ | -------- | -------- | ----------------------------------------------------------- |
-| `mint`          | ❌      | ✅        | ✅        | The mint.                                                   |
-| `token`         | ❌      | ✅        | ✅        | The account to mint tokens to.                              |
-| `mintAuthority` | either | ❌        | ✅        | The mint's minting authority or its multisignature account. |
-
-## Instruction arguments
-
-```ts
-type MintToCheckedInstruction = { discriminator: number /* u8 */; amount: number /* u64 */; decimals: number /* u8 */ }
-```

+ 0 - 21
packages/renderers-demo/test/e2e/token/docs/instructions/revoke.md

@@ -1,21 +0,0 @@
----
-title: Revoke
-description: Overview of the Revoke instruction
----
-
-# Revoke
-
-Revokes the delegate's authority.
-
-## Instruction accounts
-
-| Name     | Signer | Writable | Required | Description                                     |
-| -------- | ------ | -------- | -------- | ----------------------------------------------- |
-| `source` | ❌      | ✅        | ✅        | The source account.                             |
-| `owner`  | either | ❌        | ✅        | The source account owner or its multisignature. |
-
-## Instruction arguments
-
-```ts
-type RevokeInstruction = { discriminator: number /* u8 */ }
-```

+ 0 - 25
packages/renderers-demo/test/e2e/token/docs/instructions/setAuthority.md

@@ -1,25 +0,0 @@
----
-title: Set Authority
-description: Overview of the Set Authority instruction
----
-
-# Set Authority
-
-Sets a new authority of a mint or account.
-
-## Instruction accounts
-
-| Name    | Signer | Writable | Required | Description                                                                           |
-| ------- | ------ | -------- | -------- | ------------------------------------------------------------------------------------- |
-| `owned` | ❌      | ✅        | ✅        | The mint or account to change the authority of.                                       |
-| `owner` | either | ❌        | ✅        | The current authority or the multisignature account of the mint or account to update. |
-
-## Instruction arguments
-
-```ts
-type SetAuthorityInstruction = { discriminator: number /* u8 */; authorityType: AuthorityType; newAuthority: Option<Address> }
-```
-
-## See also
-
-- [AuthorityType](../types/authorityType.md)

+ 0 - 24
packages/renderers-demo/test/e2e/token/docs/instructions/syncNative.md

@@ -1,24 +0,0 @@
----
-title: Sync Native
-description: Overview of the Sync Native instruction
----
-
-# Sync Native
-
-Given a wrapped / native token account (a token account containing SOL)
-updates its amount field based on the account's underlying `lamports`.
-This is useful if a non-wrapped SOL account uses
-`system_instruction::transfer` to move lamports to a wrapped token
-account, and needs to have its token `amount` field updated.
-
-## Instruction accounts
-
-| Name      | Signer | Writable | Required | Description                                                    |
-| --------- | ------ | -------- | -------- | -------------------------------------------------------------- |
-| `account` | ❌      | ✅        | ✅        | The native token account to sync with its underlying lamports. |
-
-## Instruction arguments
-
-```ts
-type SyncNativeInstruction = { discriminator: number /* u8 */ }
-```

+ 0 - 22
packages/renderers-demo/test/e2e/token/docs/instructions/thawAccount.md

@@ -1,22 +0,0 @@
----
-title: Thaw Account
-description: Overview of the Thaw Account instruction
----
-
-# Thaw Account
-
-Thaw a Frozen account using the Mint's freeze_authority (if set).
-
-## Instruction accounts
-
-| Name      | Signer | Writable | Required | Description                                              |
-| --------- | ------ | -------- | -------- | -------------------------------------------------------- |
-| `account` | ❌      | ✅        | ✅        | The account to thaw.                                     |
-| `mint`    | ❌      | ❌        | ✅        | The token mint.                                          |
-| `owner`   | either | ❌        | ✅        | The mint freeze authority or its multisignature account. |
-
-## Instruction arguments
-
-```ts
-type ThawAccountInstruction = { discriminator: number /* u8 */ }
-```

+ 0 - 24
packages/renderers-demo/test/e2e/token/docs/instructions/transfer.md

@@ -1,24 +0,0 @@
----
-title: Transfer
-description: Overview of the Transfer instruction
----
-
-# Transfer
-
-Transfers tokens from one account to another either directly or via a delegate.
-If this account is associated with the native mint then equal amounts
-of SOL and Tokens will be transferred to the destination account.
-
-## Instruction accounts
-
-| Name          | Signer | Writable | Required | Description                                                        |
-| ------------- | ------ | -------- | -------- | ------------------------------------------------------------------ |
-| `source`      | ❌      | ✅        | ✅        | The source account.                                                |
-| `destination` | ❌      | ✅        | ✅        | The destination account.                                           |
-| `authority`   | either | ❌        | ✅        | The source account's owner/delegate or its multisignature account. |
-
-## Instruction arguments
-
-```ts
-type TransferInstruction = { discriminator: number /* u8 */; amount: number /* u64 */ }
-```

+ 0 - 29
packages/renderers-demo/test/e2e/token/docs/instructions/transferChecked.md

@@ -1,29 +0,0 @@
----
-title: Transfer Checked
-description: Overview of the Transfer Checked instruction
----
-
-# Transfer Checked
-
-Transfers tokens from one account to another either directly or via a
-delegate. If this account is associated with the native mint then equal
-amounts of SOL and Tokens will be transferred to the destination account.
-
-This instruction differs from Transfer in that the token mint and
-decimals value is checked by the caller. This may be useful when
-creating transactions offline or within a hardware wallet.
-
-## Instruction accounts
-
-| Name          | Signer | Writable | Required | Description                                                        |
-| ------------- | ------ | -------- | -------- | ------------------------------------------------------------------ |
-| `source`      | ❌      | ✅        | ✅        | The source account.                                                |
-| `mint`        | ❌      | ❌        | ✅        | The token mint.                                                    |
-| `destination` | ❌      | ✅        | ✅        | The destination account.                                           |
-| `authority`   | either | ❌        | ✅        | The source account's owner/delegate or its multisignature account. |
-
-## Instruction arguments
-
-```ts
-type TransferCheckedInstruction = { discriminator: number /* u8 */; amount: number /* u64 */; decimals: number /* u8 */ }
-```

+ 0 - 25
packages/renderers-demo/test/e2e/token/docs/instructions/uiAmountToAmount.md

@@ -1,25 +0,0 @@
----
-title: Ui Amount To Amount
-description: Overview of the Ui Amount To Amount instruction
----
-
-# Ui Amount To Amount
-
-Convert a UiAmount of tokens to a little-endian `u64` raw Amount, using
-the given mint. In this version of the program, the mint can only
-specify the number of decimals.
-
-Return data can be fetched using `sol_get_return_data` and deserializing
-the return data as a little-endian `u64`.
-
-## Instruction accounts
-
-| Name   | Signer | Writable | Required | Description                |
-| ------ | ------ | -------- | -------- | -------------------------- |
-| `mint` | ❌      | ❌        | ✅        | The mint to calculate for. |
-
-## Instruction arguments
-
-```ts
-type UiAmountToAmountInstruction = { discriminator: number /* u8 */; uiAmount: string }
-```

+ 0 - 2861
packages/renderers-demo/test/e2e/token/idl.json

@@ -1,2861 +0,0 @@
-{
-  "kind": "rootNode",
-  "program": {
-    "kind": "programNode",
-    "pdas": [],
-    "accounts": [
-      {
-        "kind": "accountNode",
-        "data": {
-          "kind": "structTypeNode",
-          "fields": [
-            {
-              "kind": "structFieldTypeNode",
-              "name": "mintAuthority",
-              "type": {
-                "kind": "optionTypeNode",
-                "item": { "kind": "publicKeyTypeNode" },
-                "prefix": {
-                  "kind": "numberTypeNode",
-                  "format": "u32",
-                  "endian": "le"
-                },
-                "fixed": true
-              },
-              "docs": [
-                "Optional authority used to mint new tokens. The mint authority may only",
-                "be provided during mint creation. If no mint authority is present",
-                "then the mint has a fixed supply and no further tokens may be minted."
-              ]
-            },
-            {
-              "kind": "structFieldTypeNode",
-              "name": "supply",
-              "type": {
-                "kind": "numberTypeNode",
-                "format": "u64",
-                "endian": "le"
-              },
-              "docs": ["Total supply of tokens."]
-            },
-            {
-              "kind": "structFieldTypeNode",
-              "name": "decimals",
-              "type": {
-                "kind": "numberTypeNode",
-                "format": "u8",
-                "endian": "le"
-              },
-              "docs": [
-                "Number of base 10 digits to the right of the decimal place."
-              ]
-            },
-            {
-              "kind": "structFieldTypeNode",
-              "name": "isInitialized",
-              "type": {
-                "kind": "booleanTypeNode",
-                "size": {
-                  "kind": "numberTypeNode",
-                  "format": "u8",
-                  "endian": "le"
-                }
-              },
-              "docs": ["Is `true` if this structure has been initialized."]
-            },
-            {
-              "kind": "structFieldTypeNode",
-              "name": "freezeAuthority",
-              "type": {
-                "kind": "optionTypeNode",
-                "item": { "kind": "publicKeyTypeNode" },
-                "prefix": {
-                  "kind": "numberTypeNode",
-                  "format": "u32",
-                  "endian": "le"
-                },
-                "fixed": true
-              },
-              "docs": ["Optional authority to freeze token accounts."]
-            }
-          ]
-        },
-        "discriminators": [
-          {
-            "kind": "sizeDiscriminatorNode",
-            "size": 82
-          }
-        ],
-        "name": "mint",
-        "docs": [],
-        "size": 82
-      },
-      {
-        "kind": "accountNode",
-        "data": {
-          "kind": "structTypeNode",
-          "fields": [
-            {
-              "kind": "structFieldTypeNode",
-              "name": "mint",
-              "type": { "kind": "publicKeyTypeNode" },
-              "docs": ["The mint associated with this account."]
-            },
-            {
-              "kind": "structFieldTypeNode",
-              "name": "owner",
-              "type": { "kind": "publicKeyTypeNode" },
-              "docs": ["The owner of this account."]
-            },
-            {
-              "kind": "structFieldTypeNode",
-              "name": "amount",
-              "type": {
-                "kind": "numberTypeNode",
-                "format": "u64",
-                "endian": "le"
-              },
-              "docs": ["The amount of tokens this account holds."]
-            },
-            {
-              "kind": "structFieldTypeNode",
-              "name": "delegate",
-              "type": {
-                "kind": "optionTypeNode",
-                "item": { "kind": "publicKeyTypeNode" },
-                "prefix": {
-                  "kind": "numberTypeNode",
-                  "format": "u32",
-                  "endian": "le"
-                },
-                "fixed": true
-              },
-              "docs": [
-                "If `delegate` is `Some` then `delegated_amount` represents",
-                "the amount authorized by the delegate."
-              ]
-            },
-            {
-              "kind": "structFieldTypeNode",
-              "name": "state",
-              "type": { "kind": "definedTypeLinkNode", "name": "accountState" },
-              "docs": ["The account's state."]
-            },
-            {
-              "kind": "structFieldTypeNode",
-              "name": "isNative",
-              "type": {
-                "kind": "optionTypeNode",
-                "item": {
-                  "kind": "numberTypeNode",
-                  "format": "u64",
-                  "endian": "le"
-                },
-                "prefix": {
-                  "kind": "numberTypeNode",
-                  "format": "u32",
-                  "endian": "le"
-                },
-                "fixed": true
-              },
-              "docs": [
-                "If is_native.is_some, this is a native token, and the value logs the",
-                "rent-exempt reserve. An Account is required to be rent-exempt, so",
-                "the value is used by the Processor to ensure that wrapped SOL",
-                "accounts do not drop below this threshold."
-              ]
-            },
-            {
-              "kind": "structFieldTypeNode",
-              "name": "delegatedAmount",
-              "type": {
-                "kind": "numberTypeNode",
-                "format": "u64",
-                "endian": "le"
-              },
-              "docs": ["The amount delegated."]
-            },
-            {
-              "kind": "structFieldTypeNode",
-              "name": "closeAuthority",
-              "type": {
-                "kind": "optionTypeNode",
-                "item": { "kind": "publicKeyTypeNode" },
-                "prefix": {
-                  "kind": "numberTypeNode",
-                  "format": "u32",
-                  "endian": "le"
-                },
-                "fixed": true
-              },
-              "docs": ["Optional authority to close the account."]
-            }
-          ]
-        },
-        "discriminators": [
-          {
-            "kind": "sizeDiscriminatorNode",
-            "size": 165
-          }
-        ],
-        "name": "token",
-        "docs": [],
-        "size": 165
-      },
-      {
-        "kind": "accountNode",
-        "data": {
-          "kind": "structTypeNode",
-          "fields": [
-            {
-              "kind": "structFieldTypeNode",
-              "name": "m",
-              "type": {
-                "kind": "numberTypeNode",
-                "format": "u8",
-                "endian": "le"
-              },
-              "docs": ["Number of signers required."]
-            },
-            {
-              "kind": "structFieldTypeNode",
-              "name": "n",
-              "type": {
-                "kind": "numberTypeNode",
-                "format": "u8",
-                "endian": "le"
-              },
-              "docs": ["Number of valid signers."]
-            },
-            {
-              "kind": "structFieldTypeNode",
-              "name": "isInitialized",
-              "type": {
-                "kind": "booleanTypeNode",
-                "size": {
-                  "kind": "numberTypeNode",
-                  "format": "u8",
-                  "endian": "le"
-                }
-              },
-              "docs": ["Is `true` if this structure has been initialized."]
-            },
-            {
-              "kind": "structFieldTypeNode",
-              "name": "signers",
-              "type": {
-                "kind": "arrayTypeNode",
-                "item": { "kind": "publicKeyTypeNode" },
-                "count": { "kind": "fixedCountNode", "value": 11 }
-              },
-              "docs": ["Signer public keys."]
-            }
-          ]
-        },
-        "discriminators": [
-          {
-            "kind": "sizeDiscriminatorNode",
-            "size": 355
-          }
-        ],
-        "name": "multisig",
-        "docs": [],
-        "size": 355
-      }
-    ],
-    "instructions": [
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["Token mint account."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "rent",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["Rent sysvar."],
-            "defaultValue": {
-              "kind": "publicKeyValueNode",
-              "publicKey": "SysvarRent111111111111111111111111111111111"
-            }
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 0 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "decimals",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": ["Number of decimals in token account amounts."]
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "mintAuthority",
-            "type": { "kind": "publicKeyTypeNode" },
-            "docs": ["Minting authority."]
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "freezeAuthority",
-            "type": {
-              "kind": "optionTypeNode",
-              "item": { "kind": "publicKeyTypeNode" },
-              "prefix": {
-                "kind": "numberTypeNode",
-                "format": "u8",
-                "endian": "le"
-              },
-              "fixed": false
-            },
-            "defaultValue": {
-              "kind": "noneValueNode"
-            },
-            "docs": ["Optional authority that can freeze token accounts."]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "name": "initializeMint",
-        "docs": [
-          "Initializes a new mint and optionally deposits all the newly minted",
-          "tokens in an account.",
-          "",
-          "The `InitializeMint` instruction requires no signers and MUST be",
-          "included within the same Transaction as the system program's",
-          "`CreateAccount` instruction that creates the account being initialized.",
-          "Otherwise another party can acquire ownership of the uninitialized account."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "account",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The account to initialize."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The mint this account will be associated with."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "owner",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The new account's owner/multisignature."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "rent",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["Rent sysvar."],
-            "defaultValue": {
-              "kind": "publicKeyValueNode",
-              "publicKey": "SysvarRent111111111111111111111111111111111"
-            }
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 1 },
-            "defaultValueStrategy": "omitted"
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "name": "initializeAccount",
-        "docs": [
-          "Initializes a new account to hold tokens. If this account is associated",
-          "with the native mint then the token balance of the initialized account",
-          "will be equal to the amount of SOL in the account. If this account is",
-          "associated with another mint, that mint must be initialized before this",
-          "command can succeed.",
-          "",
-          "The `InitializeAccount` instruction requires no signers and MUST be",
-          "included within the same Transaction as the system program's",
-          "`CreateAccount` instruction that creates the account being initialized.",
-          "Otherwise another party can acquire ownership of the uninitialized account."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "multisig",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The multisignature account to initialize."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "rent",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["Rent sysvar."],
-            "defaultValue": {
-              "kind": "publicKeyValueNode",
-              "publicKey": "SysvarRent111111111111111111111111111111111"
-            }
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 2 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "m",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [
-              "The number of signers (M) required to validate this multisignature account."
-            ]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "signers"
-            }
-          }
-        ],
-        "name": "initializeMultisig",
-        "docs": [
-          "Initializes a multisignature account with N provided signers.",
-          "",
-          "Multisignature accounts can used in place of any single owner/delegate",
-          "accounts in any token instruction that require an owner/delegate to be",
-          "present. The variant field represents the number of signers (M)",
-          "required to validate this multisignature account.",
-          "",
-          "The `InitializeMultisig` instruction requires no signers and MUST be",
-          "included within the same Transaction as the system program's",
-          "`CreateAccount` instruction that creates the account being initialized.",
-          "Otherwise another party can acquire ownership of the uninitialized account."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "source",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The source account."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "destination",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The destination account."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "authority",
-            "isWritable": false,
-            "isSigner": "either",
-            "isOptional": false,
-            "docs": [
-              "The source account's owner/delegate or its multisignature account."
-            ],
-            "defaultValue": { "kind": "identityValueNode" }
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 3 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "amount",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u64",
-              "endian": "le"
-            },
-            "docs": ["The amount of tokens to transfer."]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "multiSigners"
-            },
-            "isOptional": true,
-            "isSigner": true
-          }
-        ],
-        "name": "transfer",
-        "docs": [
-          "Transfers tokens from one account to another either directly or via a delegate.",
-          "If this account is associated with the native mint then equal amounts",
-          "of SOL and Tokens will be transferred to the destination account."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "source",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The source account."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "delegate",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The delegate."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "owner",
-            "isWritable": false,
-            "isSigner": "either",
-            "isOptional": false,
-            "docs": ["The source account owner or its multisignature account."]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 4 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "amount",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u64",
-              "endian": "le"
-            },
-            "docs": ["The amount of tokens the delegate is approved for."]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "multiSigners"
-            },
-            "isOptional": true,
-            "isSigner": true
-          }
-        ],
-        "name": "approve",
-        "docs": [
-          "Approves a delegate. A delegate is given the authority over tokens on",
-          "behalf of the source account's owner."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "source",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The source account."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "owner",
-            "isWritable": false,
-            "isSigner": "either",
-            "isOptional": false,
-            "docs": ["The source account owner or its multisignature."]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 5 },
-            "defaultValueStrategy": "omitted"
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "multiSigners"
-            },
-            "isOptional": true,
-            "isSigner": true
-          }
-        ],
-        "name": "revoke",
-        "docs": ["Revokes the delegate's authority."],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "owned",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The mint or account to change the authority of."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "owner",
-            "isWritable": false,
-            "isSigner": "either",
-            "isOptional": false,
-            "docs": [
-              "The current authority or the multisignature account of the mint or account to update."
-            ]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 6 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "authorityType",
-            "type": { "kind": "definedTypeLinkNode", "name": "authorityType" },
-            "docs": ["The type of authority to update."]
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "newAuthority",
-            "type": {
-              "kind": "optionTypeNode",
-              "item": { "kind": "publicKeyTypeNode" },
-              "prefix": {
-                "kind": "numberTypeNode",
-                "format": "u8",
-                "endian": "le"
-              },
-              "fixed": false
-            },
-            "docs": ["The new authority"]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "multiSigners"
-            },
-            "isOptional": true,
-            "isSigner": true
-          }
-        ],
-        "name": "setAuthority",
-        "docs": ["Sets a new authority of a mint or account."],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The mint account."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "token",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The account to mint tokens to."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "mintAuthority",
-            "isWritable": false,
-            "isSigner": "either",
-            "isOptional": false,
-            "docs": [
-              "The mint's minting authority or its multisignature account."
-            ]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 7 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "amount",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u64",
-              "endian": "le"
-            },
-            "docs": ["The amount of new tokens to mint."]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "multiSigners"
-            },
-            "isOptional": true,
-            "isSigner": true
-          }
-        ],
-        "name": "mintTo",
-        "docs": [
-          "Mints new tokens to an account. The native mint does not support minting."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "account",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The account to burn from."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The token mint."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "authority",
-            "isWritable": false,
-            "isSigner": "either",
-            "isOptional": false,
-            "docs": [
-              "The account's owner/delegate or its multisignature account."
-            ],
-            "defaultValue": { "kind": "identityValueNode" }
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": ["The amount of tokens to burn."],
-            "defaultValue": { "kind": "numberValueNode", "number": 8 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "amount",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u64",
-              "endian": "le"
-            },
-            "docs": []
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "multiSigners"
-            },
-            "isOptional": true,
-            "isSigner": true
-          }
-        ],
-        "name": "burn",
-        "docs": [
-          "Burns tokens by removing them from an account. `Burn` does not support",
-          "accounts associated with the native mint, use `CloseAccount` instead."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "account",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The account to close."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "destination",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The destination account."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "owner",
-            "isWritable": false,
-            "isSigner": "either",
-            "isOptional": false,
-            "docs": ["The account's owner or its multisignature account."]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 9 },
-            "defaultValueStrategy": "omitted"
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "multiSigners"
-            },
-            "isOptional": true,
-            "isSigner": true
-          }
-        ],
-        "name": "closeAccount",
-        "docs": [
-          "Close an account by transferring all its SOL to the destination account.",
-          "Non-native accounts may only be closed if its token amount is zero."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "account",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The account to freeze."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The token mint."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "owner",
-            "isWritable": false,
-            "isSigner": "either",
-            "isOptional": false,
-            "docs": ["The mint freeze authority or its multisignature account."]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 10 },
-            "defaultValueStrategy": "omitted"
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "multiSigners"
-            },
-            "isOptional": true,
-            "isSigner": true
-          }
-        ],
-        "name": "freezeAccount",
-        "docs": [
-          "Freeze an Initialized account using the Mint's freeze_authority (if set)."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "account",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The account to thaw."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The token mint."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "owner",
-            "isWritable": false,
-            "isSigner": "either",
-            "isOptional": false,
-            "docs": ["The mint freeze authority or its multisignature account."]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 11 },
-            "defaultValueStrategy": "omitted"
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "multiSigners"
-            },
-            "isOptional": true,
-            "isSigner": true
-          }
-        ],
-        "name": "thawAccount",
-        "docs": [
-          "Thaw a Frozen account using the Mint's freeze_authority (if set)."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "source",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The source account."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The token mint."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "destination",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The destination account."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "authority",
-            "isWritable": false,
-            "isSigner": "either",
-            "isOptional": false,
-            "docs": [
-              "The source account's owner/delegate or its multisignature account."
-            ],
-            "defaultValue": { "kind": "identityValueNode" }
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 12 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "amount",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u64",
-              "endian": "le"
-            },
-            "docs": ["The amount of tokens to transfer."]
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "decimals",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [
-              "Expected number of base 10 digits to the right of the decimal place."
-            ]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "multiSigners"
-            },
-            "isOptional": true,
-            "isSigner": true
-          }
-        ],
-        "name": "transferChecked",
-        "docs": [
-          "Transfers tokens from one account to another either directly or via a",
-          "delegate. If this account is associated with the native mint then equal",
-          "amounts of SOL and Tokens will be transferred to the destination account.",
-          "",
-          "This instruction differs from Transfer in that the token mint and",
-          "decimals value is checked by the caller. This may be useful when",
-          "creating transactions offline or within a hardware wallet."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "source",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The source account."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The token mint."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "delegate",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The delegate."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "owner",
-            "isWritable": false,
-            "isSigner": "either",
-            "isOptional": false,
-            "docs": ["The source account owner or its multisignature account."]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 13 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "amount",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u64",
-              "endian": "le"
-            },
-            "docs": ["The amount of tokens the delegate is approved for."]
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "decimals",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [
-              "Expected number of base 10 digits to the right of the decimal place."
-            ]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "multiSigners"
-            },
-            "isOptional": true,
-            "isSigner": true
-          }
-        ],
-        "name": "approveChecked",
-        "docs": [
-          "Approves a delegate. A delegate is given the authority over tokens on",
-          "behalf of the source account's owner.",
-          "",
-          "This instruction differs from Approve in that the token mint and",
-          "decimals value is checked by the caller. This may be useful when",
-          "creating transactions offline or within a hardware wallet."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The mint."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "token",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The account to mint tokens to."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "mintAuthority",
-            "isWritable": false,
-            "isSigner": "either",
-            "isOptional": false,
-            "docs": [
-              "The mint's minting authority or its multisignature account."
-            ]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 14 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "amount",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u64",
-              "endian": "le"
-            },
-            "docs": ["The amount of new tokens to mint."]
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "decimals",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [
-              "Expected number of base 10 digits to the right of the decimal place."
-            ]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "multiSigners"
-            },
-            "isOptional": true,
-            "isSigner": true
-          }
-        ],
-        "name": "mintToChecked",
-        "docs": [
-          "Mints new tokens to an account. The native mint does not support minting.",
-          "",
-          "This instruction differs from MintTo in that the decimals value is",
-          "checked by the caller. This may be useful when creating transactions",
-          "offline or within a hardware wallet."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "account",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The account to burn from."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The token mint."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "authority",
-            "isWritable": false,
-            "isSigner": "either",
-            "isOptional": false,
-            "docs": [
-              "The account's owner/delegate or its multisignature account."
-            ],
-            "defaultValue": { "kind": "identityValueNode" }
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 15 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "amount",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u64",
-              "endian": "le"
-            },
-            "docs": ["The amount of tokens to burn."]
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "decimals",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [
-              "Expected number of base 10 digits to the right of the decimal place."
-            ]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "multiSigners"
-            },
-            "isOptional": true,
-            "isSigner": true
-          }
-        ],
-        "name": "burnChecked",
-        "docs": [
-          "Burns tokens by removing them from an account. `BurnChecked` does not",
-          "support accounts associated with the native mint, use `CloseAccount` instead.",
-          "",
-          "This instruction differs from Burn in that the decimals value is checked",
-          "by the caller. This may be useful when creating transactions offline or",
-          "within a hardware wallet."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "account",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The account to initialize."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The mint this account will be associated with."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "rent",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["Rent sysvar."],
-            "defaultValue": {
-              "kind": "publicKeyValueNode",
-              "publicKey": "SysvarRent111111111111111111111111111111111"
-            }
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 16 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "owner",
-            "type": { "kind": "publicKeyTypeNode" },
-            "docs": ["The new account's owner/multisignature."]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "name": "initializeAccount2",
-        "docs": [
-          "Like InitializeAccount, but the owner pubkey is passed via instruction",
-          "data rather than the accounts list. This variant may be preferable",
-          "when using Cross Program Invocation from an instruction that does",
-          "not need the owner's `AccountInfo` otherwise."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "account",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": [
-              "The native token account to sync with its underlying lamports."
-            ]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 17 },
-            "defaultValueStrategy": "omitted"
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "name": "syncNative",
-        "docs": [
-          "Given a wrapped / native token account (a token account containing SOL)",
-          "updates its amount field based on the account's underlying `lamports`.",
-          "This is useful if a non-wrapped SOL account uses",
-          "`system_instruction::transfer` to move lamports to a wrapped token",
-          "account, and needs to have its token `amount` field updated."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "account",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The account to initialize."]
-          },
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The mint this account will be associated with."]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 18 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "owner",
-            "type": { "kind": "publicKeyTypeNode" },
-            "docs": ["The new account's owner/multisignature."]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "name": "initializeAccount3",
-        "docs": [
-          "Like InitializeAccount2, but does not require the Rent sysvar to be provided."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "multisig",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The multisignature account to initialize."]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 19 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "m",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [
-              "The number of signers (M) required to validate this multisignature account."
-            ]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "remainingAccounts": [
-          {
-            "kind": "instructionRemainingAccountsNode",
-            "value": {
-              "kind": "argumentValueNode",
-              "name": "signers"
-            }
-          }
-        ],
-        "name": "initializeMultisig2",
-        "docs": [
-          "Like InitializeMultisig, but does not require the Rent sysvar to be provided."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The mint to initialize."]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 20 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "decimals",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [
-              "Number of base 10 digits to the right of the decimal place."
-            ]
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "mintAuthority",
-            "type": { "kind": "publicKeyTypeNode" },
-            "docs": ["The authority/multisignature to mint tokens."]
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "freezeAuthority",
-            "type": {
-              "kind": "optionTypeNode",
-              "item": { "kind": "publicKeyTypeNode" },
-              "prefix": {
-                "kind": "numberTypeNode",
-                "format": "u8",
-                "endian": "le"
-              },
-              "fixed": false
-            },
-            "defaultValue": {
-              "kind": "noneValueNode"
-            },
-            "docs": [
-              "The optional freeze authority/multisignature of the mint."
-            ]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "name": "initializeMint2",
-        "docs": [
-          "Like [`InitializeMint`], but does not require the Rent sysvar to be provided."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The mint to calculate for."]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 21 },
-            "defaultValueStrategy": "omitted"
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "name": "getAccountDataSize",
-        "docs": [
-          "Gets the required size of an account for the given mint as a",
-          "little-endian `u64`.",
-          "",
-          "Return data can be fetched using `sol_get_return_data` and deserializing",
-          "the return data as a little-endian `u64`."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "account",
-            "isWritable": true,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The account to initialize."]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 22 },
-            "defaultValueStrategy": "omitted"
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "name": "initializeImmutableOwner",
-        "docs": [
-          "Initialize the Immutable Owner extension for the given token account",
-          "",
-          "Fails if the account has already been initialized, so must be called",
-          "before `InitializeAccount`.",
-          "",
-          "No-ops in this version of the program, but is included for compatibility",
-          "with the Associated Token Account program."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The mint to calculate for."]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 23 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "amount",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u64",
-              "endian": "le"
-            },
-            "docs": ["The amount of tokens to reformat."]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "name": "amountToUiAmount",
-        "docs": [
-          "Convert an Amount of tokens to a UiAmount `string`, using the given",
-          "mint. In this version of the program, the mint can only specify the",
-          "number of decimals.",
-          "",
-          "Fails on an invalid mint.",
-          "",
-          "Return data can be fetched using `sol_get_return_data` and deserialized",
-          "with `String::from_utf8`."
-        ],
-        "optionalAccountStrategy": "programId"
-      },
-      {
-        "kind": "instructionNode",
-        "accounts": [
-          {
-            "kind": "instructionAccountNode",
-            "name": "mint",
-            "isWritable": false,
-            "isSigner": false,
-            "isOptional": false,
-            "docs": ["The mint to calculate for."]
-          }
-        ],
-        "arguments": [
-          {
-            "kind": "instructionArgumentNode",
-            "name": "discriminator",
-            "type": {
-              "kind": "numberTypeNode",
-              "format": "u8",
-              "endian": "le"
-            },
-            "docs": [],
-            "defaultValue": { "kind": "numberValueNode", "number": 24 },
-            "defaultValueStrategy": "omitted"
-          },
-          {
-            "kind": "instructionArgumentNode",
-            "name": "uiAmount",
-            "type": {
-              "kind": "stringTypeNode",
-              "encoding": "utf8"
-            },
-            "docs": ["The ui_amount of tokens to reformat."]
-          }
-        ],
-        "discriminators": [
-          {
-            "kind": "fieldDiscriminatorNode",
-            "name": "discriminator",
-            "offset": 0
-          }
-        ],
-        "name": "uiAmountToAmount",
-        "docs": [
-          "Convert a UiAmount of tokens to a little-endian `u64` raw Amount, using",
-          "the given mint. In this version of the program, the mint can only",
-          "specify the number of decimals.",
-          "",
-          "Return data can be fetched using `sol_get_return_data` and deserializing",
-          "the return data as a little-endian `u64`."
-        ],
-        "optionalAccountStrategy": "programId"
-      }
-    ],
-    "definedTypes": [
-      {
-        "kind": "definedTypeNode",
-        "name": "accountState",
-        "type": {
-          "kind": "enumTypeNode",
-          "variants": [
-            { "kind": "enumEmptyVariantTypeNode", "name": "uninitialized" },
-            { "kind": "enumEmptyVariantTypeNode", "name": "initialized" },
-            { "kind": "enumEmptyVariantTypeNode", "name": "frozen" }
-          ],
-          "size": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
-        },
-        "docs": []
-      },
-      {
-        "kind": "definedTypeNode",
-        "name": "authorityType",
-        "type": {
-          "kind": "enumTypeNode",
-          "variants": [
-            { "kind": "enumEmptyVariantTypeNode", "name": "mintTokens" },
-            { "kind": "enumEmptyVariantTypeNode", "name": "freezeAccount" },
-            { "kind": "enumEmptyVariantTypeNode", "name": "accountOwner" },
-            { "kind": "enumEmptyVariantTypeNode", "name": "closeAccount" }
-          ],
-          "size": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
-        },
-        "docs": []
-      }
-    ],
-    "errors": [
-      {
-        "kind": "errorNode",
-        "name": "notRentExempt",
-        "code": 0,
-        "message": "Lamport balance below rent-exempt threshold",
-        "docs": ["NotRentExempt: Lamport balance below rent-exempt threshold"]
-      },
-      {
-        "kind": "errorNode",
-        "name": "insufficientFunds",
-        "code": 1,
-        "message": "Insufficient funds",
-        "docs": ["InsufficientFunds: Insufficient funds"]
-      },
-      {
-        "kind": "errorNode",
-        "name": "invalidMint",
-        "code": 2,
-        "message": "Invalid Mint",
-        "docs": ["InvalidMint: Invalid Mint"]
-      },
-      {
-        "kind": "errorNode",
-        "name": "mintMismatch",
-        "code": 3,
-        "message": "Account not associated with this Mint",
-        "docs": ["MintMismatch: Account not associated with this Mint"]
-      },
-      {
-        "kind": "errorNode",
-        "name": "ownerMismatch",
-        "code": 4,
-        "message": "Owner does not match",
-        "docs": ["OwnerMismatch: Owner does not match"]
-      },
-      {
-        "kind": "errorNode",
-        "name": "fixedSupply",
-        "code": 5,
-        "message": "Fixed supply",
-        "docs": ["FixedSupply: Fixed supply"]
-      },
-      {
-        "kind": "errorNode",
-        "name": "alreadyInUse",
-        "code": 6,
-        "message": "Already in use",
-        "docs": ["AlreadyInUse: Already in use"]
-      },
-      {
-        "kind": "errorNode",
-        "name": "invalidNumberOfProvidedSigners",
-        "code": 7,
-        "message": "Invalid number of provided signers",
-        "docs": [
-          "InvalidNumberOfProvidedSigners: Invalid number of provided signers"
-        ]
-      },
-      {
-        "kind": "errorNode",
-        "name": "invalidNumberOfRequiredSigners",
-        "code": 8,
-        "message": "Invalid number of required signers",
-        "docs": [
-          "InvalidNumberOfRequiredSigners: Invalid number of required signers"
-        ]
-      },
-      {
-        "kind": "errorNode",
-        "name": "uninitializedState",
-        "code": 9,
-        "message": "State is unititialized",
-        "docs": ["UninitializedState: State is unititialized"]
-      },
-      {
-        "kind": "errorNode",
-        "name": "nativeNotSupported",
-        "code": 10,
-        "message": "Instruction does not support native tokens",
-        "docs": [
-          "NativeNotSupported: Instruction does not support native tokens"
-        ]
-      },
-      {
-        "kind": "errorNode",
-        "name": "nonNativeHasBalance",
-        "code": 11,
-        "message": "Non-native account can only be closed if its balance is zero",
-        "docs": [
-          "NonNativeHasBalance: Non-native account can only be closed if its balance is zero"
-        ]
-      },
-      {
-        "kind": "errorNode",
-        "name": "invalidInstruction",
-        "code": 12,
-        "message": "Invalid instruction",
-        "docs": ["InvalidInstruction: Invalid instruction"]
-      },
-      {
-        "kind": "errorNode",
-        "name": "invalidState",
-        "code": 13,
-        "message": "State is invalid for requested operation",
-        "docs": ["InvalidState: State is invalid for requested operation"]
-      },
-      {
-        "kind": "errorNode",
-        "name": "overflow",
-        "code": 14,
-        "message": "Operation overflowed",
-        "docs": ["Overflow: Operation overflowed"]
-      },
-      {
-        "kind": "errorNode",
-        "name": "authorityTypeNotSupported",
-        "code": 15,
-        "message": "Account does not support specified authority type",
-        "docs": [
-          "AuthorityTypeNotSupported: Account does not support specified authority type"
-        ]
-      },
-      {
-        "kind": "errorNode",
-        "name": "mintCannotFreeze",
-        "code": 16,
-        "message": "This token mint cannot freeze accounts",
-        "docs": ["MintCannotFreeze: This token mint cannot freeze accounts"]
-      },
-      {
-        "kind": "errorNode",
-        "name": "accountFrozen",
-        "code": 17,
-        "message": "Account is frozen",
-        "docs": ["AccountFrozen: Account is frozen"]
-      },
-      {
-        "kind": "errorNode",
-        "name": "mintDecimalsMismatch",
-        "code": 18,
-        "message": "The provided decimals value different from the Mint decimals",
-        "docs": [
-          "MintDecimalsMismatch: The provided decimals value different from the Mint decimals"
-        ]
-      },
-      {
-        "kind": "errorNode",
-        "name": "nonNativeNotSupported",
-        "code": 19,
-        "message": "Instruction does not support non-native tokens",
-        "docs": [
-          "NonNativeNotSupported: Instruction does not support non-native tokens"
-        ]
-      }
-    ],
-    "name": "token",
-    "prefix": "",
-    "publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
-    "version": "3.3.0",
-    "origin": "shank"
-  },
-  "additionalPrograms": [
-    {
-      "kind": "programNode",
-      "pdas": [
-        {
-          "kind": "pdaNode",
-          "name": "associatedToken",
-          "docs": ["The address of the associated token account."],
-          "seeds": [
-            {
-              "kind": "variablePdaSeedNode",
-              "name": "owner",
-              "docs": ["The wallet address of the associated token account."],
-              "type": {
-                "kind": "publicKeyTypeNode"
-              }
-            },
-            {
-              "kind": "variablePdaSeedNode",
-              "name": "tokenProgram",
-              "docs": ["The address of the token program to use."],
-              "type": {
-                "kind": "publicKeyTypeNode"
-              }
-            },
-            {
-              "kind": "variablePdaSeedNode",
-              "name": "mint",
-              "docs": ["The mint address of the associated token account."],
-              "type": {
-                "kind": "publicKeyTypeNode"
-              }
-            }
-          ]
-        }
-      ],
-      "accounts": [],
-      "instructions": [
-        {
-          "kind": "instructionNode",
-          "accounts": [
-            {
-              "kind": "instructionAccountNode",
-              "name": "payer",
-              "isWritable": true,
-              "isSigner": true,
-              "isOptional": false,
-              "docs": ["Funding account (must be a system account)."],
-              "defaultValue": { "kind": "payerValueNode" }
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "ata",
-              "isWritable": true,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": ["Associated token account address to be created."],
-              "defaultValue": {
-                "kind": "pdaValueNode",
-                "pda": {
-                  "kind": "pdaLinkNode",
-                  "name": "associatedToken"
-                },
-                "seeds": [
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "owner",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "owner"
-                    }
-                  },
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "tokenProgram",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "tokenProgram"
-                    }
-                  },
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "mint",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "mint"
-                    }
-                  }
-                ]
-              }
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "owner",
-              "isWritable": false,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": ["Wallet address for the new associated token account."]
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "mint",
-              "isWritable": false,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": ["The token mint for the new associated token account."]
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "systemProgram",
-              "isWritable": false,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": ["System program."],
-              "defaultValue": {
-                "kind": "publicKeyValueNode",
-                "publicKey": "11111111111111111111111111111111"
-              }
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "tokenProgram",
-              "isWritable": false,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": ["SPL Token program."],
-              "defaultValue": {
-                "kind": "publicKeyValueNode",
-                "publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
-              }
-            }
-          ],
-          "arguments": [
-            {
-              "kind": "instructionArgumentNode",
-              "name": "discriminator",
-              "type": {
-                "kind": "numberTypeNode",
-                "format": "u8",
-                "endian": "le"
-              },
-              "docs": [],
-              "defaultValue": { "kind": "numberValueNode", "number": 0 },
-              "defaultValueStrategy": "omitted"
-            }
-          ],
-          "discriminators": [
-            {
-              "kind": "fieldDiscriminatorNode",
-              "name": "discriminator",
-              "offset": 0
-            }
-          ],
-          "name": "createAssociatedToken",
-          "docs": [
-            "Creates an associated token account for the given wallet address and",
-            "token mint Returns an error if the account exists."
-          ],
-          "optionalAccountStrategy": "programId"
-        },
-        {
-          "kind": "instructionNode",
-          "accounts": [
-            {
-              "kind": "instructionAccountNode",
-              "name": "payer",
-              "isWritable": true,
-              "isSigner": true,
-              "isOptional": false,
-              "docs": ["Funding account (must be a system account)."],
-              "defaultValue": { "kind": "payerValueNode" }
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "ata",
-              "isWritable": true,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": ["Associated token account address to be created."],
-              "defaultValue": {
-                "kind": "pdaValueNode",
-                "pda": {
-                  "kind": "pdaLinkNode",
-                  "name": "associatedToken"
-                },
-                "seeds": [
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "owner",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "owner"
-                    }
-                  },
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "tokenProgram",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "tokenProgram"
-                    }
-                  },
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "mint",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "mint"
-                    }
-                  }
-                ]
-              }
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "owner",
-              "isWritable": false,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": ["Wallet address for the new associated token account."]
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "mint",
-              "isWritable": false,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": ["The token mint for the new associated token account."]
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "systemProgram",
-              "isWritable": false,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": ["System program."],
-              "defaultValue": {
-                "kind": "publicKeyValueNode",
-                "publicKey": "11111111111111111111111111111111"
-              }
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "tokenProgram",
-              "isWritable": false,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": ["SPL Token program."],
-              "defaultValue": {
-                "kind": "publicKeyValueNode",
-                "publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
-              }
-            }
-          ],
-          "arguments": [
-            {
-              "kind": "instructionArgumentNode",
-              "name": "discriminator",
-              "type": {
-                "kind": "numberTypeNode",
-                "format": "u8",
-                "endian": "le"
-              },
-              "docs": [],
-              "defaultValue": { "kind": "numberValueNode", "number": 1 },
-              "defaultValueStrategy": "omitted"
-            }
-          ],
-          "discriminators": [
-            {
-              "kind": "fieldDiscriminatorNode",
-              "name": "discriminator",
-              "offset": 0
-            }
-          ],
-          "name": "createAssociatedTokenIdempotent",
-          "docs": [
-            "Creates an associated token account for the given wallet address and",
-            "token mint, if it doesn't already exist. Returns an error if the",
-            "account exists, but with a different owner."
-          ],
-          "optionalAccountStrategy": "programId"
-        },
-        {
-          "kind": "instructionNode",
-          "accounts": [
-            {
-              "kind": "instructionAccountNode",
-              "name": "nestedAssociatedAccountAddress",
-              "isWritable": true,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": [
-                "Nested associated token account, must be owned by `ownerAssociatedAccountAddress`."
-              ],
-              "defaultValue": {
-                "kind": "pdaValueNode",
-                "pda": {
-                  "kind": "pdaLinkNode",
-                  "name": "associatedToken"
-                },
-                "seeds": [
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "owner",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "ownerAssociatedAccountAddress"
-                    }
-                  },
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "tokenProgram",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "tokenProgram"
-                    }
-                  },
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "mint",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "nestedTokenMintAddress"
-                    }
-                  }
-                ]
-              }
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "nestedTokenMintAddress",
-              "isWritable": false,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": ["Token mint for the nested associated token account."]
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "destinationAssociatedAccountAddress",
-              "isWritable": true,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": ["Wallet's associated token account."],
-              "defaultValue": {
-                "kind": "pdaValueNode",
-                "pda": {
-                  "kind": "pdaLinkNode",
-                  "name": "associatedToken"
-                },
-                "seeds": [
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "owner",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "walletAddress"
-                    }
-                  },
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "tokenProgram",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "tokenProgram"
-                    }
-                  },
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "mint",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "nestedTokenMintAddress"
-                    }
-                  }
-                ]
-              }
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "ownerAssociatedAccountAddress",
-              "isWritable": false,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": [
-                "Owner associated token account address, must be owned by `walletAddress`."
-              ],
-              "defaultValue": {
-                "kind": "pdaValueNode",
-                "pda": {
-                  "kind": "pdaLinkNode",
-                  "name": "associatedToken"
-                },
-                "seeds": [
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "owner",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "walletAddress"
-                    }
-                  },
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "tokenProgram",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "tokenProgram"
-                    }
-                  },
-                  {
-                    "kind": "pdaSeedValueNode",
-                    "name": "mint",
-                    "value": {
-                      "kind": "accountValueNode",
-                      "name": "ownerTokenMintAddress"
-                    }
-                  }
-                ]
-              }
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "ownerTokenMintAddress",
-              "isWritable": false,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": ["Token mint for the owner associated token account."]
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "walletAddress",
-              "isWritable": true,
-              "isSigner": true,
-              "isOptional": false,
-              "docs": ["Wallet address for the owner associated token account."]
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "tokenProgram",
-              "isWritable": false,
-              "isSigner": false,
-              "isOptional": false,
-              "docs": ["SPL Token program."],
-              "defaultValue": {
-                "kind": "publicKeyValueNode",
-                "publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
-              }
-            }
-          ],
-          "arguments": [
-            {
-              "kind": "instructionArgumentNode",
-              "name": "discriminator",
-              "type": {
-                "kind": "numberTypeNode",
-                "format": "u8",
-                "endian": "le"
-              },
-              "docs": [],
-              "defaultValue": { "kind": "numberValueNode", "number": 2 },
-              "defaultValueStrategy": "omitted"
-            }
-          ],
-          "discriminators": [
-            {
-              "kind": "fieldDiscriminatorNode",
-              "name": "discriminator",
-              "offset": 0
-            }
-          ],
-          "name": "recoverNestedAssociatedToken",
-          "docs": [
-            "Transfers from and closes a nested associated token account: an",
-            "associated token account owned by an associated token account.",
-            "",
-            "The tokens are moved from the nested associated token account to the",
-            "wallet's associated token account, and the nested account lamports are",
-            "moved to the wallet.",
-            "",
-            "Note: Nested token accounts are an anti-pattern, and almost always",
-            "created unintentionally, so this instruction should only be used to",
-            "recover from errors."
-          ],
-          "optionalAccountStrategy": "programId"
-        }
-      ],
-      "definedTypes": [],
-      "errors": [
-        {
-          "kind": "errorNode",
-          "name": "invalidOwner",
-          "code": 0,
-          "message": "Associated token account owner does not match address derivation",
-          "docs": [
-            "InvalidOwner: Associated token account owner does not match address derivation"
-          ]
-        }
-      ],
-      "name": "associatedToken",
-      "prefix": "",
-      "publicKey": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
-      "version": "1.1.1",
-      "origin": "shank"
-    },
-    {
-      "kind": "programNode",
-      "pdas": [],
-      "accounts": [],
-      "instructions": [
-        {
-          "kind": "instructionNode",
-          "accounts": [
-            {
-              "kind": "instructionAccountNode",
-              "name": "payer",
-              "isWritable": true,
-              "isSigner": true,
-              "isOptional": false,
-              "docs": [],
-              "defaultValue": { "kind": "payerValueNode" }
-            },
-            {
-              "kind": "instructionAccountNode",
-              "name": "newAccount",
-              "isWritable": true,
-              "isSigner": true,
-              "isOptional": false,
-              "docs": []
-            }
-          ],
-          "arguments": [
-            {
-              "kind": "instructionArgumentNode",
-              "name": "discriminator",
-              "type": {
-                "kind": "numberTypeNode",
-                "format": "u32",
-                "endian": "le"
-              },
-              "docs": [],
-              "defaultValue": { "kind": "numberValueNode", "number": 0 },
-              "defaultValueStrategy": "omitted"
-            },
-            {
-              "kind": "instructionArgumentNode",
-              "name": "lamports",
-              "type": {
-                "kind": "solAmountTypeNode",
-                "number": {
-                  "kind": "numberTypeNode",
-                  "format": "u64",
-                  "endian": "le"
-                }
-              },
-              "docs": []
-            },
-            {
-              "kind": "instructionArgumentNode",
-              "name": "space",
-              "type": {
-                "kind": "numberTypeNode",
-                "format": "u64",
-                "endian": "le"
-              },
-              "docs": []
-            },
-            {
-              "kind": "instructionArgumentNode",
-              "name": "programAddress",
-              "type": { "kind": "publicKeyTypeNode" },
-              "docs": []
-            }
-          ],
-          "byteDeltas": [
-            {
-              "kind": "instructionByteDeltaNode",
-              "value": { "kind": "argumentValueNode", "name": "space" },
-              "withHeader": true
-            }
-          ],
-          "discriminators": [
-            {
-              "kind": "fieldDiscriminatorNode",
-              "name": "discriminator",
-              "offset": 0
-            }
-          ],
-          "name": "createAccount",
-          "idlName": "CreateAccount",
-          "docs": [],
-          "optionalAccountStrategy": "programId"
-        }
-      ],
-      "definedTypes": [],
-      "errors": [],
-      "name": "system",
-      "prefix": "",
-      "publicKey": "11111111111111111111111111111111",
-      "version": "0.0.1",
-      "origin": "shank"
-    }
-  ],
-  "standard": "codama",
-  "version": "1.0.0"
-}

+ 0 - 15
packages/renderers-demo/test/e2e/token/package.json

@@ -1,15 +0,0 @@
-{
-    "name": "@codama/renderers-demo-e2e-token",
-    "private": true,
-    "version": "0.0.0",
-    "type": "commonjs",
-    "sideEffects": false,
-    "license": "MIT",
-    "scripts": {
-        "test": "../../../node_modules/.bin/codama run demo"
-    },
-    "devDependencies": {
-        "@codama/renderers-demo": "workspace:*"
-    },
-    "packageManager": "pnpm@9.1.0"
-}

+ 0 - 7
packages/renderers-demo/test/exports/commonjs.cjs

@@ -1,7 +0,0 @@
-const { definedTypeNode, numberTypeNode } = require('@codama/nodes');
-const { visit } = require('@codama/visitors-core');
-
-const { getRenderMapVisitor } = require('../../dist/index.node.cjs');
-
-const node = definedTypeNode({ name: 'answerToLife', type: numberTypeNode('u8') });
-visit(node, getRenderMapVisitor());

+ 0 - 10
packages/renderers-demo/test/exports/module.mjs

@@ -1,10 +0,0 @@
-// This ensures that we do not rely on `__dirname` in ES modules even when it is polyfilled.
-globalThis.__dirname = 'DO_NOT_USE';
-
-import { definedTypeNode, numberTypeNode } from '@codama/nodes';
-import { visit } from '@codama/visitors-core';
-
-import { getRenderMapVisitor } from '../../dist/index.node.mjs';
-
-const node = definedTypeNode({ name: 'answerToLife', type: numberTypeNode('u8') });
-visit(node, getRenderMapVisitor());

+ 0 - 138
packages/renderers-demo/test/fragments/accountPage.test.ts

@@ -1,138 +0,0 @@
-import {
-    accountNode,
-    constantPdaSeedNodeFromString,
-    definedTypeLinkNode,
-    numberTypeNode,
-    pdaNode,
-    publicKeyTypeNode,
-    structFieldTypeNode,
-    structTypeNode,
-    variablePdaSeedNode,
-} from '@codama/nodes';
-import { pipe } from '@codama/visitors-core';
-import { expect, test } from 'vitest';
-
-import { getAccountPageFragment } from '../../src/fragments';
-import { addFragmentImports, fragment } from '../../src/utils';
-import { getTypeVisitor } from '../../src/visitors';
-
-test('it renders account pages', () => {
-    const node = accountNode({
-        data: structTypeNode([structFieldTypeNode({ name: 'maxSupply', type: numberTypeNode('u64') })]),
-        docs: ['This is some description for the mint account.', 'It can use multiple lines.'],
-        name: 'mint',
-    });
-
-    const result = getAccountPageFragment(node, getTypeVisitor());
-
-    expect(result).toStrictEqual(fragment`---
-title: Mint
-description: Overview of the Mint account
----
-
-# Mint
-
-This is some description for the mint account.
-It can use multiple lines.
-
-## Account data
-
-\`\`\`ts
-type Mint = { maxSupply: number /* u64 */ }
-\`\`\``);
-});
-
-test('it renders a fixed size paragraph.', () => {
-    const node = accountNode({ name: 'token' });
-    const result = getAccountPageFragment(node, getTypeVisitor(), 42);
-
-    expect(result).toStrictEqual(fragment`---
-title: Token
-description: Overview of the Token account
----
-
-# Token
-
-## Account data
-
-\`\`\`ts
-type Token = {}
-\`\`\`
-
-This account has a fixed size of 42 bytes.`);
-});
-
-test('it renders PDA sections', () => {
-    const node = accountNode({
-        data: structTypeNode([structFieldTypeNode({ name: 'amount', type: numberTypeNode('u64') })]),
-        name: 'token',
-    });
-    const pda = pdaNode({
-        name: 'associatedToken',
-        seeds: [
-            variablePdaSeedNode('mint', publicKeyTypeNode()),
-            variablePdaSeedNode('owner', publicKeyTypeNode()),
-            constantPdaSeedNodeFromString('base58', 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'),
-        ],
-    });
-    const result = getAccountPageFragment(node, getTypeVisitor(), undefined, pda);
-
-    expect(result).toStrictEqual(
-        pipe(
-            fragment`---
-title: Token
-description: Overview of the Token account
----
-
-# Token
-
-## Account data
-
-\`\`\`ts
-type Token = { amount: number /* u64 */ }
-\`\`\`
-
-## PDA
-
-\`\`\`ts
-const [address, bump] = await findAssociatedTokenPda({ mint, owner });
-\`\`\`
-
-## See also
-
-- [AssociatedToken](../pdas/associatedToken.md)`,
-            f => addFragmentImports(f, 'generatedPdas', 'AssociatedToken'),
-        ),
-    );
-});
-
-test('it renders see also sections', () => {
-    const node = accountNode({
-        data: structTypeNode([structFieldTypeNode({ name: 'maxSupply', type: definedTypeLinkNode('someType') })]),
-        name: 'mint',
-    });
-
-    const result = getAccountPageFragment(node, getTypeVisitor());
-
-    expect(result).toStrictEqual(
-        pipe(
-            fragment`---
-title: Mint
-description: Overview of the Mint account
----
-
-# Mint
-
-## Account data
-
-\`\`\`ts
-type Mint = { maxSupply: SomeType }
-\`\`\`
-
-## See also
-
-- [SomeType](../types/someType.md)`,
-            f => addFragmentImports(f, 'generatedTypes', 'SomeType'),
-        ),
-    );
-});

+ 0 - 70
packages/renderers-demo/test/fragments/definedTypePage.test.ts

@@ -1,70 +0,0 @@
-import {
-    definedTypeLinkNode,
-    definedTypeNode,
-    numberTypeNode,
-    structFieldTypeNode,
-    structTypeNode,
-} from '@codama/nodes';
-import { pipe } from '@codama/visitors-core';
-import { expect, test } from 'vitest';
-
-import { getDefinedTypePageFragment } from '../../src/fragments';
-import { addFragmentImports, fragment } from '../../src/utils';
-import { getTypeVisitor } from '../../src/visitors';
-
-test('it renders defined type pages', () => {
-    const node = definedTypeNode({
-        docs: ['This is some description for the counter type.', 'It can use multiple lines.'],
-        name: 'counter',
-        type: structTypeNode([structFieldTypeNode({ name: 'value', type: numberTypeNode('u32') })]),
-    });
-
-    const result = getDefinedTypePageFragment(node, getTypeVisitor());
-
-    expect(result).toStrictEqual(fragment`---
-title: Counter
-description: Overview of the Counter type
----
-
-# Counter
-
-This is some description for the counter type.
-It can use multiple lines.
-
-## Type definition
-
-\`\`\`ts
-type Counter = { value: number /* u32 */ }
-\`\`\``);
-});
-
-test('it renders see also sections', () => {
-    const node = definedTypeNode({
-        name: 'counter',
-        type: structTypeNode([structFieldTypeNode({ name: 'value', type: definedTypeLinkNode('someType') })]),
-    });
-
-    const result = getDefinedTypePageFragment(node, getTypeVisitor());
-
-    expect(result).toStrictEqual(
-        pipe(
-            fragment`---
-title: Counter
-description: Overview of the Counter type
----
-
-# Counter
-
-## Type definition
-
-\`\`\`ts
-type Counter = { value: SomeType }
-\`\`\`
-
-## See also
-
-- [SomeType](someType.md)`,
-            f => addFragmentImports(f, 'generatedTypes', 'SomeType'),
-        ),
-    );
-});

+ 0 - 124
packages/renderers-demo/test/fragments/instructionPage.test.ts

@@ -1,124 +0,0 @@
-import {
-    definedTypeLinkNode,
-    instructionAccountNode,
-    instructionArgumentNode,
-    instructionNode,
-    numberTypeNode,
-} from '@codama/nodes';
-import { pipe } from '@codama/visitors-core';
-import { expect, test } from 'vitest';
-
-import { getInstructionPageFragment } from '../../src/fragments';
-import { addFragmentImports, fragment } from '../../src/utils';
-import { getTypeVisitor } from '../../src/visitors';
-
-test('it renders instruction pages', () => {
-    const node = instructionNode({
-        accounts: [
-            instructionAccountNode({
-                docs: ['Pays for the storage fees.'],
-                isSigner: true,
-                isWritable: true,
-                name: 'payer',
-            }),
-            instructionAccountNode({
-                docs: ['The account being created.'],
-                isSigner: false,
-                isWritable: true,
-                name: 'newAccount',
-            }),
-            instructionAccountNode({
-                docs: ['A dummy account.'],
-                isOptional: true,
-                isSigner: 'either',
-                isWritable: true,
-                name: 'optionalAccount',
-            }),
-        ],
-        arguments: [instructionArgumentNode({ name: 'lamports', type: numberTypeNode('u64') })],
-        docs: ['This is some description for the Create Account instruction.', 'It can use multiple lines.'],
-        name: 'createAccount',
-    });
-
-    const result = getInstructionPageFragment(node, getTypeVisitor());
-
-    expect(result).toStrictEqual(fragment`---
-title: Create Account
-description: Overview of the Create Account instruction
----
-
-# Create Account
-
-This is some description for the Create Account instruction.
-It can use multiple lines.
-
-## Instruction accounts
-
-| Name              | Signer | Writable | Required | Description                |
-| ----------------- | ------ | -------- | -------- | -------------------------- |
-| \`payer\`           | ✅      | ✅        | ✅        | Pays for the storage fees. |
-| \`newAccount\`      | ❌      | ✅        | ✅        | The account being created. |
-| \`optionalAccount\` | either | ✅        | ❌        | A dummy account.           |
-
-## Instruction arguments
-
-\`\`\`ts
-type CreateAccountInstruction = { lamports: number /* u64 */ }
-\`\`\``);
-});
-
-test('it renders a page with no accounts nor arguments', () => {
-    const node = instructionNode({ name: 'createAccount' });
-
-    const result = getInstructionPageFragment(node, getTypeVisitor());
-
-    expect(result).toStrictEqual(fragment`---
-title: Create Account
-description: Overview of the Create Account instruction
----
-
-# Create Account
-
-## Instruction accounts
-
-_This instruction has no accounts._
-
-## Instruction arguments
-
-_This instruction has no arguments._`);
-});
-
-test('it renders see also sections', () => {
-    const node = instructionNode({
-        arguments: [instructionArgumentNode({ name: 'lamports', type: definedTypeLinkNode('someType') })],
-        name: 'createAccount',
-    });
-
-    const result = getInstructionPageFragment(node, getTypeVisitor());
-
-    expect(result).toStrictEqual(
-        pipe(
-            fragment`---
-title: Create Account
-description: Overview of the Create Account instruction
----
-
-# Create Account
-
-## Instruction accounts
-
-_This instruction has no accounts._
-
-## Instruction arguments
-
-\`\`\`ts
-type CreateAccountInstruction = { lamports: SomeType }
-\`\`\`
-
-## See also
-
-- [SomeType](../types/someType.md)`,
-            f => addFragmentImports(f, 'generatedTypes', 'SomeType'),
-        ),
-    );
-});

+ 0 - 99
packages/renderers-demo/test/fragments/pdaPage.test.ts

@@ -1,99 +0,0 @@
-import {
-    constantPdaSeedNode,
-    constantPdaSeedNodeFromString,
-    definedTypeLinkNode,
-    enumValueNode,
-    pdaNode,
-    publicKeyTypeNode,
-    variablePdaSeedNode,
-} from '@codama/nodes';
-import { pipe } from '@codama/visitors-core';
-import { expect, test } from 'vitest';
-
-import { getPdaPageFragment } from '../../src/fragments';
-import { addFragmentImports, fragment } from '../../src/utils';
-import { getTypeVisitor, getValueVisitor } from '../../src/visitors';
-
-test('it renders PDA pages', () => {
-    const node = pdaNode({
-        docs: ['This is some description for the Associated Token PDA.', 'It can use multiple lines.'],
-        name: 'associatedToken',
-        seeds: [
-            variablePdaSeedNode('mint', publicKeyTypeNode(), 'The Mint account.'),
-            variablePdaSeedNode('owner', publicKeyTypeNode(), 'The Owner account.'),
-            constantPdaSeedNodeFromString('base58', 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'),
-        ],
-    });
-
-    const result = getPdaPageFragment(node, getTypeVisitor(), getValueVisitor());
-
-    expect(result).toStrictEqual(fragment`---
-title: Associated Token PDA
-description: Overview of the Associated Token PDA
----
-
-# Associated Token PDA
-
-This is some description for the Associated Token PDA.
-It can use multiple lines.
-
-## Seeds
-
-| Seed       | Type      | Value                                           |
-| ---------- | --------- | ----------------------------------------------- |
-| \`mint\`     | \`Address\` | The Mint account.                               |
-| \`owner\`    | \`Address\` | The Owner account.                              |
-| _constant_ | \`string\`  | \`"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"\` |`);
-});
-
-test('it renders a page with no seeds', () => {
-    const node = pdaNode({ name: 'counter', seeds: [] });
-
-    const result = getPdaPageFragment(node, getTypeVisitor(), getValueVisitor());
-
-    expect(result).toStrictEqual(fragment`---
-title: Counter PDA
-description: Overview of the Counter PDA
----
-
-# Counter PDA
-
-## Seeds
-
-_This PDA has no seeds._`);
-});
-
-test('it renders see also sections', () => {
-    const node = pdaNode({
-        name: 'counter',
-        seeds: [
-            variablePdaSeedNode('authority', publicKeyTypeNode(), 'The Authority account.'),
-            constantPdaSeedNode(definedTypeLinkNode('counterMode'), enumValueNode('counterMode', 'incremental')),
-        ],
-    });
-
-    const result = getPdaPageFragment(node, getTypeVisitor(), getValueVisitor());
-
-    expect(result).toStrictEqual(
-        pipe(
-            fragment`---
-title: Counter PDA
-description: Overview of the Counter PDA
----
-
-# Counter PDA
-
-## Seeds
-
-| Seed        | Type          | Value                     |
-| ----------- | ------------- | ------------------------- |
-| \`authority\` | \`Address\`     | The Authority account.    |
-| _constant_  | \`CounterMode\` | \`CounterMode.Incremental\` |
-
-## See also
-
-- [CounterMode](../types/counterMode.md)`,
-            f => addFragmentImports(f, 'generatedTypes', 'CounterMode'),
-        ),
-    );
-});

+ 0 - 131
packages/renderers-demo/test/fragments/programPage.test.ts

@@ -1,131 +0,0 @@
-import {
-    accountNode,
-    definedTypeNode,
-    enumTypeNode,
-    errorNode,
-    instructionNode,
-    pdaNode,
-    programNode,
-} from '@codama/nodes';
-import { expect, test } from 'vitest';
-
-import { getProgramPageFragment } from '../../src/fragments';
-import { fragment } from '../../src/utils';
-
-test('it renders program pages', () => {
-    const node = programNode({
-        accounts: [accountNode({ name: 'mint' }), accountNode({ name: 'token' })],
-        definedTypes: [
-            definedTypeNode({ name: 'accountState', type: enumTypeNode([]) }),
-            definedTypeNode({ name: 'authorityType', type: enumTypeNode([]) }),
-        ],
-        docs: ['This is some description for the token program.', 'It can use multiple lines.'],
-        errors: [
-            errorNode({ code: 0, message: 'Lamport balance below rent-exempt threshold', name: 'notRentExempt' }),
-            errorNode({ code: 1, message: 'Insufficient funds', name: 'insufficientFunds' }),
-            errorNode({ code: 2, message: 'Invalid Mint account', name: 'invalidMint' }),
-            errorNode({ code: 3, message: 'Account not associated with this Mint', name: 'mintMismatch' }),
-            errorNode({ code: 4, message: 'Owner does not match', name: 'ownerMismatch' }),
-        ],
-        instructions: [
-            instructionNode({ name: 'initializeMint' }),
-            instructionNode({ name: 'initializeAccount' }),
-            instructionNode({ name: 'mintTo' }),
-            instructionNode({ name: 'transfer' }),
-            instructionNode({ name: 'revoke' }),
-            instructionNode({ name: 'burn' }),
-        ],
-        name: 'token',
-        pdas: [pdaNode({ name: 'associatedToken', seeds: [] })],
-        publicKey: 'TokenKegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
-        version: '1.2.3',
-    });
-
-    const result = getProgramPageFragment(node);
-
-    expect(result).toStrictEqual(fragment`---
-title: Token Program
-description: Overview of the Token Program
----
-
-# Token Program
-
-This is some description for the token program.
-It can use multiple lines.
-
-## Information
-
-- Address: \`TokenKegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\`
-- Version: \`1.2.3\`
-
-## Accounts
-
-- [Mint](accounts/mint.md)
-- [Token](accounts/token.md)
-
-## Instructions
-
-- [Initialize Mint](instructions/initializeMint.md)
-- [Initialize Account](instructions/initializeAccount.md)
-- [Mint To](instructions/mintTo.md)
-- [Transfer](instructions/transfer.md)
-- [Revoke](instructions/revoke.md)
-- [Burn](instructions/burn.md)
-
-## PDAs
-
-- [Associated Token](pdas/associatedToken.md)
-
-## Defined types
-
-- [Account State](definedTypes/accountState.md)
-- [Authority Type](definedTypes/authorityType.md)
-
-## Errors
-
-| Name               | Code | Message                                     |
-| ------------------ | ---- | ------------------------------------------- |
-| Not Rent Exempt    | \`0\`  | Lamport balance below rent-exempt threshold |
-| Insufficient Funds | \`1\`  | Insufficient funds                          |
-| Invalid Mint       | \`2\`  | Invalid Mint account                        |
-| Mint Mismatch      | \`3\`  | Account not associated with this Mint       |
-| Owner Mismatch     | \`4\`  | Owner does not match                        |`);
-});
-
-test('it renders pages for empty program', () => {
-    const node = programNode({ name: 'token', publicKey: 'TokenKegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' });
-
-    const result = getProgramPageFragment(node);
-
-    expect(result).toStrictEqual(fragment`---
-title: Token Program
-description: Overview of the Token Program
----
-
-# Token Program
-
-## Information
-
-- Address: \`TokenKegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\`
-- Version: \`0.0.0\`
-
-## Accounts
-
-_This program has no accounts._
-
-## Instructions
-
-_This program has no instructions._
-
-## PDAs
-
-_This program has no PDAs._
-
-## Defined types
-
-_This program has no defined types._
-
-## Errors
-
-_This program has no errors._`);
-});

+ 0 - 322
packages/renderers-demo/test/visitors/getTypeVisitor.test.ts

@@ -1,322 +0,0 @@
-import {
-    AccountNode,
-    accountNode,
-    amountTypeNode,
-    arrayTypeNode,
-    booleanTypeNode,
-    bytesTypeNode,
-    constantValueNodeFromString,
-    dateTimeTypeNode,
-    definedTypeLinkNode,
-    DefinedTypeNode,
-    definedTypeNode,
-    enumEmptyVariantTypeNode,
-    enumStructVariantTypeNode,
-    enumTupleVariantTypeNode,
-    enumTypeNode,
-    fixedCountNode,
-    fixedSizeTypeNode,
-    hiddenPrefixTypeNode,
-    hiddenSuffixTypeNode,
-    instructionArgumentNode,
-    InstructionNode,
-    instructionNode,
-    mapTypeNode,
-    numberTypeNode,
-    optionTypeNode,
-    postOffsetTypeNode,
-    preOffsetTypeNode,
-    publicKeyTypeNode,
-    remainderCountNode,
-    remainderOptionTypeNode,
-    sentinelTypeNode,
-    setTypeNode,
-    sizePrefixTypeNode,
-    solAmountTypeNode,
-    stringTypeNode,
-    structFieldTypeNode,
-    structTypeNode,
-    tupleTypeNode,
-    TypeNode,
-    zeroableOptionTypeNode,
-} from '@codama/nodes';
-import { visit } from '@codama/visitors-core';
-import { expect, test } from 'vitest';
-
-import { addFragmentImports, Fragment, fragment } from '../../src/utils';
-import { getTypeVisitor } from '../../src/visitors';
-
-function expectType(
-    node: AccountNode | DefinedTypeNode | InstructionNode | TypeNode,
-    expected: Fragment | string,
-): void {
-    expect(visit(node, getTypeVisitor())).toStrictEqual(
-        typeof expected === 'string' ? fragment`${expected}` : expected,
-    );
-}
-
-test('it renders accounts', () => {
-    expectType(
-        accountNode({
-            data: structTypeNode([
-                structFieldTypeNode({ name: 'amount', type: numberTypeNode('u64') }),
-                structFieldTypeNode({ name: 'decimals', type: numberTypeNode('u8') }),
-            ]),
-            name: 'mint',
-        }),
-        'type Mint = { amount: number /* u64 */; decimals: number /* u8 */ }',
-    );
-});
-
-test('it ignores amount types', () => {
-    expectType(amountTypeNode(numberTypeNode('u32'), 2), 'number /* u32 */');
-});
-
-test('it renders array types', () => {
-    expectType(arrayTypeNode(stringTypeNode('utf8'), remainderCountNode()), 'Array<string>');
-});
-
-test('it renders boolean types', () => {
-    expectType(booleanTypeNode(), 'boolean');
-});
-
-test('it renders bytes types', () => {
-    expectType(bytesTypeNode(), 'bytes');
-});
-
-test('it ignores date time types', () => {
-    expectType(dateTimeTypeNode(numberTypeNode('u32')), 'number /* u32 */');
-});
-
-test('it renders defined types', () => {
-    expectType(definedTypeNode({ name: 'nameAlias', type: stringTypeNode('utf8') }), 'type NameAlias = string');
-    expectType(
-        definedTypeNode({
-            name: 'person',
-            type: structTypeNode([
-                structFieldTypeNode({ name: 'name', type: definedTypeLinkNode('nameAlias') }),
-                structFieldTypeNode({ name: 'age', type: numberTypeNode('u32') }),
-            ]),
-        }),
-        addFragmentImports(
-            fragment`type Person = { name: NameAlias; age: number /* u32 */ }`,
-            'generatedTypes',
-            'NameAlias',
-        ),
-    );
-    expectType(
-        definedTypeNode({
-            name: 'direction',
-            type: enumTypeNode([
-                enumEmptyVariantTypeNode('up'),
-                enumEmptyVariantTypeNode('right'),
-                enumEmptyVariantTypeNode('down'),
-                enumEmptyVariantTypeNode('left'),
-            ]),
-        }),
-        'enum Direction { Up, Right, Down, Left }',
-    );
-    expectType(
-        definedTypeNode({
-            name: 'command',
-            type: enumTypeNode([
-                enumTupleVariantTypeNode('write', tupleTypeNode([stringTypeNode('utf8')])),
-                enumTupleVariantTypeNode('yell', tupleTypeNode([stringTypeNode('utf8')])),
-            ]),
-        }),
-        'type Command = { __kind: "Write"; fields: [string] } | { __kind: "Yell"; fields: [string] }',
-    );
-});
-
-test('it renders defined type links', () => {
-    expectType(
-        definedTypeLinkNode('semverVersion'),
-        addFragmentImports(fragment`SemverVersion`, 'generatedTypes', 'SemverVersion'),
-    );
-});
-
-test('it renders enum types', () => {
-    expectType(
-        enumTypeNode([
-            enumEmptyVariantTypeNode('up'),
-            enumEmptyVariantTypeNode('right'),
-            enumEmptyVariantTypeNode('down'),
-            enumEmptyVariantTypeNode('left'),
-        ]),
-        '{ Up, Right, Down, Left }',
-    );
-    expectType(
-        enumTypeNode([
-            enumEmptyVariantTypeNode('firstVariantInTheEnumWithALongName'),
-            enumEmptyVariantTypeNode('secondVariantInTheEnumWithALongName'),
-            enumEmptyVariantTypeNode('thirdVariantInTheEnumWithALongName'),
-        ]),
-        `{
-    FirstVariantInTheEnumWithALongName,
-    SecondVariantInTheEnumWithALongName,
-    ThirdVariantInTheEnumWithALongName,
-}`,
-    );
-    expectType(
-        enumTypeNode([
-            enumTupleVariantTypeNode('write', tupleTypeNode([stringTypeNode('utf8')])),
-            enumTupleVariantTypeNode('yell', tupleTypeNode([stringTypeNode('utf8')])),
-        ]),
-        `{ __kind: "Write"; fields: [string] } | { __kind: "Yell"; fields: [string] }`,
-    );
-    expectType(
-        enumTypeNode([
-            enumTupleVariantTypeNode('write', tupleTypeNode([stringTypeNode('utf8')])),
-            enumStructVariantTypeNode(
-                'move',
-                structTypeNode([
-                    structFieldTypeNode({ name: 'x', type: numberTypeNode('u64') }),
-                    structFieldTypeNode({ name: 'y', type: numberTypeNode('u64') }),
-                ]),
-            ),
-            enumEmptyVariantTypeNode('quit'),
-        ]),
-        `| { __kind: "Write"; fields: [string] }
-    | { __kind: "Move"; x: number /* u64 */; y: number /* u64 */ }
-    | { __kind: "Quit" }`,
-    );
-});
-
-test('it ignores fixed size types', () => {
-    expectType(fixedSizeTypeNode(stringTypeNode('utf8'), 42), 'string');
-});
-
-test('it ignores hidden prefix types', () => {
-    expectType(hiddenPrefixTypeNode(stringTypeNode('utf8'), []), 'string');
-});
-
-test('it ignores hidden suffix types', () => {
-    expectType(hiddenSuffixTypeNode(stringTypeNode('utf8'), []), 'string');
-});
-
-test('it renders instructions', () => {
-    expectType(
-        instructionNode({
-            arguments: [
-                instructionArgumentNode({ name: 'discriminator', type: numberTypeNode('u8') }),
-                instructionArgumentNode({ name: 'authority', type: publicKeyTypeNode() }),
-                instructionArgumentNode({ name: 'age', type: numberTypeNode('u32') }),
-                instructionArgumentNode({ name: 'name', type: stringTypeNode('utf8') }),
-            ],
-            name: 'initializePerson',
-        }),
-        'type InitializePersonInstruction = { discriminator: number /* u8 */; authority: Address; age: number /* u32 */; name: string }',
-    );
-});
-
-test('it renders map types', () => {
-    expectType(
-        mapTypeNode(stringTypeNode('utf8'), numberTypeNode('u32'), fixedCountNode(3)),
-        'Map<string, number /* u32 */>',
-    );
-});
-
-test('it renders number types', () => {
-    expectType(numberTypeNode('u32'), 'number /* u32 */');
-});
-
-test('it renders option types', () => {
-    expectType(optionTypeNode(stringTypeNode('utf8')), 'Option<string>');
-});
-
-test('it ignores post-offset types', () => {
-    expectType(postOffsetTypeNode(stringTypeNode('utf8'), 4), 'string');
-});
-
-test('it ignores pre-offset types', () => {
-    expectType(preOffsetTypeNode(stringTypeNode('utf8'), 4), 'string');
-});
-
-test('it renders public key types', () => {
-    expectType(publicKeyTypeNode(), 'Address');
-});
-
-test('it renders remainder option types', () => {
-    expectType(remainderOptionTypeNode(stringTypeNode('utf8')), 'Option<string>');
-});
-
-test('it ignores sentinel types', () => {
-    expectType(sentinelTypeNode(stringTypeNode('utf8'), constantValueNodeFromString('base16', 'ff')), 'string');
-});
-
-test('it renders set types', () => {
-    expectType(setTypeNode(stringTypeNode('utf8'), fixedCountNode(3)), 'Set<string>');
-});
-
-test('it ignores size prefix types', () => {
-    expectType(sizePrefixTypeNode(stringTypeNode('utf8'), numberTypeNode('u32')), 'string');
-});
-
-test('it ignores sol amount types', () => {
-    expectType(solAmountTypeNode(numberTypeNode('u32')), 'number /* u32 */');
-});
-
-test('it renders string types', () => {
-    expectType(stringTypeNode('utf8'), 'string');
-});
-
-test('it renders struct types', () => {
-    expectType(structTypeNode([]), '{}');
-    expectType(
-        structTypeNode([
-            structFieldTypeNode({ name: 'name', type: stringTypeNode('utf8') }),
-            structFieldTypeNode({ name: 'age', type: numberTypeNode('u32') }),
-        ]),
-        '{ name: string; age: number /* u32 */ }',
-    );
-    expectType(
-        structTypeNode([
-            structFieldTypeNode({ name: 'firstFieldInTheTupleWithALongName', type: stringTypeNode('utf8') }),
-            structFieldTypeNode({ name: 'secondFieldInTheTupleWithALongName', type: stringTypeNode('utf8') }),
-            structFieldTypeNode({ name: 'thirdFieldInTheTupleWithALongName', type: stringTypeNode('utf8') }),
-            structFieldTypeNode({
-                name: 'nestedStruct',
-                type: structTypeNode([
-                    structFieldTypeNode({ name: 'name', type: stringTypeNode('utf8') }),
-                    structFieldTypeNode({ name: 'age', type: numberTypeNode('u32') }),
-                ]),
-            }),
-        ]),
-        `{
-    firstFieldInTheTupleWithALongName: string;
-    secondFieldInTheTupleWithALongName: string;
-    thirdFieldInTheTupleWithALongName: string;
-    nestedStruct: { name: string; age: number /* u32 */ };
-}`,
-    );
-});
-
-test('it renders tuple types', () => {
-    expectType(tupleTypeNode([stringTypeNode('utf8'), numberTypeNode('u32')]), '[string, number /* u32 */]');
-    expectType(
-        tupleTypeNode([
-            definedTypeLinkNode('firstItemInTheTupleWithALongName'),
-            definedTypeLinkNode('secondItemInTheTupleWithALongName'),
-            definedTypeLinkNode('thirdItemInTheTupleWithALongName'),
-            tupleTypeNode([stringTypeNode('utf8'), numberTypeNode('u32')]),
-        ]),
-        addFragmentImports(
-            fragment`[
-    FirstItemInTheTupleWithALongName,
-    SecondItemInTheTupleWithALongName,
-    ThirdItemInTheTupleWithALongName,
-    [string, number /* u32 */],
-]`,
-            'generatedTypes',
-            [
-                'FirstItemInTheTupleWithALongName',
-                'SecondItemInTheTupleWithALongName',
-                'ThirdItemInTheTupleWithALongName',
-            ],
-        ),
-    );
-});
-
-test('it renders ZeroableOption types', () => {
-    expectType(zeroableOptionTypeNode(stringTypeNode('utf8')), 'Option<string>');
-});

+ 0 - 130
packages/renderers-demo/test/visitors/getValueVisitor.test.ts

@@ -1,130 +0,0 @@
-import {
-    arrayValueNode,
-    booleanValueNode,
-    bytesValueNode,
-    constantValueNode,
-    constantValueNodeFromBytes,
-    enumValueNode,
-    mapEntryValueNode,
-    mapValueNode,
-    noneValueNode,
-    numberTypeNode,
-    numberValueNode,
-    ProgramIdValueNode,
-    programIdValueNode,
-    publicKeyValueNode,
-    setValueNode,
-    someValueNode,
-    stringValueNode,
-    structFieldValueNode,
-    structValueNode,
-    tupleValueNode,
-    ValueNode,
-} from '@codama/nodes';
-import { visit } from '@codama/visitors-core';
-import { expect, test } from 'vitest';
-
-import { addFragmentImports, Fragment, fragment } from '../../src/utils';
-import { getValueVisitor } from '../../src/visitors';
-
-function expectValue(node: ProgramIdValueNode | ValueNode, expected: Fragment | string): void {
-    expect(visit(node, getValueVisitor())).toStrictEqual(
-        typeof expected === 'string' ? fragment`${expected}` : expected,
-    );
-}
-
-test('it renders array values', () => {
-    expectValue(arrayValueNode([]), '[]');
-    expectValue(arrayValueNode([numberValueNode(1), numberValueNode(2)]), '[1, 2]');
-});
-
-test('it renders boolean values', () => {
-    expectValue(booleanValueNode(true), 'true');
-    expectValue(booleanValueNode(false), 'false');
-});
-
-test('it renders byte values', () => {
-    expectValue(bytesValueNode('utf8', ''), '0x');
-    expectValue(bytesValueNode('utf8', 'hello'), '0x68656c6c6f');
-    expectValue(bytesValueNode('base16', 'deadface'), '0xdeadface');
-    expectValue(bytesValueNode('base58', 'HeLLo'), '0x0b39f6f0');
-    expectValue(bytesValueNode('base64', 'hello'), '0x85e965');
-});
-
-test('it renders constant values', () => {
-    expectValue(constantValueNode(numberTypeNode('u8'), numberValueNode(42)), '42');
-    expectValue(constantValueNodeFromBytes('utf8', 'hello'), '0x68656c6c6f');
-    expectValue(constantValueNodeFromBytes('base16', 'deadbeef'), '0xdeadbeef');
-    expectValue(constantValueNodeFromBytes('base58', 'HeLLo'), '0x0b39f6f0');
-    expectValue(constantValueNodeFromBytes('base64', 'hello'), '0x85e965');
-});
-
-test('it renders enum values', () => {
-    expectValue(
-        enumValueNode('direction', 'left'),
-        addFragmentImports(fragment`Direction.Left`, 'generatedTypes', 'Direction'),
-    );
-});
-
-test('it renders map values', () => {
-    expectValue(
-        mapValueNode([
-            mapEntryValueNode(stringValueNode('Alice'), numberValueNode(30)),
-            mapEntryValueNode(stringValueNode('Bob'), numberValueNode(42)),
-            mapEntryValueNode(stringValueNode('Carla'), numberValueNode(39)),
-        ]),
-        'new Map([["Alice", 30], ["Bob", 42], ["Carla", 39]])',
-    );
-});
-
-test('it renders none values', () => {
-    expectValue(noneValueNode(), 'null');
-});
-
-test('it renders number values', () => {
-    expectValue(numberValueNode(0), '0');
-    expectValue(numberValueNode(42), '42');
-    expectValue(numberValueNode(-2.5), '-2.5');
-});
-
-test('it renders program id values', () => {
-    expectValue(programIdValueNode(), 'programId');
-});
-
-test('it renders public key values', () => {
-    expectValue(
-        publicKeyValueNode('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'),
-        '"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"',
-    );
-});
-
-test('it renders set values', () => {
-    expectValue(setValueNode([]), 'new Set([])');
-    expectValue(setValueNode([numberValueNode(1), numberValueNode(2)]), 'new Set([1, 2])');
-});
-
-test('it ignores some values', () => {
-    expectValue(someValueNode(numberValueNode(42)), '42');
-    expectValue(someValueNode(stringValueNode('hello')), '"hello"');
-});
-
-test('it renders string values', () => {
-    expectValue(stringValueNode(''), '""');
-    expectValue(stringValueNode('hello'), '"hello"');
-});
-
-test('it renders struct values', () => {
-    expectValue(structValueNode([]), '{}');
-    expectValue(
-        structValueNode([
-            structFieldValueNode('name', stringValueNode('Alice')),
-            structFieldValueNode('age', numberValueNode(30)),
-        ]),
-        '{ name: "Alice", age: 30 }',
-    );
-});
-
-test('it renders tuple values', () => {
-    expectValue(tupleValueNode([]), '[]');
-    expectValue(tupleValueNode([stringValueNode('Alice'), numberValueNode(30)]), '["Alice", 30]');
-});

+ 0 - 10
packages/renderers-demo/tsconfig.declarations.json

@@ -1,10 +0,0 @@
-{
-    "compilerOptions": {
-        "declaration": true,
-        "declarationMap": true,
-        "emitDeclarationOnly": true,
-        "outDir": "./dist/types"
-    },
-    "extends": "./tsconfig.json",
-    "include": ["src/index.ts", "src/types"]
-}

+ 0 - 7
packages/renderers-demo/tsconfig.json

@@ -1,7 +0,0 @@
-{
-    "$schema": "https://json.schemastore.org/tsconfig",
-    "compilerOptions": { "lib": [] },
-    "display": "@codama/renderers-demo",
-    "extends": "../../tsconfig.json",
-    "include": ["src", "test"]
-}

+ 0 - 5
packages/renderers-demo/tsup.config.ts

@@ -1,5 +0,0 @@
-import { defineConfig } from 'tsup';
-
-import { getPackageBuildConfigs } from '../../tsup.config.base';
-
-export default defineConfig(getPackageBuildConfigs());

+ 0 - 8
packages/renderers-demo/vitest.config.mts

@@ -1,8 +0,0 @@
-import { defineConfig } from 'vitest/config';
-import { getVitestConfig } from '../../vitest.config.base.mjs';
-
-export default defineConfig({
-    test: {
-        projects: [getVitestConfig('browser'), getVitestConfig('node'), getVitestConfig('react-native')],
-    },
-});

+ 0 - 1
packages/renderers-js-umi/.gitignore

@@ -1 +0,0 @@
-dist/

+ 0 - 5
packages/renderers-js-umi/.prettierignore

@@ -1,5 +0,0 @@
-dist/
-e2e/
-test-ledger/
-target/
-CHANGELOG.md

+ 0 - 477
packages/renderers-js-umi/CHANGELOG.md

@@ -1,477 +0,0 @@
-# @codama/renderers-js-umi
-
-## 1.1.22
-
-### Patch Changes
-
-- Updated dependencies [[`a62b4c5`](https://github.com/codama-idl/codama/commit/a62b4c5701b92642b8e4069953969f1f9c3dd20c)]:
-    - @codama/errors@1.3.6
-    - @codama/nodes@1.3.6
-    - @codama/renderers-core@1.2.1
-    - @codama/validators@1.3.6
-    - @codama/visitors-core@1.3.6
-
-## 1.1.21
-
-### Patch Changes
-
-- Updated dependencies [[`e5e9077`](https://github.com/codama-idl/codama/commit/e5e90779ebec786cf35932d06110c75ef71137eb), [`e5e9077`](https://github.com/codama-idl/codama/commit/e5e90779ebec786cf35932d06110c75ef71137eb), [`8638fa7`](https://github.com/codama-idl/codama/commit/8638fa7b9b81ca4fb2ad895ec52221a1804649fe), [`5282efe`](https://github.com/codama-idl/codama/commit/5282efe3ad56083e0210d3e76e5834690335fa42), [`0bb08e6`](https://github.com/codama-idl/codama/commit/0bb08e64855ec4671b263dd6c145bb8567eefb94), [`412e143`](https://github.com/codama-idl/codama/commit/412e1439f3043eaa1224fa173519216c05368625)]:
-    - @codama/renderers-core@1.2.0
-    - @codama/visitors-core@1.3.5
-    - @codama/validators@1.3.5
-    - @codama/errors@1.3.5
-    - @codama/nodes@1.3.5
-
-## 1.1.20
-
-### Patch Changes
-
-- [#788](https://github.com/codama-idl/codama/pull/788) [`44f725e`](https://github.com/codama-idl/codama/commit/44f725e8243edb19b60a3f046974aaef87563f93) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Refactor fragments and render maps so that they are functional and immutable.
-
-- Updated dependencies [[`d6e2349`](https://github.com/codama-idl/codama/commit/d6e23493ee0228765ec3dbdb5c0ff9e712394b29), [`1f9f614`](https://github.com/codama-idl/codama/commit/1f9f614d3ed02439135a6037343f139e8a127c48), [`44f725e`](https://github.com/codama-idl/codama/commit/44f725e8243edb19b60a3f046974aaef87563f93)]:
-    - @codama/renderers-core@1.1.0
-    - @codama/visitors-core@1.3.4
-    - @codama/validators@1.3.4
-    - @codama/errors@1.3.4
-    - @codama/nodes@1.3.4
-
-## 1.1.19
-
-### Patch Changes
-
-- Updated dependencies []:
-    - @codama/errors@1.3.3
-    - @codama/nodes@1.3.3
-    - @codama/validators@1.3.3
-    - @codama/visitors-core@1.3.3
-    - @codama/renderers-core@1.0.19
-
-## 1.1.18
-
-### Patch Changes
-
-- Updated dependencies [[`b912ac8`](https://github.com/codama-idl/codama/commit/b912ac89b2d041c1f783da8d6f023fdf77dbd7e7)]:
-    - @codama/visitors-core@1.3.2
-    - @codama/renderers-core@1.0.18
-    - @codama/validators@1.3.2
-    - @codama/errors@1.3.2
-    - @codama/nodes@1.3.2
-
-## 1.1.17
-
-### Patch Changes
-
-- Updated dependencies [[`71caa87`](https://github.com/codama-idl/codama/commit/71caa87d7010ecfeed5fb08e79955e5a7e8c0779)]:
-    - @codama/visitors-core@1.3.1
-    - @codama/renderers-core@1.0.17
-    - @codama/validators@1.3.1
-    - @codama/errors@1.3.1
-    - @codama/nodes@1.3.1
-
-## 1.1.16
-
-### Patch Changes
-
-- [#713](https://github.com/codama-idl/codama/pull/713) [`364578e`](https://github.com/codama-idl/codama/commit/364578e45eca74fa24b452cc9ef22222da03ba39) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Update `@solana/kit` dependencies and remove `I` prefixes in types
-
-## 1.1.15
-
-### Patch Changes
-
-- Updated dependencies []:
-    - @codama/errors@1.3.0
-    - @codama/nodes@1.3.0
-    - @codama/validators@1.3.0
-    - @codama/visitors-core@1.3.0
-    - @codama/renderers-core@1.0.16
-
-## 1.1.14
-
-### Patch Changes
-
-- Updated dependencies []:
-    - @codama/errors@1.2.13
-    - @codama/nodes@1.2.13
-    - @codama/validators@1.2.13
-    - @codama/visitors-core@1.2.13
-    - @codama/renderers-core@1.0.15
-
-## 1.1.13
-
-### Patch Changes
-
-- Updated dependencies []:
-    - @codama/errors@1.2.12
-    - @codama/nodes@1.2.12
-    - @codama/validators@1.2.12
-    - @codama/visitors-core@1.2.12
-    - @codama/renderers-core@1.0.14
-
-## 1.1.12
-
-### Patch Changes
-
-- [#512](https://github.com/codama-idl/codama/pull/512) [`5071455`](https://github.com/codama-idl/codama/commit/5071455b05359fc427c1d6295e7abb0e39503a15) Thanks [@stegaBOB](https://github.com/stegaBOB)! - Marked additional node type fields as optional
-
-- Updated dependencies [[`5071455`](https://github.com/codama-idl/codama/commit/5071455b05359fc427c1d6295e7abb0e39503a15)]:
-    - @codama/visitors-core@1.2.11
-    - @codama/nodes@1.2.11
-    - @codama/renderers-core@1.0.13
-    - @codama/validators@1.2.11
-    - @codama/errors@1.2.11
-
-## 1.1.11
-
-### Patch Changes
-
-- Updated dependencies []:
-    - @codama/errors@1.2.10
-    - @codama/nodes@1.2.10
-    - @codama/validators@1.2.10
-    - @codama/visitors-core@1.2.10
-    - @codama/renderers-core@1.0.12
-
-## 1.1.10
-
-### Patch Changes
-
-- Updated dependencies []:
-    - @codama/errors@1.2.9
-    - @codama/nodes@1.2.9
-    - @codama/validators@1.2.9
-    - @codama/visitors-core@1.2.9
-    - @codama/renderers-core@1.0.11
-
-## 1.1.9
-
-### Patch Changes
-
-- Updated dependencies []:
-    - @codama/errors@1.2.8
-    - @codama/nodes@1.2.8
-    - @codama/validators@1.2.8
-    - @codama/visitors-core@1.2.8
-    - @codama/renderers-core@1.0.10
-
-## 1.1.8
-
-### Patch Changes
-
-- Updated dependencies [[`7e275ab`](https://github.com/codama-idl/codama/commit/7e275ab51c6d1b20b54ea9f4976b0692a308b2d2)]:
-    - @codama/errors@1.2.7
-    - @codama/nodes@1.2.7
-    - @codama/renderers-core@1.0.9
-    - @codama/validators@1.2.7
-    - @codama/visitors-core@1.2.7
-
-## 1.1.7
-
-### Patch Changes
-
-- Updated dependencies []:
-    - @codama/errors@1.2.6
-    - @codama/nodes@1.2.6
-    - @codama/validators@1.2.6
-    - @codama/visitors-core@1.2.6
-    - @codama/renderers-core@1.0.8
-
-## 1.1.6
-
-### Patch Changes
-
-- Updated dependencies []:
-    - @codama/errors@1.2.5
-    - @codama/nodes@1.2.5
-    - @codama/validators@1.2.5
-    - @codama/visitors-core@1.2.5
-    - @codama/renderers-core@1.0.7
-
-## 1.1.5
-
-### Patch Changes
-
-- Updated dependencies [[`f0c2190`](https://github.com/codama-idl/codama/commit/f0c219076af58c098319f4ca9494a98e198d99a1)]:
-    - @codama/errors@1.2.4
-    - @codama/nodes@1.2.4
-    - @codama/renderers-core@1.0.6
-    - @codama/validators@1.2.4
-    - @codama/visitors-core@1.2.4
-
-## 1.1.4
-
-### Patch Changes
-
-- Updated dependencies [[`4ceeb5e`](https://github.com/codama-idl/codama/commit/4ceeb5e6c479690fe878d25af6a5d48953adfa6a)]:
-    - @codama/errors@1.2.3
-    - @codama/nodes@1.2.3
-    - @codama/renderers-core@1.0.5
-    - @codama/validators@1.2.3
-    - @codama/visitors-core@1.2.3
-
-## 1.1.3
-
-### Patch Changes
-
-- [#425](https://github.com/codama-idl/codama/pull/425) [`7bb6920`](https://github.com/codama-idl/codama/commit/7bb6920d58d268f604889d5181c2dac0300efe0f) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Export `renderVisitor` function of all renderers packages as `default` export.
-
-- Updated dependencies []:
-    - @codama/errors@1.2.2
-    - @codama/nodes@1.2.2
-    - @codama/validators@1.2.2
-    - @codama/visitors-core@1.2.2
-    - @codama/renderers-core@1.0.4
-
-## 1.1.2
-
-### Patch Changes
-
-- Updated dependencies [[`92efaa9`](https://github.com/codama-idl/codama/commit/92efaa9261f38de10a1b691c5b25ea0ecf95360b)]:
-    - @codama/errors@1.2.1
-    - @codama/nodes@1.2.1
-    - @codama/renderers-core@1.0.3
-    - @codama/validators@1.2.1
-    - @codama/visitors-core@1.2.1
-
-## 1.1.1
-
-### Patch Changes
-
-- [#334](https://github.com/codama-idl/codama/pull/334) [`2622727`](https://github.com/codama-idl/codama/commit/2622727abf05788bf9dac51a324cfc0a1e0685a7) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Bump dependencies
-
-- Updated dependencies [[`a3225b0`](https://github.com/codama-idl/codama/commit/a3225b0e68e59746f911865653bb1d05c3aec22b), [`2622727`](https://github.com/codama-idl/codama/commit/2622727abf05788bf9dac51a324cfc0a1e0685a7)]:
-    - @codama/nodes@1.2.0
-    - @codama/visitors-core@1.2.0
-    - @codama/errors@1.2.0
-    - @codama/renderers-core@1.0.2
-    - @codama/validators@1.2.0
-
-## 1.1.0
-
-### Minor Changes
-
-- [#284](https://github.com/codama-idl/codama/pull/284) [`d1bab68`](https://github.com/codama-idl/codama/commit/d1bab68c1c987df83da9684058e1f4316d557720) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Fix LinkNode paths for JavaScript `getTypeManifestVisitors`
-
-### Patch Changes
-
-- Updated dependencies [[`c31eea8`](https://github.com/codama-idl/codama/commit/c31eea83c3f8659094324acc2b780054d72b7e90), [`81dedc1`](https://github.com/codama-idl/codama/commit/81dedc195feab40bfc3aa676a633a8340ad56e24), [`4799a7f`](https://github.com/codama-idl/codama/commit/4799a7f291677304823aa206bed64baabc20eb5b), [`1f52f00`](https://github.com/codama-idl/codama/commit/1f52f00ba2a75a783879abfbaf4397c3e04e4db4), [`ce4936c`](https://github.com/codama-idl/codama/commit/ce4936c031a2ba07f1bdb52cab8debcfec810d8c), [`e95783b`](https://github.com/codama-idl/codama/commit/e95783bf02fd12327ca5b6f1c1c4e50e189dd241)]:
-    - @codama/visitors-core@1.1.0
-    - @codama/renderers-core@1.0.1
-    - @codama/validators@1.1.0
-    - @codama/errors@1.1.0
-    - @codama/nodes@1.1.0
-
-## 1.0.1
-
-### Patch Changes
-
-- [#245](https://github.com/codama-idl/codama/pull/245) [`e02e2ad`](https://github.com/codama-idl/codama/commit/e02e2ad9c03caacb02c4bf24d6b7d962ba3b80c6) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Fix JS rendering issues for instruction edge cases
-
-## 1.0.0
-
-### Major Changes
-
-- [#236](https://github.com/codama-idl/codama/pull/236) [`4057b0d`](https://github.com/codama-idl/codama/commit/4057b0d6bb28a207ff6d473aa117d81336a323d8) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Publish codama v1 packages
-
-### Patch Changes
-
-- Updated dependencies [[`4057b0d`](https://github.com/codama-idl/codama/commit/4057b0d6bb28a207ff6d473aa117d81336a323d8)]:
-    - @codama/errors@1.0.0
-    - @codama/nodes@1.0.0
-    - @codama/renderers-core@1.0.0
-    - @codama/validators@1.0.0
-    - @codama/visitors-core@1.0.0
-
-## 0.22.0
-
-### Minor Changes
-
-- [#183](https://github.com/codama-idl/codama/pull/183) [`c8c5934`](https://github.com/codama-idl/codama/commit/c8c593466294f3ec7dca1fb828254e10aa312925) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add `InstructionLinkNode`, `InstructionAccountLinkNode` and `InstructionArgumentLinkNode`
-
-- [#175](https://github.com/codama-idl/codama/pull/175) [`2b1259b`](https://github.com/codama-idl/codama/commit/2b1259b566aa439ca61c28f7ef72ff9c0817e540) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Remove `importFrom` attributes from link nodes and resolvers
-
-    Instead, a new `linkOverrides` attribute is introduced on all renderers to redirect a link node or a resolver to a custom path or module.
-
-### Patch Changes
-
-- Updated dependencies [[`c8c5934`](https://github.com/codama-idl/codama/commit/c8c593466294f3ec7dca1fb828254e10aa312925), [`2b1259b`](https://github.com/codama-idl/codama/commit/2b1259b566aa439ca61c28f7ef72ff9c0817e540), [`93a318a`](https://github.com/codama-idl/codama/commit/93a318a9b7ee435eb37934b0ab390e160d50968b)]:
-    - @codama/visitors-core@0.22.0
-    - @codama/errors@0.22.0
-    - @codama/nodes@0.22.0
-    - @codama/renderers-core@0.22.0
-    - @codama/validators@0.22.0
-
-## 0.21.7
-
-### Patch Changes
-
-- Updated dependencies [[`a6849d3`](https://github.com/codama-idl/codama/commit/a6849d36a828e2b6b703f2a86d2ea0ae6d2fa0d8)]:
-    - @codama/errors@0.21.5
-    - @codama/nodes@0.21.5
-    - @codama/renderers-core@0.21.3
-    - @codama/validators@0.21.5
-    - @codama/visitors-core@0.21.5
-
-## 0.21.6
-
-### Patch Changes
-
-- Updated dependencies []:
-    - @codama/errors@0.21.4
-    - @codama/nodes@0.21.4
-    - @codama/validators@0.21.4
-    - @codama/visitors-core@0.21.4
-    - @codama/renderers-core@0.21.2
-
-## 0.21.5
-
-### Patch Changes
-
-- [#123](https://github.com/codama-idl/codama/pull/123) [`59ceb1d`](https://github.com/codama-idl/codama/commit/59ceb1d7803307b3a1a5e23ea3267934ad87bfc6) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update prettier
-
-- Updated dependencies [[`59ceb1d`](https://github.com/codama-idl/codama/commit/59ceb1d7803307b3a1a5e23ea3267934ad87bfc6)]:
-    - @codama/visitors-core@0.21.3
-    - @codama/renderers-core@0.21.1
-    - @codama/validators@0.21.3
-    - @codama/errors@0.21.3
-    - @codama/nodes@0.21.3
-
-## 0.21.4
-
-### Patch Changes
-
-- Updated dependencies [[`23e3dc2`](https://github.com/codama-idl/codama/commit/23e3dc2da6072fefc40e8205c19e44b646aa40a0), [`33de843`](https://github.com/codama-idl/codama/commit/33de84386af661dc870b248b5301dafe1df2aba2), [`f13abb0`](https://github.com/codama-idl/codama/commit/f13abb01fc4a6fc76fe4566e3f667aab92b43480)]:
-    - @codama/visitors-core@0.21.2
-    - @codama/renderers-core@0.21.0
-    - @codama/validators@0.21.2
-    - @codama/errors@0.21.2
-    - @codama/nodes@0.21.2
-
-## 0.21.3
-
-### Patch Changes
-
-- Updated dependencies [[`2e8ce36`](https://github.com/codama-idl/codama/commit/2e8ce36af43a853673b0805c86a62672869de487)]:
-    - @codama/visitors-core@0.21.1
-    - @codama/renderers-core@0.20.8
-    - @codama/validators@0.21.1
-    - @codama/errors@0.21.1
-    - @codama/nodes@0.21.1
-
-## 0.21.2
-
-### Patch Changes
-
-- [#160](https://github.com/codama-idl/codama/pull/160) [`87bab8a`](https://github.com/codama-idl/codama/commit/87bab8ad6f2e40903064be9258a741e176eeef77) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Bump to web3js rc
-
-## 0.21.1
-
-### Patch Changes
-
-- [#156](https://github.com/codama-idl/codama/pull/156) [`38d6de8`](https://github.com/codama-idl/codama/commit/38d6de848e93417d5e5f0935e5bfb5264dc8caf3) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Fix missing eddsa interface for inlined PDA used as default values
-
-## 0.21.0
-
-### Minor Changes
-
-- [#110](https://github.com/codama-idl/codama/pull/110) [`2d45383`](https://github.com/codama-idl/codama/commit/2d453830621047da2a18001ab427db9b603ad025) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Update renderers to tp4 of web3.js
-
-- [#111](https://github.com/codama-idl/codama/pull/111) [`2f26050`](https://github.com/codama-idl/codama/commit/2f26050ddbcbdefcefbd853e1017a30c94442e1f) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add `RemainderOptionTypeNode`
-
-    A node that represents an optional item using a child `TypeNode` such that the item can either be present — i.e. `Some<T>` — or absent — i.e. `None` — depending on whether or not there are remaining bytes in the buffer.
-
-### Patch Changes
-
-- Updated dependencies [[`2f26050`](https://github.com/codama-idl/codama/commit/2f26050ddbcbdefcefbd853e1017a30c94442e1f)]:
-    - @codama/visitors-core@0.21.0
-    - @codama/errors@0.21.0
-    - @codama/nodes@0.21.0
-    - @codama/renderers-core@0.20.7
-    - @codama/validators@0.21.0
-
-## 0.20.8
-
-### Patch Changes
-
-- [#102](https://github.com/codama-idl/codama/pull/102) [`bcf6a23`](https://github.com/codama-idl/codama/commit/bcf6a23fa0e0d1f1a064ea6ddcfc9c092190a51f) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Replace \_\_DEV\_\_ with NODE_ENV is not production in codama
-
-- Updated dependencies [[`bcf6a23`](https://github.com/codama-idl/codama/commit/bcf6a23fa0e0d1f1a064ea6ddcfc9c092190a51f)]:
-    - @codama/renderers-core@0.20.6
-    - @codama/errors@0.20.6
-    - @codama/nodes@0.20.6
-    - @codama/validators@0.20.6
-    - @codama/visitors-core@0.20.6
-
-## 0.20.7
-
-### Patch Changes
-
-- Updated dependencies [[`908acba`](https://github.com/codama-idl/codama/commit/908acba99cdb0b761ed79aebf6828e23fde97ef8), [`88572e8`](https://github.com/codama-idl/codama/commit/88572e8eaffe09b5b8c48c4e9aebfdeb8bc149e6)]:
-    - @codama/errors@0.20.5
-    - @codama/nodes@0.20.5
-    - @codama/visitors-core@0.20.5
-    - @codama/renderers-core@0.20.5
-    - @codama/validators@0.20.5
-
-## 0.20.6
-
-### Patch Changes
-
-- [#88](https://github.com/codama-idl/codama/pull/88) [`1d4223c`](https://github.com/codama-idl/codama/commit/1d4223c601ca34884f3b6ab1dfc42a3296502af2) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Fix constant PDA seed rendering in renderers-js-umi
-
-## 0.20.5
-
-### Patch Changes
-
-- [#43](https://github.com/codama-idl/codama/pull/43) [`668b550`](https://github.com/codama-idl/codama/commit/668b550aa2172c24ddb3b8751d91e67e94a93fa4) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Allow PdaValueNode to inline their own PdaNode definition
-
-- Updated dependencies [[`668b550`](https://github.com/codama-idl/codama/commit/668b550aa2172c24ddb3b8751d91e67e94a93fa4)]:
-    - @codama/nodes@0.20.4
-    - @codama/errors@0.20.4
-    - @codama/renderers-core@0.20.4
-    - @codama/validators@0.20.4
-    - @codama/visitors-core@0.20.4
-
-## 0.20.4
-
-### Patch Changes
-
-- Updated dependencies [[`d938e04`](https://github.com/codama-idl/codama/commit/d938e04b8cf5765c5bb2b68916b29e892fd5ad70), [`4bc5823`](https://github.com/codama-idl/codama/commit/4bc5823377824198bd5a6432d16333b2cb1d8b8c)]:
-    - @codama/visitors-core@0.20.3
-    - @codama/errors@0.20.3
-    - @codama/renderers-core@0.20.3
-    - @codama/validators@0.20.3
-    - @codama/nodes@0.20.3
-
-## 0.20.3
-
-### Patch Changes
-
-- [`964776f`](https://github.com/codama-idl/codama/commit/964776fe73402c236d334032821013674c3b1a5e) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Fix invalid package dependencies
-
-- Updated dependencies [[`964776f`](https://github.com/codama-idl/codama/commit/964776fe73402c236d334032821013674c3b1a5e)]:
-    - @codama/errors@0.20.2
-    - @codama/nodes@0.20.2
-    - @codama/renderers-core@0.20.2
-    - @codama/validators@0.20.2
-    - @codama/visitors-core@0.20.2
-
-## 0.20.2
-
-### Patch Changes
-
-- [`2857238`](https://github.com/codama-idl/codama/commit/28572383c1f6f6968df88be61d49b41059475d94) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Update renderer headers and pnpm
-
-- [#24](https://github.com/codama-idl/codama/pull/24) [`b9cd6b2`](https://github.com/codama-idl/codama/commit/b9cd6b29f4e5229512a7cc3dd28a6f6074dedd98) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Fix "object is not extensible" in PDA helper function
-
-## 0.20.1
-
-### Patch Changes
-
-- [#21](https://github.com/codama-idl/codama/pull/21) [`0dec0c8`](https://github.com/codama-idl/codama/commit/0dec0c8fff5e80fafc964416058e4ddf1db2bda0) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Fix ESM and CJS exports on renderers
-
-- Updated dependencies [[`0dec0c8`](https://github.com/codama-idl/codama/commit/0dec0c8fff5e80fafc964416058e4ddf1db2bda0)]:
-    - @codama/renderers-core@0.20.1
-    - @codama/errors@0.20.1
-    - @codama/nodes@0.20.1
-    - @codama/validators@0.20.1
-    - @codama/visitors-core@0.20.1

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů