├── .babelrc ├── .eslintignore ├── .eslintrc ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── circle.yml ├── docs └── README.template.md ├── index.js ├── jsdoc.json ├── karma.conf.js ├── npmrc-env ├── package.json ├── schemas ├── Condition.json └── Fulfillment.json ├── scripts ├── bench_ed25519.js ├── generate_tests.js ├── hash_fingerprint_contents.js ├── hex_to_base64url.js ├── publish_web.js └── test.template.js ├── src ├── README.md ├── crypto │ ├── mgf1.js │ ├── pss.js │ └── rsa.js ├── errors │ ├── base-error.js │ ├── missing-data-error.js │ ├── parse-error.js │ ├── prefix-error.js │ ├── unsupported-type-error.js │ └── validation-error.js ├── lib │ ├── condition.js │ ├── fulfillment.js │ └── type-registry.js ├── schemas │ ├── condition.js │ ├── fingerprint.js │ ├── fulfillment.js │ └── rsa.js ├── types │ ├── base-sha256.js │ ├── ed25519-sha256.js │ ├── prefix-sha256.js │ ├── preimage-sha256.js │ ├── rsa-sha256.js │ └── threshold-sha256.js └── util │ ├── base64url.js │ ├── is-integer.js │ ├── pem.js │ └── xor.js ├── test ├── .eslintrc ├── TESTPLAN.md ├── conditionSpec.js ├── data │ └── rsa │ │ ├── sha1.json │ │ └── sha256.json ├── fulfillmentSpec.js ├── generated_validSpec.js ├── helpers │ └── salt.js ├── index.js ├── indexSpec.js ├── mgf1Spec.js ├── mocha.opts ├── pemSpec.js ├── pssSpec.js ├── rsaSpec.js └── xorSpec.js ├── testsuite └── valid │ ├── 0000_test-minimal-preimage.json │ ├── 0001_test-minimal-prefix.json │ ├── 0002_test-minimal-threshold.json │ ├── 0003_test-minimal-rsa.json │ ├── 0004_test-minimal-ed25519.json │ ├── 0005_test-basic-preimage.json │ ├── 0006_test-basic-prefix.json │ ├── 0007_test-basic-prefix-two-levels-deep.json │ ├── 0008_test-basic-threshold.json │ ├── 0009_test-basic-threshold-same-condition-twice.json │ ├── 0010_test-basic-threshold-same-fulfillment-twice.json │ ├── 0011_test-basic-threshold-two-levels-deep.json │ ├── 0012_test-basic-threshold-schroedinger.json │ ├── 0013_test-basic-rsa.json │ ├── 0014_test-basic-rsa4096.json │ ├── 0015_test-basic-ed25519.json │ ├── 0016_test-advanced-notarized-receipt.json │ └── 0017_test-advanced-notarized-receipt-multiple-notaries.json ├── wallaby.js └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/.babelrc -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/.eslintignore -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | extends: standard 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/.gitignore -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/README.md -------------------------------------------------------------------------------- /circle.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/circle.yml -------------------------------------------------------------------------------- /docs/README.template.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/docs/README.template.md -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/index.js -------------------------------------------------------------------------------- /jsdoc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/jsdoc.json -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/karma.conf.js -------------------------------------------------------------------------------- /npmrc-env: -------------------------------------------------------------------------------- 1 | //registry.npmjs.org/:_authToken=${NPM_TOKEN} 2 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/package.json -------------------------------------------------------------------------------- /schemas/Condition.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/schemas/Condition.json -------------------------------------------------------------------------------- /schemas/Fulfillment.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/schemas/Fulfillment.json -------------------------------------------------------------------------------- /scripts/bench_ed25519.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/scripts/bench_ed25519.js -------------------------------------------------------------------------------- /scripts/generate_tests.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/scripts/generate_tests.js -------------------------------------------------------------------------------- /scripts/hash_fingerprint_contents.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/scripts/hash_fingerprint_contents.js -------------------------------------------------------------------------------- /scripts/hex_to_base64url.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/scripts/hex_to_base64url.js -------------------------------------------------------------------------------- /scripts/publish_web.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/scripts/publish_web.js -------------------------------------------------------------------------------- /scripts/test.template.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/scripts/test.template.js -------------------------------------------------------------------------------- /src/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/README.md -------------------------------------------------------------------------------- /src/crypto/mgf1.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/crypto/mgf1.js -------------------------------------------------------------------------------- /src/crypto/pss.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/crypto/pss.js -------------------------------------------------------------------------------- /src/crypto/rsa.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/crypto/rsa.js -------------------------------------------------------------------------------- /src/errors/base-error.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/errors/base-error.js -------------------------------------------------------------------------------- /src/errors/missing-data-error.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/errors/missing-data-error.js -------------------------------------------------------------------------------- /src/errors/parse-error.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/errors/parse-error.js -------------------------------------------------------------------------------- /src/errors/prefix-error.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/errors/prefix-error.js -------------------------------------------------------------------------------- /src/errors/unsupported-type-error.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/errors/unsupported-type-error.js -------------------------------------------------------------------------------- /src/errors/validation-error.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/errors/validation-error.js -------------------------------------------------------------------------------- /src/lib/condition.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/lib/condition.js -------------------------------------------------------------------------------- /src/lib/fulfillment.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/lib/fulfillment.js -------------------------------------------------------------------------------- /src/lib/type-registry.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/lib/type-registry.js -------------------------------------------------------------------------------- /src/schemas/condition.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/schemas/condition.js -------------------------------------------------------------------------------- /src/schemas/fingerprint.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/schemas/fingerprint.js -------------------------------------------------------------------------------- /src/schemas/fulfillment.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/schemas/fulfillment.js -------------------------------------------------------------------------------- /src/schemas/rsa.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/schemas/rsa.js -------------------------------------------------------------------------------- /src/types/base-sha256.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/types/base-sha256.js -------------------------------------------------------------------------------- /src/types/ed25519-sha256.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/types/ed25519-sha256.js -------------------------------------------------------------------------------- /src/types/prefix-sha256.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/types/prefix-sha256.js -------------------------------------------------------------------------------- /src/types/preimage-sha256.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/types/preimage-sha256.js -------------------------------------------------------------------------------- /src/types/rsa-sha256.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/types/rsa-sha256.js -------------------------------------------------------------------------------- /src/types/threshold-sha256.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/types/threshold-sha256.js -------------------------------------------------------------------------------- /src/util/base64url.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/util/base64url.js -------------------------------------------------------------------------------- /src/util/is-integer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/util/is-integer.js -------------------------------------------------------------------------------- /src/util/pem.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/util/pem.js -------------------------------------------------------------------------------- /src/util/xor.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/src/util/xor.js -------------------------------------------------------------------------------- /test/.eslintrc: -------------------------------------------------------------------------------- 1 | extends: ../.eslintrc 2 | env: 3 | mocha: true 4 | -------------------------------------------------------------------------------- /test/TESTPLAN.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/test/TESTPLAN.md -------------------------------------------------------------------------------- /test/conditionSpec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/test/conditionSpec.js -------------------------------------------------------------------------------- /test/data/rsa/sha1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/test/data/rsa/sha1.json -------------------------------------------------------------------------------- /test/data/rsa/sha256.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/test/data/rsa/sha256.json -------------------------------------------------------------------------------- /test/fulfillmentSpec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/test/fulfillmentSpec.js -------------------------------------------------------------------------------- /test/generated_validSpec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/test/generated_validSpec.js -------------------------------------------------------------------------------- /test/helpers/salt.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/test/helpers/salt.js -------------------------------------------------------------------------------- /test/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/test/index.js -------------------------------------------------------------------------------- /test/indexSpec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/test/indexSpec.js -------------------------------------------------------------------------------- /test/mgf1Spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/test/mgf1Spec.js -------------------------------------------------------------------------------- /test/mocha.opts: -------------------------------------------------------------------------------- 1 | test/*Spec.js 2 | -------------------------------------------------------------------------------- /test/pemSpec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/test/pemSpec.js -------------------------------------------------------------------------------- /test/pssSpec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/test/pssSpec.js -------------------------------------------------------------------------------- /test/rsaSpec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/test/rsaSpec.js -------------------------------------------------------------------------------- /test/xorSpec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/test/xorSpec.js -------------------------------------------------------------------------------- /testsuite/valid/0000_test-minimal-preimage.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0000_test-minimal-preimage.json -------------------------------------------------------------------------------- /testsuite/valid/0001_test-minimal-prefix.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0001_test-minimal-prefix.json -------------------------------------------------------------------------------- /testsuite/valid/0002_test-minimal-threshold.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0002_test-minimal-threshold.json -------------------------------------------------------------------------------- /testsuite/valid/0003_test-minimal-rsa.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0003_test-minimal-rsa.json -------------------------------------------------------------------------------- /testsuite/valid/0004_test-minimal-ed25519.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0004_test-minimal-ed25519.json -------------------------------------------------------------------------------- /testsuite/valid/0005_test-basic-preimage.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0005_test-basic-preimage.json -------------------------------------------------------------------------------- /testsuite/valid/0006_test-basic-prefix.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0006_test-basic-prefix.json -------------------------------------------------------------------------------- /testsuite/valid/0007_test-basic-prefix-two-levels-deep.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0007_test-basic-prefix-two-levels-deep.json -------------------------------------------------------------------------------- /testsuite/valid/0008_test-basic-threshold.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0008_test-basic-threshold.json -------------------------------------------------------------------------------- /testsuite/valid/0009_test-basic-threshold-same-condition-twice.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0009_test-basic-threshold-same-condition-twice.json -------------------------------------------------------------------------------- /testsuite/valid/0010_test-basic-threshold-same-fulfillment-twice.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0010_test-basic-threshold-same-fulfillment-twice.json -------------------------------------------------------------------------------- /testsuite/valid/0011_test-basic-threshold-two-levels-deep.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0011_test-basic-threshold-two-levels-deep.json -------------------------------------------------------------------------------- /testsuite/valid/0012_test-basic-threshold-schroedinger.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0012_test-basic-threshold-schroedinger.json -------------------------------------------------------------------------------- /testsuite/valid/0013_test-basic-rsa.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0013_test-basic-rsa.json -------------------------------------------------------------------------------- /testsuite/valid/0014_test-basic-rsa4096.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0014_test-basic-rsa4096.json -------------------------------------------------------------------------------- /testsuite/valid/0015_test-basic-ed25519.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0015_test-basic-ed25519.json -------------------------------------------------------------------------------- /testsuite/valid/0016_test-advanced-notarized-receipt.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0016_test-advanced-notarized-receipt.json -------------------------------------------------------------------------------- /testsuite/valid/0017_test-advanced-notarized-receipt-multiple-notaries.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/testsuite/valid/0017_test-advanced-notarized-receipt-multiple-notaries.json -------------------------------------------------------------------------------- /wallaby.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/wallaby.js -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/interledgerjs/five-bells-condition/HEAD/webpack.config.js --------------------------------------------------------------------------------