kalvora.js 0.0.1-alpha.1 → 0.0.1-alpha.2
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 +41 -1
- package/README.md +5 -3
- package/dist/README.md +5 -3
- package/dist/index.cjs +1182 -342
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -6
- package/dist/proto/generated/guardian_pb.d.ts +216 -206
- package/dist/proto/generated/guardian_pb.js +50 -47
- package/dist/proto/guardian.proto +268 -266
- package/dist/src/coin-txn/index.d.ts +1 -1
- package/dist/src/coin-txn/index.d.ts.map +1 -1
- package/dist/src/coin-txn/index.js +1 -1
- package/dist/src/coin-txn/index.js.map +1 -1
- package/dist/src/contract/create/transaction.d.ts +4 -20
- package/dist/src/contract/create/transaction.d.ts.map +1 -1
- package/dist/src/contract/create/transaction.js +116 -20
- package/dist/src/contract/create/transaction.js.map +1 -1
- package/dist/src/contract/shared/types.d.ts +15 -4
- package/dist/src/contract/shared/types.d.ts.map +1 -1
- package/dist/src/contract/shared/utils.d.ts +0 -3
- package/dist/src/contract/shared/utils.d.ts.map +1 -1
- package/dist/src/contract/shared/utils.js +8 -0
- package/dist/src/contract/shared/utils.js.map +1 -1
- package/dist/src/items/guards.d.ts +18 -0
- package/dist/src/items/guards.d.ts.map +1 -0
- package/dist/src/items/guards.js +46 -0
- package/dist/src/items/guards.js.map +1 -0
- package/dist/src/items/index.d.ts +2 -1
- package/dist/src/items/index.d.ts.map +1 -1
- package/dist/src/items/index.js +2 -1
- package/dist/src/items/index.js.map +1 -1
- package/dist/src/items/item-fee.d.ts +9 -0
- package/dist/src/items/item-fee.d.ts.map +1 -0
- package/dist/src/items/item-fee.js +21 -0
- package/dist/src/items/item-fee.js.map +1 -0
- package/dist/src/items/transaction.d.ts +3 -0
- package/dist/src/items/transaction.d.ts.map +1 -1
- package/dist/src/items/transaction.js +60 -14
- package/dist/src/items/transaction.js.map +1 -1
- package/dist/src/mint/index.d.ts +1 -1
- package/dist/src/mint/index.d.ts.map +1 -1
- package/dist/src/mint/index.js +1 -1
- package/dist/src/mint/index.js.map +1 -1
- package/dist/src/mint/transaction.d.ts +3 -1
- package/dist/src/mint/transaction.d.ts.map +1 -1
- package/dist/src/mint/transaction.js +37 -2
- package/dist/src/mint/transaction.js.map +1 -1
- package/dist/src/proposal/governance.d.ts +46 -0
- package/dist/src/proposal/governance.d.ts.map +1 -0
- package/dist/src/proposal/governance.js +94 -0
- package/dist/src/proposal/governance.js.map +1 -0
- package/dist/src/proposal/index.d.ts +2 -0
- package/dist/src/proposal/index.d.ts.map +1 -1
- package/dist/src/proposal/index.js +2 -0
- package/dist/src/proposal/index.js.map +1 -1
- package/dist/src/proposal/shape.d.ts +29 -0
- package/dist/src/proposal/shape.d.ts.map +1 -0
- package/dist/src/proposal/shape.js +82 -0
- package/dist/src/proposal/shape.js.map +1 -0
- package/dist/src/protocol/contract-id.d.ts +107 -0
- package/dist/src/protocol/contract-id.d.ts.map +1 -0
- package/dist/src/protocol/contract-id.js +224 -0
- package/dist/src/protocol/contract-id.js.map +1 -0
- package/dist/src/protocol/guardian-names.d.ts +13 -14
- package/dist/src/protocol/guardian-names.d.ts.map +1 -1
- package/dist/src/protocol/guardian-names.js +7 -8
- package/dist/src/protocol/guardian-names.js.map +1 -1
- package/dist/src/protocol/index.d.ts +4 -4
- package/dist/src/protocol/index.js +4 -4
- package/dist/src/query/api-client.d.ts +16 -1
- package/dist/src/query/api-client.d.ts.map +1 -1
- package/dist/src/query/api-client.js +38 -9
- package/dist/src/query/api-client.js.map +1 -1
- package/dist/src/query/decoders.d.ts +2 -0
- package/dist/src/query/decoders.d.ts.map +1 -1
- package/dist/src/query/decoders.js +3 -1
- package/dist/src/query/decoders.js.map +1 -1
- package/dist/src/query/events.d.ts +39 -0
- package/dist/src/query/events.d.ts.map +1 -0
- package/dist/src/query/events.js +78 -0
- package/dist/src/query/events.js.map +1 -0
- package/dist/src/query/guardian-client.js +2 -2
- package/dist/src/query/guardian-client.js.map +1 -1
- package/dist/src/query/index.d.ts +2 -0
- package/dist/src/query/index.d.ts.map +1 -1
- package/dist/src/query/index.js +2 -0
- package/dist/src/query/index.js.map +1 -1
- package/dist/src/query/keys.d.ts +12 -0
- package/dist/src/query/keys.d.ts.map +1 -0
- package/dist/src/query/keys.js +44 -0
- package/dist/src/query/keys.js.map +1 -0
- package/dist/src/revoke/index.d.ts +1 -1
- package/dist/src/revoke/index.d.ts.map +1 -1
- package/dist/src/revoke/index.js +1 -1
- package/dist/src/revoke/index.js.map +1 -1
- package/dist/src/revoke/transaction.d.ts +9 -12
- package/dist/src/revoke/transaction.d.ts.map +1 -1
- package/dist/src/revoke/transaction.js +8 -9
- package/dist/src/revoke/transaction.js.map +1 -1
- package/dist/src/shared/fee-calculators/universal-fee-calculator.d.ts.map +1 -1
- package/dist/src/shared/fee-calculators/universal-fee-calculator.js +64 -29
- package/dist/src/shared/fee-calculators/universal-fee-calculator.js.map +1 -1
- package/dist/src/shared/network/constants.d.ts +7 -7
- package/dist/src/shared/network/constants.d.ts.map +1 -1
- package/dist/src/shared/network/constants.js +9 -10
- package/dist/src/shared/network/constants.js.map +1 -1
- package/dist/src/shared/tx/standard.d.ts +7 -2
- package/dist/src/shared/tx/standard.d.ts.map +1 -1
- package/dist/src/shared/tx/standard.js +22 -2
- package/dist/src/shared/tx/standard.js.map +1 -1
- package/dist/src/smart-contracts/use-cases/bridge/guardian/vaa.js +5 -5
- package/dist/src/smart-contracts/use-cases/bridge/guardian/vaa.js.map +1 -1
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/release.js +2 -2
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/release.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,47 @@ All notable changes to this project are documented here. The format follows
|
|
|
5
5
|
[Semantic Versioning](https://semver.org/). While the version is `0.0.x`, any
|
|
6
6
|
release may change APIs; pin an exact version.
|
|
7
7
|
|
|
8
|
-
## [0.0.1-alpha.
|
|
8
|
+
## [0.0.1-alpha.2] — 2026-10-01
|
|
9
|
+
|
|
10
|
+
Checksummed contract IDs, executable governance proposals, and the re-issued
|
|
11
|
+
`kal_guardian` proto.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- **Breaking:** `guardian.proto` is updated to the re-issued bridge guardian
|
|
16
|
+
proto. Its package is now `kal_guardian`, so `GuardianService.typeName` and
|
|
17
|
+
`KalvoraRpcError.service` for guardian calls are
|
|
18
|
+
`kal_guardian.GuardianService`; callers passing their own `transport` send
|
|
19
|
+
`/kal_guardian.GuardianService/*` (the default transport still sends the
|
|
20
|
+
Envoy alias `/guardian/*`). The generated Kalvora-side names drop the former
|
|
21
|
+
network name: messages `KalPayload`, `KalContractPayload`, `KalMintPayload`,
|
|
22
|
+
`KalReleasePayload`, `KalRefundPayload`; fields `kalContractId`,
|
|
23
|
+
`kalWalletAddress`, `kalKey`, `kalPayloads`, `kalPayload`. `NETWORK_TYPE`
|
|
24
|
+
gains `KALVORA` (`0`), `ETHEREUM` (`2`) and `ZERA` (`3`).
|
|
25
|
+
`NETWORK_TYPE_KALVORA` is unchanged (`0`); `GUARDIAN_KALVORA_PAYLOAD_CASE`
|
|
26
|
+
is now `'kalPayload'`. The `KalvoraGuardian*Payload` aliases keep working.
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- Contract-id helpers: `deriveGenesisContractId`, `deriveOrdinaryContractId`,
|
|
31
|
+
`deriveContractDataHash`, `encodeContractId`, `isCanonicalContractId`,
|
|
32
|
+
`decodeContractId`, `GENESIS_CONTRACT_IDS`, and `GENESIS_CONTRACT_NONCES`.
|
|
33
|
+
`buildContractTXN` derives the id from `vanityNonce`. See
|
|
34
|
+
[Contract IDs](./docs/guides/contract-ids.md).
|
|
35
|
+
- `buildGovernanceProposalTXN` (`buildGovernanceProposal`) for proposals that
|
|
36
|
+
carry transactions, plus `applyProposalStageFee` and
|
|
37
|
+
`FORBIDDEN_OPTION_WORDS`. Usage, including a coin transfer attachment, is
|
|
38
|
+
in [src/proposal/README.md](./src/proposal/README.md).
|
|
39
|
+
- Query helpers: `getContractItem`, `acceptSmartContractEvent`,
|
|
40
|
+
`verifySmartContractEventSignature`, `nextSmartContractEventSearchStart`.
|
|
41
|
+
`getContractSupply` also returns `circulation`.
|
|
42
|
+
- `itemFeeParts` and `parseUint256`. Builder aliases `buildCoinTransfer`,
|
|
43
|
+
`buildInstrumentContract`, `buildItemMint`, `buildNftTransfer`,
|
|
44
|
+
`buildSbtBurn`, `buildRevoke`, and signed `buildMint`.
|
|
45
|
+
- The 2026-09-30 SDK audit is recorded in
|
|
46
|
+
[docs/audit-2026-09-30.md](./docs/audit-2026-09-30.md).
|
|
47
|
+
|
|
48
|
+
## [0.0.1-alpha.1] — 2026-09-29
|
|
9
49
|
|
|
10
50
|
Documentation cleanup, a rewritten README, and a few SDK-only renames. Key
|
|
11
51
|
derivation and every derived address are byte-identical to 0.0.1-alpha.0.
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ unsigned bytes to a browser wallet, a WalletConnect session, a hardware device
|
|
|
22
22
|
or any signer you write.
|
|
23
23
|
|
|
24
24
|
> **Alpha.** The version is `0.0.x`, and any release may change any API. Pin an
|
|
25
|
-
> exact version (`npm install kalvora.js@0.0.1-alpha.
|
|
25
|
+
> exact version (`npm install kalvora.js@0.0.1-alpha.2`), test on protonet
|
|
26
26
|
> before anything touches real funds, and please
|
|
27
27
|
> [report issues](https://github.com/IntoTheDerk/kalvora.js/issues).
|
|
28
28
|
|
|
@@ -194,7 +194,7 @@ const kalvora = new KalvoraClient(); // or { grpc: { endpoint: '
|
|
|
194
194
|
await kalvora.query.getNextNonce(address); // bigint
|
|
195
195
|
await kalvora.query.getBalance(address, contractId); // { balance, denomination, rate }
|
|
196
196
|
await kalvora.query.getContract(contractId); // { contract, timestamp, validatorPublicKey }
|
|
197
|
-
await kalvora.query.getContractSupply(contractId); // { maxSupply, currentSupply }
|
|
197
|
+
await kalvora.query.getContractSupply(contractId); // { maxSupply, currentSupply, circulation }
|
|
198
198
|
await kalvora.getLatestBlockHeight(); // bigint, cached height hint
|
|
199
199
|
|
|
200
200
|
try {
|
|
@@ -305,7 +305,7 @@ strings shared with wallet apps are exported as constants
|
|
|
305
305
|
| Default endpoint | `https://kal-proto.visiondynamics.ch` (gRPC-Web over HTTPS, port 443; `KALVORA_PROTONET_ENDPOINT`) |
|
|
306
306
|
| Network preset | `KALVORA_NETWORKS.protonet` (the `KalvoraClient` default) |
|
|
307
307
|
| HD path | `m/44'/5258'/account'/change'/address'` (SLIP-44 coin type `5258`, every segment hardened; [derivation spec](./docs/guides/hd-derivation.md)) |
|
|
308
|
-
| Protobuf packages | `kal_txn`, `kal_api`, `kal_validator` (official Kalvora protos);
|
|
308
|
+
| Protobuf packages | `kal_txn`, `kal_api`, `kal_validator` (official Kalvora protos); `kal_guardian` (bridge guardian service) |
|
|
309
309
|
|
|
310
310
|
## Documentation
|
|
311
311
|
|
|
@@ -314,7 +314,9 @@ strings shared with wallet apps are exported as constants
|
|
|
314
314
|
| [Getting started](./docs/guides/getting-started.md) | Wallets, connecting, sending, external signers, errors |
|
|
315
315
|
| [HD derivation](./docs/guides/hd-derivation.md) | Exact key derivation for Ed25519 (SLIP-0010) and Ed448, reference vectors |
|
|
316
316
|
| [Transactions](./docs/guides/transactions.md) | Every transaction type, required permissions, shared options |
|
|
317
|
+
| [Contract IDs](./docs/guides/contract-ids.md) | Checksummed Base58 ids, genesis ids, deriving an id while creating a contract |
|
|
317
318
|
| [Querying](./docs/guides/querying.md) | Query clients, blocks, results, events, guardian payloads, raw access |
|
|
319
|
+
| [Proposals](./src/proposal/README.md) | Text proposals and proposals that execute a coin transfer |
|
|
318
320
|
| [Architecture](./docs/guides/architecture.md) | Layers, transport, signing, protocol sync, tests |
|
|
319
321
|
| [Wallet adapters](./docs/adapter-integration-guide.md) | Injected wallets, deep links, WalletConnect, protocol constants |
|
|
320
322
|
| [CHANGELOG](./CHANGELOG.md) | Every release, with breaking changes marked |
|
package/dist/README.md
CHANGED
|
@@ -22,7 +22,7 @@ unsigned bytes to a browser wallet, a WalletConnect session, a hardware device
|
|
|
22
22
|
or any signer you write.
|
|
23
23
|
|
|
24
24
|
> **Alpha.** The version is `0.0.x`, and any release may change any API. Pin an
|
|
25
|
-
> exact version (`npm install kalvora.js@0.0.1-alpha.
|
|
25
|
+
> exact version (`npm install kalvora.js@0.0.1-alpha.2`), test on protonet
|
|
26
26
|
> before anything touches real funds, and please
|
|
27
27
|
> [report issues](https://github.com/IntoTheDerk/kalvora.js/issues).
|
|
28
28
|
|
|
@@ -194,7 +194,7 @@ const kalvora = new KalvoraClient(); // or { grpc: { endpoint: '
|
|
|
194
194
|
await kalvora.query.getNextNonce(address); // bigint
|
|
195
195
|
await kalvora.query.getBalance(address, contractId); // { balance, denomination, rate }
|
|
196
196
|
await kalvora.query.getContract(contractId); // { contract, timestamp, validatorPublicKey }
|
|
197
|
-
await kalvora.query.getContractSupply(contractId); // { maxSupply, currentSupply }
|
|
197
|
+
await kalvora.query.getContractSupply(contractId); // { maxSupply, currentSupply, circulation }
|
|
198
198
|
await kalvora.getLatestBlockHeight(); // bigint, cached height hint
|
|
199
199
|
|
|
200
200
|
try {
|
|
@@ -305,7 +305,7 @@ strings shared with wallet apps are exported as constants
|
|
|
305
305
|
| Default endpoint | `https://kal-proto.visiondynamics.ch` (gRPC-Web over HTTPS, port 443; `KALVORA_PROTONET_ENDPOINT`) |
|
|
306
306
|
| Network preset | `KALVORA_NETWORKS.protonet` (the `KalvoraClient` default) |
|
|
307
307
|
| HD path | `m/44'/5258'/account'/change'/address'` (SLIP-44 coin type `5258`, every segment hardened; [derivation spec](./docs/guides/hd-derivation.md)) |
|
|
308
|
-
| Protobuf packages | `kal_txn`, `kal_api`, `kal_validator` (official Kalvora protos);
|
|
308
|
+
| Protobuf packages | `kal_txn`, `kal_api`, `kal_validator` (official Kalvora protos); `kal_guardian` (bridge guardian service) |
|
|
309
309
|
|
|
310
310
|
## Documentation
|
|
311
311
|
|
|
@@ -314,7 +314,9 @@ strings shared with wallet apps are exported as constants
|
|
|
314
314
|
| [Getting started](./docs/guides/getting-started.md) | Wallets, connecting, sending, external signers, errors |
|
|
315
315
|
| [HD derivation](./docs/guides/hd-derivation.md) | Exact key derivation for Ed25519 (SLIP-0010) and Ed448, reference vectors |
|
|
316
316
|
| [Transactions](./docs/guides/transactions.md) | Every transaction type, required permissions, shared options |
|
|
317
|
+
| [Contract IDs](./docs/guides/contract-ids.md) | Checksummed Base58 ids, genesis ids, deriving an id while creating a contract |
|
|
317
318
|
| [Querying](./docs/guides/querying.md) | Query clients, blocks, results, events, guardian payloads, raw access |
|
|
319
|
+
| [Proposals](./src/proposal/README.md) | Text proposals and proposals that execute a coin transfer |
|
|
318
320
|
| [Architecture](./docs/guides/architecture.md) | Layers, transport, signing, protocol sync, tests |
|
|
319
321
|
| [Wallet adapters](./docs/adapter-integration-guide.md) | Injected wallets, deep links, WalletConnect, protocol constants |
|
|
320
322
|
| [CHANGELOG](./CHANGELOG.md) | Every release, with breaking changes marked |
|