@wdft/gvm-sdk
v0.0.30
Published
get via msg sdk - gvm.js
Downloads
1,752
Readme
gvm.js
WDFT - We Do Fintech
GetViaMsg SDK and WebComponents
Showcase of gvm.js web-component
Entrypoints / modes
The package ships three integration layers — pick the one that fits, they don't interfere with each other:
| Entrypoint | Mode | Use it when |
| --- | --- | --- |
| @wdft/gvm-sdk (npm) | raw SDK — programmatic getViaMsg(), no DOM | you build your own UI and control everything |
| dist/gvm.js | declarative — auto-init, reads data-gvm-* + inline <template> | you hand-write the paywall markup |
| dist/gvm-overlay.js | config-driven — fetches a JSON config, injects data-gvm-*, boots gvm.js | you want a zero-config, centrally-managed paywall |
gvm.jsandgvm-overlay.jsare isolated ES modules served from a CDN (or bundled).- Loading
gvm-overlay.js(instead ofgvm.js) is the overlay signal — no flag needed; config and admin-editor URLs are derived fromdata-gvm-env+data-gvm-tenant(see gvm-overlay docs). - The admin editor (
gvm-admin.js) is loaded lazily on?gvm_admin=1bygvm-overlay.jsonly.
Custom API endpoint
Beside data-gvm-env (demo|local|dev|qa|prod), you can point at an arbitrary
API URL with data-gvm-endpoint (absolute URL). When set, the real
environment is used regardless of data-gvm-env.
<body data-gvm data-gvm-env="demo" data-gvm-endpoint="https://api.example.com" ...>gvm-overlay.js (config-driven layer)
gvm-overlay.js is a zero-config layer on top of gvm.js: it fetches a JSON config and
applies prices/paywalls to content marked with data-gvm-reference. Loading gvm-overlay.js
(instead of gvm.js) is the overlay signal — integration is a one-liner, with the attributes
on the <script> tag:
<script type="module"
src="https://esm.sh/@wdft/gvm-sdk@latest/gvm-overlay.js"
data-gvm-tenant="your_tenant"
data-gvm-env="dev"></script>
<div data-gvm-reference="my-article">…paywalled content…</div>data-gvm-config, data-gvm-admin-src and data-gvm-admin-api are optional overrides.
Templates (paywall + payment) come from the config (templates.paywall / templates.payment) —
the overlay ships no built-in markup.
Docs: gvm-overlay. Backend/admin editor: gvm-sdk-admin.
Changelog
23.08.2026
v0.0.30
gvm.js + gvm-overlay.js: opt-in analytics event stream. Enable with data-gvm-analytics="dl,gtag,custom" (dataLayer/GTM, GA4 gtag, DOM CustomEvent). 16 events cover the full flow (gvm_render, gvm_qr, gvm_pay_click, gvm_sms_click, gvm_cancel, gvm_initializing, gvm_waiting, gvm_resolved, gvm_duplicated, gvm_rejected, gvm_expired, gvm_error, gvm_reveal, gvm_redirect, gvm_download, gvm_inject), each carrying value/currency/reference/tenant. Docs: gvm-js analytics.
22.08.2026
v0.0.29
gvm-overlay.js no-flash helper: wrap gated content in .gvm-cloak — the overlay injects visibility:hidden on load and reveals it once done (config applied or not).
v0.0.28
gvm-overlay.js now supports selectors per article.
v0.0.27
gvm-overlay.js now supports conditions per article and global.
v0.0.26
gvm-overlay.js now supports conditions.
v0.0.25
Fix gvm-overlay.js self-detection on esm.sh: match its own <script> by basename stem (.js/.mjs/.ts) and resolve gvm.js/gvm-admin.js from the script's public URL.
v0.0.24
gvm-overlay.js templates are now config-only: it reads templates.paywall/templates.payment from the tenant config instead of shipping built-in markup (no fallback, warns when missing).
v0.0.23
Overlay now used own templates not hardcoded
v0.0.22
Fixed blur and mangle-blur strategy behaviour
v0.0.21
Changes with gvm_admin logic of load of config
v0.0.20
Add gvm-overlay.js, a config-driven integration layer that fetches a JSON config, applies prices and paywall rules to data-gvm-reference content and boots gvm.js. Config and admin-editor URLs are derived from data-gvm-env + data-gvm-tenant, with data-gvm-config, data-gvm-admin-src and data-gvm-admin-api available as overrides.
16.05.2026
v0.0.19
Maintainance + developer experience
- type letters
- add gvm-retry-time param
- Utils.debug, instead of console.debug
- fix GvmTemplate.render/destroy
- move code to TypeScript + bundle into one gvm.js module
24.02.2026
v0.0.18
Webcomponent gvm.js changes:
- data-gvm-callback now binds properly for callbacks after payments
- add fallbackCallback when is not passed more details
21.02.2026
v0.0.17
Webcomponent gvm.js bundle with sdk in one package for version compatibility
v0.0.16
Strict version in webcomponent - force fresh package in cdn
v0.0.15
Strict version in webcomponent
v0.0.14
Strict version in webcomponent
v0.0.13
Add signatures support in response Add checkSignature method for commitment
11.01.2026
v0.0.12
Change library name
v0.0.11-rc7
Update URL for environments
09.11.2025
v0.0.11-rc6
Add implementation for percentage, words parameter
Add implementation for blur, mangle-blur strategy
v0.0.11-rc3, v0.0.11-rc4, v0.0.11-rc5
README.md commits
v0.0.11-rc2
Expose status to payload, method getMessage() now resolve full text message instead of mocked "Creating..."
v0.0.11-rc1
Add gvm.js as all-in-one declaritive in html attributes integration.
13.10.2025
v0.0.10
Release candidate, add storages (memory, session, local) to handle state on client side.
More & Contact
Read more about our service GetViaMsg at https://getviamsg.wdft.ovh
