diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index ee45b8e..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,22 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node -{ - "name": "Node.js & TypeScript", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm" - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "yarn install", - - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/hypersdk_snap/.eslintrc.js b/.eslintrc.js similarity index 100% rename from hypersdk_snap/.eslintrc.js rename to .eslintrc.js diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index f33a02c..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for more information: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates -# https://containers.dev/guide/dependabot - -version: 2 -updates: - - package-ecosystem: "devcontainers" - directory: "/" - schedule: - interval: weekly diff --git a/.gitignore b/.gitignore index 3c3629e..76add87 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +dist \ No newline at end of file diff --git a/hypersdk_snap/.gitignore b/hypersdk_snap/.gitignore deleted file mode 100644 index 53c37a1..0000000 --- a/hypersdk_snap/.gitignore +++ /dev/null @@ -1 +0,0 @@ -dist \ No newline at end of file diff --git a/hypersdk_snap/README.md b/hypersdk_snap/README.md deleted file mode 100644 index c3601a1..0000000 --- a/hypersdk_snap/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# TypeScript Example Snap - -This snap demonstrates how to develop a snap with TypeScript. It is a simple -snap that displays a confirmation dialog when the `hello` JSON-RPC method is -called. - -## Testing - -The snap comes with some basic tests, to demonstrate how to write tests for -snaps. To test the snap, run `yarn test` in this directory. This will use -[`@metamask/snaps-jest`](https://github.com/MetaMask/snaps/tree/main/packages/snaps-jest) -to run the tests in `src/index.test.ts`. diff --git a/hypersdk_snap/jest.config.js b/jest.config.js similarity index 100% rename from hypersdk_snap/jest.config.js rename to jest.config.js diff --git a/hypersdk_snap/package-lock.json b/package-lock.json similarity index 100% rename from hypersdk_snap/package-lock.json rename to package-lock.json diff --git a/hypersdk_snap/package.json b/package.json similarity index 100% rename from hypersdk_snap/package.json rename to package.json diff --git a/hypersdk_snap/snap.config.ts b/snap.config.ts similarity index 100% rename from hypersdk_snap/snap.config.ts rename to snap.config.ts diff --git a/hypersdk_snap/snap.manifest.json b/snap.manifest.json similarity index 92% rename from hypersdk_snap/snap.manifest.json rename to snap.manifest.json index 3375c3b..c4c18f0 100644 --- a/hypersdk_snap/snap.manifest.json +++ b/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/template-snap-monorepo.git" }, "source": { - "shasum": "YdcqrDgrrjhhmblc55l/eR6swN13Egp7UnR6YfR8jH4=", + "shasum": "Fb2Zbx7oY3DFgJtyJ8lPezXu1OzQDqT1yY/N0E3jXD0=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/hypersdk_snap/src/client/EphemeralSigner.ts b/src/client/EphemeralSigner.ts similarity index 100% rename from hypersdk_snap/src/client/EphemeralSigner.ts rename to src/client/EphemeralSigner.ts diff --git a/hypersdk_snap/src/client/MetamaskSnapSigner.ts b/src/client/MetamaskSnapSigner.ts similarity index 100% rename from hypersdk_snap/src/client/MetamaskSnapSigner.ts rename to src/client/MetamaskSnapSigner.ts diff --git a/hypersdk_snap/src/client/index.ts b/src/client/index.ts similarity index 99% rename from hypersdk_snap/src/client/index.ts rename to src/client/index.ts index 4b28b4a..a20945b 100644 --- a/hypersdk_snap/src/client/index.ts +++ b/src/client/index.ts @@ -81,7 +81,7 @@ export abstract class HyperSDKBaseClient extends EventTarget { return this.sendRawTx(signed); } - public async sendRawTx(txBytes: Uint8Array): Promise { + private async sendRawTx(txBytes: Uint8Array): Promise { const bytesBase64 = base64.encode(txBytes); return this.makeCoreAPIRequest('submitTx', { tx: bytesBase64 }); } diff --git a/hypersdk_snap/src/client/types.ts b/src/client/types.ts similarity index 100% rename from hypersdk_snap/src/client/types.ts rename to src/client/types.ts diff --git a/hypersdk_snap/src/lib/Marshaler.spec.test.ts b/src/lib/Marshaler.spec.test.ts similarity index 100% rename from hypersdk_snap/src/lib/Marshaler.spec.test.ts rename to src/lib/Marshaler.spec.test.ts diff --git a/hypersdk_snap/src/lib/Marshaler.ts b/src/lib/Marshaler.ts similarity index 100% rename from hypersdk_snap/src/lib/Marshaler.ts rename to src/lib/Marshaler.ts diff --git a/hypersdk_snap/src/lib/Marshaler.tx.test.ts b/src/lib/Marshaler.tx.test.ts similarity index 100% rename from hypersdk_snap/src/lib/Marshaler.tx.test.ts rename to src/lib/Marshaler.tx.test.ts diff --git a/hypersdk_snap/src/lib/PrivateKeySigner.ts b/src/lib/PrivateKeySigner.ts similarity index 100% rename from hypersdk_snap/src/lib/PrivateKeySigner.ts rename to src/lib/PrivateKeySigner.ts diff --git a/hypersdk_snap/src/snap/cb58.ts b/src/snap/cb58.ts similarity index 100% rename from hypersdk_snap/src/snap/cb58.ts rename to src/snap/cb58.ts diff --git a/hypersdk_snap/src/snap/const.ts b/src/snap/const.ts similarity index 100% rename from hypersdk_snap/src/snap/const.ts rename to src/snap/const.ts diff --git a/hypersdk_snap/src/snap/index.tsx b/src/snap/index.tsx similarity index 100% rename from hypersdk_snap/src/snap/index.tsx rename to src/snap/index.tsx diff --git a/hypersdk_snap/src/testdata/abi.abi.json b/src/testdata/abi.abi.json similarity index 100% rename from hypersdk_snap/src/testdata/abi.abi.json rename to src/testdata/abi.abi.json diff --git a/hypersdk_snap/src/testdata/abi.hash.hex b/src/testdata/abi.hash.hex similarity index 100% rename from hypersdk_snap/src/testdata/abi.hash.hex rename to src/testdata/abi.hash.hex diff --git a/hypersdk_snap/src/testdata/abi.json b/src/testdata/abi.json similarity index 100% rename from hypersdk_snap/src/testdata/abi.json rename to src/testdata/abi.json diff --git a/hypersdk_snap/src/testdata/arrays.hex b/src/testdata/arrays.hex similarity index 100% rename from hypersdk_snap/src/testdata/arrays.hex rename to src/testdata/arrays.hex diff --git a/hypersdk_snap/src/testdata/arrays.json b/src/testdata/arrays.json similarity index 100% rename from hypersdk_snap/src/testdata/arrays.json rename to src/testdata/arrays.json diff --git a/hypersdk_snap/src/testdata/empty.hex b/src/testdata/empty.hex similarity index 100% rename from hypersdk_snap/src/testdata/empty.hex rename to src/testdata/empty.hex diff --git a/hypersdk_snap/src/testdata/empty.json b/src/testdata/empty.json similarity index 100% rename from hypersdk_snap/src/testdata/empty.json rename to src/testdata/empty.json diff --git a/hypersdk_snap/src/testdata/numbers.hex b/src/testdata/numbers.hex similarity index 100% rename from hypersdk_snap/src/testdata/numbers.hex rename to src/testdata/numbers.hex diff --git a/hypersdk_snap/src/testdata/numbers.json b/src/testdata/numbers.json similarity index 100% rename from hypersdk_snap/src/testdata/numbers.json rename to src/testdata/numbers.json diff --git a/hypersdk_snap/src/testdata/outer.hex b/src/testdata/outer.hex similarity index 100% rename from hypersdk_snap/src/testdata/outer.hex rename to src/testdata/outer.hex diff --git a/hypersdk_snap/src/testdata/outer.json b/src/testdata/outer.json similarity index 100% rename from hypersdk_snap/src/testdata/outer.json rename to src/testdata/outer.json diff --git a/hypersdk_snap/src/testdata/strByteZero.hex b/src/testdata/strByteZero.hex similarity index 100% rename from hypersdk_snap/src/testdata/strByteZero.hex rename to src/testdata/strByteZero.hex diff --git a/hypersdk_snap/src/testdata/strByteZero.json b/src/testdata/strByteZero.json similarity index 100% rename from hypersdk_snap/src/testdata/strByteZero.json rename to src/testdata/strByteZero.json diff --git a/hypersdk_snap/src/testdata/strBytes.hex b/src/testdata/strBytes.hex similarity index 100% rename from hypersdk_snap/src/testdata/strBytes.hex rename to src/testdata/strBytes.hex diff --git a/hypersdk_snap/src/testdata/strBytes.json b/src/testdata/strBytes.json similarity index 100% rename from hypersdk_snap/src/testdata/strBytes.json rename to src/testdata/strBytes.json diff --git a/hypersdk_snap/src/testdata/strBytesEmpty.hex b/src/testdata/strBytesEmpty.hex similarity index 100% rename from hypersdk_snap/src/testdata/strBytesEmpty.hex rename to src/testdata/strBytesEmpty.hex diff --git a/hypersdk_snap/src/testdata/strBytesEmpty.json b/src/testdata/strBytesEmpty.json similarity index 100% rename from hypersdk_snap/src/testdata/strBytesEmpty.json rename to src/testdata/strBytesEmpty.json diff --git a/hypersdk_snap/src/testdata/strOnly.hex b/src/testdata/strOnly.hex similarity index 100% rename from hypersdk_snap/src/testdata/strOnly.hex rename to src/testdata/strOnly.hex diff --git a/hypersdk_snap/src/testdata/strOnly.json b/src/testdata/strOnly.json similarity index 100% rename from hypersdk_snap/src/testdata/strOnly.json rename to src/testdata/strOnly.json diff --git a/hypersdk_snap/src/testdata/transfer.hex b/src/testdata/transfer.hex similarity index 100% rename from hypersdk_snap/src/testdata/transfer.hex rename to src/testdata/transfer.hex diff --git a/hypersdk_snap/src/testdata/transfer.json b/src/testdata/transfer.json similarity index 100% rename from hypersdk_snap/src/testdata/transfer.json rename to src/testdata/transfer.json diff --git a/hypersdk_snap/src/testdata/transferField.hex b/src/testdata/transferField.hex similarity index 100% rename from hypersdk_snap/src/testdata/transferField.hex rename to src/testdata/transferField.hex diff --git a/hypersdk_snap/src/testdata/transferField.json b/src/testdata/transferField.json similarity index 100% rename from hypersdk_snap/src/testdata/transferField.json rename to src/testdata/transferField.json diff --git a/hypersdk_snap/src/testdata/transfersArray.hex b/src/testdata/transfersArray.hex similarity index 100% rename from hypersdk_snap/src/testdata/transfersArray.hex rename to src/testdata/transfersArray.hex diff --git a/hypersdk_snap/src/testdata/transfersArray.json b/src/testdata/transfersArray.json similarity index 100% rename from hypersdk_snap/src/testdata/transfersArray.json rename to src/testdata/transfersArray.json diff --git a/hypersdk_snap/src/testdata/uint16.hex b/src/testdata/uint16.hex similarity index 100% rename from hypersdk_snap/src/testdata/uint16.hex rename to src/testdata/uint16.hex diff --git a/hypersdk_snap/src/testdata/uint16.json b/src/testdata/uint16.json similarity index 100% rename from hypersdk_snap/src/testdata/uint16.json rename to src/testdata/uint16.json diff --git a/hypersdk_snap/tsconfig.json b/tsconfig.json similarity index 100% rename from hypersdk_snap/tsconfig.json rename to tsconfig.json