wative-core 1.2.2 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +147 -0
- package/LICENSE +55 -0
- package/README.md +577 -0
- package/dist/artifacts/evm/index.cjs +1 -0
- package/dist/artifacts/evm/index.d.cts +6 -0
- package/dist/artifacts/evm/index.d.ts +6 -0
- package/dist/artifacts/evm/index.js +1 -0
- package/dist/artifacts/svm/index.cjs +1 -0
- package/dist/artifacts/svm/index.d.cts +9 -0
- package/dist/artifacts/svm/index.d.ts +9 -0
- package/dist/artifacts/svm/index.js +1 -0
- package/dist/container-provider-C59yqd5Z.d.ts +48 -0
- package/dist/container-provider-i614LDE1.d.cts +48 -0
- package/dist/evm-BLml33LX.d.cts +34 -0
- package/dist/evm-DTzqGlL6.d.ts +34 -0
- package/dist/file-sink-B73MuigK.d.cts +44 -0
- package/dist/file-sink-LS4hyXXi.d.ts +44 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +194 -0
- package/dist/index.d.ts +194 -0
- package/dist/index.js +1 -0
- package/dist/index.node.cjs +1 -0
- package/dist/index.node.d.cts +6 -0
- package/dist/index.node.d.ts +6 -0
- package/dist/index.node.js +1 -0
- package/dist/node/index.cjs +1 -0
- package/dist/node/index.d.cts +7 -0
- package/dist/node/index.d.ts +7 -0
- package/dist/node/index.js +1 -0
- package/dist/svm-CCzqNAWM.d.cts +59 -0
- package/dist/svm-DieFbh9k.d.ts +59 -0
- package/dist/workspace-CamTHxso.d.cts +737 -0
- package/dist/workspace-CamTHxso.d.ts +737 -0
- package/examples/01-quick-start.test.cjs +37 -0
- package/examples/02-hd-account.test.cjs +71 -0
- package/examples/03-pk-account.test.cjs +59 -0
- package/examples/04-network-management.test.cjs +94 -0
- package/examples/05-asset-management.test.cjs +117 -0
- package/examples/06-address-signing.test.cjs +55 -0
- package/examples/07-custom-provider.test.cjs +164 -0
- package/examples/08-persistence.test.cjs +105 -0
- package/examples/09-workspace-filter.test.cjs +84 -0
- package/examples/10-default-network.test.cjs +70 -0
- package/examples/11-subpath-imports.test.cjs +24 -0
- package/examples/12-logger.test.cjs +44 -0
- package/examples/13-workspace-config.test.cjs +43 -0
- package/examples/14-esm-runtime.test.mjs +81 -0
- package/examples/15-package-resolution.test.cjs +76 -0
- package/examples/16-known-answer-vectors.test.cjs +141 -0
- package/examples/17-locked-state.test.cjs +162 -0
- package/examples/README.md +72 -0
- package/package.json +85 -39
- package/lib/account.d.ts +0 -69
- package/lib/index.d.ts +0 -6
- package/lib/index.esm.js +0 -1
- package/lib/index.umd.js +0 -1
- package/lib/mnemonic.d.ts +0 -3
- package/lib/utils.d.ts +0 -21
- package/src/account.ts +0 -749
- package/src/index.ts +0 -11
- package/src/mnemonic.ts +0 -2084
- package/src/utils.ts +0 -132
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `wative-core` are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
|
+
|
|
5
|
+
## [2.2.1] — 2026-07-29
|
|
6
|
+
|
|
7
|
+
Documentation and packaging only — the library code is identical to 2.2.0.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- The runnable examples moved from `tests/` to `examples/`; update any path references.
|
|
11
|
+
- Clearer README: how Workspace, Account, Wallet and Address relate, and when to use a recovery-phrase account versus an imported-key one.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- One example failed when run from an installed copy.
|
|
15
|
+
|
|
16
|
+
## [2.2.0] — 2026-07-28
|
|
17
|
+
|
|
18
|
+
Runs in the browser now. Existing Node code keeps working unchanged.
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- **Browser support.** The library works in a web app, keeping wallets in the browser's own storage. See the browser example in the Quick start.
|
|
22
|
+
- **Backup and restore.** Export a workspace as encrypted data and load it somewhere else. A workspace created in a browser opens on a desktop, and the other way round.
|
|
23
|
+
- **Writing your own storage is simpler.** A custom backend now needs six small methods; encryption and file layout are handled for you.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- `HybridProvider` and `FileSink` are still available from the main import in Node. They also live at `wative-core/node`, which is where new code should get them.
|
|
27
|
+
|
|
28
|
+
### Please note
|
|
29
|
+
- Browsers can clear their own storage. Creating a **new** wallet in a browser is blocked unless the browser promises to keep the data, or you explicitly accept the risk — an existing wallet always opens. Give users a way to back up.
|
|
30
|
+
- A `Buffer` polyfill is needed in the browser. One line, shown in the Quick start.
|
|
31
|
+
|
|
32
|
+
## [2.1.0] — 2026-07-28
|
|
33
|
+
|
|
34
|
+
> **Browser groundwork.** This release removes every Node-builtin dependency from the crypto and EVM layers. `wative-core/artifacts/evm` and `wative-core/artifacts/svm` now bundle for the browser with **zero** unresolvable Node builtins; the main entry is down to four (`fs`, `fs/promises`, `os`, `path`), all belonging to the filesystem provider. **No public API changed** — this is a drop-in upgrade from 2.0.7.
|
|
35
|
+
|
|
36
|
+
### License
|
|
37
|
+
- **Relicensed to a Modified MIT License** (previously BUSL-1.1). The library is now free for any use, including commercial. The sole added condition: a product or service generating more than 50,000 USD in monthly revenue must prominently display "Wative" on its user interface. Measured per product, not per company. `package.json` declares `"license": "SEE LICENSE IN LICENSE"`, the npm convention for a non-standard licence.
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
- **`web3` 1.7.3 and `ethereumjs-wallet` 1.0.2 replaced by `ethers` 6.** Both were used only for offline work — a provider-less `new Web3()` for the ABI codec and transaction/message signing, and `ethereumjs-wallet` solely for BIP-44 derivation. All RPC already went through `fetch`. web3's transitive tree (`web3-providers-http`/`ws`, `xhr2-cookies`, `readable-stream`, `cipher-base`, `ethereumjs-util`, `@ethereumjs/common`) pulled in `http`, `https`, `stream`, `events`, `url`, `assert` and `os`, which alone made the package impossible to bundle for a browser. web3 1.x is also end-of-life.
|
|
41
|
+
- **Crypto core moved from `node:crypto` to `@noble`.** AES-256-GCM now runs on `@noble/ciphers`; PBKDF2, HMAC and CSPRNG bytes on `@noble/hashes` (Argon2id already used `@noble/hashes`). Every primitive was verified byte-identical against `node:crypto` before the switch. **`Cipher.encrypt`/`decrypt` remain synchronous** — that is why `@noble` was chosen over WebCrypto, whose async-only `SubtleCrypto` would have forced the whole `Cipher` contract async and made this a breaking change.
|
|
42
|
+
- **`node:net.isIP` replaced by a pure-JS classifier**, differential-tested against `node:net.isIP` over ~600 valid, malformed and adversarial inputs.
|
|
43
|
+
- **Wire format, key derivation and on-disk layout are unchanged.** A workspace written by 2.0.7 opens under 2.1.0 with byte-identical results, and the production KDF parameters (PBKDF2 600 000 iterations; Argon2id t=3, m=64 MiB, p=1) are pinned by test.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
- **EIP-712 with an empty `bytes` field no longer crashes.** web3's `keccak256("0x")` returned `null` and broke the signer; empty bytes now hash to the canonical empty-input digest, which is what EIP-712 specifies.
|
|
47
|
+
- **Intrinsic-gas validation preserved.** web3 rejected an under-funded `gasLimit` before signing and ethers does not, so the check is reimplemented — a transaction that can never execute is no longer signed and broadcast, burning the nonce.
|
|
48
|
+
|
|
49
|
+
### Notes for browser consumers
|
|
50
|
+
- `wative-core/artifacts/evm` and `wative-core/artifacts/svm` bundle cleanly today (the EVM artifact is ~128 KB min+gzip).
|
|
51
|
+
- A **`Buffer` polyfill is still required**, because `@solana/web3.js` and `@coral-xyz/anchor` depend on the global. This is standard for any Solana dapp.
|
|
52
|
+
- The main entry still requires the filesystem builtins listed above. Splitting the Node-only surface (`HybridProvider`, `FileSink`) behind a `wative-core/node` subpath, and adding an IndexedDB provider, is planned for 2.2.0.
|
|
53
|
+
|
|
54
|
+
### Internal
|
|
55
|
+
- `scripts/check-browser-bundle.mjs` bundles every published entry for `platform=browser` and ratchets the set of unresolvable Node builtins — failing both on a regression and on a stale baseline, so browser compatibility can only improve. Wired into `prepublishOnly`.
|
|
56
|
+
- Known-answer vectors (`tests/kat/`) pin exact bytes for HD derivation, EIP-191/712 signing, ed25519, the ABI codec, all three EVM transaction types, both KDFs and the envelope wire format; a committed v2.0.7 workspace fixture is opened on every run.
|
|
57
|
+
|
|
58
|
+
## [2.0.7] — 2026-07-21
|
|
59
|
+
|
|
60
|
+
> **Runtime requirement changed:** this release requires **Node.js 22.12+** (was 18.18+). See *Changed → Dependencies* below.
|
|
61
|
+
|
|
62
|
+
### Added
|
|
63
|
+
- **`Workspace.open()` options object.** `open()` now accepts `{ provider?, path?, password? }` alongside the existing positional form, so the default location no longer needs an `undefined` placeholder: `await Workspace.open({ password })`. Passing both `provider` and `path` is rejected.
|
|
64
|
+
- **Automatic create-vs-open with folder validation.** `open()` decides for itself: an existing workspace is opened, an empty or absent location is created, and a **non-empty location that is not a wative workspace is refused** — so a mistyped path can no longer write a workspace into unrelated files. Backed by a new overridable `Provider.inspectContainer()`; `HybridProvider` implements the filesystem check and the base class defaults to permissive, leaving custom providers unaffected.
|
|
65
|
+
|
|
66
|
+
### Changed
|
|
67
|
+
- **`create` parameter is deprecated and ignored.** The third positional argument to `open()` still type-checks so existing calls compile, but create-vs-open is now automatic. The former `"Workspace is not initialized. Pass create=true"` error is gone.
|
|
68
|
+
- **Dependencies.** `@solana/web3.js` 1.91.8 → **1.98.4**. The previous pin resolved `rpc-websockets@^7.11.0` to 7.11.2, which no longer ships the `dist/lib/client` entry that 1.91.8 deep-requires — leaving the published package unloadable under plain Node. 1.98.4 requires the package root instead. Its dependency chain reaches an ESM-only `uuid`, which is why the minimum Node version moves to **22.12** (the first release where `require()` of an ES module is supported).
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
- **Signing.** `signTypedData` rejects a malformed `domain.chainId` with `PARAMETER_ERROR` instead of leaking a raw `SyntaxError`.
|
|
72
|
+
- **Transactions.** EIP-1559 auto-fill clamps a defaulted priority fee to a user-supplied sub-gwei `maxFeePerGas` (previously produced an invalid tip-over-cap pair); receipt status is compared numerically so a non-canonical `0x01` is no longer misread as a revert; an auto-estimated `gasLimit` gets a 1.2x safety buffer.
|
|
73
|
+
- **Transaction tracker.** `abort()` now wakes pending `whenMined`/`whenConfirmed`/`whenFinalized` awaiters instead of hanging them forever; a failed send rejects those awaiters with the real cause rather than a misleading `TX_TIMEOUT`; `whenConfirmed(n)` with `n > 1` fails loudly instead of silently resolving at first inclusion.
|
|
74
|
+
- **Solana.** Anchor instruction accounts now take their signer/writable flags from the IDL instead of being forced to writable non-signer; `memo` is encoded as a real Memo-program instruction; `addressLookupTables` are rejected rather than silently dropped.
|
|
75
|
+
- **Workspace.** A network can no longer be dropped while a user-asset still references it, and the cross-queue race that could orphan an asset or an account's default network is closed.
|
|
76
|
+
- **Accounts & wallets.** A forced `kind: "HD"` now validates the mnemonic checksum at create time; wallet tag read-modify-write runs inside the account mutation queue; invisible Hangul filler characters are rejected in validated text; `formatUnits` no longer emits a misleading `"-0"`.
|
|
77
|
+
|
|
78
|
+
### Packaging
|
|
79
|
+
- `exports` carries per-condition `types`, so CJS TypeScript consumers resolve the `.d.cts` declarations.
|
|
80
|
+
- The `files` allowlist no longer ships the internal `tests/` directory, which had been leaking TypeScript sources into the tarball.
|
|
81
|
+
|
|
82
|
+
## [2.0.5] — 2026-05-04
|
|
83
|
+
|
|
84
|
+
### Added
|
|
85
|
+
- **`EvmTransaction.toRawTx()` and `SvmTransaction.toRawTx()`.** Hand-off accessors that return the lowest-level transaction representation each chain ecosystem already understands, so callers can route a wative-core transaction through any external signer / RPC client without re-deriving the inputs.
|
|
86
|
+
- **`EvmTransaction.toRawTx(): EvmRawTx`** — synchronous. Returns a plain `{ from, to, value, data, type, chainId, nonce?, gasLimit?, gasPrice?, maxFeePerGas?, maxPriorityFeePerGas?, accessList? }` object matching the `web3.js` / `ethers` / `viem` `TransactionRequest` shape. Unset autofill fields are simply omitted, leaving the consumer's provider to fill them in. Does not sign or hit the network.
|
|
87
|
+
- **`SvmTransaction.toRawTx(): Promise<unknown>`** — async. Returns the underlying `@solana/web3.js` `Transaction` instance with `instructions`, `feePayer`, and `recentBlockhash` populated. The build is cached, so repeated calls return the same instance and a subsequent `.sign()` reuses it.
|
|
88
|
+
- **Build-requirement relaxation on the SVM side.** `SvmTransaction` no longer requires a bound `Address` purely to construct the underlying transaction object — if `recentBlockhash` is supplied at construction, `toRawTx()` builds entirely structurally. An Address is still required when blockhash needs to be fetched over RPC.
|
|
89
|
+
- **`EvmRawTx`** type exported from the package entry.
|
|
90
|
+
|
|
91
|
+
### Changed
|
|
92
|
+
- **Cross-OS IO hardening pass.** The `HybridProvider` file backend now applies the Windows `\\?\` long-path prefix when a resolved path crosses 240 chars, canonicalizes the workspace root via `fs.realpath` at unlock, and refuses to traverse symlinked ancestors at write time. Atomic-write temp files use a 64-bit random suffix (was 48-bit) and retry on `EEXIST`; orphan `*.tmp.<rand>` files older than 60 s are swept on first unlock. Directory `fsync` is gated to POSIX. The logger `chmod`s pre-existing log files to `0o600` after open so they don't inherit permissive bits from a prior run under a different `umask`.
|
|
93
|
+
- **`tweetnacl` is now loaded behind a lazy singleton.** Matches the existing `web3.js` / `bs58` lazy-load pattern; first call loads, subsequent calls reuse.
|
|
94
|
+
- **Per-process KDF cache HMAC secret is lazy-initialized.** No `crypto.randomBytes` call at module load time, removing one pre-condition for browser/Edge runtimes.
|
|
95
|
+
|
|
96
|
+
### Security
|
|
97
|
+
- **Passwords are normalized to NFC at the KDF boundary.** Clipboard managers and OS input methods occasionally hand back equivalent strings in different Unicode normalization forms; without normalization, a workspace sealed on one host would refuse to unlock on another. ASCII passwords are unaffected.
|
|
98
|
+
- **`TextDecoder` calls now use `{ fatal: true }`** in every record-payload, recovery-envelope, and decoded-bytes path. Malformed UTF-8 surfaces as `DECRYPT_FAILED` instead of silently substituting `U+FFFD`.
|
|
99
|
+
- **Account slug reserved-name lookup is case-insensitive.** Belt-and-suspenders over the slug regex (which already enforces lowercase output) — Windows resolves `CON`/`con`/`Con` to the same device, so reserved-name matching now follows the same rule explicitly.
|
|
100
|
+
- **Workspace path resolver throws clearly when no home is available.** Containers and jails without `HOME` / `USERPROFILE` previously fell through to a malformed path; now `Workspace.open()` surfaces a `PARAMETER_ERROR` directing the caller to set `WATIVE_WORKSPACE_PATH` or pass an explicit path.
|
|
101
|
+
- **`ENAMETOOLONG` on the on-disk path now returns `PROVIDER_IO`** with an actionable "relocate workspace closer to root" message, distinguishing OS-limit overflow from invalid input (slug length is already capped by the validator).
|
|
102
|
+
|
|
103
|
+
## [2.0.3] — 2026-05-04
|
|
104
|
+
|
|
105
|
+
### Changed
|
|
106
|
+
- **Default workspace path renamed** from `<cwd>/.wative` to `<cwd>/.wative2`. Existing on-disk workspaces under `.wative/` are not migrated automatically — pass the old path explicitly to `Workspace.open()` if you want to keep using one, or rename the directory.
|
|
107
|
+
- **`Workspace.open()` no-arg path now resolves through a 3-tier strategy:**
|
|
108
|
+
1. `WATIVE_WORKSPACE_PATH` env var (if set & non-empty) — wins unconditionally. `~` is expanded.
|
|
109
|
+
2. `<process.cwd()>/.wative2` — used when the env var is unset and the directory already exists on disk. Symlinks at this path are refused (fall through to home) to defend against attacker-controlled redirection on shared/multi-user systems.
|
|
110
|
+
3. `<os.homedir()>/.wative2` — last-resort fallback. Where `create=true` lands on a fresh machine when no env var is set and there's no project-local `.wative2/`.
|
|
111
|
+
|
|
112
|
+
Calls that pass an explicit path or `Provider` instance are unaffected — those short-circuit before any resolution.
|
|
113
|
+
|
|
114
|
+
### Security
|
|
115
|
+
- **Envelope v2 — Argon2id + AAD-bound on-disk records.** New seals use Argon2id (RFC 9106; t=3, m=64 MiB, p=1) and bind every record's GCM tag to its on-disk identity. HybridProvider records bind to `wative:v2:record:<recordType>:<slug>`; per-account mnemonic ciphertexts bind to `wative:v2:account:<slug>:mnemonic`; per-address private-key ciphertexts bind to `wative:v2:account:<slug>:wallet:<id>:<vm>:pk`; recovery envelopes bind to `wative:v2:recovery:account:<slug>`. Closes the blob-swap class of attack where an attacker with workspace-dir write access (but not the password) could substitute one record's ciphertext for another's. Legacy v1 records (PBKDF2-SHA256, no AAD) continue to read; new writes are always v2.
|
|
116
|
+
- **Slug-collision suffix now CSPRNG.** Was `Math.random()`; now `crypto.randomInt`. Prevents predictable filenames in `accounts/<slug>-<suffix>.db`.
|
|
117
|
+
- **`#seed` Buffer scrubbed before drop.** `Account.lock()` now `.fill(0)`s the BIP-39 seed Buffer before nulling the reference. JS string immutability still prevents perfect zeroization of mnemonic + plaintext private keys (documented on `Workspace.lock()`).
|
|
118
|
+
- **`useTestKdfIterations` Jest auto-detect removed.** The `typeof globalThis.expect !== "undefined"` opt-in arm fired in any downstream consumer using Jest, not just our own test process. Now requires explicit `WATIVE_ALLOW_TEST_KDF=1` (or `NODE_ENV=test`). Internal-only function; not on the package surface.
|
|
119
|
+
|
|
120
|
+
## [2.0.1] — 2026-04-29
|
|
121
|
+
|
|
122
|
+
First release of the v2 line.
|
|
123
|
+
|
|
124
|
+
### Added
|
|
125
|
+
- Seven domain classes — `Workspace`, `Account`, `Wallet`, `Address`, `Network`, `Asset`, `Transaction`. `Network`, `Asset`, `EvmTransaction`, and `SvmTransaction` accept both positional and object-form constructor arguments.
|
|
126
|
+
- HD (BIP-39 mnemonic) and PK (raw private key) account modes. Per-account or workspace-shared password.
|
|
127
|
+
- `EvmTransaction` and `SvmTransaction` with `TransactionTracker` lifecycle events (`change` / `confirmed` / `failed`) and lifecycle promises (`whenSubmitted` / `whenMined` / `whenConfirmed(blocks?)` / `whenFinalized`).
|
|
128
|
+
- 9 pre-loaded networks: ethereum, base, bnbchain, arbitrum, optimism, sepolia, solana, solana-testnet, solana-devnet.
|
|
129
|
+
- 23 pre-loaded tokens: native gas tokens for every network plus USDC and USDT on each EVM mainnet (BSC versions are 18-decimal Binance-Peg), WETH on ethereum, and USDC, USDT, WSOL on solana mainnet.
|
|
130
|
+
- Custom storage backends — third parties can extend the `Provider` base class and pass an instance to `Workspace.open()`. Default implementation is `HybridProvider` (encrypted files on local disk).
|
|
131
|
+
- Subpath imports `wative-core/artifacts/evm` and `wative-core/artifacts/svm` for heavier chain helpers.
|
|
132
|
+
- Both ESM and CJS builds with full TypeScript declaration files.
|
|
133
|
+
- `Token2022Program` support alongside the legacy SPL `TokenProgram` (extension instructions are out of scope).
|
|
134
|
+
- Workspace search via `workspace.filter("Account" | "Wallet" | "Address" | "Asset", query)`.
|
|
135
|
+
|
|
136
|
+
### Security
|
|
137
|
+
- Built-in networks and tokens cannot be dropped from the workspace (they would orphan accounts that reference them by default).
|
|
138
|
+
- Concurrent `addAsset` / `dropAsset` and network-collection mutations are serialized — no duplicate ids or slugs from interleaved calls.
|
|
139
|
+
- Hydrate-time guards reject corrupted records (duplicate asset ids or network slugs) at workspace open.
|
|
140
|
+
|
|
141
|
+
### Notes
|
|
142
|
+
- Requires Node.js 18.18+. The crypto and address-encoding paths are pure-JS via `@noble/hashes`, `@noble/curves`, and `bs58` — no native gyp build is needed for installation. Some chain helpers (`web3@1.7.x`, `@solana/web3.js`) and a few transitive deps (`ethereumjs-wallet`, `tweetnacl`) currently target Node and are loaded lazily on first use; full Deno / Bun / browser support is partial pending those upgrades.
|
|
143
|
+
- Source maps are not published. The npm package contains only compiled JavaScript and TypeScript declaration files. TypeScript source lives in a separate private repository.
|
|
144
|
+
|
|
145
|
+
[2.0.7]: https://github.com/braady/wative-core/releases/tag/v2.0.7
|
|
146
|
+
[2.0.3]: https://github.com/braady/wative-core/releases/tag/v2.0.3
|
|
147
|
+
[2.0.1]: https://github.com/braady/wative-core/releases/tag/v2.0.1
|
package/LICENSE
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Modified MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Brady <brady.c@hedgue.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 all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
Our only modification part is that, if the Software (or any derivative works
|
|
16
|
+
thereof) is used for any of your commercial products or services that have
|
|
17
|
+
more than 50,000 US dollars (or the equivalent in other currencies) in monthly
|
|
18
|
+
revenue, you shall prominently display "Wative" on the user interface of such
|
|
19
|
+
product or service.
|
|
20
|
+
|
|
21
|
+
For the purpose of the paragraph above:
|
|
22
|
+
|
|
23
|
+
a. "Monthly revenue" is measured per product or service, meaning the gross
|
|
24
|
+
revenue that the individual product or service incorporating the Software
|
|
25
|
+
generates in a calendar month — not the total revenue of the entity
|
|
26
|
+
operating it. An entity operating several products need only attribute
|
|
27
|
+
those products that individually cross the threshold.
|
|
28
|
+
|
|
29
|
+
b. "Prominently display" means the "Wative" label is visible to an ordinary
|
|
30
|
+
user in the normal course of using the product or service, without
|
|
31
|
+
requiring that user to open a settings pane, an "About" dialog, a licenses
|
|
32
|
+
screen, source code, or documentation. Placement, size and styling are
|
|
33
|
+
otherwise at your discretion.
|
|
34
|
+
|
|
35
|
+
c. For a product or service with no user interface — a backend service, an
|
|
36
|
+
API, a library, or a command-line tool — the requirement is satisfied by
|
|
37
|
+
displaying "Wative" in the product's public documentation, in its startup
|
|
38
|
+
or version output, or on an equivalent surface its users routinely see.
|
|
39
|
+
|
|
40
|
+
d. The obligation applies only while the product or service remains above the
|
|
41
|
+
threshold, and takes effect from the start of the calendar month following
|
|
42
|
+
the month in which the threshold is first crossed.
|
|
43
|
+
|
|
44
|
+
e. This requirement grants no other right in any trademark, service mark, or
|
|
45
|
+
logo of the copyright holder, and does not permit you to state or imply
|
|
46
|
+
that your product or service is endorsed by, affiliated with, or produced
|
|
47
|
+
by the copyright holder.
|
|
48
|
+
|
|
49
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
50
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
51
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
52
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
53
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
54
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
55
|
+
SOFTWARE.
|