├── example ├── node_modules │ ├── tr46 │ │ ├── lib │ │ │ └── .gitkeep │ │ ├── .npmignore │ │ └── package.json │ ├── @noble │ │ ├── hashes │ │ │ ├── index.d.ts │ │ │ ├── crypto.d.ts │ │ │ ├── cryptoBrowser.d.ts │ │ │ ├── esm │ │ │ │ ├── index.js │ │ │ │ ├── crypto.js │ │ │ │ ├── package.json │ │ │ │ └── cryptoBrowser.js │ │ │ ├── index.js │ │ │ ├── crypto.js │ │ │ ├── cryptoBrowser.js │ │ │ ├── sha1.d.ts │ │ │ ├── pbkdf2.d.ts │ │ │ ├── _assert.d.ts │ │ │ ├── ripemd160.d.ts │ │ │ ├── hmac.d.ts │ │ │ ├── sha256.d.ts │ │ │ ├── _sha2.d.ts │ │ │ ├── _blake2.d.ts │ │ │ └── LICENSE │ │ └── secp256k1 │ │ │ ├── lib │ │ │ └── esm │ │ │ │ └── package.json │ │ │ └── LICENSE │ ├── ethereum-cryptography │ │ ├── index.d.ts │ │ ├── node_modules │ │ │ └── @noble │ │ │ │ └── hashes │ │ │ │ ├── index.d.ts │ │ │ │ ├── crypto.d.ts │ │ │ │ ├── cryptoBrowser.d.ts │ │ │ │ ├── esm │ │ │ │ ├── index.js │ │ │ │ ├── crypto.js │ │ │ │ ├── package.json │ │ │ │ └── cryptoBrowser.js │ │ │ │ ├── index.js │ │ │ │ ├── crypto.js │ │ │ │ ├── cryptoBrowser.js │ │ │ │ ├── sha1.d.ts │ │ │ │ ├── pbkdf2.d.ts │ │ │ │ ├── _assert.d.ts │ │ │ │ ├── ripemd160.d.ts │ │ │ │ ├── hmac.d.ts │ │ │ │ ├── sha256.d.ts │ │ │ │ ├── _sha2.d.ts │ │ │ │ └── _blake2.d.ts │ │ ├── hdkey.d.ts │ │ ├── sha256.d.ts │ │ ├── sha512.d.ts │ │ ├── ripemd160.d.ts │ │ ├── bip39 │ │ │ ├── wordlists │ │ │ │ ├── czech.d.ts │ │ │ │ ├── french.d.ts │ │ │ │ ├── korean.d.ts │ │ │ │ ├── english.d.ts │ │ │ │ ├── italian.d.ts │ │ │ │ ├── japanese.d.ts │ │ │ │ ├── spanish.d.ts │ │ │ │ ├── simplified-chinese.d.ts │ │ │ │ ├── traditional-chinese.d.ts │ │ │ │ ├── czech.js │ │ │ │ ├── french.js │ │ │ │ ├── korean.js │ │ │ │ ├── english.js │ │ │ │ ├── italian.js │ │ │ │ ├── spanish.js │ │ │ │ ├── japanese.js │ │ │ │ ├── simplified-chinese.js │ │ │ │ └── traditional-chinese.js │ │ │ ├── index.d.ts │ │ │ └── index.js │ │ ├── blake2b.d.ts │ │ ├── index.js │ │ ├── random.d.ts │ │ ├── secp256k1.d.ts │ │ ├── sha256.js │ │ ├── sha512.js │ │ ├── ripemd160.js │ │ ├── scrypt.d.ts │ │ ├── pbkdf2.d.ts │ │ ├── aes.d.ts │ │ ├── hdkey.js │ │ ├── keccak.d.ts │ │ ├── random.js │ │ ├── blake2b.js │ │ ├── keccak.js │ │ ├── utils.d.ts │ │ └── scrypt.js │ ├── starknet │ │ ├── www │ │ │ ├── static │ │ │ │ ├── .nojekyll │ │ │ │ └── img │ │ │ │ │ ├── favicon.ico │ │ │ │ │ ├── docusaurus.png │ │ │ │ │ ├── starknet-1.png │ │ │ │ │ ├── starknet-2.png │ │ │ │ │ ├── starknet-3.png │ │ │ │ │ └── tutorial │ │ │ │ │ ├── localeDropdown.png │ │ │ │ │ └── docsVersionDropdown.png │ │ │ ├── babel.config.js │ │ │ ├── docs │ │ │ │ └── API │ │ │ │ │ ├── _category_.json │ │ │ │ │ ├── index.md │ │ │ │ │ └── changelog.md │ │ │ ├── guides │ │ │ │ ├── cra.md │ │ │ │ └── intro.md │ │ │ ├── src │ │ │ │ ├── pages │ │ │ │ │ ├── markdown-page.md │ │ │ │ │ └── index.module.css │ │ │ │ └── components │ │ │ │ │ └── HomepageFeatures │ │ │ │ │ └── styles.module.css │ │ │ ├── code-examples │ │ │ │ ├── package.json │ │ │ │ └── erc20.js │ │ │ ├── sidebars.js │ │ │ └── README.md │ │ ├── .eslintignore │ │ ├── src │ │ │ ├── signer │ │ │ │ └── index.ts │ │ │ ├── account │ │ │ │ └── index.ts │ │ │ ├── contract │ │ │ │ └── index.ts │ │ │ ├── types │ │ │ │ ├── contract.ts │ │ │ │ ├── index.ts │ │ │ │ ├── account.ts │ │ │ │ ├── api │ │ │ │ │ └── index.ts │ │ │ │ └── signer.ts │ │ │ ├── provider │ │ │ │ ├── index.ts │ │ │ │ └── errors.ts │ │ │ ├── utils │ │ │ │ ├── fetchPonyfill.ts │ │ │ │ ├── json.ts │ │ │ │ ├── typedData │ │ │ │ │ ├── utils.ts │ │ │ │ │ └── types.ts │ │ │ │ ├── shortString.ts │ │ │ │ ├── provider.ts │ │ │ │ ├── responseParser │ │ │ │ │ └── index.ts │ │ │ │ └── uint256.ts │ │ │ └── index.ts │ │ ├── dist │ │ │ ├── account │ │ │ │ ├── index.d.ts │ │ │ │ └── index.js │ │ │ ├── signer │ │ │ │ ├── index.d.ts │ │ │ │ ├── interface.js │ │ │ │ ├── index.js │ │ │ │ └── default.d.ts │ │ │ ├── utils │ │ │ │ ├── fetchPonyfill.d.ts │ │ │ │ ├── typedData │ │ │ │ │ ├── types.js │ │ │ │ │ ├── utils.d.ts │ │ │ │ │ ├── utils.js │ │ │ │ │ └── types.d.ts │ │ │ │ ├── shortString.d.ts │ │ │ │ ├── url.d.ts │ │ │ │ ├── provider.d.ts │ │ │ │ ├── responseParser │ │ │ │ │ ├── index.js │ │ │ │ │ ├── index.d.ts │ │ │ │ │ └── rpc.d.ts │ │ │ │ ├── address.d.ts │ │ │ │ ├── merkle.d.ts │ │ │ │ ├── fetchPonyfill.js │ │ │ │ ├── uint256.d.ts │ │ │ │ ├── transaction.d.ts │ │ │ │ ├── stark.d.ts │ │ │ │ ├── json.js │ │ │ │ ├── encode.d.ts │ │ │ │ └── number.d.ts │ │ │ ├── types │ │ │ │ ├── lib.js │ │ │ │ ├── account.js │ │ │ │ ├── api │ │ │ │ │ ├── rpc.js │ │ │ │ │ ├── sequencer.js │ │ │ │ │ ├── index.d.ts │ │ │ │ │ ├── index.js │ │ │ │ │ └── openrpc.js │ │ │ │ ├── contract.js │ │ │ │ ├── provider.js │ │ │ │ ├── signer.js │ │ │ │ ├── index.d.ts │ │ │ │ ├── contract.d.ts │ │ │ │ ├── account.d.ts │ │ │ │ └── signer.d.ts │ │ │ ├── contract │ │ │ │ ├── index.d.ts │ │ │ │ ├── interface.js │ │ │ │ └── index.js │ │ │ ├── provider │ │ │ │ ├── index.d.ts │ │ │ │ ├── interface.js │ │ │ │ └── errors.d.ts │ │ │ └── index.d.ts │ │ ├── tsconfig.eslint.json │ │ ├── .prettierrc │ │ ├── .babelrc │ │ ├── __tests__ │ │ │ ├── utils │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── ellipticalCurve.test.ts.snap │ │ │ │ ├── transactionHash.test.ts │ │ │ │ ├── utils.browser.test.ts │ │ │ │ └── shortString.test.ts │ │ │ └── jest.setup.ts │ │ ├── .commitlintrc │ │ ├── .releaserc │ │ ├── .eslintrc │ │ ├── __mocks__ │ │ │ └── typedDataExample.json │ │ └── LICENSE │ ├── @scure │ │ ├── base │ │ │ ├── lib │ │ │ │ └── esm │ │ │ │ │ └── package.json │ │ │ └── LICENSE │ │ ├── bip39 │ │ │ ├── wordlists │ │ │ │ ├── czech.d.ts │ │ │ │ ├── english.d.ts │ │ │ │ ├── french.d.ts │ │ │ │ ├── italian.d.ts │ │ │ │ ├── japanese.d.ts │ │ │ │ ├── korean.d.ts │ │ │ │ ├── spanish.d.ts │ │ │ │ ├── simplified-chinese.d.ts │ │ │ │ └── traditional-chinese.d.ts │ │ │ └── LICENSE │ │ └── bip32 │ │ │ ├── lib │ │ │ └── esm │ │ │ │ └── package.json │ │ │ └── LICENSE │ ├── brorand │ │ ├── .npmignore │ │ ├── test │ │ │ └── api-test.js │ │ └── package.json │ ├── hmac-drbg │ │ ├── .npmignore │ │ ├── .travis.yml │ │ └── package.json │ ├── isomorphic-fetch │ │ ├── fetch-bower.js │ │ ├── .travis.yml │ │ ├── .jshintrc │ │ ├── bower.json │ │ ├── .editorconfig │ │ ├── fetch-npm-browserify.js │ │ ├── fetch-npm-node.js │ │ ├── package.json │ │ └── LICENSE │ ├── minimalistic-crypto-utils │ │ ├── .npmignore │ │ ├── .travis.yml │ │ ├── package.json │ │ └── test │ │ │ └── utils-test.js │ ├── @ethersproject │ │ ├── bytes │ │ │ ├── src.ts │ │ │ │ └── _version.ts │ │ │ ├── lib.esm │ │ │ │ ├── _version.js │ │ │ │ ├── _version.d.ts │ │ │ │ ├── _version.d.ts.map │ │ │ │ └── _version.js.map │ │ │ ├── lib │ │ │ │ ├── _version.d.ts │ │ │ │ ├── _version.d.ts.map │ │ │ │ ├── _version.js.map │ │ │ │ └── _version.js │ │ │ └── LICENSE.md │ │ └── logger │ │ │ ├── src.ts │ │ │ └── _version.ts │ │ │ ├── lib.esm │ │ │ ├── _version.js │ │ │ ├── _version.d.ts │ │ │ ├── _version.d.ts.map │ │ │ └── _version.js.map │ │ │ ├── lib │ │ │ ├── _version.d.ts │ │ │ ├── _version.d.ts.map │ │ │ ├── _version.js.map │ │ │ └── _version.js │ │ │ └── README.md │ ├── url-join │ │ ├── .travis.yml │ │ ├── package.json │ │ ├── README.md │ │ └── LICENSE │ ├── minimalistic-assert │ │ ├── readme.md │ │ ├── index.js │ │ ├── package.json │ │ └── LICENSE │ ├── ts-custom-error │ │ ├── dist │ │ │ └── dist │ │ │ │ └── src │ │ │ │ └── index.d.ts │ │ ├── SECURITY.md │ │ └── LICENSE │ ├── hash.js │ │ ├── .travis.yml │ │ ├── lib │ │ │ ├── hash │ │ │ │ ├── sha.js │ │ │ │ └── sha │ │ │ │ │ ├── 224.js │ │ │ │ │ ├── 384.js │ │ │ │ │ └── common.js │ │ │ └── hash.js │ │ ├── .eslintrc.js │ │ └── package.json │ ├── elliptic │ │ ├── lib │ │ │ ├── elliptic │ │ │ │ └── curve │ │ │ │ │ └── index.js │ │ │ └── elliptic.js │ │ └── node_modules │ │ │ └── bn.js │ │ │ ├── package.json │ │ │ └── LICENSE │ ├── inherits │ │ ├── inherits.js │ │ ├── package.json │ │ ├── LICENSE │ │ └── inherits_browser.js │ ├── json-bigint │ │ ├── index.js │ │ ├── package.json │ │ └── LICENSE │ ├── webidl-conversions │ │ └── package.json │ ├── whatwg-url │ │ ├── lib │ │ │ ├── utils.js │ │ │ └── public-api.js │ │ ├── package.json │ │ └── LICENSE.txt │ ├── pako │ │ ├── index.js │ │ └── LICENSE │ ├── node-fetch │ │ ├── browser.js │ │ └── LICENSE.md │ ├── bn.js │ │ ├── package.json │ │ └── LICENSE │ └── whatwg-fetch │ │ └── LICENSE └── package.json ├── screenshots ├── solveme.png ├── cairo-bid.png ├── division.png ├── overview.png ├── unique-id.png ├── cairo-bid2.png ├── cairo-bid3.png ├── cairo-intro.png ├── cairo-intro2.png ├── claim-a-punk.png ├── ledger-chads.png ├── unique-id2.png ├── access-denied.png ├── challenges │ ├── dna.png │ ├── solve-me.png │ ├── cairo-bid.png │ ├── cairo-intro.png │ ├── puzzle-box.png │ ├── unique-id.png │ ├── access-denied.png │ ├── claim-a-punk.png │ ├── frozen-finance.png │ ├── magic-encoding.png │ ├── account-obstruction.png │ └── first-come-first-served.png ├── frozen-finance.png ├── magic-encoding.png ├── starknet-explorer.png └── first-come-first-served.png └── src ├── StarkNet-CC CTF.pdf ├── claim_a_punk └── public │ ├── contracts │ └── openzeppelin │ │ ├── introspection │ │ └── erc165 │ │ │ └── IERC165.cairo │ │ ├── __init__.py │ │ ├── token │ │ ├── erc721 │ │ │ ├── IERC721Receiver.cairo │ │ │ ├── IERC721Metadata.cairo │ │ │ ├── enumerable │ │ │ │ ├── IERC721Enumerable.cairo │ │ │ │ └── presets │ │ │ │ │ └── utils │ │ │ │ │ └── ERC721Holder.cairo │ │ │ └── IERC721.cairo │ │ └── erc20 │ │ │ └── IERC20.cairo │ │ ├── access │ │ └── accesscontrol │ │ │ └── IAccessControl.cairo │ │ ├── utils │ │ └── constants │ │ │ └── library.cairo │ │ ├── account │ │ ├── presets │ │ │ └── AddressRegistry.cairo │ │ └── IAccount.cairo │ │ └── security │ │ ├── reentrancyguard │ │ └── library.cairo │ │ └── initializable │ │ └── library.cairo │ └── Dockerfile ├── magic_encoding └── public │ ├── Dockerfile │ └── deploy │ └── chal.py ├── dna └── public │ ├── Dockerfile │ └── deploy │ └── chal.py ├── account_obstruction └── public │ ├── contracts │ └── openzeppelin │ │ ├── introspection │ │ └── erc165 │ │ │ └── IERC165.cairo │ │ ├── __init__.py │ │ ├── token │ │ ├── erc721 │ │ │ ├── IERC721Receiver.cairo │ │ │ ├── IERC721Metadata.cairo │ │ │ ├── enumerable │ │ │ │ ├── IERC721Enumerable.cairo │ │ │ │ └── presets │ │ │ │ │ └── utils │ │ │ │ │ └── ERC721Holder.cairo │ │ │ └── IERC721.cairo │ │ └── erc20 │ │ │ └── IERC20.cairo │ │ ├── access │ │ └── accesscontrol │ │ │ └── IAccessControl.cairo │ │ ├── utils │ │ └── constants │ │ │ └── library.cairo │ │ ├── account │ │ ├── presets │ │ │ └── AddressRegistry.cairo │ │ └── IAccount.cairo │ │ └── security │ │ ├── reentrancyguard │ │ └── library.cairo │ │ └── initializable │ │ └── library.cairo │ └── Dockerfile ├── cairo_bid └── public │ ├── Dockerfile │ └── contracts │ └── bid_interface.cairo ├── frozen_finance └── public │ ├── Dockerfile │ └── deploy │ └── chal.py ├── solveme └── public │ ├── Dockerfile │ ├── contracts │ └── solve-me.cairo │ └── deploy │ └── chal.py ├── first_come_first_served └── public │ └── Dockerfile ├── cairo_intro └── public │ ├── Dockerfile │ └── deploy │ └── chal.py ├── access_denied └── public │ ├── Dockerfile │ ├── contracts │ └── IAccount.cairo │ └── deploy │ └── chal.py ├── unique_id └── public │ └── Dockerfile └── puzzle_box └── public ├── Dockerfile └── contracts ├── impl_1.cairo └── impl_2.cairo /example/node_modules/tr46/lib/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/index.d.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/index.d.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/static/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/node_modules/starknet/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | -------------------------------------------------------------------------------- /example/node_modules/@scure/base/lib/esm/package.json: -------------------------------------------------------------------------------- 1 | { "type": "module" } 2 | -------------------------------------------------------------------------------- /example/node_modules/brorand/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /example/node_modules/hmac-drbg/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/index.d.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/node_modules/isomorphic-fetch/fetch-bower.js: -------------------------------------------------------------------------------- 1 | module.exports = require('fetch'); 2 | -------------------------------------------------------------------------------- /example/node_modules/minimalistic-crypto-utils/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /example/node_modules/tr46/.npmignore: -------------------------------------------------------------------------------- 1 | scripts/ 2 | test/ 3 | 4 | !lib/mapping_table.json 5 | -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/bytes/src.ts/_version.ts: -------------------------------------------------------------------------------- 1 | export const version = "bytes/5.7.0"; 2 | -------------------------------------------------------------------------------- /example/node_modules/@scure/bip39/wordlists/czech.d.ts: -------------------------------------------------------------------------------- 1 | export declare const wordlist: string[]; 2 | -------------------------------------------------------------------------------- /example/node_modules/@scure/bip39/wordlists/english.d.ts: -------------------------------------------------------------------------------- 1 | export declare const wordlist: string[]; 2 | -------------------------------------------------------------------------------- /example/node_modules/@scure/bip39/wordlists/french.d.ts: -------------------------------------------------------------------------------- 1 | export declare const wordlist: string[]; 2 | -------------------------------------------------------------------------------- /example/node_modules/@scure/bip39/wordlists/italian.d.ts: -------------------------------------------------------------------------------- 1 | export declare const wordlist: string[]; 2 | -------------------------------------------------------------------------------- /example/node_modules/@scure/bip39/wordlists/japanese.d.ts: -------------------------------------------------------------------------------- 1 | export declare const wordlist: string[]; 2 | -------------------------------------------------------------------------------- /example/node_modules/@scure/bip39/wordlists/korean.d.ts: -------------------------------------------------------------------------------- 1 | export declare const wordlist: string[]; 2 | -------------------------------------------------------------------------------- /example/node_modules/@scure/bip39/wordlists/spanish.d.ts: -------------------------------------------------------------------------------- 1 | export declare const wordlist: string[]; 2 | -------------------------------------------------------------------------------- /screenshots/solveme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/solveme.png -------------------------------------------------------------------------------- /src/StarkNet-CC CTF.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/src/StarkNet-CC CTF.pdf -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/logger/src.ts/_version.ts: -------------------------------------------------------------------------------- 1 | export const version = "logger/5.7.0"; 2 | -------------------------------------------------------------------------------- /screenshots/cairo-bid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/cairo-bid.png -------------------------------------------------------------------------------- /screenshots/division.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/division.png -------------------------------------------------------------------------------- /screenshots/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/overview.png -------------------------------------------------------------------------------- /screenshots/unique-id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/unique-id.png -------------------------------------------------------------------------------- /example/node_modules/@scure/bip39/wordlists/simplified-chinese.d.ts: -------------------------------------------------------------------------------- 1 | export declare const wordlist: string[]; 2 | -------------------------------------------------------------------------------- /example/node_modules/@scure/bip39/wordlists/traditional-chinese.d.ts: -------------------------------------------------------------------------------- 1 | export declare const wordlist: string[]; 2 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/hdkey.d.ts: -------------------------------------------------------------------------------- 1 | export { HARDENED_OFFSET, HDKey } from "@scure/bip32"; 2 | -------------------------------------------------------------------------------- /example/node_modules/isomorphic-fetch/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - 14 5 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/signer/index.ts: -------------------------------------------------------------------------------- 1 | export * from './interface'; 2 | export * from './default'; 3 | -------------------------------------------------------------------------------- /example/node_modules/url-join/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "5" 4 | - "4" 5 | - "0.12" -------------------------------------------------------------------------------- /screenshots/cairo-bid2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/cairo-bid2.png -------------------------------------------------------------------------------- /screenshots/cairo-bid3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/cairo-bid3.png -------------------------------------------------------------------------------- /screenshots/cairo-intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/cairo-intro.png -------------------------------------------------------------------------------- /screenshots/cairo-intro2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/cairo-intro2.png -------------------------------------------------------------------------------- /screenshots/claim-a-punk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/claim-a-punk.png -------------------------------------------------------------------------------- /screenshots/ledger-chads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/ledger-chads.png -------------------------------------------------------------------------------- /screenshots/unique-id2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/unique-id2.png -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/account/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './default'; 2 | export * from './interface'; 3 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/signer/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './interface'; 2 | export * from './default'; 3 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/account/index.ts: -------------------------------------------------------------------------------- 1 | export * from './default'; 2 | export * from './interface'; 3 | -------------------------------------------------------------------------------- /screenshots/access-denied.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/access-denied.png -------------------------------------------------------------------------------- /screenshots/challenges/dna.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/challenges/dna.png -------------------------------------------------------------------------------- /screenshots/frozen-finance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/frozen-finance.png -------------------------------------------------------------------------------- /screenshots/magic-encoding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/magic-encoding.png -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/sha256.d.ts: -------------------------------------------------------------------------------- 1 | export declare const sha256: (msg: Uint8Array) => Uint8Array; 2 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/sha512.d.ts: -------------------------------------------------------------------------------- 1 | export declare const sha512: (msg: Uint8Array) => Uint8Array; 2 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/fetchPonyfill.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: any; 2 | export default _default; 3 | -------------------------------------------------------------------------------- /screenshots/starknet-explorer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/starknet-explorer.png -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/crypto.d.ts: -------------------------------------------------------------------------------- 1 | export declare const crypto: { 2 | node?: any; 3 | web?: any; 4 | }; 5 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/ripemd160.d.ts: -------------------------------------------------------------------------------- 1 | export declare const ripemd160: (msg: Uint8Array) => Uint8Array; 2 | -------------------------------------------------------------------------------- /example/node_modules/minimalistic-assert/readme.md: -------------------------------------------------------------------------------- 1 | minimalistic-assert 2 | === 3 | 4 | very minimalistic assert module. 5 | -------------------------------------------------------------------------------- /screenshots/challenges/solve-me.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/challenges/solve-me.png -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/czech.d.ts: -------------------------------------------------------------------------------- 1 | export { wordlist } from "@scure/bip39/wordlists/czech"; 2 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/french.d.ts: -------------------------------------------------------------------------------- 1 | export { wordlist } from "@scure/bip39/wordlists/french"; 2 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/korean.d.ts: -------------------------------------------------------------------------------- 1 | export { wordlist } from "@scure/bip39/wordlists/korean"; 2 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/types/lib.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /example/node_modules/ts-custom-error/dist/dist/src/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from "./custom-error"; 2 | export * from "./factory"; 3 | -------------------------------------------------------------------------------- /screenshots/challenges/cairo-bid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/challenges/cairo-bid.png -------------------------------------------------------------------------------- /screenshots/challenges/cairo-intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/challenges/cairo-intro.png -------------------------------------------------------------------------------- /screenshots/challenges/puzzle-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/challenges/puzzle-box.png -------------------------------------------------------------------------------- /screenshots/challenges/unique-id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/challenges/unique-id.png -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/cryptoBrowser.d.ts: -------------------------------------------------------------------------------- 1 | export declare const crypto: { 2 | node?: any; 3 | web?: any; 4 | }; 5 | -------------------------------------------------------------------------------- /example/node_modules/@scure/bip32/lib/esm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "browser": { 4 | "crypto": false 5 | } 6 | } -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/english.d.ts: -------------------------------------------------------------------------------- 1 | export { wordlist } from "@scure/bip39/wordlists/english"; 2 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/italian.d.ts: -------------------------------------------------------------------------------- 1 | export { wordlist } from "@scure/bip39/wordlists/italian"; 2 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/japanese.d.ts: -------------------------------------------------------------------------------- 1 | export { wordlist } from "@scure/bip39/wordlists/japanese"; 2 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/spanish.d.ts: -------------------------------------------------------------------------------- 1 | export { wordlist } from "@scure/bip39/wordlists/spanish"; 2 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/types/account.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/types/api/rpc.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/types/contract.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/types/provider.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/types/signer.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /screenshots/challenges/access-denied.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/challenges/access-denied.png -------------------------------------------------------------------------------- /screenshots/challenges/claim-a-punk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/challenges/claim-a-punk.png -------------------------------------------------------------------------------- /screenshots/first-come-first-served.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/first-come-first-served.png -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/bytes/lib.esm/_version.js: -------------------------------------------------------------------------------- 1 | export const version = "bytes/5.7.0"; 2 | //# sourceMappingURL=_version.js.map -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/logger/lib.esm/_version.js: -------------------------------------------------------------------------------- 1 | export const version = "logger/5.7.0"; 2 | //# sourceMappingURL=_version.js.map -------------------------------------------------------------------------------- /example/node_modules/@noble/secp256k1/lib/esm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "browser": { 4 | "crypto": false 5 | } 6 | } -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/types/api/sequencer.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /screenshots/challenges/frozen-finance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/challenges/frozen-finance.png -------------------------------------------------------------------------------- /screenshots/challenges/magic-encoding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/challenges/magic-encoding.png -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/bytes/lib/_version.d.ts: -------------------------------------------------------------------------------- 1 | export declare const version = "bytes/5.7.0"; 2 | //# sourceMappingURL=_version.d.ts.map -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/esm/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | throw new Error('noble-hashes have no entry-point: consult README for usage'); 3 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | throw new Error('noble-hashes have no entry-point: consult README for usage'); 3 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/blake2b.d.ts: -------------------------------------------------------------------------------- 1 | export declare const blake2b: (msg: Uint8Array, outputLength?: number) => Uint8Array; 2 | -------------------------------------------------------------------------------- /example/node_modules/isomorphic-fetch/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "browser": true, 4 | "predef": ["describe", "it", "before"] 5 | } 6 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/typedData/types.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /example/node_modules/starknet/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["src/**/*", "__tests__/**/*"] 4 | } 5 | -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/bytes/lib.esm/_version.d.ts: -------------------------------------------------------------------------------- 1 | export declare const version = "bytes/5.7.0"; 2 | //# sourceMappingURL=_version.d.ts.map -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/logger/lib.esm/_version.d.ts: -------------------------------------------------------------------------------- 1 | export declare const version = "logger/5.7.0"; 2 | //# sourceMappingURL=_version.d.ts.map -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/logger/lib/_version.d.ts: -------------------------------------------------------------------------------- 1 | export declare const version = "logger/5.7.0"; 2 | //# sourceMappingURL=_version.d.ts.map -------------------------------------------------------------------------------- /example/node_modules/starknet/www/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')], 3 | }; 4 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/docs/API/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "StarkNet.js API", 3 | "position": 1, 4 | "collapsed": false 5 | } 6 | -------------------------------------------------------------------------------- /screenshots/challenges/account-obstruction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/challenges/account-obstruction.png -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/simplified-chinese.d.ts: -------------------------------------------------------------------------------- 1 | export { wordlist } from "@scure/bip39/wordlists/simplified-chinese"; 2 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/traditional-chinese.d.ts: -------------------------------------------------------------------------------- 1 | export { wordlist } from "@scure/bip39/wordlists/traditional-chinese"; 2 | -------------------------------------------------------------------------------- /example/node_modules/starknet/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "tabWidth": 2, 4 | "singleQuote": true, 5 | "trailingComma": "es5" 6 | } 7 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/contract/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './default'; 2 | export * from './interface'; 3 | export * from './contractFactory'; 4 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/contract/index.ts: -------------------------------------------------------------------------------- 1 | export * from './default'; 2 | export * from './interface'; 3 | export * from './contractFactory'; 4 | -------------------------------------------------------------------------------- /screenshots/challenges/first-come-first-served.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/screenshots/challenges/first-come-first-served.png -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/crypto.d.ts: -------------------------------------------------------------------------------- 1 | export declare const crypto: { 2 | node?: any; 3 | web?: any; 4 | }; 5 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "starknet": "https://github.com/0xs34n/starknet.js#develop" 4 | }, 5 | "type": "module" 6 | } 7 | 8 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/cryptoBrowser.d.ts: -------------------------------------------------------------------------------- 1 | export declare const crypto: { 2 | node?: any; 3 | web?: any; 4 | }; 5 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/example/node_modules/starknet/www/static/img/favicon.ico -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/esm/crypto.js: -------------------------------------------------------------------------------- 1 | import * as nodeCrypto from 'crypto'; 2 | export const crypto = { 3 | node: nodeCrypto, 4 | web: undefined, 5 | }; 6 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/static/img/docusaurus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/example/node_modules/starknet/www/static/img/docusaurus.png -------------------------------------------------------------------------------- /example/node_modules/starknet/www/static/img/starknet-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/example/node_modules/starknet/www/static/img/starknet-1.png -------------------------------------------------------------------------------- /example/node_modules/starknet/www/static/img/starknet-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/example/node_modules/starknet/www/static/img/starknet-2.png -------------------------------------------------------------------------------- /example/node_modules/starknet/www/static/img/starknet-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/example/node_modules/starknet/www/static/img/starknet-3.png -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | throw new Error("This package has no entry-point. Please consult the README.md to learn how to use it."); 3 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/esm/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | throw new Error('noble-hashes have no entry-point: consult README for usage'); 3 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | throw new Error('noble-hashes have no entry-point: consult README for usage'); 3 | -------------------------------------------------------------------------------- /example/node_modules/starknet/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["@babel/preset-env", { "targets": { "node": "current" } }], 4 | "@babel/preset-typescript" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/esm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "browser": { 4 | "crypto": false, 5 | "./crypto": "./esm/cryptoBrowser.js" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/guides/cra.md: -------------------------------------------------------------------------------- 1 | # Usage with Create React App 2 | 3 | Please refer to this [GitHub issue](https://github.com/0xs34n/starknet.js/issues/37) 4 | -------------------------------------------------------------------------------- /example/node_modules/hmac-drbg/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - "4" 7 | - "6" 8 | - "stable" 9 | 10 | script: 11 | - npm test 12 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/esm/cryptoBrowser.js: -------------------------------------------------------------------------------- 1 | export const crypto = { 2 | node: undefined, 3 | web: typeof self === 'object' && 'crypto' in self ? self.crypto : undefined, 4 | }; 5 | -------------------------------------------------------------------------------- /example/node_modules/hash.js/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - "6" 5 | - "8" 6 | - "10" 7 | - "stable" 8 | branches: 9 | only: 10 | - master 11 | -------------------------------------------------------------------------------- /example/node_modules/isomorphic-fetch/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "isomorphic-fetch", 3 | "main": ["fetch-bower.js"], 4 | "dependencies": { 5 | "fetch": "github/fetch#^3.4.1" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/static/img/tutorial/localeDropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/example/node_modules/starknet/www/static/img/tutorial/localeDropdown.png -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/bytes/lib/_version.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAAgB,CAAC"} -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/bytes/lib/_version.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,aAAa,CAAC"} -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/logger/lib/_version.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/logger/lib/_version.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,cAAc,CAAC"} -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/index.d.ts: -------------------------------------------------------------------------------- 1 | export { generateMnemonic, mnemonicToEntropy, entropyToMnemonic, validateMnemonic, mnemonicToSeed, mnemonicToSeedSync } from "@scure/bip39"; 2 | -------------------------------------------------------------------------------- /example/node_modules/minimalistic-crypto-utils/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - "4" 7 | - "6" 8 | - "stable" 9 | 10 | script: 11 | - npm test 12 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/src/pages/markdown-page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Markdown page example 3 | --- 4 | 5 | # Markdown page example 6 | 7 | You don't need React to write simple standalone pages. 8 | -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/bytes/lib.esm/_version.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAAgB,CAAC"} -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/logger/lib.esm/_version.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/esm/crypto.js: -------------------------------------------------------------------------------- 1 | import * as nodeCrypto from 'crypto'; 2 | export const crypto = { 3 | node: nodeCrypto, 4 | web: undefined, 5 | }; 6 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/random.d.ts: -------------------------------------------------------------------------------- 1 | export declare function getRandomBytesSync(bytes: number): Uint8Array; 2 | export declare function getRandomBytes(bytes: number): Promise; 3 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/secp256k1.d.ts: -------------------------------------------------------------------------------- 1 | export { getPublicKey, sign, signSync, verify, recoverPublicKey, getSharedSecret, utils, CURVE, Point, Signature, schnorr } from "@noble/secp256k1"; 2 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/static/img/tutorial/docsVersionDropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pscott/StarknetCC-CTF/HEAD/example/node_modules/starknet/www/static/img/tutorial/docsVersionDropdown.png -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/bytes/lib.esm/_version.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC"} -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/logger/lib.esm/_version.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC"} -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/esm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "browser": { 4 | "crypto": false, 5 | "./crypto": "./esm/cryptoBrowser.js" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/esm/cryptoBrowser.js: -------------------------------------------------------------------------------- 1 | export const crypto = { 2 | node: undefined, 3 | web: typeof self === 'object' && 'crypto' in self ? self.crypto : undefined, 4 | }; 5 | -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/bytes/lib/_version.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.version = void 0; 4 | exports.version = "bytes/5.7.0"; 5 | //# sourceMappingURL=_version.js.map -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/logger/lib/_version.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.version = void 0; 4 | exports.version = "logger/5.7.0"; 5 | //# sourceMappingURL=_version.js.map -------------------------------------------------------------------------------- /example/node_modules/isomorphic-fetch/.editorconfig: -------------------------------------------------------------------------------- 1 | root=true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | 7 | [*.js] 8 | indent_style = tab 9 | 10 | [*.json] 11 | indent_style = space 12 | indent_size = 2 13 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/src/components/HomepageFeatures/styles.module.css: -------------------------------------------------------------------------------- 1 | .features { 2 | display: flex; 3 | align-items: center; 4 | padding: 2rem 0; 5 | width: 100%; 6 | } 7 | 8 | .featureSvg { 9 | height: 66px; 10 | } 11 | -------------------------------------------------------------------------------- /example/node_modules/elliptic/lib/elliptic/curve/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var curve = exports; 4 | 5 | curve.base = require('./base'); 6 | curve.short = require('./short'); 7 | curve.mont = require('./mont'); 8 | curve.edwards = require('./edwards'); 9 | -------------------------------------------------------------------------------- /example/node_modules/hash.js/lib/hash/sha.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.sha1 = require('./sha/1'); 4 | exports.sha224 = require('./sha/224'); 5 | exports.sha256 = require('./sha/256'); 6 | exports.sha384 = require('./sha/384'); 7 | exports.sha512 = require('./sha/512'); 8 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/crypto.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.crypto = void 0; 4 | const nodeCrypto = require("crypto"); 5 | exports.crypto = { 6 | node: nodeCrypto, 7 | web: undefined, 8 | }; 9 | -------------------------------------------------------------------------------- /example/node_modules/brorand/test/api-test.js: -------------------------------------------------------------------------------- 1 | var brorand = require('../'); 2 | var assert = require('assert'); 3 | 4 | describe('Brorand', function() { 5 | it('should generate random numbers', function() { 6 | assert.equal(brorand(100).length, 100); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/types/contract.ts: -------------------------------------------------------------------------------- 1 | export type AsyncContractFunction = (...args: Array) => Promise; 2 | export type ContractFunction = (...args: Array) => any; 3 | export interface Result extends Array { 4 | [key: string]: any; 5 | } 6 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib'; 2 | export * as api from './api'; 3 | export { Calldata, Overrides, RawArgs } from './api'; 4 | export * from './signer'; 5 | export * from './contract'; 6 | export * from './account'; 7 | export * from './provider'; 8 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/types/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './lib'; 2 | export * as api from './api'; 3 | export { Calldata, Overrides, RawArgs } from './api'; 4 | export * from './signer'; 5 | export * from './contract'; 6 | export * from './account'; 7 | export * from './provider'; 8 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/provider/index.d.ts: -------------------------------------------------------------------------------- 1 | import { Provider } from './default'; 2 | export * from './default'; 3 | export * from './errors'; 4 | export * from './sequencer'; 5 | export * from './interface'; 6 | export * from './rpc'; 7 | export declare const defaultProvider: Provider; 8 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/cryptoBrowser.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.crypto = void 0; 4 | exports.crypto = { 5 | node: undefined, 6 | web: typeof self === 'object' && 'crypto' in self ? self.crypto : undefined, 7 | }; 8 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/types/contract.d.ts: -------------------------------------------------------------------------------- 1 | export declare type AsyncContractFunction = (...args: Array) => Promise; 2 | export declare type ContractFunction = (...args: Array) => any; 3 | export interface Result extends Array { 4 | [key: string]: any; 5 | } 6 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/docs/API/index.md: -------------------------------------------------------------------------------- 1 | # StarkNet.js API 2 | 3 | This API is based on the [Starknet.js V3](https://github.com/0xs34n/starknet.js/discussions/102) Interface write up by [Janek](https://twitter.com/0xjanek) of [Argent](https://www.argent.xyz/) 4 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/crypto.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.crypto = void 0; 4 | const nodeCrypto = require("crypto"); 5 | exports.crypto = { 6 | node: nodeCrypto, 7 | web: undefined, 8 | }; 9 | -------------------------------------------------------------------------------- /example/node_modules/isomorphic-fetch/fetch-npm-browserify.js: -------------------------------------------------------------------------------- 1 | // the whatwg-fetch polyfill installs the fetch() function 2 | // on the global object (window or self) 3 | // 4 | // Return that as the export for use in Webpack, Browserify etc. 5 | require('whatwg-fetch'); 6 | module.exports = self.fetch.bind(self); 7 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/shortString.d.ts: -------------------------------------------------------------------------------- 1 | export declare function isASCII(str: string): boolean; 2 | export declare function isShortString(str: string): boolean; 3 | export declare function encodeShortString(str: string): string; 4 | export declare function decodeShortString(str: string): string; 5 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/url.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Loosely validate a URL `string`. 3 | * @param {String} s 4 | * @return {Boolean} 5 | */ 6 | export declare function isUrl(s?: string): boolean; 7 | export declare function buildUrl(baseUrl: string, defaultPath: string, urlOrPath?: string): string; 8 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/provider/index.ts: -------------------------------------------------------------------------------- 1 | import { Provider } from './default'; 2 | 3 | export * from './default'; 4 | export * from './errors'; 5 | export * from './sequencer'; 6 | export * from './interface'; 7 | export * from './rpc'; 8 | 9 | export const defaultProvider = new Provider(); 10 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/sha256.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.sha256 = void 0; 4 | const sha256_1 = require("@noble/hashes/sha256"); 5 | const utils_1 = require("./utils"); 6 | exports.sha256 = (0, utils_1.wrapHash)(sha256_1.sha256); 7 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/sha512.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.sha512 = void 0; 4 | const sha512_1 = require("@noble/hashes/sha512"); 5 | const utils_1 = require("./utils"); 6 | exports.sha512 = (0, utils_1.wrapHash)(sha512_1.sha512); 7 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/typedData/utils.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedData } from './types'; 2 | /** 3 | * Validates that `data` matches the EIP-712 JSON schema. 4 | * 5 | * @param {any} data 6 | * @return {boolean} 7 | */ 8 | export declare const validateTypedData: (data: unknown) => data is TypedData; 9 | -------------------------------------------------------------------------------- /example/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | try { 2 | var util = require('util'); 3 | /* istanbul ignore next */ 4 | if (typeof util.inherits !== 'function') throw ''; 5 | module.exports = util.inherits; 6 | } catch (e) { 7 | /* istanbul ignore next */ 8 | module.exports = require('./inherits_browser.js'); 9 | } 10 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/cryptoBrowser.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.crypto = void 0; 4 | exports.crypto = { 5 | node: undefined, 6 | web: typeof self === 'object' && 'crypto' in self ? self.crypto : undefined, 7 | }; 8 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/ripemd160.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.ripemd160 = void 0; 4 | const ripemd160_1 = require("@noble/hashes/ripemd160"); 5 | const utils_1 = require("./utils"); 6 | exports.ripemd160 = (0, utils_1.wrapHash)(ripemd160_1.ripemd160); 7 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/scrypt.d.ts: -------------------------------------------------------------------------------- 1 | export declare function scrypt(password: Uint8Array, salt: Uint8Array, n: number, p: number, r: number, dkLen: number): Promise; 2 | export declare function scryptSync(password: Uint8Array, salt: Uint8Array, n: number, p: number, r: number, dkLen: number): Uint8Array; 3 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/pbkdf2.d.ts: -------------------------------------------------------------------------------- 1 | export declare function pbkdf2(password: Uint8Array, salt: Uint8Array, iterations: number, keylen: number, digest: string): Promise; 2 | export declare function pbkdf2Sync(password: Uint8Array, salt: Uint8Array, iterations: number, keylen: number, digest: string): Uint8Array; 3 | -------------------------------------------------------------------------------- /example/node_modules/minimalistic-assert/index.js: -------------------------------------------------------------------------------- 1 | module.exports = assert; 2 | 3 | function assert(val, msg) { 4 | if (!val) 5 | throw new Error(msg || 'Assertion failed'); 6 | } 7 | 8 | assert.equal = function assertEqual(l, r, msg) { 9 | if (l != r) 10 | throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); 11 | }; 12 | -------------------------------------------------------------------------------- /example/node_modules/starknet/__tests__/utils/__snapshots__/ellipticalCurve.test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`pedersen() 1`] = `"0x5ed2703dfdb505c587700ce2ebfcab5b3515cd7e6114817e6026ec9d4b364ca"`; 4 | 5 | exports[`pedersen() with 0 1`] = `"0x1a5c561f97b52c17a19f34c4499a745cd4e8412e29e4ed5e91e4481c7d53935"`; 6 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/czech.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.wordlist = void 0; 4 | var czech_1 = require("@scure/bip39/wordlists/czech"); 5 | Object.defineProperty(exports, "wordlist", { enumerable: true, get: function () { return czech_1.wordlist; } }); 6 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/french.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.wordlist = void 0; 4 | var french_1 = require("@scure/bip39/wordlists/french"); 5 | Object.defineProperty(exports, "wordlist", { enumerable: true, get: function () { return french_1.wordlist; } }); 6 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/korean.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.wordlist = void 0; 4 | var korean_1 = require("@scure/bip39/wordlists/korean"); 5 | Object.defineProperty(exports, "wordlist", { enumerable: true, get: function () { return korean_1.wordlist; } }); 6 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/aes.d.ts: -------------------------------------------------------------------------------- 1 | export declare function encrypt(msg: Uint8Array, key: Uint8Array, iv: Uint8Array, mode?: string, pkcs7PaddingEnabled?: boolean): Promise; 2 | export declare function decrypt(cypherText: Uint8Array, key: Uint8Array, iv: Uint8Array, mode?: string, pkcs7PaddingEnabled?: boolean): Promise; 3 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/english.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.wordlist = void 0; 4 | var english_1 = require("@scure/bip39/wordlists/english"); 5 | Object.defineProperty(exports, "wordlist", { enumerable: true, get: function () { return english_1.wordlist; } }); 6 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/italian.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.wordlist = void 0; 4 | var italian_1 = require("@scure/bip39/wordlists/italian"); 5 | Object.defineProperty(exports, "wordlist", { enumerable: true, get: function () { return italian_1.wordlist; } }); 6 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/spanish.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.wordlist = void 0; 4 | var spanish_1 = require("@scure/bip39/wordlists/spanish"); 5 | Object.defineProperty(exports, "wordlist", { enumerable: true, get: function () { return spanish_1.wordlist; } }); 6 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/japanese.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.wordlist = void 0; 4 | var japanese_1 = require("@scure/bip39/wordlists/japanese"); 5 | Object.defineProperty(exports, "wordlist", { enumerable: true, get: function () { return japanese_1.wordlist; } }); 6 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/provider.d.ts: -------------------------------------------------------------------------------- 1 | import { CompiledContract, ContractClass, RawCalldata } from '../types'; 2 | export declare function wait(delay: number): Promise; 3 | export declare function parseCalldata(calldata?: RawCalldata): string[]; 4 | export declare function parseContract(contract: CompiledContract | string): ContractClass; 5 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/signer/interface.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.SignerInterface = void 0; 4 | var SignerInterface = /** @class */ (function () { 5 | function SignerInterface() { 6 | } 7 | return SignerInterface; 8 | }()); 9 | exports.SignerInterface = SignerInterface; 10 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/contracts/openzeppelin/introspection/erc165/IERC165.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (introspection/erc165/IERC165.cairo) 3 | 4 | %lang starknet 5 | 6 | @contract_interface 7 | namespace IERC165 { 8 | func supportsInterface(interfaceId: felt) -> (success: felt) { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/magic_encoding/public/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amanusk/cairo-base:latest 2 | 3 | COPY deploy/ /home/ctf/ 4 | 5 | COPY contracts /tmp/contracts 6 | 7 | RUN true \ 8 | && mkdir /home/ctf/compiled \ 9 | && cd /tmp/contracts \ 10 | && cat magic-encoding.json > /home/ctf/compiled/magic-encoding.json \ 11 | && rm -rf /tmp/contracts \ 12 | && true 13 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/responseParser/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.ResponseParser = void 0; 4 | var ResponseParser = /** @class */ (function () { 5 | function ResponseParser() { 6 | } 7 | return ResponseParser; 8 | }()); 9 | exports.ResponseParser = ResponseParser; 10 | -------------------------------------------------------------------------------- /src/dna/public/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amanusk/cairo-base:latest 2 | 3 | COPY deploy/ /home/ctf/ 4 | 5 | COPY contracts /tmp/contracts 6 | 7 | RUN true \ 8 | && mkdir /home/ctf/compiled \ 9 | && cd /tmp/contracts \ 10 | && starknet-compile --debug_info_with_source dna.cairo > /home/ctf/compiled/dna.cairo \ 11 | && rm -rf /tmp/contracts \ 12 | && true 13 | -------------------------------------------------------------------------------- /src/account_obstruction/public/contracts/openzeppelin/introspection/erc165/IERC165.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (introspection/erc165/IERC165.cairo) 3 | 4 | %lang starknet 5 | 6 | @contract_interface 7 | namespace IERC165 { 8 | func supportsInterface(interfaceId: felt) -> (success: felt) { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/cairo_bid/public/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amanusk/cairo-base:latest 2 | 3 | COPY deploy/ /home/ctf/ 4 | 5 | COPY contracts /tmp/contracts 6 | 7 | RUN true \ 8 | && mkdir /home/ctf/compiled \ 9 | && cd /tmp/contracts \ 10 | && starknet-compile --debug_info_with_source bid.cairo > /home/ctf/compiled/bid.cairo \ 11 | && rm -rf /tmp/contracts \ 12 | && true 13 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/contract/interface.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.ContractInterface = void 0; 4 | var ContractInterface = /** @class */ (function () { 5 | function ContractInterface() { 6 | } 7 | return ContractInterface; 8 | }()); 9 | exports.ContractInterface = ContractInterface; 10 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/provider/interface.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.ProviderInterface = void 0; 4 | var ProviderInterface = /** @class */ (function () { 5 | function ProviderInterface() { 6 | } 7 | return ProviderInterface; 8 | }()); 9 | exports.ProviderInterface = ProviderInterface; 10 | -------------------------------------------------------------------------------- /src/frozen_finance/public/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amanusk/cairo-base:latest 2 | 3 | COPY deploy/ /home/ctf/ 4 | 5 | COPY contracts /tmp/contracts 6 | 7 | RUN true \ 8 | && mkdir /home/ctf/compiled \ 9 | && cd /tmp/contracts \ 10 | && starknet-compile --debug_info_with_source frozen.cairo > /home/ctf/compiled/frozen.cairo \ 11 | && rm -rf /tmp/contracts \ 12 | && true 13 | -------------------------------------------------------------------------------- /src/solveme/public/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amanusk/cairo-base:latest 2 | 3 | COPY deploy/ /home/ctf/ 4 | 5 | COPY contracts /tmp/contracts 6 | 7 | RUN true \ 8 | && mkdir /home/ctf/compiled \ 9 | && cd /tmp/contracts \ 10 | && starknet-compile --debug_info_with_source solve-me.cairo > /home/ctf/compiled/solve-me.json \ 11 | && rm -rf /tmp/contracts \ 12 | && true 13 | -------------------------------------------------------------------------------- /src/first_come_first_served/public/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amanusk/cairo-base:latest 2 | 3 | COPY deploy/ /home/ctf/ 4 | 5 | COPY contracts /tmp/contracts 6 | 7 | RUN true \ 8 | && mkdir /home/ctf/compiled \ 9 | && cd /tmp/contracts \ 10 | && starknet-compile --debug_info_with_source fifs.cairo > /home/ctf/compiled/fifs.json \ 11 | && rm -rf /tmp/contracts \ 12 | && true 13 | -------------------------------------------------------------------------------- /example/node_modules/ts-custom-error/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | | Version | Supported | 6 | | ------- | ------------------ | 7 | | 3.x.x | :white_check_mark: | 8 | 9 | ## Reporting a Vulnerability 10 | 11 | Please [create an issue with the "security" label](https://github.com/adriengibrat/ts-custom-error/issues/new?labels=security). 12 | -------------------------------------------------------------------------------- /src/cairo_intro/public/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amanusk/cairo-base:latest 2 | 3 | COPY deploy/ /home/ctf/ 4 | 5 | COPY contracts /tmp/contracts 6 | 7 | RUN true \ 8 | && mkdir /home/ctf/compiled \ 9 | && cd /tmp/contracts \ 10 | && starknet-compile --debug_info_with_source cairo-intro.cairo > /home/ctf/compiled/cairo-intro.cairo \ 11 | && rm -rf /tmp/contracts \ 12 | && true 13 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/simplified-chinese.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.wordlist = void 0; 4 | var simplified_chinese_1 = require("@scure/bip39/wordlists/simplified-chinese"); 5 | Object.defineProperty(exports, "wordlist", { enumerable: true, get: function () { return simplified_chinese_1.wordlist; } }); 6 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/provider/errors.d.ts: -------------------------------------------------------------------------------- 1 | import { CustomError } from 'ts-custom-error'; 2 | export declare class GatewayError extends CustomError { 3 | errorCode: string; 4 | constructor(message: string, errorCode: string); 5 | } 6 | export declare class HttpError extends CustomError { 7 | errorCode: number; 8 | constructor(message: string, errorCode: number); 9 | } 10 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/code-examples/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "code-examples", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "starknet": "^3.3.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/access_denied/public/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amanusk/cairo-base:latest 2 | 3 | COPY deploy/ /home/ctf/ 4 | 5 | COPY contracts /tmp/contracts 6 | 7 | RUN true \ 8 | && mkdir /home/ctf/compiled \ 9 | && cd /tmp/contracts \ 10 | && starknet-compile --debug_info_with_source access_denied.cairo > /home/ctf/compiled/access_denied.cairo \ 11 | && rm -rf /tmp/contracts \ 12 | && true 13 | -------------------------------------------------------------------------------- /src/access_denied/public/contracts/IAccount.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0 (account/IAccount.cairo) 3 | 4 | %lang starknet 5 | 6 | @contract_interface 7 | namespace IAccount { 8 | // Starknet devnet 0.3.1 uses open zeppelin's camelcased account impl 9 | func get_public_key() -> ( 10 | res: felt 11 | ) { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/wordlists/traditional-chinese.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.wordlist = void 0; 4 | var traditional_chinese_1 = require("@scure/bip39/wordlists/traditional-chinese"); 5 | Object.defineProperty(exports, "wordlist", { enumerable: true, get: function () { return traditional_chinese_1.wordlist; } }); 6 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/address.d.ts: -------------------------------------------------------------------------------- 1 | import { BigNumberish } from './number'; 2 | export declare function addAddressPadding(address: BigNumberish): string; 3 | export declare function validateAndParseAddress(address: BigNumberish): string; 4 | export declare function getChecksumAddress(address: BigNumberish): string; 5 | export declare function validateChecksumAddress(address: string): boolean; 6 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/contracts/openzeppelin/__init__.py: -------------------------------------------------------------------------------- 1 | """StarkNet/Cairo development toolbelt.""" 2 | 3 | try: 4 | from importlib import metadata as importlib_metadata 5 | except ImportError: 6 | import importlib_metadata 7 | 8 | try: 9 | __version__ = importlib_metadata.version("openzeppelin-cairo-contracts") 10 | except importlib_metadata.PackageNotFoundError: 11 | __version__ = None 12 | -------------------------------------------------------------------------------- /src/account_obstruction/public/contracts/openzeppelin/__init__.py: -------------------------------------------------------------------------------- 1 | """StarkNet/Cairo development toolbelt.""" 2 | 3 | try: 4 | from importlib import metadata as importlib_metadata 5 | except ImportError: 6 | import importlib_metadata 7 | 8 | try: 9 | __version__ = importlib_metadata.version("openzeppelin-cairo-contracts") 10 | except importlib_metadata.PackageNotFoundError: 11 | __version__ = None 12 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/utils/fetchPonyfill.ts: -------------------------------------------------------------------------------- 1 | export default (typeof window !== 'undefined' && window.fetch) || // use buildin fetch in browser if available 2 | (typeof global !== 'undefined' && global.fetch) || // use buildin fetch in node, react-native and service worker if available 3 | // eslint-disable-next-line global-require 4 | require('isomorphic-fetch'); // ponyfill fetch in node and browsers that don't have it 5 | -------------------------------------------------------------------------------- /example/node_modules/starknet/.commitlintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@commitlint/config-conventional" 4 | ], 5 | "rules": { 6 | "body-max-line-length": [ 7 | 0, 8 | "always", 9 | 100 10 | ], 11 | "footer-max-line-length": [ 12 | 0, 13 | "always", 14 | 100 15 | ], 16 | "footer-leading-blank": [ 17 | 0, 18 | "always", 19 | 100 20 | ] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/hdkey.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.HDKey = exports.HARDENED_OFFSET = void 0; 4 | var bip32_1 = require("@scure/bip32"); 5 | Object.defineProperty(exports, "HARDENED_OFFSET", { enumerable: true, get: function () { return bip32_1.HARDENED_OFFSET; } }); 6 | Object.defineProperty(exports, "HDKey", { enumerable: true, get: function () { return bip32_1.HDKey; } }); 7 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/types/account.d.ts: -------------------------------------------------------------------------------- 1 | import BN from 'bn.js'; 2 | import { BlockIdentifier } from '../provider/utils'; 3 | import { BigNumberish } from '../utils/number'; 4 | import { EstimateFeeResponse } from './provider'; 5 | export interface EstimateFee extends EstimateFeeResponse { 6 | suggestedMaxFee: BN; 7 | } 8 | export interface EstimateFeeDetails { 9 | nonce?: BigNumberish; 10 | blockIdentifier?: BlockIdentifier; 11 | } 12 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/provider/errors.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable max-classes-per-file */ 2 | import { CustomError } from 'ts-custom-error'; 3 | 4 | export class GatewayError extends CustomError { 5 | constructor(message: string, public errorCode: string) { 6 | super(message); 7 | } 8 | } 9 | 10 | export class HttpError extends CustomError { 11 | constructor(message: string, public errorCode: number) { 12 | super(message); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /example/node_modules/elliptic/lib/elliptic.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var elliptic = exports; 4 | 5 | elliptic.version = require('../package.json').version; 6 | elliptic.utils = require('./elliptic/utils'); 7 | elliptic.rand = require('brorand'); 8 | elliptic.curve = require('./elliptic/curve'); 9 | elliptic.curves = require('./elliptic/curves'); 10 | 11 | // Protocols 12 | elliptic.ec = require('./elliptic/ec'); 13 | elliptic.eddsa = require('./elliptic/eddsa'); 14 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/merkle.d.ts: -------------------------------------------------------------------------------- 1 | export declare class MerkleTree { 2 | leaves: string[]; 3 | branches: string[][]; 4 | root: string; 5 | constructor(leafHashes: string[]); 6 | private build; 7 | static hash(a: string, b: string): string; 8 | getProof(leaf: string, branch?: string[], hashPath?: string[]): string[]; 9 | } 10 | export declare function proofMerklePath(root: string, leaf: string, path: string[]): boolean; 11 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/types/account.ts: -------------------------------------------------------------------------------- 1 | import BN from 'bn.js'; 2 | 3 | import { BlockIdentifier } from '../provider/utils'; 4 | import { BigNumberish } from '../utils/number'; 5 | import { EstimateFeeResponse } from './provider'; 6 | 7 | export interface EstimateFee extends EstimateFeeResponse { 8 | suggestedMaxFee: BN; 9 | } 10 | 11 | export interface EstimateFeeDetails { 12 | nonce?: BigNumberish; 13 | blockIdentifier?: BlockIdentifier; 14 | } 15 | -------------------------------------------------------------------------------- /example/node_modules/isomorphic-fetch/fetch-npm-node.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var realFetch = require('node-fetch'); 4 | module.exports = function(url, options) { 5 | if (/^\/\//.test(url)) { 6 | url = 'https:' + url; 7 | } 8 | return realFetch.call(this, url, options); 9 | }; 10 | 11 | if (!global.fetch) { 12 | global.fetch = module.exports; 13 | global.Response = realFetch.Response; 14 | global.Headers = realFetch.Headers; 15 | global.Request = realFetch.Request; 16 | } 17 | -------------------------------------------------------------------------------- /example/node_modules/json-bigint/index.js: -------------------------------------------------------------------------------- 1 | var json_stringify = require('./lib/stringify.js').stringify; 2 | var json_parse = require('./lib/parse.js'); 3 | 4 | module.exports = function(options) { 5 | return { 6 | parse: json_parse(options), 7 | stringify: json_stringify 8 | } 9 | }; 10 | //create the default method members with no options applied for backwards compatibility 11 | module.exports.parse = json_parse(); 12 | module.exports.stringify = json_stringify; 13 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/utils/json.ts: -------------------------------------------------------------------------------- 1 | import Json from 'json-bigint'; 2 | 3 | const json = (alwaysParseAsBig: boolean) => { 4 | return Json({ 5 | alwaysParseAsBig, 6 | useNativeBigInt: true, 7 | protoAction: 'preserve', 8 | constructorAction: 'preserve', 9 | }); 10 | }; 11 | 12 | export const { parse, stringify } = json(false); 13 | export const { parse: parseAlwaysAsBig, stringify: stringifyAlwaysAsBig } = json(true); 14 | 15 | export default { parse, stringify }; 16 | -------------------------------------------------------------------------------- /src/unique_id/public/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amanusk/cairo-base:latest 2 | 3 | COPY deploy/ /home/ctf/ 4 | 5 | COPY contracts /tmp/contracts 6 | 7 | RUN true \ 8 | && mkdir /home/ctf/compiled \ 9 | && cd /tmp/contracts \ 10 | && starknet-compile --debug_info_with_source implementation_v1.cairo > /home/ctf/compiled/implementation_v1.json \ 11 | && starknet-compile --debug_info_with_source proxy.cairo > /home/ctf/compiled/proxy.json \ 12 | && rm -rf /tmp/contracts \ 13 | && true 14 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/keccak.d.ts: -------------------------------------------------------------------------------- 1 | import { Keccak } from "@noble/hashes/sha3"; 2 | import { Hash } from "@noble/hashes/utils"; 3 | interface K256 { 4 | (data: Uint8Array): Uint8Array; 5 | create(): Hash; 6 | } 7 | export declare const keccak224: (msg: Uint8Array) => Uint8Array; 8 | export declare const keccak256: K256; 9 | export declare const keccak384: (msg: Uint8Array) => Uint8Array; 10 | export declare const keccak512: (msg: Uint8Array) => Uint8Array; 11 | export {}; 12 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/contracts/openzeppelin/token/erc721/IERC721Receiver.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (token/erc721/IERC721Receiver.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.uint256 import Uint256 7 | 8 | @contract_interface 9 | namespace IERC721Receiver { 10 | func onERC721Received( 11 | operator: felt, from_: felt, tokenId: Uint256, data_len: felt, data: felt* 12 | ) -> (selector: felt) { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/types/api/index.ts: -------------------------------------------------------------------------------- 1 | import { BigNumberish } from '../../utils/number'; 2 | import { Signature } from '../lib'; 3 | 4 | export type RawArgs = { 5 | [inputName: string]: string | string[] | { type: 'struct'; [k: string]: BigNumberish }; 6 | }; 7 | 8 | export type Calldata = string[]; 9 | 10 | export type Overrides = { 11 | maxFee?: BigNumberish; 12 | nonce?: BigNumberish; 13 | signature?: Signature; 14 | }; 15 | 16 | export * from './sequencer'; 17 | export * from './rpc'; 18 | -------------------------------------------------------------------------------- /src/account_obstruction/public/contracts/openzeppelin/token/erc721/IERC721Receiver.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (token/erc721/IERC721Receiver.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.uint256 import Uint256 7 | 8 | @contract_interface 9 | namespace IERC721Receiver { 10 | func onERC721Received( 11 | operator: felt, from_: felt, tokenId: Uint256, data_len: felt, data: felt* 12 | ) -> (selector: felt) { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/fetchPonyfill.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.default = (typeof window !== 'undefined' && window.fetch) || // use buildin fetch in browser if available 4 | (typeof global !== 'undefined' && global.fetch) || // use buildin fetch in node, react-native and service worker if available 5 | // eslint-disable-next-line global-require 6 | require('isomorphic-fetch'); // ponyfill fetch in node and browsers that don't have it 7 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/src/pages/index.module.css: -------------------------------------------------------------------------------- 1 | /** 2 | * CSS files with the .module.css suffix will be treated as CSS modules 3 | * and scoped locally. 4 | */ 5 | 6 | .heroBanner { 7 | padding: 4rem 0; 8 | text-align: center; 9 | position: relative; 10 | overflow: hidden; 11 | } 12 | 13 | @media screen and (max-width: 966px) { 14 | .heroBanner { 15 | padding: 2rem; 16 | } 17 | } 18 | 19 | .buttons { 20 | display: flex; 21 | align-items: center; 22 | justify-content: center; 23 | } 24 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/random.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.getRandomBytes = exports.getRandomBytesSync = void 0; 4 | const utils_1 = require("@noble/hashes/utils"); 5 | function getRandomBytesSync(bytes) { 6 | return (0, utils_1.randomBytes)(bytes); 7 | } 8 | exports.getRandomBytesSync = getRandomBytesSync; 9 | async function getRandomBytes(bytes) { 10 | return (0, utils_1.randomBytes)(bytes); 11 | } 12 | exports.getRandomBytes = getRandomBytes; 13 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/contracts/openzeppelin/token/erc721/IERC721Metadata.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (token/erc721/IERC721Metadata.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.uint256 import Uint256 7 | 8 | @contract_interface 9 | namespace IERC721Metadata { 10 | func name() -> (name: felt) { 11 | } 12 | 13 | func symbol() -> (symbol: felt) { 14 | } 15 | 16 | func tokenURI(tokenId: Uint256) -> (tokenURI: felt) { 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /example/node_modules/hash.js/lib/hash.js: -------------------------------------------------------------------------------- 1 | var hash = exports; 2 | 3 | hash.utils = require('./hash/utils'); 4 | hash.common = require('./hash/common'); 5 | hash.sha = require('./hash/sha'); 6 | hash.ripemd = require('./hash/ripemd'); 7 | hash.hmac = require('./hash/hmac'); 8 | 9 | // Proxy hash functions to the main object 10 | hash.sha1 = hash.sha.sha1; 11 | hash.sha256 = hash.sha.sha256; 12 | hash.sha224 = hash.sha.sha224; 13 | hash.sha384 = hash.sha.sha384; 14 | hash.sha512 = hash.sha.sha512; 15 | hash.ripemd160 = hash.ripemd.ripemd160; 16 | -------------------------------------------------------------------------------- /src/account_obstruction/public/contracts/openzeppelin/token/erc721/IERC721Metadata.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (token/erc721/IERC721Metadata.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.uint256 import Uint256 7 | 8 | @contract_interface 9 | namespace IERC721Metadata { 10 | func name() -> (name: felt) { 11 | } 12 | 13 | func symbol() -> (symbol: felt) { 14 | } 15 | 16 | func tokenURI(tokenId: Uint256) -> (tokenURI: felt) { 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/uint256.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { BigNumberish } from './number'; 3 | export interface Uint256 { 4 | low: BigNumberish; 5 | high: BigNumberish; 6 | } 7 | export declare function uint256ToBN(uint256: Uint256): import("bn.js"); 8 | export declare const UINT_128_MAX: import("bn.js"); 9 | export declare const UINT_256_MAX: import("bn.js"); 10 | export declare function isUint256(bn: BigNumberish): boolean; 11 | export declare function bnToUint256(bignumber: BigNumberish): Uint256; 12 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/utils/typedData/utils.ts: -------------------------------------------------------------------------------- 1 | import { TypedData } from './types'; 2 | 3 | /** 4 | * Validates that `data` matches the EIP-712 JSON schema. 5 | * 6 | * @param {any} data 7 | * @return {boolean} 8 | */ 9 | export const validateTypedData = (data: unknown): data is TypedData => { 10 | const typedData = data as TypedData; 11 | 12 | // Validate that the data matches the EIP-712 JSON schema 13 | const valid = Boolean(typedData.types && typedData.primaryType && typedData.message); 14 | 15 | return valid; 16 | }; 17 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/code-examples/erc20.js: -------------------------------------------------------------------------------- 1 | import * as starknet from 'starknet'; 2 | 3 | const keyPair = starknet.ec.genKeyPair(); 4 | const starkKey = starknet.ec.getStarkKey(keyPair); 5 | const starkKeyInt = starknet.number.toBN(starknet.encode.removeHexPrefix(starkKey), 16); 6 | 7 | const deployWalletTx = await provider.deployContract({ 8 | contract: COMPILED_WALLET_CONTRACT_JSON, 9 | constructorCallData: [starkKeyInt], 10 | addressSalt: 0, 11 | }); 12 | 13 | await defaultProvider.waitForTx(deployWalletTx.transaction_hash); 14 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/types/api/index.d.ts: -------------------------------------------------------------------------------- 1 | import { BigNumberish } from '../../utils/number'; 2 | import { Signature } from '../lib'; 3 | export declare type RawArgs = { 4 | [inputName: string]: string | string[] | { 5 | type: 'struct'; 6 | [k: string]: BigNumberish; 7 | }; 8 | }; 9 | export declare type Calldata = string[]; 10 | export declare type Overrides = { 11 | maxFee?: BigNumberish; 12 | nonce?: BigNumberish; 13 | signature?: Signature; 14 | }; 15 | export * from './sequencer'; 16 | export * from './rpc'; 17 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/blake2b.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.blake2b = void 0; 4 | const blake2b_1 = require("@noble/hashes/blake2b"); 5 | const utils_1 = require("./utils"); 6 | const blake2b = (msg, outputLength = 64) => { 7 | (0, utils_1.assertBytes)(msg); 8 | if (outputLength <= 0 || outputLength > 64) { 9 | throw Error("Invalid outputLength"); 10 | } 11 | return (0, blake2b_1.blake2b)(msg, { dkLen: outputLength }); 12 | }; 13 | exports.blake2b = blake2b; 14 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amanusk/cairo-base:latest 2 | 3 | COPY deploy/ /home/ctf/ 4 | 5 | COPY contracts /tmp/contracts 6 | 7 | RUN true \ 8 | && mkdir /home/ctf/compiled \ 9 | && cd /tmp/contracts \ 10 | && starknet-compile --debug_info_with_source claim_a_punk.cairo > /home/ctf/compiled/claim_a_punk.cairo \ 11 | && starknet-compile --debug_info_with_source openzeppelin/token/erc721/enumerable/presets/ERC721EnumerableMintableBurnable.cairo > /home/ctf/compiled/erc721enumerable_mintable.cairo \ 12 | && rm -rf /tmp/contracts \ 13 | && true 14 | -------------------------------------------------------------------------------- /src/account_obstruction/public/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amanusk/cairo-base:latest 2 | 3 | COPY deploy/ /home/ctf/ 4 | 5 | COPY contracts /tmp/contracts 6 | 7 | RUN true \ 8 | && mkdir /home/ctf/compiled \ 9 | && cd /tmp/contracts \ 10 | && starknet-compile --debug_info_with_source openzeppelin/account/presets/Account.cairo --output /home/ctf/compiled/Account.json --account \ 11 | && starknet-compile --debug_info_with_source openzeppelin/token/erc20/presets/ERC20Pausable.cairo --output /home/ctf/compiled/ERC20Pausable.json \ 12 | && rm -rf /tmp/contracts \ 13 | && true 14 | -------------------------------------------------------------------------------- /src/puzzle_box/public/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amanusk/cairo-base:latest 2 | 3 | COPY deploy/ /home/ctf/ 4 | 5 | COPY contracts /tmp/contracts 6 | 7 | RUN true \ 8 | && mkdir /home/ctf/compiled \ 9 | && cd /tmp/contracts \ 10 | && starknet-compile --debug_info_with_source impl_1.cairo > /home/ctf/compiled/impl_1.json \ 11 | && starknet-compile --debug_info_with_source impl_2.cairo > /home/ctf/compiled/impl_2.json \ 12 | && starknet-compile --debug_info_with_source puzzle_box.cairo > /home/ctf/compiled/puzzle_box.json \ 13 | && rm -rf /tmp/contracts \ 14 | && true 15 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/contracts/openzeppelin/token/erc721/enumerable/IERC721Enumerable.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (token/erc721/enumerable/IERC721Enumerable.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.uint256 import Uint256 7 | 8 | @contract_interface 9 | namespace IERC721Enumerable { 10 | func totalSupply() -> (totalSupply: Uint256) { 11 | } 12 | 13 | func tokenByIndex(index: Uint256) -> (tokenId: Uint256) { 14 | } 15 | 16 | func tokenOfOwnerByIndex(owner: felt, index: Uint256) -> (tokenId: Uint256) { 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/typedData/utils.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.validateTypedData = void 0; 4 | /** 5 | * Validates that `data` matches the EIP-712 JSON schema. 6 | * 7 | * @param {any} data 8 | * @return {boolean} 9 | */ 10 | var validateTypedData = function (data) { 11 | var typedData = data; 12 | // Validate that the data matches the EIP-712 JSON schema 13 | var valid = Boolean(typedData.types && typedData.primaryType && typedData.message); 14 | return valid; 15 | }; 16 | exports.validateTypedData = validateTypedData; 17 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/docs/API/changelog.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 7 3 | --- 4 | 5 | # CHANGELOG 6 | 7 | ### Release 3.10.2 (21.04.2022) 8 | 9 | - New hash formula for the new account contract version. 10 | 11 | **NOTE**: Update your accounts, old ones will not be supported anymore. For updating with Argent X extension you can check this [link](https://github.com/argentlabs/argent-x/pull/522) 12 | 13 | - BUGFIX: [#165](https://github.com/0xs34n/starknet.js/issues/165) 14 | - BUGFIX: [#151](https://github.com/0xs34n/starknet.js/issues/151) 15 | - BUGFIX: [#158](https://github.com/0xs34n/starknet.js/issues/158) 16 | -------------------------------------------------------------------------------- /src/account_obstruction/public/contracts/openzeppelin/token/erc721/enumerable/IERC721Enumerable.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (token/erc721/enumerable/IERC721Enumerable.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.uint256 import Uint256 7 | 8 | @contract_interface 9 | namespace IERC721Enumerable { 10 | func totalSupply() -> (totalSupply: Uint256) { 11 | } 12 | 13 | func tokenByIndex(index: Uint256) -> (tokenId: Uint256) { 14 | } 15 | 16 | func tokenOfOwnerByIndex(owner: felt, index: Uint256) -> (tokenId: Uint256) { 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /example/node_modules/minimalistic-assert/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "minimalistic-assert", 3 | "version": "1.0.1", 4 | "description": "minimalistic-assert ===", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/calvinmetcalf/minimalistic-assert.git" 12 | }, 13 | "author": "", 14 | "license": "ISC", 15 | "bugs": { 16 | "url": "https://github.com/calvinmetcalf/minimalistic-assert/issues" 17 | }, 18 | "homepage": "https://github.com/calvinmetcalf/minimalistic-assert" 19 | } 20 | -------------------------------------------------------------------------------- /example/node_modules/webidl-conversions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webidl-conversions", 3 | "version": "3.0.1", 4 | "description": "Implements the WebIDL algorithms for converting to and from JavaScript values", 5 | "main": "lib/index.js", 6 | "scripts": { 7 | "test": "mocha test/*.js" 8 | }, 9 | "repository": "jsdom/webidl-conversions", 10 | "keywords": [ 11 | "webidl", 12 | "web", 13 | "types" 14 | ], 15 | "files": [ 16 | "lib/" 17 | ], 18 | "author": "Domenic Denicola (https://domenic.me/)", 19 | "license": "BSD-2-Clause", 20 | "devDependencies": { 21 | "mocha": "^1.21.4" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/contracts/openzeppelin/access/accesscontrol/IAccessControl.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (access/accesscontrol/IAccessControl.cairo) 3 | 4 | %lang starknet 5 | 6 | @contract_interface 7 | namespace IAccessControl { 8 | func hasRole(role: felt, account: felt) -> (hasRole: felt) { 9 | } 10 | 11 | func getRoleAdmin(role: felt) -> (admin: felt) { 12 | } 13 | 14 | func grantRole(role: felt, account: felt) { 15 | } 16 | 17 | func revokeRole(role: felt, account: felt) { 18 | } 19 | 20 | func renounceRole(role: felt, account: felt) { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/account_obstruction/public/contracts/openzeppelin/access/accesscontrol/IAccessControl.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (access/accesscontrol/IAccessControl.cairo) 3 | 4 | %lang starknet 5 | 6 | @contract_interface 7 | namespace IAccessControl { 8 | func hasRole(role: felt, account: felt) -> (hasRole: felt) { 9 | } 10 | 11 | func getRoleAdmin(role: felt) -> (admin: felt) { 12 | } 13 | 14 | func grantRole(role: felt, account: felt) { 15 | } 16 | 17 | func revokeRole(role: felt, account: felt) { 18 | } 19 | 20 | func renounceRole(role: felt, account: felt) { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/keccak.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.keccak512 = exports.keccak384 = exports.keccak256 = exports.keccak224 = void 0; 4 | const sha3_1 = require("@noble/hashes/sha3"); 5 | const utils_1 = require("./utils"); 6 | exports.keccak224 = (0, utils_1.wrapHash)(sha3_1.keccak_224); 7 | exports.keccak256 = (() => { 8 | const k = (0, utils_1.wrapHash)(sha3_1.keccak_256); 9 | k.create = sha3_1.keccak_256.create; 10 | return k; 11 | })(); 12 | exports.keccak384 = (0, utils_1.wrapHash)(sha3_1.keccak_384); 13 | exports.keccak512 = (0, utils_1.wrapHash)(sha3_1.keccak_512); 14 | -------------------------------------------------------------------------------- /example/node_modules/starknet/__tests__/utils/transactionHash.test.ts: -------------------------------------------------------------------------------- 1 | import { StarknetChainId, TransactionHashPrefix } from '../../src/constants'; 2 | import { calculateTransactionHashCommon } from '../../src/utils/hash'; 3 | 4 | describe('calculateTransactionHashCommon()', () => { 5 | test('should match most simple python output', () => { 6 | const result = calculateTransactionHashCommon( 7 | TransactionHashPrefix.INVOKE, 8 | '0x0', 9 | '0x2a', 10 | '0x64', 11 | [], 12 | '0x0', 13 | StarknetChainId.TESTNET 14 | ); 15 | expect(result).toBe('0x7d260744de9d8c55e7675a34512d1951a7b262c79e685d26599edd2948de959'); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /example/node_modules/whatwg-url/lib/utils.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports.mixin = function mixin(target, source) { 4 | const keys = Object.getOwnPropertyNames(source); 5 | for (let i = 0; i < keys.length; ++i) { 6 | Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i])); 7 | } 8 | }; 9 | 10 | module.exports.wrapperSymbol = Symbol("wrapper"); 11 | module.exports.implSymbol = Symbol("impl"); 12 | 13 | module.exports.wrapperForImpl = function (impl) { 14 | return impl[module.exports.wrapperSymbol]; 15 | }; 16 | 17 | module.exports.implForWrapper = function (wrapper) { 18 | return wrapper[module.exports.implSymbol]; 19 | }; 20 | 21 | -------------------------------------------------------------------------------- /example/node_modules/pako/index.js: -------------------------------------------------------------------------------- 1 | // Top level file is just a mixin of submodules & constants 2 | 'use strict'; 3 | 4 | const { Deflate, deflate, deflateRaw, gzip } = require('./lib/deflate'); 5 | 6 | const { Inflate, inflate, inflateRaw, ungzip } = require('./lib/inflate'); 7 | 8 | const constants = require('./lib/zlib/constants'); 9 | 10 | module.exports.Deflate = Deflate; 11 | module.exports.deflate = deflate; 12 | module.exports.deflateRaw = deflateRaw; 13 | module.exports.gzip = gzip; 14 | module.exports.Inflate = Inflate; 15 | module.exports.inflate = inflate; 16 | module.exports.inflateRaw = inflateRaw; 17 | module.exports.ungzip = ungzip; 18 | module.exports.constants = constants; 19 | -------------------------------------------------------------------------------- /example/node_modules/url-join/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "url-join", 3 | "version": "4.0.1", 4 | "description": "Join urls and normalize as in path.join.", 5 | "main": "lib/url-join.js", 6 | "scripts": { 7 | "test": "mocha --require should" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git://github.com/jfromaniello/url-join.git" 12 | }, 13 | "keywords": [ 14 | "url", 15 | "join" 16 | ], 17 | "author": "José F. Romaniello (http://joseoncode.com)", 18 | "license": "MIT", 19 | "devDependencies": { 20 | "conventional-changelog": "^1.1.10", 21 | "mocha": "^3.2.0", 22 | "should": "~1.2.1" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /example/node_modules/whatwg-url/lib/public-api.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | exports.URL = require("./URL").interface; 4 | exports.serializeURL = require("./url-state-machine").serializeURL; 5 | exports.serializeURLOrigin = require("./url-state-machine").serializeURLOrigin; 6 | exports.basicURLParse = require("./url-state-machine").basicURLParse; 7 | exports.setTheUsername = require("./url-state-machine").setTheUsername; 8 | exports.setThePassword = require("./url-state-machine").setThePassword; 9 | exports.serializeHost = require("./url-state-machine").serializeHost; 10 | exports.serializeInteger = require("./url-state-machine").serializeInteger; 11 | exports.parseURL = require("./url-state-machine").parseURL; 12 | -------------------------------------------------------------------------------- /src/cairo_bid/public/contracts/bid_interface.cairo: -------------------------------------------------------------------------------- 1 | %lang starknet 2 | 3 | using Bool = felt; 4 | using Address = felt; 5 | 6 | @contract_interface 7 | namespace Bid { 8 | func get_balance(address: Address) -> (balance: felt) { 9 | } 10 | 11 | func get_transfer_fact(address: Address) -> (transered: Bool) { 12 | } 13 | 14 | func get_fact_bid(address: Address) -> (bidded: Bool) { 15 | } 16 | 17 | func get_bid_amount(address: Address) -> (bid_amount: felt) { 18 | } 19 | 20 | func get_winner_bid() -> (address: Address, bid_amount: felt) { 21 | } 22 | 23 | func deposit(address: Address, bid_amount: felt) { 24 | } 25 | 26 | func bid(address: Address, bid_amount: felt) { 27 | } 28 | } -------------------------------------------------------------------------------- /example/node_modules/starknet/www/guides/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # Getting Started 6 | 7 | ```bash 8 | npm install starknet 9 | 10 | # to use latest features 11 | 12 | npm install starknet@next 13 | ``` 14 | 15 | ## Compiling StarkNet Contracts 16 | 17 | Please check the StarkNet documentation [here](https://www.cairo-lang.org/docs/hello_starknet/intro.html) to compile starknet contracts. 18 | 19 | Additional helpful resources can also be found at [OpenZeppelin](https://docs.openzeppelin.com/contracts-cairo/0.3.1/) documentation site. 20 | 21 | ## Full example with account & erc20 22 | 23 | Please take a look at our workshop [here](https://github.com/0xs34n/starknet.js-workshop). 24 | -------------------------------------------------------------------------------- /src/solveme/public/contracts/solve-me.cairo: -------------------------------------------------------------------------------- 1 | %lang starknet 2 | 3 | from starkware.cairo.common.cairo_builtins import HashBuiltin 4 | 5 | @storage_var 6 | func solved() -> (bool: felt) { 7 | } 8 | 9 | // Constructor 10 | @constructor 11 | func constructor{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() { 12 | return (); 13 | } 14 | 15 | // View 16 | 17 | @view 18 | func is_solved{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() -> (res: felt) { 19 | let (res) = solved.read(); 20 | return (res=res); 21 | } 22 | 23 | // External 24 | 25 | @external 26 | func solve{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() { 27 | solved.write(1); 28 | return (); 29 | } 30 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/sha1.d.ts: -------------------------------------------------------------------------------- 1 | import { SHA2 } from './_sha2.js'; 2 | declare class SHA1 extends SHA2 { 3 | private A; 4 | private B; 5 | private C; 6 | private D; 7 | private E; 8 | constructor(); 9 | protected get(): [number, number, number, number, number]; 10 | protected set(A: number, B: number, C: number, D: number, E: number): void; 11 | protected process(view: DataView, offset: number): void; 12 | protected roundClean(): void; 13 | destroy(): void; 14 | } 15 | export declare const sha1: { 16 | (message: import("./utils.js").Input): Uint8Array; 17 | outputLen: number; 18 | blockLen: number; 19 | create(): import("./utils.js").Hash; 20 | }; 21 | export {}; 22 | -------------------------------------------------------------------------------- /example/node_modules/inherits/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inherits", 3 | "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", 4 | "version": "2.0.4", 5 | "keywords": [ 6 | "inheritance", 7 | "class", 8 | "klass", 9 | "oop", 10 | "object-oriented", 11 | "inherits", 12 | "browser", 13 | "browserify" 14 | ], 15 | "main": "./inherits.js", 16 | "browser": "./inherits_browser.js", 17 | "repository": "git://github.com/isaacs/inherits", 18 | "license": "ISC", 19 | "scripts": { 20 | "test": "tap" 21 | }, 22 | "devDependencies": { 23 | "tap": "^14.2.4" 24 | }, 25 | "files": [ 26 | "inherits.js", 27 | "inherits_browser.js" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/utils.d.ts: -------------------------------------------------------------------------------- 1 | declare const assertBool: typeof import("@noble/hashes/_assert").bool; 2 | declare const assertBytes: typeof import("@noble/hashes/_assert").bytes; 3 | export { assertBool, assertBytes }; 4 | export { bytesToHex, bytesToHex as toHex, concatBytes, createView, utf8ToBytes } from "@noble/hashes/utils"; 5 | export declare function bytesToUtf8(data: Uint8Array): string; 6 | export declare function hexToBytes(data: string): Uint8Array; 7 | export declare function equalsBytes(a: Uint8Array, b: Uint8Array): boolean; 8 | export declare function wrapHash(hash: (msg: Uint8Array) => Uint8Array): (msg: Uint8Array) => Uint8Array; 9 | export declare const crypto: { 10 | node?: any; 11 | web?: Crypto; 12 | }; 13 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/pbkdf2.d.ts: -------------------------------------------------------------------------------- 1 | import { CHash, Input } from './utils.js'; 2 | export declare type Pbkdf2Opt = { 3 | c: number; 4 | dkLen?: number; 5 | asyncTick?: number; 6 | }; 7 | /** 8 | * PBKDF2-HMAC: RFC 2898 key derivation function 9 | * @param hash - hash function that would be used e.g. sha256 10 | * @param password - password from which a derived key is generated 11 | * @param salt - cryptographic salt 12 | * @param opts - {c, dkLen} where c is work factor and dkLen is output message size 13 | */ 14 | export declare function pbkdf2(hash: CHash, password: Input, salt: Input, opts: Pbkdf2Opt): Uint8Array; 15 | export declare function pbkdf2Async(hash: CHash, password: Input, salt: Input, opts: Pbkdf2Opt): Promise; 16 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/sha1.d.ts: -------------------------------------------------------------------------------- 1 | import { SHA2 } from './_sha2.js'; 2 | declare class SHA1 extends SHA2 { 3 | private A; 4 | private B; 5 | private C; 6 | private D; 7 | private E; 8 | constructor(); 9 | protected get(): [number, number, number, number, number]; 10 | protected set(A: number, B: number, C: number, D: number, E: number): void; 11 | protected process(view: DataView, offset: number): void; 12 | protected roundClean(): void; 13 | destroy(): void; 14 | } 15 | export declare const sha1: { 16 | (message: import("./utils.js").Input): Uint8Array; 17 | outputLen: number; 18 | blockLen: number; 19 | create(): import("./utils.js").Hash; 20 | }; 21 | export {}; 22 | -------------------------------------------------------------------------------- /example/node_modules/starknet/.releaserc: -------------------------------------------------------------------------------- 1 | { 2 | "branches": [ 3 | "main", 4 | { 5 | "name": "develop", 6 | "channel": "next" 7 | } 8 | ], 9 | "plugins": [ 10 | "@semantic-release/commit-analyzer", 11 | "@semantic-release/release-notes-generator", 12 | "@semantic-release/changelog", 13 | "@semantic-release/npm", 14 | [ 15 | "@semantic-release/git", 16 | { 17 | "assets": [ 18 | "package.json", 19 | "package-lock.json", 20 | "CHANGELOG.md" 21 | ], 22 | "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" 23 | } 24 | ], 25 | "@semantic-release/github" 26 | ], 27 | "repositoryUrl": "https://github.com/0xs34n/starknet.js" 28 | } 29 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/scrypt.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.scryptSync = exports.scrypt = void 0; 4 | const scrypt_1 = require("@noble/hashes/scrypt"); 5 | const utils_1 = require("./utils"); 6 | async function scrypt(password, salt, n, p, r, dkLen) { 7 | (0, utils_1.assertBytes)(password); 8 | (0, utils_1.assertBytes)(salt); 9 | return (0, scrypt_1.scryptAsync)(password, salt, { N: n, r, p, dkLen }); 10 | } 11 | exports.scrypt = scrypt; 12 | function scryptSync(password, salt, n, p, r, dkLen) { 13 | (0, utils_1.assertBytes)(password); 14 | (0, utils_1.assertBytes)(salt); 15 | return (0, scrypt_1.scrypt)(password, salt, { N: n, r, p, dkLen }); 16 | } 17 | exports.scryptSync = scryptSync; 18 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/pbkdf2.d.ts: -------------------------------------------------------------------------------- 1 | import { CHash, Input } from './utils.js'; 2 | export declare type Pbkdf2Opt = { 3 | c: number; 4 | dkLen?: number; 5 | asyncTick?: number; 6 | }; 7 | /** 8 | * PBKDF2-HMAC: RFC 2898 key derivation function 9 | * @param hash - hash function that would be used e.g. sha256 10 | * @param password - password from which a derived key is generated 11 | * @param salt - cryptographic salt 12 | * @param opts - {c, dkLen} where c is work factor and dkLen is output message size 13 | */ 14 | export declare function pbkdf2(hash: CHash, password: Input, salt: Input, opts: Pbkdf2Opt): Uint8Array; 15 | export declare function pbkdf2Async(hash: CHash, password: Input, salt: Input, opts: Pbkdf2Opt): Promise; 16 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/contracts/openzeppelin/utils/constants/library.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (utils/constants/library.cairo) 3 | 4 | %lang starknet 5 | 6 | // 7 | // Numbers 8 | // 9 | 10 | const UINT8_MAX = 255; 11 | 12 | // 13 | // Interface Ids 14 | // 15 | 16 | // ERC165 17 | const IERC165_ID = 0x01ffc9a7; 18 | const INVALID_ID = 0xffffffff; 19 | 20 | // Account 21 | const IACCOUNT_ID = 0xa66bd575; 22 | 23 | // ERC721 24 | const IERC721_ID = 0x80ac58cd; 25 | const IERC721_RECEIVER_ID = 0x150b7a02; 26 | const IERC721_METADATA_ID = 0x5b5e139f; 27 | const IERC721_ENUMERABLE_ID = 0x780e9d63; 28 | 29 | // AccessControl 30 | const IACCESSCONTROL_ID = 0x7965db0b; 31 | 32 | // 33 | // Roles 34 | // 35 | 36 | const DEFAULT_ADMIN_ROLE = 0; 37 | -------------------------------------------------------------------------------- /example/node_modules/minimalistic-assert/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2015 Calvin Metcalf 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any purpose 4 | with or without fee is hereby granted, provided that the above copyright notice 5 | and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 8 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 9 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 10 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 11 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 12 | OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 13 | PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------------------- /src/account_obstruction/public/contracts/openzeppelin/utils/constants/library.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (utils/constants/library.cairo) 3 | 4 | %lang starknet 5 | 6 | // 7 | // Numbers 8 | // 9 | 10 | const UINT8_MAX = 255; 11 | 12 | // 13 | // Interface Ids 14 | // 15 | 16 | // ERC165 17 | const IERC165_ID = 0x01ffc9a7; 18 | const INVALID_ID = 0xffffffff; 19 | 20 | // Account 21 | const IACCOUNT_ID = 0xa66bd575; 22 | 23 | // ERC721 24 | const IERC721_ID = 0x80ac58cd; 25 | const IERC721_RECEIVER_ID = 0x150b7a02; 26 | const IERC721_METADATA_ID = 0x5b5e139f; 27 | const IERC721_ENUMERABLE_ID = 0x780e9d63; 28 | 29 | // AccessControl 30 | const IACCESSCONTROL_ID = 0x7965db0b; 31 | 32 | // 33 | // Roles 34 | // 35 | 36 | const DEFAULT_ADMIN_ROLE = 0; 37 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/_assert.d.ts: -------------------------------------------------------------------------------- 1 | export declare function number(n: number): void; 2 | export declare function bool(b: boolean): void; 3 | export declare function bytes(b: Uint8Array | undefined, ...lengths: number[]): void; 4 | declare type Hash = { 5 | (data: Uint8Array): Uint8Array; 6 | blockLen: number; 7 | outputLen: number; 8 | create: any; 9 | }; 10 | export declare function hash(hash: Hash): void; 11 | export declare function exists(instance: any, checkFinished?: boolean): void; 12 | export declare function output(out: any, instance: any): void; 13 | declare const assert: { 14 | number: typeof number; 15 | bool: typeof bool; 16 | bytes: typeof bytes; 17 | hash: typeof hash; 18 | exists: typeof exists; 19 | output: typeof output; 20 | }; 21 | export default assert; 22 | -------------------------------------------------------------------------------- /example/node_modules/brorand/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "brorand", 3 | "version": "1.1.0", 4 | "description": "Random number generator for browsers and node.js", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "mocha --reporter=spec test/**/*-test.js" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git@github.com:indutny/brorand" 12 | }, 13 | "keywords": [ 14 | "Random", 15 | "RNG", 16 | "browser", 17 | "crypto" 18 | ], 19 | "author": "Fedor Indutny ", 20 | "license": "MIT", 21 | "bugs": { 22 | "url": "https://github.com/indutny/brorand/issues" 23 | }, 24 | "homepage": "https://github.com/indutny/brorand", 25 | "devDependencies": { 26 | "mocha": "^2.0.1" 27 | }, 28 | "browser": { 29 | "crypto": false 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/logger/README.md: -------------------------------------------------------------------------------- 1 | Logger 2 | ====== 3 | 4 | This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). 5 | 6 | It is responsible for managing logging and errors to maintain a standard 7 | structure. 8 | 9 | For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/logger/). 10 | 11 | Importing 12 | --------- 13 | 14 | Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), 15 | but for those with more specific needs, individual components can be imported. 16 | 17 | ```javascript 18 | const { 19 | 20 | Logger, 21 | 22 | // Enums 23 | 24 | ErrorCode, 25 | 26 | LogLevel, 27 | 28 | } = require("@ethersproject/logger"); 29 | ``` 30 | 31 | 32 | License 33 | ------- 34 | 35 | MIT License. 36 | -------------------------------------------------------------------------------- /example/node_modules/starknet/__tests__/jest.setup.ts: -------------------------------------------------------------------------------- 1 | import 'isomorphic-fetch'; 2 | 3 | /* eslint-disable no-console */ 4 | import { register } from 'fetch-intercept'; 5 | 6 | jest.setTimeout(50 * 60 * 1000); 7 | 8 | if (process.env.DEBUG === 'true') { 9 | register({ 10 | request(url, config) { 11 | console.log('[fetch.request]', [url, config]); 12 | return [url, config]; 13 | }, 14 | 15 | requestError(error) { 16 | console.log('[fetch.requestError]', error); 17 | return Promise.reject(error); 18 | }, 19 | 20 | response(response) { 21 | console.log('[fetch.response]', response); 22 | return response; 23 | }, 24 | 25 | responseError(error) { 26 | console.log('[fetch.responseError]', error); 27 | return Promise.reject(error); 28 | }, 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/types/signer.d.ts: -------------------------------------------------------------------------------- 1 | import { StarknetChainId } from '../constants'; 2 | import { BigNumberish } from '../utils/number'; 3 | import { DeployAccountContractPayload, InvocationsDetails } from './lib'; 4 | export interface InvocationsSignerDetails extends Required { 5 | walletAddress: string; 6 | chainId: StarknetChainId; 7 | } 8 | export interface DeclareSignerDetails { 9 | classHash: BigNumberish; 10 | senderAddress: BigNumberish; 11 | chainId: StarknetChainId; 12 | maxFee: BigNumberish; 13 | version: BigNumberish; 14 | nonce: BigNumberish; 15 | } 16 | export declare type DeployAccountSignerDetails = Required & Required & { 17 | contractAddress: BigNumberish; 18 | chainId: StarknetChainId; 19 | }; 20 | -------------------------------------------------------------------------------- /example/node_modules/inherits/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /example/node_modules/hash.js/lib/hash/sha/224.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('../utils'); 4 | var SHA256 = require('./256'); 5 | 6 | function SHA224() { 7 | if (!(this instanceof SHA224)) 8 | return new SHA224(); 9 | 10 | SHA256.call(this); 11 | this.h = [ 12 | 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 13 | 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ]; 14 | } 15 | utils.inherits(SHA224, SHA256); 16 | module.exports = SHA224; 17 | 18 | SHA224.blockSize = 512; 19 | SHA224.outSize = 224; 20 | SHA224.hmacStrength = 192; 21 | SHA224.padLength = 64; 22 | 23 | SHA224.prototype._digest = function digest(enc) { 24 | // Just truncate output 25 | if (enc === 'hex') 26 | return utils.toHex32(this.h.slice(0, 7), 'big'); 27 | else 28 | return utils.split32(this.h.slice(0, 7), 'big'); 29 | }; 30 | 31 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/_assert.d.ts: -------------------------------------------------------------------------------- 1 | export declare function number(n: number): void; 2 | export declare function bool(b: boolean): void; 3 | export declare function bytes(b: Uint8Array | undefined, ...lengths: number[]): void; 4 | declare type Hash = { 5 | (data: Uint8Array): Uint8Array; 6 | blockLen: number; 7 | outputLen: number; 8 | create: any; 9 | }; 10 | export declare function hash(hash: Hash): void; 11 | export declare function exists(instance: any, checkFinished?: boolean): void; 12 | export declare function output(out: any, instance: any): void; 13 | declare const assert: { 14 | number: typeof number; 15 | bool: typeof bool; 16 | bytes: typeof bytes; 17 | hash: typeof hash; 18 | exists: typeof exists; 19 | output: typeof output; 20 | }; 21 | export default assert; 22 | -------------------------------------------------------------------------------- /example/node_modules/minimalistic-crypto-utils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "minimalistic-crypto-utils", 3 | "version": "1.0.1", 4 | "description": "Minimalistic tools for JS crypto modules", 5 | "main": "lib/utils.js", 6 | "scripts": { 7 | "test": "mocha --reporter=spec test/*-test.js" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+ssh://git@github.com/indutny/minimalistic-crypto-utils.git" 12 | }, 13 | "keywords": [ 14 | "minimalistic", 15 | "utils", 16 | "crypto" 17 | ], 18 | "author": "Fedor Indutny ", 19 | "license": "MIT", 20 | "bugs": { 21 | "url": "https://github.com/indutny/minimalistic-crypto-utils/issues" 22 | }, 23 | "homepage": "https://github.com/indutny/minimalistic-crypto-utils#readme", 24 | "devDependencies": { 25 | "mocha": "^3.2.0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /example/node_modules/starknet/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es2021": true, 5 | "node": true, 6 | "jest": true 7 | }, 8 | "extends": ["airbnb-base", "airbnb-typescript/base", "prettier", "plugin:prettier/recommended"], 9 | "globals": { 10 | "Atomics": "readonly", 11 | "SharedArrayBuffer": "readonly" 12 | }, 13 | "parser": "@typescript-eslint/parser", 14 | "parserOptions": { 15 | "ecmaVersion": 12, 16 | "sourceType": "module", 17 | "project": "./tsconfig.eslint.json" 18 | }, 19 | "plugins": ["@typescript-eslint"], 20 | "rules": { 21 | "class-methods-use-this": 0, 22 | "import/prefer-default-export": 0, 23 | "@typescript-eslint/naming-convention": 0, 24 | "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], 25 | "func-names": 0 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/transaction.d.ts: -------------------------------------------------------------------------------- 1 | import { Call, ParsedStruct } from '../types'; 2 | import { BigNumberish } from './number'; 3 | /** 4 | * Transforms a list of Calls, each with their own calldata, into 5 | * two arrays: one with the entrypoints, and one with the concatenated calldata. 6 | * @param calls 7 | * @returns 8 | */ 9 | export declare const transformCallsToMulticallArrays: (calls: Call[]) => { 10 | callArray: ParsedStruct[]; 11 | calldata: string[]; 12 | }; 13 | /** 14 | * Transforms a list of calls in the full flattened calldata expected 15 | * by the __execute__ protocol. 16 | * @param calls 17 | * @returns 18 | */ 19 | export declare const fromCallsToExecuteCalldata: (calls: Call[]) => string[]; 20 | export declare const fromCallsToExecuteCalldataWithNonce: (calls: Call[], nonce: BigNumberish) => string[]; 21 | -------------------------------------------------------------------------------- /example/node_modules/node-fetch/browser.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | // ref: https://github.com/tc39/proposal-global 4 | var getGlobal = function () { 5 | // the only reliable means to get the global object is 6 | // `Function('return this')()` 7 | // However, this causes CSP violations in Chrome apps. 8 | if (typeof self !== 'undefined') { return self; } 9 | if (typeof window !== 'undefined') { return window; } 10 | if (typeof global !== 'undefined') { return global; } 11 | throw new Error('unable to locate global object'); 12 | } 13 | 14 | var global = getGlobal(); 15 | 16 | module.exports = exports = global.fetch; 17 | 18 | // Needed for TypeScript and Webpack. 19 | if (global.fetch) { 20 | exports.default = global.fetch.bind(global); 21 | } 22 | 23 | exports.Headers = global.Headers; 24 | exports.Request = global.Request; 25 | exports.Response = global.Response; -------------------------------------------------------------------------------- /example/node_modules/json-bigint/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "json-bigint", 3 | "version": "1.0.0", 4 | "description": "JSON.parse with bigints support", 5 | "main": "index.js", 6 | "files": [ 7 | "index.js", 8 | "lib/parse.js", 9 | "lib/stringify.js" 10 | ], 11 | "scripts": { 12 | "test": "./node_modules/mocha/bin/mocha -R spec --check-leaks test/*-test.js" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git@github.com:sidorares/json-bigint.git" 17 | }, 18 | "keywords": [ 19 | "JSON", 20 | "bigint", 21 | "bignumber", 22 | "parse", 23 | "json" 24 | ], 25 | "author": "Andrey Sidorov ", 26 | "license": "MIT", 27 | "dependencies": { 28 | "bignumber.js": "^9.0.0" 29 | }, 30 | "devDependencies": { 31 | "chai": "4.2.0", 32 | "mocha": "8.0.1" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /example/node_modules/hash.js/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'env': { 3 | 'browser': true, 4 | 'commonjs': true, 5 | 'node': true, 6 | 'es6': true 7 | }, 8 | 'parserOptions': { 9 | 'ecmaVersion': 8 10 | }, 11 | 'extends': 'eslint:recommended', 12 | 'rules': { 13 | 'indent': [ 14 | 'error', 15 | 2, 16 | { 17 | 'FunctionDeclaration': { 18 | 'parameters': 'first' 19 | }, 20 | 'FunctionExpression': { 21 | 'parameters': 'first' 22 | }, 23 | 'CallExpression': { 24 | 'arguments': 'first' 25 | } 26 | } 27 | ], 28 | 'linebreak-style': [ 29 | 'error', 30 | 'unix' 31 | ], 32 | 'quotes': [ 33 | 'error', 34 | 'single' 35 | ], 36 | 'semi': [ 37 | 'error', 38 | 'always' 39 | ] 40 | } 41 | }; 42 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/utils/shortString.ts: -------------------------------------------------------------------------------- 1 | import { addHexPrefix, removeHexPrefix } from './encode'; 2 | 3 | export function isASCII(str: string) { 4 | // eslint-disable-next-line no-control-regex 5 | return /^[\x00-\x7F]*$/.test(str); 6 | } 7 | 8 | // function to check if string has less or equal 31 characters 9 | export function isShortString(str: string) { 10 | return str.length <= 31; 11 | } 12 | 13 | export function encodeShortString(str: string) { 14 | if (!isASCII(str)) throw new Error(`${str} is not an ASCII string`); 15 | if (!isShortString(str)) throw new Error(`${str} is too long`); 16 | return addHexPrefix(str.replace(/./g, (char) => char.charCodeAt(0).toString(16))); 17 | } 18 | 19 | export function decodeShortString(str: string) { 20 | return removeHexPrefix(str).replace(/.{2}/g, (hex) => String.fromCharCode(parseInt(hex, 16))); 21 | } 22 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/ripemd160.d.ts: -------------------------------------------------------------------------------- 1 | import { SHA2 } from './_sha2.js'; 2 | export declare class RIPEMD160 extends SHA2 { 3 | private h0; 4 | private h1; 5 | private h2; 6 | private h3; 7 | private h4; 8 | constructor(); 9 | protected get(): [number, number, number, number, number]; 10 | protected set(h0: number, h1: number, h2: number, h3: number, h4: number): void; 11 | protected process(view: DataView, offset: number): void; 12 | protected roundClean(): void; 13 | destroy(): void; 14 | } 15 | /** 16 | * RIPEMD-160 - a hash function from 1990s. 17 | * @param message - msg that would be hashed 18 | */ 19 | export declare const ripemd160: { 20 | (message: import("./utils.js").Input): Uint8Array; 21 | outputLen: number; 22 | blockLen: number; 23 | create(): import("./utils.js").Hash; 24 | }; 25 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/hmac.d.ts: -------------------------------------------------------------------------------- 1 | import { Hash, CHash, Input } from './utils.js'; 2 | declare class HMAC> extends Hash> { 3 | oHash: T; 4 | iHash: T; 5 | blockLen: number; 6 | outputLen: number; 7 | private finished; 8 | private destroyed; 9 | constructor(hash: CHash, _key: Input); 10 | update(buf: Input): this; 11 | digestInto(out: Uint8Array): void; 12 | digest(): Uint8Array; 13 | _cloneInto(to?: HMAC): HMAC; 14 | destroy(): void; 15 | } 16 | /** 17 | * HMAC: RFC2104 message authentication code. 18 | * @param hash - function that would be used e.g. sha256 19 | * @param key - message key 20 | * @param message - message data 21 | */ 22 | export declare const hmac: { 23 | (hash: CHash, key: Input, message: Input): Uint8Array; 24 | create(hash: CHash, key: Input): HMAC; 25 | }; 26 | export {}; 27 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Main 3 | */ 4 | export * from './contract'; 5 | export * from './types'; 6 | export * from './provider'; 7 | export * from './account'; 8 | export * from './signer'; 9 | /** 10 | * Utils 11 | */ 12 | export * as constants from './constants'; 13 | export * as encode from './utils/encode'; 14 | export * as hash from './utils/hash'; 15 | export * as json from './utils/json'; 16 | export * as number from './utils/number'; 17 | export * as transaction from './utils/transaction'; 18 | export * as stark from './utils/stark'; 19 | export * as merkle from './utils/merkle'; 20 | export * as ec from './utils/ellipticCurve'; 21 | export * as uint256 from './utils/uint256'; 22 | export * as shortString from './utils/shortString'; 23 | export * as typedData from './utils/typedData'; 24 | export * from './utils/address'; 25 | export * from './utils/url'; 26 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Main 3 | */ 4 | export * from './contract'; 5 | export * from './types'; 6 | export * from './provider'; 7 | export * from './account'; 8 | export * from './signer'; 9 | 10 | /** 11 | * Utils 12 | */ 13 | export * as constants from './constants'; 14 | export * as encode from './utils/encode'; 15 | export * as hash from './utils/hash'; 16 | export * as json from './utils/json'; 17 | export * as number from './utils/number'; 18 | export * as transaction from './utils/transaction'; 19 | export * as stark from './utils/stark'; 20 | export * as merkle from './utils/merkle'; 21 | export * as ec from './utils/ellipticCurve'; 22 | export * as uint256 from './utils/uint256'; 23 | export * as shortString from './utils/shortString'; 24 | export * as typedData from './utils/typedData'; 25 | export * from './utils/address'; 26 | export * from './utils/url'; 27 | -------------------------------------------------------------------------------- /example/node_modules/tr46/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tr46", 3 | "version": "0.0.3", 4 | "description": "An implementation of the Unicode TR46 spec", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "mocha", 8 | "pretest": "node scripts/getLatestUnicodeTests.js", 9 | "prepublish": "node scripts/generateMappingTable.js" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/Sebmaster/tr46.js.git" 14 | }, 15 | "keywords": [ 16 | "unicode", 17 | "tr46", 18 | "url", 19 | "whatwg" 20 | ], 21 | "author": "Sebastian Mayr ", 22 | "license": "MIT", 23 | "bugs": { 24 | "url": "https://github.com/Sebmaster/tr46.js/issues" 25 | }, 26 | "homepage": "https://github.com/Sebmaster/tr46.js#readme", 27 | "devDependencies": { 28 | "mocha": "^2.2.5", 29 | "request": "^2.57.0" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/sidebars.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Creating a sidebar enables you to: 3 | - create an ordered group of docs 4 | - render a sidebar for each doc of that group 5 | - provide next/previous navigation 6 | 7 | The sidebars can be generated from the filesystem, or explicitly defined here. 8 | 9 | Create as many sidebars as you want. 10 | */ 11 | 12 | // @ts-check 13 | 14 | /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ 15 | const sidebars = { 16 | // By default, Docusaurus generates a sidebar from the docs folder structure 17 | tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }], 18 | 19 | // But you can create a sidebar manually 20 | /* 21 | tutorialSidebar: [ 22 | { 23 | type: 'category', 24 | label: 'Tutorial', 25 | items: ['hello'], 26 | }, 27 | ], 28 | */ 29 | }; 30 | 31 | module.exports = sidebars; 32 | -------------------------------------------------------------------------------- /example/node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | if (superCtor) { 5 | ctor.super_ = superCtor 6 | ctor.prototype = Object.create(superCtor.prototype, { 7 | constructor: { 8 | value: ctor, 9 | enumerable: false, 10 | writable: true, 11 | configurable: true 12 | } 13 | }) 14 | } 15 | }; 16 | } else { 17 | // old school shim for old browsers 18 | module.exports = function inherits(ctor, superCtor) { 19 | if (superCtor) { 20 | ctor.super_ = superCtor 21 | var TempCtor = function () {} 22 | TempCtor.prototype = superCtor.prototype 23 | ctor.prototype = new TempCtor() 24 | ctor.prototype.constructor = ctor 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/ripemd160.d.ts: -------------------------------------------------------------------------------- 1 | import { SHA2 } from './_sha2.js'; 2 | export declare class RIPEMD160 extends SHA2 { 3 | private h0; 4 | private h1; 5 | private h2; 6 | private h3; 7 | private h4; 8 | constructor(); 9 | protected get(): [number, number, number, number, number]; 10 | protected set(h0: number, h1: number, h2: number, h3: number, h4: number): void; 11 | protected process(view: DataView, offset: number): void; 12 | protected roundClean(): void; 13 | destroy(): void; 14 | } 15 | /** 16 | * RIPEMD-160 - a hash function from 1990s. 17 | * @param message - msg that would be hashed 18 | */ 19 | export declare const ripemd160: { 20 | (message: import("./utils.js").Input): Uint8Array; 21 | outputLen: number; 22 | blockLen: number; 23 | create(): import("./utils.js").Hash; 24 | }; 25 | -------------------------------------------------------------------------------- /example/node_modules/starknet/__tests__/utils/utils.browser.test.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment jsdom 3 | */ 4 | 5 | import fs from 'fs'; 6 | 7 | import { constants, json, stark } from '../../src'; 8 | 9 | const { IS_BROWSER } = constants; 10 | 11 | const compiledAccount = json.parse(fs.readFileSync('./__mocks__/Account.json').toString('ascii')); 12 | 13 | test('isBrowser', () => { 14 | expect(IS_BROWSER).toBe(true); 15 | }); 16 | describe('compressProgram()', () => { 17 | test('compresses a contract program', () => { 18 | const compressed = stark.compressProgram(compiledAccount.program); 19 | 20 | expect(compressed).toMatchSnapshot(); 21 | }); 22 | test('works with strings', () => { 23 | const inputProgram = json.stringify(compiledAccount.program); 24 | 25 | const compressed = stark.compressProgram(inputProgram); 26 | 27 | expect(compressed).toMatchSnapshot(); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /example/node_modules/hmac-drbg/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hmac-drbg", 3 | "version": "1.0.1", 4 | "description": "Deterministic random bit generator (hmac)", 5 | "main": "lib/hmac-drbg.js", 6 | "scripts": { 7 | "test": "mocha --reporter=spec test/*-test.js" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+ssh://git@github.com/indutny/hmac-drbg.git" 12 | }, 13 | "keywords": [ 14 | "hmac", 15 | "drbg", 16 | "prng" 17 | ], 18 | "author": "Fedor Indutny ", 19 | "license": "MIT", 20 | "bugs": { 21 | "url": "https://github.com/indutny/hmac-drbg/issues" 22 | }, 23 | "homepage": "https://github.com/indutny/hmac-drbg#readme", 24 | "devDependencies": { 25 | "mocha": "^3.2.0" 26 | }, 27 | "dependencies": { 28 | "hash.js": "^1.0.3", 29 | "minimalistic-assert": "^1.0.0", 30 | "minimalistic-crypto-utils": "^1.0.1" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/hmac.d.ts: -------------------------------------------------------------------------------- 1 | import { Hash, CHash, Input } from './utils.js'; 2 | declare class HMAC> extends Hash> { 3 | oHash: T; 4 | iHash: T; 5 | blockLen: number; 6 | outputLen: number; 7 | private finished; 8 | private destroyed; 9 | constructor(hash: CHash, _key: Input); 10 | update(buf: Input): this; 11 | digestInto(out: Uint8Array): void; 12 | digest(): Uint8Array; 13 | _cloneInto(to?: HMAC): HMAC; 14 | destroy(): void; 15 | } 16 | /** 17 | * HMAC: RFC2104 message authentication code. 18 | * @param hash - function that would be used e.g. sha256 19 | * @param key - message key 20 | * @param message - message data 21 | */ 22 | export declare const hmac: { 23 | (hash: CHash, key: Input, message: Input): Uint8Array; 24 | create(hash: CHash, key: Input): HMAC; 25 | }; 26 | export {}; 27 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/types/signer.ts: -------------------------------------------------------------------------------- 1 | import { StarknetChainId } from '../constants'; 2 | import { BigNumberish } from '../utils/number'; 3 | import { DeployAccountContractPayload, InvocationsDetails } from './lib'; 4 | 5 | export interface InvocationsSignerDetails extends Required { 6 | walletAddress: string; 7 | chainId: StarknetChainId; 8 | } 9 | 10 | export interface DeclareSignerDetails { 11 | // contractClass: ContractClass, // Should be used once class hash is present in ContractClass 12 | classHash: BigNumberish; 13 | senderAddress: BigNumberish; 14 | chainId: StarknetChainId; 15 | maxFee: BigNumberish; 16 | version: BigNumberish; 17 | nonce: BigNumberish; 18 | } 19 | 20 | export type DeployAccountSignerDetails = Required & 21 | Required & { 22 | contractAddress: BigNumberish; 23 | chainId: StarknetChainId; 24 | }; 25 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/contracts/openzeppelin/account/presets/AddressRegistry.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (account/presets/AddressRegistry.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.cairo_builtins import HashBuiltin 7 | from starkware.starknet.common.syscalls import get_caller_address 8 | 9 | @storage_var 10 | func L1_address(L2_address: felt) -> (address: felt) { 11 | } 12 | 13 | @external 14 | func get_L1_address{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}( 15 | L2_address: felt 16 | ) -> (address: felt) { 17 | return L1_address.read(L2_address); 18 | } 19 | 20 | @external 21 | func set_L1_address{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}( 22 | new_L1_address: felt 23 | ) { 24 | let (caller) = get_caller_address(); 25 | L1_address.write(caller, new_L1_address); 26 | return (); 27 | } 28 | -------------------------------------------------------------------------------- /src/account_obstruction/public/contracts/openzeppelin/account/presets/AddressRegistry.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (account/presets/AddressRegistry.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.cairo_builtins import HashBuiltin 7 | from starkware.starknet.common.syscalls import get_caller_address 8 | 9 | @storage_var 10 | func L1_address(L2_address: felt) -> (address: felt) { 11 | } 12 | 13 | @external 14 | func get_L1_address{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}( 15 | L2_address: felt 16 | ) -> (address: felt) { 17 | return L1_address.read(L2_address); 18 | } 19 | 20 | @external 21 | func set_L1_address{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}( 22 | new_L1_address: felt 23 | ) { 24 | let (caller) = get_caller_address(); 25 | L1_address.write(caller, new_L1_address); 26 | return (); 27 | } 28 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/contracts/openzeppelin/account/IAccount.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (account/IAccount.cairo) 3 | 4 | %lang starknet 5 | 6 | from openzeppelin.account.library import AccountCallArray 7 | 8 | @contract_interface 9 | namespace IAccount { 10 | 11 | func supportsInterface(interfaceId: felt) -> (success: felt) { 12 | } 13 | 14 | func isValidSignature(hash: felt, signature_len: felt, signature: felt*) -> (isValid: felt) { 15 | } 16 | 17 | func __validate__( 18 | call_array_len: felt, call_array: AccountCallArray*, calldata_len: felt, calldata: felt* 19 | ) { 20 | } 21 | 22 | func __validate_declare__(class_hash: felt) { 23 | } 24 | 25 | func __execute__( 26 | call_array_len: felt, call_array: AccountCallArray*, calldata_len: felt, calldata: felt* 27 | ) -> (response_len: felt, response: felt*) { 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/account_obstruction/public/contracts/openzeppelin/account/IAccount.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (account/IAccount.cairo) 3 | 4 | %lang starknet 5 | 6 | from openzeppelin.account.library import AccountCallArray 7 | 8 | @contract_interface 9 | namespace IAccount { 10 | 11 | func supportsInterface(interfaceId: felt) -> (success: felt) { 12 | } 13 | 14 | func isValidSignature(hash: felt, signature_len: felt, signature: felt*) -> (isValid: felt) { 15 | } 16 | 17 | func __validate__( 18 | call_array_len: felt, call_array: AccountCallArray*, calldata_len: felt, calldata: felt* 19 | ) { 20 | } 21 | 22 | func __validate_declare__(class_hash: felt) { 23 | } 24 | 25 | func __execute__( 26 | call_array_len: felt, call_array: AccountCallArray*, calldata_len: felt, calldata: felt* 27 | ) -> (response_len: felt, response: felt*) { 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /example/node_modules/hash.js/lib/hash/sha/384.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('../utils'); 4 | 5 | var SHA512 = require('./512'); 6 | 7 | function SHA384() { 8 | if (!(this instanceof SHA384)) 9 | return new SHA384(); 10 | 11 | SHA512.call(this); 12 | this.h = [ 13 | 0xcbbb9d5d, 0xc1059ed8, 14 | 0x629a292a, 0x367cd507, 15 | 0x9159015a, 0x3070dd17, 16 | 0x152fecd8, 0xf70e5939, 17 | 0x67332667, 0xffc00b31, 18 | 0x8eb44a87, 0x68581511, 19 | 0xdb0c2e0d, 0x64f98fa7, 20 | 0x47b5481d, 0xbefa4fa4 ]; 21 | } 22 | utils.inherits(SHA384, SHA512); 23 | module.exports = SHA384; 24 | 25 | SHA384.blockSize = 1024; 26 | SHA384.outSize = 384; 27 | SHA384.hmacStrength = 192; 28 | SHA384.padLength = 128; 29 | 30 | SHA384.prototype._digest = function digest(enc) { 31 | if (enc === 'hex') 32 | return utils.toHex32(this.h.slice(0, 12), 'big'); 33 | else 34 | return utils.split32(this.h.slice(0, 12), 'big'); 35 | }; 36 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/account/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | var desc = Object.getOwnPropertyDescriptor(m, k); 5 | if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { 6 | desc = { enumerable: true, get: function() { return m[k]; } }; 7 | } 8 | Object.defineProperty(o, k2, desc); 9 | }) : (function(o, m, k, k2) { 10 | if (k2 === undefined) k2 = k; 11 | o[k2] = m[k]; 12 | })); 13 | var __exportStar = (this && this.__exportStar) || function(m, exports) { 14 | for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); 15 | }; 16 | Object.defineProperty(exports, "__esModule", { value: true }); 17 | __exportStar(require("./default"), exports); 18 | __exportStar(require("./interface"), exports); 19 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/signer/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | var desc = Object.getOwnPropertyDescriptor(m, k); 5 | if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { 6 | desc = { enumerable: true, get: function() { return m[k]; } }; 7 | } 8 | Object.defineProperty(o, k2, desc); 9 | }) : (function(o, m, k, k2) { 10 | if (k2 === undefined) k2 = k; 11 | o[k2] = m[k]; 12 | })); 13 | var __exportStar = (this && this.__exportStar) || function(m, exports) { 14 | for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); 15 | }; 16 | Object.defineProperty(exports, "__esModule", { value: true }); 17 | __exportStar(require("./interface"), exports); 18 | __exportStar(require("./default"), exports); 19 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/types/api/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | var desc = Object.getOwnPropertyDescriptor(m, k); 5 | if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { 6 | desc = { enumerable: true, get: function() { return m[k]; } }; 7 | } 8 | Object.defineProperty(o, k2, desc); 9 | }) : (function(o, m, k, k2) { 10 | if (k2 === undefined) k2 = k; 11 | o[k2] = m[k]; 12 | })); 13 | var __exportStar = (this && this.__exportStar) || function(m, exports) { 14 | for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); 15 | }; 16 | Object.defineProperty(exports, "__esModule", { value: true }); 17 | __exportStar(require("./sequencer"), exports); 18 | __exportStar(require("./rpc"), exports); 19 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/responseParser/index.d.ts: -------------------------------------------------------------------------------- 1 | import { CallContractResponse, DeclareContractResponse, DeployContractResponse, EstimateFeeResponse, GetBlockResponse, GetTransactionReceiptResponse, GetTransactionResponse, InvokeFunctionResponse } from '../../types'; 2 | export declare abstract class ResponseParser { 3 | abstract parseGetBlockResponse(res: any): GetBlockResponse; 4 | abstract parseGetTransactionResponse(res: any): GetTransactionResponse; 5 | abstract parseGetTransactionReceiptResponse(res: any): GetTransactionReceiptResponse; 6 | abstract parseFeeEstimateResponse(res: any): EstimateFeeResponse; 7 | abstract parseCallContractResponse(res: any): CallContractResponse; 8 | abstract parseInvokeFunctionResponse(res: any): InvokeFunctionResponse; 9 | abstract parseDeployContractResponse(res: any): DeployContractResponse; 10 | abstract parseDeclareContractResponse(res: any): DeclareContractResponse; 11 | } 12 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/sha256.d.ts: -------------------------------------------------------------------------------- 1 | import { SHA2 } from './_sha2.js'; 2 | declare class SHA256 extends SHA2 { 3 | private A; 4 | private B; 5 | private C; 6 | private D; 7 | private E; 8 | private F; 9 | private G; 10 | private H; 11 | constructor(); 12 | protected get(): [number, number, number, number, number, number, number, number]; 13 | protected set(A: number, B: number, C: number, D: number, E: number, F: number, G: number, H: number): void; 14 | protected process(view: DataView, offset: number): void; 15 | protected roundClean(): void; 16 | destroy(): void; 17 | } 18 | /** 19 | * SHA2-256 hash function 20 | * @param message - data that would be hashed 21 | */ 22 | export declare const sha256: { 23 | (message: import("./utils.js").Input): Uint8Array; 24 | outputLen: number; 25 | blockLen: number; 26 | create(): import("./utils.js").Hash; 27 | }; 28 | export {}; 29 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/utils/provider.ts: -------------------------------------------------------------------------------- 1 | import { CompiledContract, ContractClass, RawCalldata } from '../types'; 2 | import { parse } from './json'; 3 | import { isHex, toBN, toHex } from './number'; 4 | import { compressProgram } from './stark'; 5 | 6 | export function wait(delay: number) { 7 | return new Promise((res) => { 8 | setTimeout(res, delay); 9 | }); 10 | } 11 | 12 | export function parseCalldata(calldata: RawCalldata = []) { 13 | return calldata.map((data) => { 14 | if (typeof data === 'string' && isHex(data as string)) { 15 | return data; 16 | } 17 | return toHex(toBN(data)); 18 | }); 19 | } 20 | 21 | export function parseContract(contract: CompiledContract | string) { 22 | const parsedContract = 23 | typeof contract === 'string' ? (parse(contract) as CompiledContract) : contract; 24 | return { 25 | ...parsedContract, 26 | program: compressProgram(parsedContract.program), 27 | } as ContractClass; 28 | } 29 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/stark.d.ts: -------------------------------------------------------------------------------- 1 | import BN from 'bn.js'; 2 | import { Calldata, CompressedProgram, Program, RawArgs, Signature } from '../types'; 3 | import { BigNumberish } from './number'; 4 | /** 5 | * Function to compress compiled cairo program 6 | * 7 | * [Reference](https://github.com/starkware-libs/cairo-lang/blob/master/src/starkware/starknet/services/api/gateway/transaction.py#L54-L58) 8 | * @param jsonProgram - json file representing the compiled cairo program 9 | * @returns Compressed cairo program 10 | */ 11 | export declare function compressProgram(jsonProgram: Program | string): CompressedProgram; 12 | export declare function randomAddress(): string; 13 | export declare function makeAddress(input: string): string; 14 | export declare function formatSignature(sig?: Signature): string[]; 15 | export declare function compileCalldata(args: RawArgs): Calldata; 16 | export declare function estimatedFeeToMaxFee(estimatedFee: BigNumberish, overhead?: number): BN; 17 | -------------------------------------------------------------------------------- /example/node_modules/starknet/www/README.md: -------------------------------------------------------------------------------- 1 | # Website 2 | 3 | This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. 4 | 5 | ### Installation 6 | 7 | ``` 8 | $ yarn 9 | ``` 10 | 11 | ### Local Development 12 | 13 | ``` 14 | $ yarn start 15 | ``` 16 | 17 | This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. 18 | 19 | ### Build 20 | 21 | ``` 22 | $ yarn build 23 | ``` 24 | 25 | This command generates static content into the `build` directory and can be served using any static contents hosting service. 26 | 27 | ### Deployment 28 | 29 | Using SSH: 30 | 31 | ``` 32 | $ USE_SSH=true yarn deploy 33 | ``` 34 | 35 | Not using SSH: 36 | 37 | ``` 38 | $ GIT_USER= yarn deploy 39 | ``` 40 | 41 | If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. 42 | -------------------------------------------------------------------------------- /example/node_modules/url-join/README.md: -------------------------------------------------------------------------------- 1 | Join all arguments together and normalize the resulting url. 2 | 3 | ## Install 4 | 5 | ~~~ 6 | npm install url-join 7 | ~~~ 8 | 9 | ## Usage 10 | 11 | ~~~javascript 12 | var urljoin = require('url-join'); 13 | 14 | var fullUrl = urljoin('http://www.google.com', 'a', '/b/cd', '?foo=123'); 15 | 16 | console.log(fullUrl); 17 | 18 | ~~~ 19 | 20 | Prints: 21 | 22 | ~~~ 23 | 'http://www.google.com/a/b/cd?foo=123' 24 | ~~~ 25 | 26 | ## Browser and AMD 27 | 28 | It also works in the browser, you can either include ```lib/url-join.js``` in your page: 29 | 30 | ~~~html 31 | 32 | 35 | ~~~ 36 | 37 | Or using an AMD module system like requirejs: 38 | 39 | ~~~javascript 40 | define(['path/url-join.js'], function (urljoin) { 41 | urljoin('http://blabla.com', 'foo?a=1'); 42 | }); 43 | ~~~ 44 | 45 | ## License 46 | 47 | MIT 48 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/_sha2.d.ts: -------------------------------------------------------------------------------- 1 | import { Hash, Input } from './utils.js'; 2 | export declare abstract class SHA2> extends Hash { 3 | readonly blockLen: number; 4 | outputLen: number; 5 | readonly padOffset: number; 6 | readonly isLE: boolean; 7 | protected abstract process(buf: DataView, offset: number): void; 8 | protected abstract get(): number[]; 9 | protected abstract set(...args: number[]): void; 10 | abstract destroy(): void; 11 | protected abstract roundClean(): void; 12 | protected buffer: Uint8Array; 13 | protected view: DataView; 14 | protected finished: boolean; 15 | protected length: number; 16 | protected pos: number; 17 | protected destroyed: boolean; 18 | constructor(blockLen: number, outputLen: number, padOffset: number, isLE: boolean); 19 | update(data: Input): this; 20 | digestInto(out: Uint8Array): void; 21 | digest(): Uint8Array; 22 | _cloneInto(to?: T): T; 23 | } 24 | -------------------------------------------------------------------------------- /example/node_modules/elliptic/node_modules/bn.js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bn.js", 3 | "version": "4.12.0", 4 | "description": "Big number implementation in pure javascript", 5 | "main": "lib/bn.js", 6 | "scripts": { 7 | "lint": "semistandard", 8 | "unit": "mocha --reporter=spec test/*-test.js", 9 | "test": "npm run lint && npm run unit" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git@github.com:indutny/bn.js" 14 | }, 15 | "keywords": [ 16 | "BN", 17 | "BigNum", 18 | "Big number", 19 | "Modulo", 20 | "Montgomery" 21 | ], 22 | "author": "Fedor Indutny ", 23 | "license": "MIT", 24 | "bugs": { 25 | "url": "https://github.com/indutny/bn.js/issues" 26 | }, 27 | "homepage": "https://github.com/indutny/bn.js", 28 | "browser": { 29 | "buffer": false 30 | }, 31 | "devDependencies": { 32 | "istanbul": "^0.3.5", 33 | "mocha": "^2.1.0", 34 | "semistandard": "^7.0.4" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/sha256.d.ts: -------------------------------------------------------------------------------- 1 | import { SHA2 } from './_sha2.js'; 2 | declare class SHA256 extends SHA2 { 3 | private A; 4 | private B; 5 | private C; 6 | private D; 7 | private E; 8 | private F; 9 | private G; 10 | private H; 11 | constructor(); 12 | protected get(): [number, number, number, number, number, number, number, number]; 13 | protected set(A: number, B: number, C: number, D: number, E: number, F: number, G: number, H: number): void; 14 | protected process(view: DataView, offset: number): void; 15 | protected roundClean(): void; 16 | destroy(): void; 17 | } 18 | /** 19 | * SHA2-256 hash function 20 | * @param message - data that would be hashed 21 | */ 22 | export declare const sha256: { 23 | (message: import("./utils.js").Input): Uint8Array; 24 | outputLen: number; 25 | blockLen: number; 26 | create(): import("./utils.js").Hash; 27 | }; 28 | export {}; 29 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/json.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | var _a, _b; 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | exports.stringifyAlwaysAsBig = exports.parseAlwaysAsBig = exports.stringify = exports.parse = void 0; 8 | var json_bigint_1 = __importDefault(require("json-bigint")); 9 | var json = function (alwaysParseAsBig) { 10 | return (0, json_bigint_1.default)({ 11 | alwaysParseAsBig: alwaysParseAsBig, 12 | useNativeBigInt: true, 13 | protoAction: 'preserve', 14 | constructorAction: 'preserve', 15 | }); 16 | }; 17 | exports.parse = (_a = json(false), _a.parse), exports.stringify = _a.stringify; 18 | exports.parseAlwaysAsBig = (_b = json(true), _b.parse), exports.stringifyAlwaysAsBig = _b.stringify; 19 | exports.default = { parse: exports.parse, stringify: exports.stringify }; 20 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/contracts/openzeppelin/token/erc721/IERC721.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (token/erc721/IERC721.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.uint256 import Uint256 7 | 8 | @contract_interface 9 | namespace IERC721 { 10 | func balanceOf(owner: felt) -> (balance: Uint256) { 11 | } 12 | 13 | func ownerOf(tokenId: Uint256) -> (owner: felt) { 14 | } 15 | 16 | func safeTransferFrom(from_: felt, to: felt, tokenId: Uint256, data_len: felt, data: felt*) { 17 | } 18 | 19 | func transferFrom(from_: felt, to: felt, tokenId: Uint256) { 20 | } 21 | 22 | func approve(approved: felt, tokenId: Uint256) { 23 | } 24 | 25 | func setApprovalForAll(operator: felt, approved: felt) { 26 | } 27 | 28 | func getApproved(tokenId: Uint256) -> (approved: felt) { 29 | } 30 | 31 | func isApprovedForAll(owner: felt, operator: felt) -> (isApproved: felt) { 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /example/node_modules/starknet/__mocks__/typedDataExample.json: -------------------------------------------------------------------------------- 1 | { 2 | "types": { 3 | "StarkNetDomain": [ 4 | { "name": "name", "type": "felt" }, 5 | { "name": "version", "type": "felt" }, 6 | { "name": "chainId", "type": "felt" } 7 | ], 8 | "Person": [ 9 | { "name": "name", "type": "felt" }, 10 | { "name": "wallet", "type": "felt" } 11 | ], 12 | "Mail": [ 13 | { "name": "from", "type": "Person" }, 14 | { "name": "to", "type": "Person" }, 15 | { "name": "contents", "type": "felt" } 16 | ] 17 | }, 18 | "primaryType": "Mail", 19 | "domain": { 20 | "name": "StarkNet Mail", 21 | "version": "1", 22 | "chainId": 1 23 | }, 24 | "message": { 25 | "from": { 26 | "name": "Cow", 27 | "wallet": "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826" 28 | }, 29 | "to": { 30 | "name": "Bob", 31 | "wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB" 32 | }, 33 | "contents": "Hello, Bob!" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/account_obstruction/public/contracts/openzeppelin/token/erc721/IERC721.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (token/erc721/IERC721.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.uint256 import Uint256 7 | 8 | @contract_interface 9 | namespace IERC721 { 10 | func balanceOf(owner: felt) -> (balance: Uint256) { 11 | } 12 | 13 | func ownerOf(tokenId: Uint256) -> (owner: felt) { 14 | } 15 | 16 | func safeTransferFrom(from_: felt, to: felt, tokenId: Uint256, data_len: felt, data: felt*) { 17 | } 18 | 19 | func transferFrom(from_: felt, to: felt, tokenId: Uint256) { 20 | } 21 | 22 | func approve(approved: felt, tokenId: Uint256) { 23 | } 24 | 25 | func setApprovalForAll(operator: felt, approved: felt) { 26 | } 27 | 28 | func getApproved(tokenId: Uint256) -> (approved: felt) { 29 | } 30 | 31 | func isApprovedForAll(owner: felt, operator: felt) -> (isApproved: felt) { 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/contract/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | var desc = Object.getOwnPropertyDescriptor(m, k); 5 | if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { 6 | desc = { enumerable: true, get: function() { return m[k]; } }; 7 | } 8 | Object.defineProperty(o, k2, desc); 9 | }) : (function(o, m, k, k2) { 10 | if (k2 === undefined) k2 = k; 11 | o[k2] = m[k]; 12 | })); 13 | var __exportStar = (this && this.__exportStar) || function(m, exports) { 14 | for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); 15 | }; 16 | Object.defineProperty(exports, "__esModule", { value: true }); 17 | __exportStar(require("./default"), exports); 18 | __exportStar(require("./interface"), exports); 19 | __exportStar(require("./contractFactory"), exports); 20 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/contracts/openzeppelin/security/reentrancyguard/library.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (security/reentrancyguard/library.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.cairo_builtins import HashBuiltin 7 | from starkware.cairo.common.bool import TRUE, FALSE 8 | 9 | @storage_var 10 | func ReentrancyGuard_entered() -> (entered: felt) { 11 | } 12 | 13 | namespace ReentrancyGuard { 14 | func _start{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() { 15 | let (has_entered) = ReentrancyGuard_entered.read(); 16 | with_attr error_message("ReentrancyGuard: reentrant call") { 17 | assert has_entered = FALSE; 18 | } 19 | ReentrancyGuard_entered.write(TRUE); 20 | return (); 21 | } 22 | 23 | func _end{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() { 24 | ReentrancyGuard_entered.write(FALSE); 25 | return (); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/contracts/openzeppelin/token/erc20/IERC20.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (token/erc20/IERC20.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.uint256 import Uint256 7 | 8 | @contract_interface 9 | namespace IERC20 { 10 | func name() -> (name: felt) { 11 | } 12 | 13 | func symbol() -> (symbol: felt) { 14 | } 15 | 16 | func decimals() -> (decimals: felt) { 17 | } 18 | 19 | func totalSupply() -> (totalSupply: Uint256) { 20 | } 21 | 22 | func balanceOf(account: felt) -> (balance: Uint256) { 23 | } 24 | 25 | func allowance(owner: felt, spender: felt) -> (remaining: Uint256) { 26 | } 27 | 28 | func transfer(recipient: felt, amount: Uint256) -> (success: felt) { 29 | } 30 | 31 | func transferFrom(sender: felt, recipient: felt, amount: Uint256) -> (success: felt) { 32 | } 33 | 34 | func approve(spender: felt, amount: Uint256) -> (success: felt) { 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /example/node_modules/bn.js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bn.js", 3 | "version": "5.2.1", 4 | "description": "Big number implementation in pure javascript", 5 | "keywords": [ 6 | "BN", 7 | "Big number", 8 | "BigNum", 9 | "Modulo", 10 | "Montgomery" 11 | ], 12 | "homepage": "https://github.com/indutny/bn.js", 13 | "bugs": { 14 | "url": "https://github.com/indutny/bn.js/issues" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "git@github.com:indutny/bn.js" 19 | }, 20 | "license": "MIT", 21 | "author": "Fedor Indutny ", 22 | "files": [ 23 | "lib/bn.js" 24 | ], 25 | "main": "lib/bn.js", 26 | "browser": { 27 | "buffer": false 28 | }, 29 | "scripts": { 30 | "lint": "standardx", 31 | "test": "npm run lint && npm run unit", 32 | "unit": "mocha --reporter=spec test/*-test.js" 33 | }, 34 | "devDependencies": { 35 | "eslint-plugin-es5": "^1.5.0", 36 | "mocha": "^8.3.0", 37 | "standardx": "^7.0.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/_sha2.d.ts: -------------------------------------------------------------------------------- 1 | import { Hash, Input } from './utils.js'; 2 | export declare abstract class SHA2> extends Hash { 3 | readonly blockLen: number; 4 | outputLen: number; 5 | readonly padOffset: number; 6 | readonly isLE: boolean; 7 | protected abstract process(buf: DataView, offset: number): void; 8 | protected abstract get(): number[]; 9 | protected abstract set(...args: number[]): void; 10 | abstract destroy(): void; 11 | protected abstract roundClean(): void; 12 | protected buffer: Uint8Array; 13 | protected view: DataView; 14 | protected finished: boolean; 15 | protected length: number; 16 | protected pos: number; 17 | protected destroyed: boolean; 18 | constructor(blockLen: number, outputLen: number, padOffset: number, isLE: boolean); 19 | update(data: Input): this; 20 | digestInto(out: Uint8Array): void; 21 | digest(): Uint8Array; 22 | _cloneInto(to?: T): T; 23 | } 24 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/signer/default.d.ts: -------------------------------------------------------------------------------- 1 | import { Abi, Call, DeclareSignerDetails, InvocationsSignerDetails, KeyPair, Signature } from '../types'; 2 | import { DeployAccountSignerDetails } from '../types/signer'; 3 | import { TypedData } from '../utils/typedData'; 4 | import { SignerInterface } from './interface'; 5 | export declare class Signer implements SignerInterface { 6 | protected keyPair: KeyPair; 7 | constructor(keyPair?: KeyPair); 8 | getPubKey(): Promise; 9 | signMessage(typedData: TypedData, accountAddress: string): Promise; 10 | signTransaction(transactions: Call[], transactionsDetail: InvocationsSignerDetails, abis?: Abi[]): Promise; 11 | signDeployAccountTransaction({ classHash, contractAddress, constructorCalldata, addressSalt, maxFee, version, chainId, nonce, }: DeployAccountSignerDetails): Promise; 12 | signDeclareTransaction({ classHash, senderAddress, chainId, maxFee, version, nonce }: DeclareSignerDetails): Promise; 13 | } 14 | -------------------------------------------------------------------------------- /src/account_obstruction/public/contracts/openzeppelin/security/reentrancyguard/library.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (security/reentrancyguard/library.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.cairo_builtins import HashBuiltin 7 | from starkware.cairo.common.bool import TRUE, FALSE 8 | 9 | @storage_var 10 | func ReentrancyGuard_entered() -> (entered: felt) { 11 | } 12 | 13 | namespace ReentrancyGuard { 14 | func _start{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() { 15 | let (has_entered) = ReentrancyGuard_entered.read(); 16 | with_attr error_message("ReentrancyGuard: reentrant call") { 17 | assert has_entered = FALSE; 18 | } 19 | ReentrancyGuard_entered.write(TRUE); 20 | return (); 21 | } 22 | 23 | func _end{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() { 24 | ReentrancyGuard_entered.write(FALSE); 25 | return (); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/account_obstruction/public/contracts/openzeppelin/token/erc20/IERC20.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (token/erc20/IERC20.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.uint256 import Uint256 7 | 8 | @contract_interface 9 | namespace IERC20 { 10 | func name() -> (name: felt) { 11 | } 12 | 13 | func symbol() -> (symbol: felt) { 14 | } 15 | 16 | func decimals() -> (decimals: felt) { 17 | } 18 | 19 | func totalSupply() -> (totalSupply: Uint256) { 20 | } 21 | 22 | func balanceOf(account: felt) -> (balance: Uint256) { 23 | } 24 | 25 | func allowance(owner: felt, spender: felt) -> (remaining: Uint256) { 26 | } 27 | 28 | func transfer(recipient: felt, amount: Uint256) -> (success: felt) { 29 | } 30 | 31 | func transferFrom(sender: felt, recipient: felt, amount: Uint256) -> (success: felt) { 32 | } 33 | 34 | func approve(spender: felt, amount: Uint256) -> (success: felt) { 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /example/node_modules/hash.js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hash.js", 3 | "version": "1.1.7", 4 | "description": "Various hash functions that could be run by both browser and node", 5 | "main": "lib/hash.js", 6 | "typings": "lib/hash.d.ts", 7 | "scripts": { 8 | "test": "mocha --reporter=spec test/*-test.js && npm run lint", 9 | "lint": "eslint lib/*.js lib/**/*.js lib/**/**/*.js test/*.js" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git@github.com:indutny/hash.js" 14 | }, 15 | "keywords": [ 16 | "hash", 17 | "sha256", 18 | "sha224", 19 | "hmac" 20 | ], 21 | "author": "Fedor Indutny ", 22 | "license": "MIT", 23 | "bugs": { 24 | "url": "https://github.com/indutny/hash.js/issues" 25 | }, 26 | "homepage": "https://github.com/indutny/hash.js", 27 | "dependencies": { 28 | "inherits": "^2.0.3", 29 | "minimalistic-assert": "^1.0.1" 30 | }, 31 | "devDependencies": { 32 | "eslint": "^4.19.1", 33 | "mocha": "^5.2.0" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/encode.d.ts: -------------------------------------------------------------------------------- 1 | export declare const IS_BROWSER: boolean; 2 | export declare function arrayBufferToString(array: ArrayBuffer): string; 3 | export declare function btoaUniversal(b: ArrayBuffer): string; 4 | export declare function buf2hex(buffer: Uint8Array): string; 5 | /** 6 | * Some function imported from https://github.com/pedrouid/enc-utils/blob/master/src/index.ts 7 | * enc-utils is no dependency to avoid using `Buffer` which just works in node and no browsers 8 | */ 9 | export declare function removeHexPrefix(hex: string): string; 10 | export declare function addHexPrefix(hex: string): string; 11 | export declare function padLeft(str: string, length: number, padding?: string): string; 12 | export declare function calcByteLength(length: number, byteSize?: number): number; 13 | export declare function sanitizeBytes(str: string, byteSize?: number, padding?: string): string; 14 | export declare function sanitizeHex(hex: string): string; 15 | export declare function utf8ToArray(str: string): Uint8Array; 16 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/utils/responseParser/index.ts: -------------------------------------------------------------------------------- 1 | import { 2 | CallContractResponse, 3 | DeclareContractResponse, 4 | DeployContractResponse, 5 | EstimateFeeResponse, 6 | GetBlockResponse, 7 | GetTransactionReceiptResponse, 8 | GetTransactionResponse, 9 | InvokeFunctionResponse, 10 | } from '../../types'; 11 | 12 | export abstract class ResponseParser { 13 | abstract parseGetBlockResponse(res: any): GetBlockResponse; 14 | 15 | abstract parseGetTransactionResponse(res: any): GetTransactionResponse; 16 | 17 | abstract parseGetTransactionReceiptResponse(res: any): GetTransactionReceiptResponse; 18 | 19 | abstract parseFeeEstimateResponse(res: any): EstimateFeeResponse; 20 | 21 | abstract parseCallContractResponse(res: any): CallContractResponse; 22 | 23 | abstract parseInvokeFunctionResponse(res: any): InvokeFunctionResponse; 24 | 25 | abstract parseDeployContractResponse(res: any): DeployContractResponse; 26 | 27 | abstract parseDeclareContractResponse(res: any): DeclareContractResponse; 28 | } 29 | -------------------------------------------------------------------------------- /example/node_modules/whatwg-url/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "whatwg-url", 3 | "version": "5.0.0", 4 | "description": "An implementation of the WHATWG URL Standard's URL API and parsing machinery", 5 | "main": "lib/public-api.js", 6 | "files": [ 7 | "lib/" 8 | ], 9 | "author": "Sebastian Mayr ", 10 | "license": "MIT", 11 | "repository": "jsdom/whatwg-url", 12 | "dependencies": { 13 | "tr46": "~0.0.3", 14 | "webidl-conversions": "^3.0.0" 15 | }, 16 | "devDependencies": { 17 | "eslint": "^2.6.0", 18 | "istanbul": "~0.4.3", 19 | "mocha": "^2.2.4", 20 | "recast": "~0.10.29", 21 | "request": "^2.55.0", 22 | "webidl2js": "^3.0.2" 23 | }, 24 | "scripts": { 25 | "build": "node scripts/transform.js && node scripts/convert-idl.js", 26 | "coverage": "istanbul cover node_modules/mocha/bin/_mocha", 27 | "lint": "eslint .", 28 | "prepublish": "npm run build", 29 | "pretest": "node scripts/get-latest-platform-tests.js && npm run build", 30 | "test": "mocha" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /example/node_modules/starknet/__tests__/utils/shortString.test.ts: -------------------------------------------------------------------------------- 1 | import { decodeShortString, encodeShortString } from '../../src/utils/shortString'; 2 | 3 | describe('shortString', () => { 4 | test('should convert string to number', () => { 5 | expect(encodeShortString('hello')).toMatchInlineSnapshot(`"0x68656c6c6f"`); 6 | }); 7 | test('should convert number to string', () => { 8 | expect(decodeShortString('0x68656c6c6f')).toMatchInlineSnapshot(`"hello"`); 9 | }); 10 | test('should throw if string is too long', () => { 11 | expect(() => 12 | encodeShortString('hello world hello world hello world hello world hello world hello world') 13 | ).toThrowErrorMatchingInlineSnapshot( 14 | `"hello world hello world hello world hello world hello world hello world is too long"` 15 | ); 16 | }); 17 | test('should throw if string contains non ascii chars', () => { 18 | expect(() => encodeShortString('hello\uD83D\uDE00')).toThrowErrorMatchingInlineSnapshot( 19 | `"hello😀 is not an ASCII string"` 20 | ); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/contracts/openzeppelin/security/initializable/library.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (security/initializable/library.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.cairo_builtins import HashBuiltin 7 | from starkware.cairo.common.bool import TRUE, FALSE 8 | 9 | @storage_var 10 | func Initializable_initialized() -> (initialized: felt) { 11 | } 12 | 13 | namespace Initializable { 14 | func initialized{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() -> ( 15 | felt 16 | ) { 17 | return Initializable_initialized.read(); 18 | } 19 | 20 | func initialize{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() { 21 | let (is_initialized) = Initializable_initialized.read(); 22 | with_attr error_message("Initializable: contract already initialized") { 23 | assert is_initialized = FALSE; 24 | } 25 | Initializable_initialized.write(TRUE); 26 | return (); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/account_obstruction/public/contracts/openzeppelin/security/initializable/library.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (security/initializable/library.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.cairo_builtins import HashBuiltin 7 | from starkware.cairo.common.bool import TRUE, FALSE 8 | 9 | @storage_var 10 | func Initializable_initialized() -> (initialized: felt) { 11 | } 12 | 13 | namespace Initializable { 14 | func initialized{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() -> ( 15 | felt 16 | ) { 17 | return Initializable_initialized.read(); 18 | } 19 | 20 | func initialize{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() { 21 | let (is_initialized) = Initializable_initialized.read(); 22 | with_attr error_message("Initializable: contract already initialized") { 23 | assert is_initialized = FALSE; 24 | } 25 | Initializable_initialized.write(TRUE); 26 | return (); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/solveme/public/deploy/chal.py: -------------------------------------------------------------------------------- 1 | import cairo_sandbox 2 | 3 | from pathlib import Path 4 | 5 | from starknet_py.net import AccountClient 6 | from starknet_py.contract import Contract 7 | from starkware.python.utils import to_bytes 8 | 9 | async def deploy(client: AccountClient, player_address: int) -> int: 10 | print("[+] deploying solve-me") 11 | storage_deploy = await Contract.deploy( 12 | client=client, 13 | compiled_contract=Path("compiled/solve-me.json").read_text(), 14 | constructor_args=[], 15 | ) 16 | await storage_deploy.wait_for_acceptance() 17 | 18 | return storage_deploy.deployed_contract.address 19 | 20 | 21 | async def checker(client: AccountClient, intro_contract: Contract, player_address: int) -> bool: 22 | solution = (await intro_contract.functions["is_solved"].call()).res 23 | 24 | return solution == 1 25 | 26 | cairo_sandbox.run_launcher([ 27 | cairo_sandbox.new_launch_instance_action(deploy), 28 | cairo_sandbox.new_kill_instance_action(), 29 | cairo_sandbox.new_get_flag_action(checker), 30 | ]) 31 | -------------------------------------------------------------------------------- /example/node_modules/minimalistic-crypto-utils/test/utils-test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const assert = require('assert'); 4 | const utils = require('../'); 5 | 6 | describe('utils', () => { 7 | it('should convert to array', () => { 8 | assert.deepEqual(utils.toArray('1234', 'hex'), [ 0x12, 0x34 ]); 9 | assert.deepEqual(utils.toArray('1234'), [ 49, 50, 51, 52 ]); 10 | assert.deepEqual(utils.toArray('1234', 'utf8'), [ 49, 50, 51, 52 ]); 11 | assert.deepEqual(utils.toArray('\u1234234'), [ 18, 52, 50, 51, 52 ]); 12 | assert.deepEqual(utils.toArray([ 1, 2, 3, 4 ]), [ 1, 2, 3, 4 ]); 13 | }); 14 | 15 | it('should zero pad byte to hex', () => { 16 | assert.equal(utils.zero2('0'), '00'); 17 | assert.equal(utils.zero2('01'), '01'); 18 | }); 19 | 20 | it('should convert to hex', () => { 21 | assert.equal(utils.toHex([ 0, 1, 2, 3 ]), '00010203'); 22 | }); 23 | 24 | it('should encode', () => { 25 | assert.deepEqual(utils.encode([ 0, 1, 2, 3 ]), [ 0, 1, 2, 3 ]); 26 | assert.deepEqual(utils.encode([ 0, 1, 2, 3 ], 'hex'), '00010203'); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /src/cairo_intro/public/deploy/chal.py: -------------------------------------------------------------------------------- 1 | import cairo_sandbox 2 | 3 | from pathlib import Path 4 | 5 | from starknet_py.net import AccountClient 6 | from starknet_py.contract import Contract 7 | from starkware.python.utils import to_bytes 8 | 9 | async def deploy(client: AccountClient, player_address: int) -> int: 10 | print("[+] deploying cairo-intro") 11 | storage_deploy = await Contract.deploy( 12 | client=client, 13 | compiled_contract=Path("compiled/cairo-intro.cairo").read_text(), 14 | constructor_args=[0], 15 | ) 16 | await storage_deploy.wait_for_acceptance() 17 | 18 | return storage_deploy.deployed_contract.address 19 | 20 | 21 | async def checker(client: AccountClient, intro_contract: Contract, player_address: int) -> bool: 22 | solution = (await intro_contract.functions["is_solved"].call()).res 23 | 24 | return solution == 1 25 | 26 | cairo_sandbox.run_launcher([ 27 | cairo_sandbox.new_launch_instance_action(deploy), 28 | cairo_sandbox.new_kill_instance_action(), 29 | cairo_sandbox.new_get_flag_action(checker), 30 | ]) 31 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/types/api/openrpc.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * Starknet RPC version 0.1.0 4 | * 5 | * StarkNet Node API 0.31.0 6 | * StarkNet Node Write API 0.3.0 7 | * StarkNet Trace API 0.3.0 8 | * 9 | * TypeScript Representation of OpenRpc protocol types 10 | */ 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | var BLOCK_TAG; 13 | (function (BLOCK_TAG) { 14 | BLOCK_TAG[BLOCK_TAG["latest"] = 0] = "latest"; 15 | BLOCK_TAG[BLOCK_TAG["pending"] = 1] = "pending"; 16 | })(BLOCK_TAG || (BLOCK_TAG = {})); 17 | var CALL_TYPE; 18 | (function (CALL_TYPE) { 19 | CALL_TYPE[CALL_TYPE["DELEGATE"] = 0] = "DELEGATE"; 20 | CALL_TYPE[CALL_TYPE["CALL"] = 1] = "CALL"; 21 | })(CALL_TYPE || (CALL_TYPE = {})); 22 | var ENTRY_POINT_TYPE; 23 | (function (ENTRY_POINT_TYPE) { 24 | ENTRY_POINT_TYPE[ENTRY_POINT_TYPE["EXTERNAL"] = 0] = "EXTERNAL"; 25 | ENTRY_POINT_TYPE[ENTRY_POINT_TYPE["L1_HANDLER"] = 1] = "L1_HANDLER"; 26 | ENTRY_POINT_TYPE[ENTRY_POINT_TYPE["CONSTRUCTOR"] = 2] = "CONSTRUCTOR"; 27 | })(ENTRY_POINT_TYPE || (ENTRY_POINT_TYPE = {})); 28 | -------------------------------------------------------------------------------- /src/puzzle_box/public/contracts/impl_1.cairo: -------------------------------------------------------------------------------- 1 | %lang starknet 2 | 3 | from starkware.cairo.common.cairo_builtins import HashBuiltin 4 | from starkware.cairo.common.math_cmp import is_le_felt 5 | from starkware.starknet.common.syscalls import get_caller_address 6 | 7 | @contract_interface 8 | namespace Contract_1 { 9 | func solve_step_1(mult: felt) -> (res: felt) { 10 | } 11 | func get_step_1() -> (res: felt) { 12 | } 13 | } 14 | 15 | const const_step_1 = 3609145100; 16 | 17 | @storage_var 18 | func step_1() -> (res: felt) { 19 | } 20 | 21 | @view 22 | func get_step_1{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() -> (res: felt) { 23 | let (res) = step_1.read(); 24 | return (res,); 25 | } 26 | 27 | @external 28 | func solve_step_1{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}(mult: felt) -> ( 29 | res: felt 30 | ) { 31 | let (caller) = get_caller_address(); 32 | let prod = const_step_1 + 12345 + caller; 33 | 34 | if (mult == prod) { 35 | step_1.write(prod); 36 | return (res=1); 37 | } 38 | return (res=0); 39 | } 40 | -------------------------------------------------------------------------------- /src/magic_encoding/public/deploy/chal.py: -------------------------------------------------------------------------------- 1 | import cairo_sandbox 2 | 3 | from pathlib import Path 4 | 5 | from starknet_py.net import AccountClient 6 | from starknet_py.contract import Contract 7 | from starkware.python.utils import to_bytes 8 | 9 | async def deploy(client: AccountClient, player_address: int) -> int: 10 | print("[+] deploying magic-encoding") 11 | bitwise_deployement = await Contract.deploy( 12 | client=client, 13 | compiled_contract=Path("compiled/magic-encoding.json").read_text(), 14 | constructor_args=[], 15 | ) 16 | await bitwise_deployement.wait_for_acceptance() 17 | return bitwise_deployement.deployed_contract.address 18 | 19 | 20 | async def checker(client: AccountClient, bitwise_contract: Contract, player_address: int) -> bool: 21 | solution = (await bitwise_contract.functions["is_challenge_done"].call()).res 22 | 23 | return solution == 1 24 | 25 | cairo_sandbox.run_launcher([ 26 | cairo_sandbox.new_launch_instance_action(deploy), 27 | cairo_sandbox.new_kill_instance_action(), 28 | cairo_sandbox.new_get_flag_action(checker), 29 | ]) -------------------------------------------------------------------------------- /src/puzzle_box/public/contracts/impl_2.cairo: -------------------------------------------------------------------------------- 1 | %lang starknet 2 | 3 | from starkware.cairo.common.cairo_builtins import HashBuiltin 4 | from starkware.starknet.common.syscalls import get_caller_address 5 | from starkware.cairo.common.math_cmp import is_le_felt 6 | 7 | @contract_interface 8 | namespace Contract_2 { 9 | func solve_step_2(mult: felt) -> (res: felt) { 10 | } 11 | func get_step_2() -> (res: felt) { 12 | } 13 | } 14 | 15 | const step_2_const = 1010886179; 16 | 17 | @storage_var 18 | func step_2() -> (res: felt) { 19 | } 20 | 21 | @view 22 | func get_step_2{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() -> (res: felt) { 23 | let (res) = step_2.read(); 24 | return (res,); 25 | } 26 | 27 | @external 28 | func solve_step_2{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}(mult: felt) -> ( 29 | res: felt 30 | ) { 31 | let (caller) = get_caller_address(); 32 | let prod = step_2_const + 965647271 + caller; 33 | 34 | if (mult == prod) { 35 | step_2.write(prod); 36 | return (res=1); 37 | } 38 | return (res=0); 39 | } 40 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/bip39/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.mnemonicToSeedSync = exports.mnemonicToSeed = exports.validateMnemonic = exports.entropyToMnemonic = exports.mnemonicToEntropy = exports.generateMnemonic = void 0; 4 | var bip39_1 = require("@scure/bip39"); 5 | Object.defineProperty(exports, "generateMnemonic", { enumerable: true, get: function () { return bip39_1.generateMnemonic; } }); 6 | Object.defineProperty(exports, "mnemonicToEntropy", { enumerable: true, get: function () { return bip39_1.mnemonicToEntropy; } }); 7 | Object.defineProperty(exports, "entropyToMnemonic", { enumerable: true, get: function () { return bip39_1.entropyToMnemonic; } }); 8 | Object.defineProperty(exports, "validateMnemonic", { enumerable: true, get: function () { return bip39_1.validateMnemonic; } }); 9 | Object.defineProperty(exports, "mnemonicToSeed", { enumerable: true, get: function () { return bip39_1.mnemonicToSeed; } }); 10 | Object.defineProperty(exports, "mnemonicToSeedSync", { enumerable: true, get: function () { return bip39_1.mnemonicToSeedSync; } }); 11 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/_blake2.d.ts: -------------------------------------------------------------------------------- 1 | import { Hash, Input } from './utils.js'; 2 | export declare const SIGMA: Uint8Array; 3 | export declare type BlakeOpts = { 4 | dkLen?: number; 5 | key?: Input; 6 | salt?: Input; 7 | personalization?: Input; 8 | }; 9 | export declare abstract class BLAKE2> extends Hash { 10 | readonly blockLen: number; 11 | outputLen: number; 12 | protected abstract compress(msg: Uint32Array, offset: number, isLast: boolean): void; 13 | protected abstract get(): number[]; 14 | protected abstract set(...args: number[]): void; 15 | abstract destroy(): void; 16 | protected buffer: Uint8Array; 17 | protected buffer32: Uint32Array; 18 | protected length: number; 19 | protected pos: number; 20 | protected finished: boolean; 21 | protected destroyed: boolean; 22 | constructor(blockLen: number, outputLen: number, opts: BlakeOpts | undefined, keyLen: number, saltLen: number, persLen: number); 23 | update(data: Input): this; 24 | digestInto(out: Uint8Array): void; 25 | digest(): Uint8Array; 26 | _cloneInto(to?: T): T; 27 | } 28 | -------------------------------------------------------------------------------- /example/node_modules/bn.js/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Fedor Indutny, 2015. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /src/claim_a_punk/public/contracts/openzeppelin/token/erc721/enumerable/presets/utils/ERC721Holder.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (token/erc721/presets/utils/ERC721Holder.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.cairo_builtins import HashBuiltin 7 | from starkware.cairo.common.uint256 import Uint256 8 | 9 | from openzeppelin.utils.constants.library import IERC721_RECEIVER_ID 10 | 11 | from openzeppelin.introspection.erc165.library import ERC165 12 | 13 | @view 14 | func onERC721Received( 15 | operator: felt, from_: felt, tokenId: Uint256, data_len: felt, data: felt* 16 | ) -> (selector: felt) { 17 | return (selector=IERC721_RECEIVER_ID); 18 | } 19 | 20 | @view 21 | func supportsInterface{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}( 22 | interfaceId: felt 23 | ) -> (success: felt) { 24 | return ERC165.supports_interface(interfaceId); 25 | } 26 | 27 | @constructor 28 | func constructor{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() { 29 | ERC165.register_interface(IERC721_RECEIVER_ID); 30 | return (); 31 | } 32 | -------------------------------------------------------------------------------- /src/dna/public/deploy/chal.py: -------------------------------------------------------------------------------- 1 | import cairo_sandbox 2 | 3 | from pathlib import Path 4 | 5 | from starknet_py.net import AccountClient 6 | from starknet_py.contract import Contract 7 | from starkware.python.utils import to_bytes 8 | 9 | async def deploy(client: AccountClient, player_address: int) -> int: 10 | print("[+] deploying dna") 11 | riddle_deployment = await Contract.deploy( 12 | client=client, 13 | compiled_contract=Path("compiled/dna.cairo").read_text(), 14 | constructor_args=[3329738248317886966279794942297149793815292158761370755733235303955518040301], 15 | ) 16 | await riddle_deployment.wait_for_acceptance() 17 | 18 | return riddle_deployment.deployed_contract.address 19 | 20 | 21 | async def checker(client: AccountClient, dna_contract: Contract, player_address: int) -> bool: 22 | solution = (await dna_contract.functions["is_challenge_done"].call()).res 23 | 24 | return solution == 1 25 | 26 | cairo_sandbox.run_launcher([ 27 | cairo_sandbox.new_launch_instance_action(deploy), 28 | cairo_sandbox.new_kill_instance_action(), 29 | cairo_sandbox.new_get_flag_action(checker), 30 | ]) -------------------------------------------------------------------------------- /src/account_obstruction/public/contracts/openzeppelin/token/erc721/enumerable/presets/utils/ERC721Holder.cairo: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts for Cairo v0.4.0b (token/erc721/presets/utils/ERC721Holder.cairo) 3 | 4 | %lang starknet 5 | 6 | from starkware.cairo.common.cairo_builtins import HashBuiltin 7 | from starkware.cairo.common.uint256 import Uint256 8 | 9 | from openzeppelin.utils.constants.library import IERC721_RECEIVER_ID 10 | 11 | from openzeppelin.introspection.erc165.library import ERC165 12 | 13 | @view 14 | func onERC721Received( 15 | operator: felt, from_: felt, tokenId: Uint256, data_len: felt, data: felt* 16 | ) -> (selector: felt) { 17 | return (selector=IERC721_RECEIVER_ID); 18 | } 19 | 20 | @view 21 | func supportsInterface{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}( 22 | interfaceId: felt 23 | ) -> (success: felt) { 24 | return ERC165.supports_interface(interfaceId); 25 | } 26 | 27 | @constructor 28 | func constructor{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}() { 29 | ERC165.register_interface(IERC721_RECEIVER_ID); 30 | return (); 31 | } 32 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/number.d.ts: -------------------------------------------------------------------------------- 1 | import BN from 'bn.js'; 2 | export declare type BigNumberish = string | number | BN; 3 | export declare function isHex(hex: string): boolean; 4 | export declare function toBN(number: BigNumberish, base?: number | 'hex'): BN; 5 | export declare function toHex(number: BN): string; 6 | export declare function hexToDecimalString(hex: string): string; 7 | export declare function toFelt(num: BigNumberish): string; 8 | export declare function assertInRange(input: BigNumberish, lowerBound: BigNumberish, upperBound: BigNumberish, inputName?: string): void; 9 | export declare function bigNumberishArrayToDecimalStringArray(rawCalldata: BigNumberish[]): string[]; 10 | export declare function bigNumberishArrayToHexadecimalStringArray(rawCalldata: BigNumberish[]): string[]; 11 | export declare const isStringWholeNumber: (value: string) => boolean; 12 | export declare const toHexString: (value: string) => string; 13 | export declare function getDecimalString(value: string): string; 14 | export declare function getHexString(value: string): string; 15 | export declare function getHexStringArray(value: Array): string[]; 16 | -------------------------------------------------------------------------------- /example/node_modules/whatwg-fetch/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2016 GitHub, Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /src/frozen_finance/public/deploy/chal.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | from starknet_py.contract import Contract 4 | from starknet_py.net import AccountClient 5 | from starkware.python.utils import from_bytes 6 | 7 | import cairo_sandbox 8 | 9 | 10 | async def deploy(client: AccountClient, player_address: int) -> int: 11 | print("[+] deploying frozen account") 12 | frozen_deployment = await Contract.deploy( 13 | client=client, 14 | compiled_contract=Path("compiled/frozen.cairo").read_text(), 15 | constructor_args=[], 16 | ) 17 | await frozen_deployment.wait_for_acceptance() 18 | 19 | return frozen_deployment.deployed_contract.address 20 | 21 | 22 | async def checker( 23 | client: AccountClient, frozen_contract: Contract, player_address: int 24 | ) -> bool: 25 | balance = await frozen_contract.functions["readBalance"].call() 26 | 27 | return balance.balance == 0 28 | 29 | 30 | cairo_sandbox.run_launcher( 31 | [ 32 | cairo_sandbox.new_launch_instance_action(deploy), 33 | cairo_sandbox.new_kill_instance_action(), 34 | cairo_sandbox.new_get_flag_action(checker), 35 | ] 36 | ) 37 | -------------------------------------------------------------------------------- /example/node_modules/elliptic/node_modules/bn.js/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Fedor Indutny, 2015. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /example/node_modules/hash.js/lib/hash/sha/common.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('../utils'); 4 | var rotr32 = utils.rotr32; 5 | 6 | function ft_1(s, x, y, z) { 7 | if (s === 0) 8 | return ch32(x, y, z); 9 | if (s === 1 || s === 3) 10 | return p32(x, y, z); 11 | if (s === 2) 12 | return maj32(x, y, z); 13 | } 14 | exports.ft_1 = ft_1; 15 | 16 | function ch32(x, y, z) { 17 | return (x & y) ^ ((~x) & z); 18 | } 19 | exports.ch32 = ch32; 20 | 21 | function maj32(x, y, z) { 22 | return (x & y) ^ (x & z) ^ (y & z); 23 | } 24 | exports.maj32 = maj32; 25 | 26 | function p32(x, y, z) { 27 | return x ^ y ^ z; 28 | } 29 | exports.p32 = p32; 30 | 31 | function s0_256(x) { 32 | return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22); 33 | } 34 | exports.s0_256 = s0_256; 35 | 36 | function s1_256(x) { 37 | return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25); 38 | } 39 | exports.s1_256 = s1_256; 40 | 41 | function g0_256(x) { 42 | return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3); 43 | } 44 | exports.g0_256 = g0_256; 45 | 46 | function g1_256(x) { 47 | return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10); 48 | } 49 | exports.g1_256 = g1_256; 50 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/typedData/types.d.ts: -------------------------------------------------------------------------------- 1 | export declare type StarkNetMerkleType = { 2 | name: string; 3 | type: 'merkletree'; 4 | contains: string; 5 | }; 6 | /** 7 | * A single type, as part of a struct. The `type` field can be any of the EIP-712 supported types. 8 | * 9 | * Note that the `uint` and `int` aliases like in Solidity, and fixed point numbers are not supported by the EIP-712 10 | * standard. 11 | */ 12 | export declare type StarkNetType = { 13 | name: string; 14 | type: string; 15 | } | StarkNetMerkleType; 16 | /** 17 | * The EIP712 domain struct. Any of these fields are optional, but it must contain at least one field. 18 | */ 19 | export interface StarkNetDomain extends Record { 20 | name?: string; 21 | version?: string; 22 | chainId?: string | number; 23 | } 24 | /** 25 | * The complete typed data, with all the structs, domain data, primary type of the message, and the message itself. 26 | */ 27 | export interface TypedData { 28 | types: Record; 29 | primaryType: string; 30 | domain: StarkNetDomain; 31 | message: Record; 32 | } 33 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/utils/typedData/types.ts: -------------------------------------------------------------------------------- 1 | export type StarkNetMerkleType = { 2 | name: string; 3 | type: 'merkletree'; 4 | contains: string; 5 | }; 6 | 7 | /** 8 | * A single type, as part of a struct. The `type` field can be any of the EIP-712 supported types. 9 | * 10 | * Note that the `uint` and `int` aliases like in Solidity, and fixed point numbers are not supported by the EIP-712 11 | * standard. 12 | */ 13 | export type StarkNetType = 14 | | { 15 | name: string; 16 | type: string; 17 | } 18 | | StarkNetMerkleType; 19 | 20 | /** 21 | * The EIP712 domain struct. Any of these fields are optional, but it must contain at least one field. 22 | */ 23 | export interface StarkNetDomain extends Record { 24 | name?: string; 25 | version?: string; 26 | chainId?: string | number; 27 | } 28 | 29 | /** 30 | * The complete typed data, with all the structs, domain data, primary type of the message, and the message itself. 31 | */ 32 | export interface TypedData { 33 | types: Record; 34 | primaryType: string; 35 | domain: StarkNetDomain; 36 | message: Record; 37 | } 38 | -------------------------------------------------------------------------------- /src/access_denied/public/deploy/chal.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | from starknet_py.contract import Contract 4 | from starknet_py.net import AccountClient 5 | from starkware.python.utils import to_bytes 6 | 7 | import cairo_sandbox 8 | 9 | 10 | async def deploy(client: AccountClient, player_address: int) -> int: 11 | print("[+] deploying contract") 12 | signature_deployment = await Contract.deploy( 13 | client=client, 14 | compiled_contract=Path("compiled/access_denied.cairo").read_text(), 15 | constructor_args=[], 16 | ) 17 | await signature_deployment.wait_for_acceptance() 18 | 19 | return signature_deployment.deployed_contract.address 20 | 21 | 22 | async def checker( 23 | client: AccountClient, signature_contract: Contract, player_address: int 24 | ) -> bool: 25 | solved = (await signature_contract.functions["solved"].call()).solved 26 | 27 | return solved == 1 28 | 29 | 30 | cairo_sandbox.run_launcher( 31 | [ 32 | cairo_sandbox.new_launch_instance_action(deploy), 33 | cairo_sandbox.new_kill_instance_action(), 34 | cairo_sandbox.new_get_flag_action(checker), 35 | ] 36 | ) 37 | -------------------------------------------------------------------------------- /example/node_modules/ethereum-cryptography/node_modules/@noble/hashes/_blake2.d.ts: -------------------------------------------------------------------------------- 1 | import { Hash, Input } from './utils.js'; 2 | export declare const SIGMA: Uint8Array; 3 | export declare type BlakeOpts = { 4 | dkLen?: number; 5 | key?: Input; 6 | salt?: Input; 7 | personalization?: Input; 8 | }; 9 | export declare abstract class BLAKE2> extends Hash { 10 | readonly blockLen: number; 11 | outputLen: number; 12 | protected abstract compress(msg: Uint32Array, offset: number, isLast: boolean): void; 13 | protected abstract get(): number[]; 14 | protected abstract set(...args: number[]): void; 15 | abstract destroy(): void; 16 | protected buffer: Uint8Array; 17 | protected buffer32: Uint32Array; 18 | protected length: number; 19 | protected pos: number; 20 | protected finished: boolean; 21 | protected destroyed: boolean; 22 | constructor(blockLen: number, outputLen: number, opts: BlakeOpts | undefined, keyLen: number, saltLen: number, persLen: number); 23 | update(data: Input): this; 24 | digestInto(out: Uint8Array): void; 25 | digest(): Uint8Array; 26 | _cloneInto(to?: T): T; 27 | } 28 | -------------------------------------------------------------------------------- /example/node_modules/isomorphic-fetch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "isomorphic-fetch", 3 | "version": "3.0.0", 4 | "description": "Isomorphic WHATWG Fetch API, for Node & Browserify", 5 | "browser": "fetch-npm-browserify.js", 6 | "main": "fetch-npm-node.js", 7 | "scripts": { 8 | "files": "find . -name '*.js' ! -path './node_modules/*' ! -path './bower_components/*'", 9 | "test": "jshint `npm run -s files` && lintspaces -i js-comments -e .editorconfig `npm run -s files` && mocha" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/matthew-andrews/isomorphic-fetch.git" 14 | }, 15 | "author": "Matt Andrews ", 16 | "license": "MIT", 17 | "bugs": { 18 | "url": "https://github.com/matthew-andrews/isomorphic-fetch/issues" 19 | }, 20 | "homepage": "https://github.com/matthew-andrews/isomorphic-fetch/issues", 21 | "dependencies": { 22 | "node-fetch": "^2.6.1", 23 | "whatwg-fetch": "^3.4.1" 24 | }, 25 | "devDependencies": { 26 | "chai": "^4.2.0", 27 | "jshint": "^2.5.11", 28 | "lintspaces-cli": "^0.7.1", 29 | "mocha": "^8.1.3", 30 | "nock": "^13.0.4" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /example/node_modules/starknet/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Sean James Han 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/node_modules/starknet/dist/utils/responseParser/rpc.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Map RPC Response to common interface response 3 | * Intersection (sequencer response ∩ (∪ rpc responses)) 4 | */ 5 | import { CallContractResponse, EstimateFeeResponse, GetBlockResponse, GetTransactionResponse } from '../../types'; 6 | import { RPC } from '../../types/api'; 7 | import { ResponseParser } from '.'; 8 | declare type RpcGetBlockResponse = RPC.GetBlockWithTxHashesResponse & { 9 | [key: string]: any; 10 | }; 11 | declare type GetTransactionByHashResponse = RPC.GetTransactionByHashResponse & { 12 | [key: string]: any; 13 | }; 14 | export declare class RPCResponseParser implements Omit { 15 | parseGetBlockResponse(res: RpcGetBlockResponse): GetBlockResponse; 16 | parseGetTransactionResponse(res: GetTransactionByHashResponse): GetTransactionResponse; 17 | parseFeeEstimateResponse(res: RPC.EstimateFeeResponse): EstimateFeeResponse; 18 | parseCallContractResponse(res: Array): CallContractResponse; 19 | } 20 | export {}; 21 | -------------------------------------------------------------------------------- /example/node_modules/url-join/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2015 José F. Romaniello 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/node_modules/json-bigint/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Andrey Sidorov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /example/node_modules/@ethersproject/bytes/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Richard Moore 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/node_modules/isomorphic-fetch/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Matt Andrews 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/node_modules/node-fetch/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 David Frank 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /example/node_modules/starknet/src/utils/uint256.ts: -------------------------------------------------------------------------------- 1 | import { addHexPrefix } from './encode'; 2 | import { BigNumberish, toBN } from './number'; 3 | 4 | // Represents an integer in the range [0, 2^256). 5 | export interface Uint256 { 6 | // The low 128 bits of the value. 7 | low: BigNumberish; 8 | // The high 128 bits of the value. 9 | high: BigNumberish; 10 | } 11 | 12 | // function to convert Uint256 to BN 13 | export function uint256ToBN(uint256: Uint256) { 14 | return toBN(uint256.high).shln(128).add(toBN(uint256.low)); 15 | } 16 | 17 | export const UINT_128_MAX = toBN(1).shln(128).sub(toBN(1)); 18 | export const UINT_256_MAX = toBN(1).shln(256).sub(toBN(1)); 19 | // function to check if BN is smaller or equal 2**256-1 20 | export function isUint256(bn: BigNumberish): boolean { 21 | return toBN(bn).lte(UINT_256_MAX); 22 | } 23 | 24 | // function to convert BN to Uint256 25 | export function bnToUint256(bignumber: BigNumberish): Uint256 { 26 | const bn = toBN(bignumber); 27 | if (!isUint256(bn)) throw new Error('Number is too large'); 28 | return { 29 | low: addHexPrefix(bn.maskn(128).toString(16)), 30 | high: addHexPrefix(bn.shrn(128).toString(16)), 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /example/node_modules/whatwg-url/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015–2016 Sebastian Mayr 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/node_modules/pako/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/node_modules/@noble/hashes/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2022 Paul Miller (https://paulmillr.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the “Software”), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /example/node_modules/@noble/secp256k1/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2019 Paul Miller (https://paulmillr.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the “Software”), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /example/node_modules/@scure/base/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2022 Paul Miller (https://paulmillr.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the “Software”), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/node_modules/ts-custom-error/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2019 Adrien Gibrat https://github.com/adriengibrat 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/node_modules/@scure/bip32/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the “Software”), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/node_modules/@scure/bip39/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the “Software”), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | --------------------------------------------------------------------------------