Skip to content

Defi-Oracle-Tooling/chain138-snap-minimal

Repository files navigation

Chain 138 Open Snap

Official Snap ID: npm:chain138-open-snap

A MetaMask Snap for Chain 138DeFi Oracle Meta Mainnet (EVM, chain ID 138 / 0x8a). It uses only open Snap permissions (minimal privileged APIs inside the Snap). Stable MetaMask still only installs npm Snaps on MetaMask’s install allowlist; use MetaMask Flask or apply for allowlisting for broad production use.


Why this package

Goal How this Snap handles it
Explain the network Home page shows RPC, block explorer, and a link to the canonical token list (with logoURIs suited to wallets).
Context on activity Transaction and signature insights when you interact with dApps (with optional site origin where the manifest allows it).
Lightweight reminders Weekly cron notification nudging you to refresh token metadata awareness (optional dismiss via preferences).
No extra trust surface Does not use endowment:network-access or endowment:rpc — the Snap does not fetch arbitrary URLs or expose a custom JSON-RPC API.

What users see

After installation, open MetaMask → Snaps → Chain 138 Open for:

  • Network name, public RPC, and explorer links
  • Token list URL: https://explorer.d-bis.org/api/config/token-list
  • Live eth_chainId / block readout when the wallet RPC matches Chain 138
  • Transaction and signature panels for review flows

Default public RPC referenced in the UI: https://rpc-http-pub.d-bis.org (adjust in-wallet if you use another endpoint).


Permissions (all open / allowlist-free)

  • Home page, Ethereum provider (read-only wallet RPC helpers in-app)
  • Transaction insight and signature insight (with origin as permitted by MetaMask)
  • Lifecycle hooks (install / update / start)
  • Cronjob (weekly reminder)
  • Dialog, notifications, preferences, managed state (lightweight counters / install metadata)

Install (dApps or DevTools console)

await ethereum.request({
  method: 'wallet_requestSnaps',
  params: { 'npm:chain138-open-snap': {} },
});

Requires a MetaMask build that supports Snaps (e.g. Flask during development — follow current MetaMask docs).


Develop locally

npm install
npm run build
npm run serve

Point MetaMask at the local Snap URL from mm-snap serve (see MetaMask Snaps developer docs).

CI-style check (production dependencies only):

npm run verify   # npm audit --omit=dev && npm run build

A full npm audit may still report low-severity items under the Snaps CLI toolchain; bn.js is pinned via overrides.

npm + nvm (prefix warning)

scripts/deployment/publish-chain138-open-snap.sh in the monorepo unsets npm_config_prefix and runs nvm use --delete-prefix when NVM_DIR is set. If warnings persist, remove a stray prefix= from ~/.npmrc.


Publish to npm

From the proxmox repo root (recommended — uses an isolated npm userconfig so tokens are not written into the repo):

./scripts/deployment/publish-chain138-open-snap.sh

Or from this package directory after npm login:

npm install
npm publish

prepack runs npm run build so dist/ and snap.manifest.json shasum match the tarball.

2FA / tokens: Publishing may require a granular token with publish rights and 2FA bypass for automation, or npm publish --otp=…. See npm’s token documentation.

Version bumps: Change version in package.json and in source (SNAP_VERSION in src/index.tsx when bumped), run npm run build, then publish.


Repository

Canonical source: Defi-Oracle-Tooling/chain138-snap-minimal.

The same package is also vendored under bis-innovations/proxmox at metamask-integration/chain138-snap-minimal so the monorepo can run scripts/deployment/publish-chain138-open-snap.sh and keep explorer docs in one tree. Prefer the standalone repo for issues and PRs focused on the Snap only.


License

(MIT-0 OR Apache-2.0) — dual-license, same pattern as metamask-integration/chain138-snap/.

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT-0 licenses found

Licenses found

Apache-2.0
LICENSE.APACHE2
MIT-0
LICENSE.MIT0

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors