├── .circleci └── config.yml ├── .cspell.json ├── .eslintignore ├── .eslintrc.js ├── .flowconfig ├── .gitignore ├── .prettierignore ├── .prettierrc.js ├── CHANGELOG.md ├── LICENSE ├── README.md ├── _typedoc └── custom-theme │ ├── assets │ ├── css │ │ └── main.css │ ├── images │ │ ├── icons.png │ │ ├── icons@2x.png │ │ ├── widgets.png │ │ └── widgets@2x.png │ └── js │ │ └── main.js │ ├── layouts │ └── default.hbs │ ├── partials │ ├── analytics.hbs │ ├── breadcrumb.hbs │ ├── comment.hbs │ ├── footer.hbs │ ├── header.hbs │ ├── hierarchy.hbs │ ├── index.hbs │ ├── member.declaration.hbs │ ├── member.getterSetter.hbs │ ├── member.hbs │ ├── member.reference.hbs │ ├── member.signature.body.hbs │ ├── member.signature.title.hbs │ ├── member.signatures.hbs │ ├── member.sources.hbs │ ├── members.group.hbs │ ├── members.hbs │ ├── navigation.hbs │ ├── parameter.hbs │ ├── toc.hbs │ ├── toc.root.hbs │ ├── type.hbs │ ├── typeAndParent.hbs │ └── typeParameters.hbs │ └── templates │ ├── index.hbs │ └── reflection.hbs ├── example-node ├── index.ts └── tsconfig.json ├── package.json ├── src ├── Ada.ts ├── errors │ ├── deviceStatusError.ts │ ├── deviceUnsupported.ts │ ├── errorBase.ts │ ├── index.ts │ ├── invalidData.ts │ └── invalidDataReason.ts ├── interactions │ ├── common │ │ ├── ins.ts │ │ └── types.ts │ ├── deriveAddress.ts │ ├── deriveNativeScriptHash.ts │ ├── getExtendedPublicKeys.ts │ ├── getSerial.ts │ ├── getVersion.ts │ ├── runTests.ts │ ├── serialization │ │ ├── addressParams.ts │ │ ├── cVoteRegistration.ts │ │ ├── messageData.ts │ │ ├── nativeScript.ts │ │ ├── operationalCertificate.ts │ │ ├── poolRegistrationCertificate.ts │ │ ├── txAuxiliaryData.ts │ │ ├── txCertificate.ts │ │ ├── txInit.ts │ │ ├── txOther.ts │ │ └── txOutput.ts │ ├── showAddress.ts │ ├── signCVote.ts │ ├── signMessage.ts │ ├── signOperationalCertificate.ts │ └── signTx.ts ├── parsing │ ├── address.ts │ ├── cVote.ts │ ├── certificate.ts │ ├── constants.ts │ ├── messageData.ts │ ├── nativeScript.ts │ ├── network.ts │ ├── operationalCertificate.ts │ ├── output.ts │ ├── poolRegistration.ts │ ├── transaction.ts │ └── txAuxiliaryData.ts ├── tsconfig.json ├── types │ ├── internal.ts │ └── public.ts ├── utils.ts └── utils │ ├── address.ts │ ├── assert.ts │ ├── parse.ts │ └── serialize.ts ├── test ├── device-self-test │ └── runTestsDevice.test.ts ├── integration │ ├── __fixtures__ │ │ ├── deriveAddress.ts │ │ ├── deriveNativeScriptHash.ts │ │ ├── getExtendedPublicKey.ts │ │ ├── signCVote.ts │ │ ├── signMessage.ts │ │ ├── signOperationalCertificate.ts │ │ ├── signTx.ts │ │ ├── signTxCVote.ts │ │ ├── signTxPlutus.ts │ │ ├── signTxPoolRegistration.ts │ │ ├── signTxPoolRegistrationRejects.ts │ │ ├── signTxRejects.ts │ │ └── txElements.ts │ ├── deriveAddress.test.ts │ ├── deriveNativeScriptHash.test.ts │ ├── getExtendedPublicKey.test.ts │ ├── getSerial.test.ts │ ├── getVersion.test.ts │ ├── signCVote.test.ts │ ├── signMessage.test.ts │ ├── signOperationalCertificate.test.ts │ ├── signTx.test.ts │ ├── signTxCVote.test.ts │ └── signTxPoolRegistration.test.ts ├── test_utils.ts ├── tsconfig.json └── unit │ └── parse.test.ts ├── tsconfig.base.json ├── tsconfig.json ├── typedoc.json ├── workspace.code-workspace └── yarn.lock /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # Javascript Node CircleCI 2.0 configuration file 2 | # 3 | # Check https://circleci.com/docs/2.0/language-javascript/ for more details 4 | # 5 | version: 2.1 6 | jobs: 7 | build_and_test: 8 | docker: 9 | - image: cimg/node:18.12 10 | working_directory: ~/repo 11 | steps: 12 | - checkout 13 | - run: 14 | name: Install system dependencies 15 | command: sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev libudev-dev 16 | 17 | - restore_cache: 18 | key: v2-dependencies-{{ checksum "yarn.lock" }} 19 | - run: 20 | name: Install dependencies 21 | command: yarn install 22 | - save_cache: 23 | paths: 24 | - node_modules 25 | key: v2-dependencies-{{ checksum "yarn.lock" }} 26 | 27 | - run: 28 | name: Lint 29 | command: yarn lint 30 | - run: 31 | name: Spellcheck 32 | command: yarn spell:check 33 | - run: 34 | name: Audit dependencies 35 | command: yarn audit 36 | - run: 37 | name: Build 38 | command: yarn build 39 | - run: 40 | name: Try building the example 41 | command: yarn tsc -p example-node/tsconfig.json --noEmit 42 | - run: 43 | name: Try generating the docs 44 | command: yarn typedoc 45 | - run: 46 | name: Try generating and checking flow types 47 | # piping output to cat to bypass process.stdout.columns being 0 48 | # which causes flowgen console logging to crash 49 | # see https://github.com/aws/aws-cdk/issues/2253 50 | command: | 51 | yarn build:flowtypes | cat 52 | yarn run flow 53 | 54 | update_docs: 55 | docker: 56 | - image: cimg/node:18.12 57 | working_directory: ~/repo 58 | steps: 59 | - checkout 60 | - run: 61 | name: Install system dependencies 62 | command: sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev libudev-dev 63 | - restore_cache: 64 | keys: 65 | - v2-dependencies-{{ checksum "yarn.lock" }} 66 | - run: 67 | name: Install dependencies 68 | command: yarn install 69 | - save_cache: 70 | paths: 71 | - node_modules 72 | key: v2-dependencies-{{ checksum "yarn.lock" }} 73 | 74 | - run: 75 | name: Get ledgerjs library version 76 | command: | 77 | LEDGERJS_PACKAGE_VERSION=$(cat package.json \ 78 | | grep version \ 79 | | head -1 \ 80 | | awk -F: '{ print $2 }' \ 81 | | sed 's/[",]//g') 82 | echo $LEDGERJS_PACKAGE_VERSION > ledgerjs_version.tmp 83 | - run: 84 | name: Build docs 85 | command: yarn typedoc --out docs_build/$(cat ledgerjs_version.tmp) 86 | 87 | - run: 88 | name: Generate redirect to current version of docs 89 | command: echo '' > docs_build/index.html 90 | 91 | - add_ssh_keys: 92 | fingerprints: 93 | - e4:d2:8d:f4:aa:02:4a:ea:ed:72:00:62:1e:f7:9b:bc 94 | - run: 95 | name: Setup git 96 | command: | 97 | git config user.email "ci-build@vacuumlabs.com" 98 | git config user.name "ci-build@vacuumlabs.com" 99 | - run: 100 | name: Deploy docs 101 | command: yarn gh-pages --add --dist docs_build --message "[ci skip] Docs for v$(cat ledgerjs_version.tmp)" 102 | 103 | 104 | workflows: 105 | version: 2 106 | main_workflow: 107 | jobs: 108 | - build_and_test 109 | - update_docs: 110 | requires: 111 | - build_and_test 112 | filters: 113 | branches: 114 | only: 115 | - master 116 | -------------------------------------------------------------------------------- /.cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2", 3 | "language": "en", 4 | "ignorePaths": [ 5 | ".cspell.json", 6 | "build", 7 | "node_modules", 8 | "**/*.tgz", 9 | "**/package.json", 10 | "**/tsconfig.json", 11 | ".vscode/**", 12 | "_typedoc" 13 | ], 14 | "ignoreRegExpList": [ 15 | "0x[A-Z]{7,25}", 16 | "\\S{32,}", 17 | "[A-Za-z0-9+/]+={1,2}", 18 | "deadbe[ea]f", 19 | "'[a-z0-9]{16}'" 20 | ], 21 | "words": [ 22 | "Adalite", 23 | "APDU", 24 | "argparse", 25 | "basex", 26 | "bbbc", 27 | "bech", 28 | "Benc", 29 | "bytestring", 30 | "cardano", 31 | "cbor", 32 | "CHAINCODE", 33 | "chsh", 34 | "cimg", 35 | "concats", 36 | "cryptoprovider", 37 | "cvote", 38 | "cword", 39 | "czvf", 40 | "Deregisters", 41 | "deregistration", 42 | "DEVEL", 43 | "dpkg", 44 | "DREP", 45 | "endians", 46 | "financials", 47 | "hwsfile", 48 | "insertable", 49 | "jcli", 50 | "jormungandr", 51 | "keyhash", 52 | "Kojn", 53 | "ledgerhq", 54 | "ledgerjs", 55 | "libudev", 56 | "libusb", 57 | "multiasset", 58 | "multidelegation", 59 | "nargs", 60 | "opcert", 61 | "PAYMENTADDRESS", 62 | "PAYMENTPATH", 63 | "pkey", 64 | "policyid", 65 | "ppershing", 66 | "PREPROD", 67 | "pubkey", 68 | "pubkeys", 69 | "retcode", 70 | "scripthash", 71 | "skey", 72 | "speculos", 73 | "STAKINGPATH", 74 | "Stax", 75 | "subarray", 76 | "subparser", 77 | "subparsers", 78 | "TLDR", 79 | "unfixable", 80 | "uniquifier", 81 | "uniquify", 82 | "utxo", 83 | "vacuumlabs", 84 | "vkey", 85 | "votecast", 86 | "VOTINGPURPOSE", 87 | "yoroi", 88 | "zxvf" 89 | ] 90 | } 91 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | docs_generated/ 3 | _typedoc/ 4 | node_modules/ 5 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // copied from https://github.com/vacuumlabs/nufi and adjusted 2 | module.exports = { 3 | extends: [ 4 | 'plugin:@typescript-eslint/recommended', 5 | 'plugin:import/typescript', 6 | 'vacuumlabs', 7 | 'prettier', 8 | ], 9 | env: { 10 | "es6": true, 11 | "node": true, 12 | "mocha": true 13 | }, 14 | rules: { 15 | '@typescript-eslint/no-explicit-any': [ 16 | 'error', 17 | { 18 | ignoreRestArgs: true, 19 | }, 20 | ], 21 | '@typescript-eslint/no-var-requires': 'off', 22 | '@typescript-eslint/explicit-module-boundary-types': 'off', 23 | 24 | // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md#how-to-use 25 | // note you must disable the base rule as it can report incorrect errors 26 | 'no-use-before-define': 'off', 27 | '@typescript-eslint/no-use-before-define': ['error'], 28 | 'no-unused-vars': 'off', 29 | '@typescript-eslint/no-unused-vars': ['error', {argsIgnorePattern: '^_'}], 30 | // Why detect cycles: https://spin.atomicobject.com/2018/06/25/circular-dependencies-javascript 31 | // TLDR - memory crashes, tangled architecture, unreadable code, undefined imports 32 | 'import/no-cycle': [ 33 | 'error', 34 | ], 35 | 'import/no-extraneous-dependencies': ['error'], 36 | 'no-duplicate-imports': 'off', 37 | 'import/no-duplicates': ['error'], 38 | 'spaced-comment': ['error', 'always', {block: {balanced: true}}], 39 | 'quote-props': ['error', 'consistent'], 40 | '@typescript-eslint/no-redeclare': ['error'], 41 | 42 | // redundant, suggested in https://github.com/typescript-eslint/typescript-eslint/issues/4510 43 | 'consistent-return': 'off', 44 | }, 45 | parser: '@typescript-eslint/parser', 46 | parserOptions: { 47 | ecmaVersion: 2020, 48 | sourceType: 'module', 49 | createDefaultProgram: true, 50 | }, 51 | settings: { 52 | 'import/resolver': { 53 | node: { 54 | extensions: ['.js', '.ts'], 55 | }, 56 | }, 57 | }, 58 | plugins: ['import'], 59 | } 60 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | .*/node_modules/resolve/test/resolver/malformed_package_json/package.json 3 | 4 | [include] 5 | 6 | [untyped] 7 | 8 | [libs] 9 | 10 | [lints] 11 | 12 | [options] 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | .vscode 4 | docs_generated/ 5 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .eslintrc.js 2 | README.md 3 | CHANGELOG.md 4 | docs 5 | docs_generated/ 6 | .vscode 7 | .circleci 8 | dist/ 9 | _typedoc/ 10 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | quoteProps: 'consistent', 4 | semi: false, 5 | singleQuote: true, 6 | trailingComma: 'all', 7 | } 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![image](https://user-images.githubusercontent.com/837681/53001830-d7c8a600-342b-11e9-9038-e745cc91e543.png) 2 | 3 | ### @cardano-foundation/ledgerjs-hw-app-cardano 4 | 5 | JS Library for communication with Ledger Hardware Wallets. 6 | This library is compatible with the [Cardano ADA Ledger Application](https://github.com/cardano-foundation/ledger-app-cardano). 7 | 8 | Note: this project comes with both [Typescript](https://www.typescriptlang.org/) and [Flow](https://flow.org/) type definitions, but only the Typescript ones are checked for correctness. 9 | 10 | ### Example code 11 | 12 | Example code interacting with `hw-app-cardano` is provided in `example-node` directory. 13 | You can execute it with the `yarn run-example` command. 14 | 15 | ### Tests 16 | 17 | Automated tests are provided. There are two types of tests 18 | 19 | 1. `yarn test-integration`. Tests JS API and integration with the physical Ledger device. 20 | * `yarn test-speculos`. Runs the `test-integration` test against the Speculos emulator. 21 | 22 | 2. `yarn device-self-test`. Runs tests defined in the application code of the Ledger application, requires development build of the application. 23 | * `yarn device-self-test-speculos`. Runs `yarn device-self-test` on Speculos (useful because the full app in debug mode with self-tests does not fit on Nano S). 24 | 25 | Note that for these tests it is advisable to install the developer build of the Cardano app with _headless_ mode enabled unless you want to verify the UI flows, otherwise you will need a significant amount of time to manually confirm all prompts on the device. 26 | 27 | #### Speculos 28 | 29 | To run the Speculos emulator, you first need to install it. The [Speculos documentation](https://speculos.ledger.com/installation/build.html) should take you through the installation process. 30 | After installing you can start the emulator with the correct seed: 31 | `` 32 | speculos /path/to/your/ledger-app-cardano-shelley/bin/app.elf --seed "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about" --display headless 33 | `` 34 | *Note: replace `/path/to/your/ledger-app-cardano-shelley/bin/app.elf` with a path to the `app.elf` file of the Cardano ledger app.* 35 | This will start the emulator with a TCP server listening on port 9999 for APDU messages and a web interface running on port 5000 (http://localhost:5000) which can be used to interact with the app. 36 | The `--display headless` option just hides any window UI. 37 | 38 | ### Documentation 39 | 40 | - you can build the docs by running `yarn gen-docs` and then navigate to docs_generated/index.html 41 | - generated docs can also be found at (https://vacuumlabs.github.io/ledgerjs-cardano-shelley) 42 | - [CHANGELOG](CHANGELOG.md) 43 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/assets/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardano-foundation/ledgerjs-hw-app-cardano/ee543694deaa9dd39d049d3efb888515bf058faa/_typedoc/custom-theme/assets/images/icons.png -------------------------------------------------------------------------------- /_typedoc/custom-theme/assets/images/icons@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardano-foundation/ledgerjs-hw-app-cardano/ee543694deaa9dd39d049d3efb888515bf058faa/_typedoc/custom-theme/assets/images/icons@2x.png -------------------------------------------------------------------------------- /_typedoc/custom-theme/assets/images/widgets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardano-foundation/ledgerjs-hw-app-cardano/ee543694deaa9dd39d049d3efb888515bf058faa/_typedoc/custom-theme/assets/images/widgets.png -------------------------------------------------------------------------------- /_typedoc/custom-theme/assets/images/widgets@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardano-foundation/ledgerjs-hw-app-cardano/ee543694deaa9dd39d049d3efb888515bf058faa/_typedoc/custom-theme/assets/images/widgets@2x.png -------------------------------------------------------------------------------- /_typedoc/custom-theme/layouts/default.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{#ifCond model.name '==' project.name}}{{project.name}}{{else}}{{model.name}} | {{project.name}}{{/ifCond}} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {{> header}} 16 | 17 |
18 |
19 |
20 | {{{contents}}} 21 |
22 | 39 |
40 |
41 | 42 | {{> footer}} 43 | 44 |
45 | 46 | 47 | {{> analytics}} 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/analytics.hbs: -------------------------------------------------------------------------------- 1 | {{#if settings.gaID}} 2 | 11 | {{/if}} -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/breadcrumb.hbs: -------------------------------------------------------------------------------- 1 | {{#if parent}} 2 | {{#with parent}}{{> breadcrumb}}{{/with}} 3 |
  • 4 | {{#if url}} 5 | {{name}} 6 | {{else}} 7 | {{name}} 8 | {{/if}} 9 |
  • 10 | {{else}} 11 | {{#if url}} 12 |
  • 13 | {{ name }} 14 |
  • 15 | {{/if}} 16 | {{/if}} 17 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/comment.hbs: -------------------------------------------------------------------------------- 1 | {{#with comment}} 2 | {{#if hasVisibleComponent}} 3 |
    4 | {{#if shortText}} 5 |
    6 | {{#markdown}}{{{shortText}}}{{/markdown}} 7 |
    8 | {{/if}} 9 | {{#if text}} 10 | {{#markdown}}{{{text}}}{{/markdown}} 11 | {{/if}} 12 | {{#if tags}} 13 |
    14 | {{#each tags}} 15 |
    {{tagName}}
    16 |
    {{#markdown}}{{{text}}}{{/markdown}}
    17 | {{/each}} 18 |
    19 | {{/if}} 20 |
    21 | {{/if}} 22 | {{/with}} -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/footer.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 |

    Legend

    5 |
    6 | {{#each legend}} 7 |
      8 | {{#each .}} 9 |
    • {{name}}
    • 10 | {{/each}} 11 |
    12 | {{/each}} 13 |
    14 |
    15 | 16 | 17 | {{#unless settings.hideGenerator}} 18 |
    19 |

    Generated using TypeDoc

    20 |
    21 | {{/unless}} -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/header.hbs: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 |
    5 | 18 | 19 |
    20 |
    21 | Options 22 |
    23 |
    24 | All 25 |
      26 |
    • Public
    • 27 |
    • Public/Protected
    • 28 |
    • All
    • 29 |
    30 |
    31 | 32 | 33 | 34 | 35 | {{#unless settings.excludeExternals}} 36 | 37 | 38 | {{/unless}} 39 |
    40 |
    41 | 42 | Menu 43 |
    44 |
    45 |
    46 |
    47 |
    48 |
    49 | {{#if model.parent}} {{! Don't show breadcrumbs on main project page, it is the root page. !}} 50 |
      51 | {{#with model}}{{> breadcrumb}}{{/with}} 52 |
    53 | {{/if}} 54 |

    {{#compact}} 55 | {{#ifCond model.kindString "!==" "Project" }} 56 | {{model.kindString}}  57 | {{/ifCond}} 58 | {{model.name}} 59 | {{#if model.typeParameters}} 60 | < 61 | {{#each model.typeParameters}} 62 | {{#if @index}}, {{/if}} 63 | {{name}} 64 | {{/each}} 65 | > 66 | {{/if}} 67 | {{/compact}}

    68 |
    69 |
    70 |
    71 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/hierarchy.hbs: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/index.hbs: -------------------------------------------------------------------------------- 1 | {{#if categories}} 2 |
    3 |

    Index

    4 |
    5 |
    6 | {{#each categories}} 7 |
    8 |

    {{title}}

    9 | 14 |
    15 | {{/each}} 16 |
    17 |
    18 |
    19 | {{else}} 20 | {{#if groups}} 21 |
    22 |

    Index

    23 |
    24 |
    25 | {{#each groups}} 26 |
    27 | {{#if categories}} 28 | {{#each categories}} 29 |

    {{#if title}}{{title}} {{/if}}{{../title}}

    30 | 35 | {{/each}} 36 | {{else}} 37 |

    {{title}}

    38 | 43 | {{/if}} 44 |
    45 | {{/each}} 46 |
    47 |
    48 |
    49 | {{/if}} 50 | {{/if}} 51 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/member.declaration.hbs: -------------------------------------------------------------------------------- 1 | {{> comment}} 2 | 3 |
    {{#compact}} 4 | {{{wbr name}}} 5 | {{#if typeParameters}} 6 | < 7 | {{#each typeParameters}} 8 | {{#if @index}}, {{/if}} 9 | {{name}} 10 | {{/each}} 11 | > 12 | {{/if}} 13 | {{#if isOptional}}?{{/if}}: {{#with type}}{{>type}}{{/with}} 14 | {{#if defaultValue}} 15 | 16 |  =  17 | {{defaultValue}} 18 | 19 | {{/if}} 20 | {{/compact}}
    21 | 22 | {{> member.sources}} 23 | 24 | 25 | {{#if typeParameters}} 26 |

    Type parameters

    27 | {{> typeParameters}} 28 | {{/if}} 29 | 30 | {{#if type.declaration}} 31 |
    32 |

    Type declaration

    33 | {{#with type.declaration}} 34 | {{> parameter}} 35 | {{/with}} 36 |
    37 | {{/if}} 38 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/member.getterSetter.hbs: -------------------------------------------------------------------------------- 1 | 21 | 22 | 38 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/member.hbs: -------------------------------------------------------------------------------- 1 |
    2 | 3 | {{#if name}} 4 |

    {{#each flags}}{{this}} {{/each}}{{{wbr name}}}

    5 | {{/if}} 6 | 7 | {{#if signatures}} 8 | {{> member.signatures}} 9 | {{else}}{{#if hasGetterOrSetter}} 10 | {{> member.getterSetter}} 11 | {{else}}{{#if isReference}} 12 | {{> member.reference}} 13 | {{else}} 14 | {{> member.declaration}} 15 | {{/if}}{{/if}}{{/if}} 16 | 17 | {{#each groups}} 18 | {{#each children}} 19 | {{#unless hasOwnDocument}} 20 | {{> member}} 21 | {{/unless}} 22 | {{/each}} 23 | {{/each}} 24 |
    25 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/member.reference.hbs: -------------------------------------------------------------------------------- 1 | {{#with tryGetTargetReflectionDeep}} 2 | {{#ifCond ../name '===' name}} 3 | Re-exports {{name}} 4 | {{else if flags.isExported}} 5 | Renames and re-exports {{name}} 6 | {{else}} 7 | Renames and exports {{name}} 8 | {{/ifCond}} 9 | {{else}} 10 | Re-exports {{name}} 11 | {{/with}} 12 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/member.signature.body.hbs: -------------------------------------------------------------------------------- 1 | {{#unless hideSources}} 2 | {{> member.sources}} 3 | {{/unless}} 4 | 5 | {{> comment}} 6 | 7 | {{#if typeParameters}} 8 |

    Type parameters

    9 | {{> typeParameters}} 10 | {{/if}} 11 | 12 | {{#if parameters}} 13 |

    Parameters

    14 | 42 | {{/if}} 43 | 44 | {{#if type}} 45 |

    Returns {{#compact}}{{#with type}}{{>type}}{{/with}}{{/compact}}

    46 | 47 | {{#if comment.returns}} 48 | {{#markdown}}{{{comment.returns}}}{{/markdown}} 49 | {{/if}} 50 | 51 | {{#if type.declaration}} 52 | {{#with type.declaration}} 53 | {{> parameter}} 54 | {{/with}} 55 | {{/if}} 56 | {{/if}} 57 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/member.signature.title.hbs: -------------------------------------------------------------------------------- 1 | {{#unless hideName}} 2 | {{{wbr name}}} 3 | {{else}} {{! This ugliness goes away when we stop naming constructor signatures "new X"}} 4 | {{#ifCond kindString "===" "Constructor signature"}} 5 | {{#if flags.isAbstract}} 6 | abstract 7 | {{/if}} 8 | new 9 | {{/ifCond}} 10 | {{/unless}} 11 | {{#if typeParameters}} 12 | < 13 | {{#each typeParameters}} 14 | {{#if @index}}, {{/if}} 15 | {{name}} 16 | {{/each}} 17 | > 18 | {{/if}} 19 | ( 20 | {{#each parameters}} 21 | {{#if @index}}, {{/if}} 22 | {{#if flags.isRest}}...{{/if}} 23 | {{name}} 24 | 25 | {{#if flags.isOptional}}?{{/if}} 26 | {{#if defaultValue}}?{{/if}} 27 | :  28 | 29 | {{#with type}}{{>type}}{{/with}} 30 | {{/each}} 31 | ) 32 | {{#if type}} 33 | {{#if arrowStyle}} 34 | => 35 | {{else}} 36 | : 37 | {{/if}} 38 | {{#with type}} 39 | {{>type}} 40 | {{/with}} 41 | {{/if}} 42 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/member.signatures.hbs: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/member.sources.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/members.group.hbs: -------------------------------------------------------------------------------- 1 | {{#if categories}} 2 | {{#each categories}} 3 |
    4 |

    {{#if title}}{{title}} {{/if}}{{../title}}

    5 | {{#each children}} 6 | {{#unless hasOwnDocument}} 7 | {{> member}} 8 | {{/unless}} 9 | {{/each}} 10 |
    11 | {{/each}} 12 | {{else}} 13 |
    14 |

    {{title}}

    15 | {{#each children}} 16 | {{#unless hasOwnDocument}} 17 | {{> member}} 18 | {{/unless}} 19 | {{/each}} 20 |
    21 | {{/if}} -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/members.hbs: -------------------------------------------------------------------------------- 1 | {{#if categories}} 2 | {{#each categories}} 3 | {{#unless allChildrenHaveOwnDocument}} 4 |
    5 |

    {{title}}

    6 | {{#each children}} 7 | {{#unless hasOwnDocument}} 8 | {{> member}} 9 | {{/unless}} 10 | {{/each}} 11 |
    12 | {{/unless}} 13 | {{/each}} 14 | {{else}} 15 | {{#each groups}} 16 | {{#unless allChildrenHaveOwnDocument}} 17 | {{> members.group}} 18 | {{/unless}} 19 | {{/each}} 20 | {{/if}} -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/navigation.hbs: -------------------------------------------------------------------------------- 1 | {{#if isVisible}} 2 | {{#if isLabel}} 3 |
  • 4 | {{{wbr title}}} 5 |
  • 6 | {{else}} 7 | {{#if isGlobals}} 8 |
  • 9 | {{{wbr title}}} 10 |
  • 11 | {{else}} 12 |
  • 13 | {{{wbr title}}} 14 | {{#if isInPath}} 15 | {{#if children}} 16 | 21 | {{/if}} 22 | {{/if}} 23 |
  • 24 | {{/if}} 25 | {{/if}} 26 | {{/if}} 27 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/parameter.hbs: -------------------------------------------------------------------------------- 1 | 133 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/toc.hbs: -------------------------------------------------------------------------------- 1 |
  • 2 | {{{wbr title}}} 3 | {{#if children}} 4 | 9 | {{/if}} 10 |
  • 11 | -------------------------------------------------------------------------------- /_typedoc/custom-theme/partials/toc.root.hbs: -------------------------------------------------------------------------------- 1 | {{#if isInPath}} 2 | 3 | 17 |