@ottochain/sdk 0.2.0
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/README.md +305 -0
- package/dist/apps/contracts/index.d.ts +21 -0
- package/dist/apps/contracts/index.js +39 -0
- package/dist/apps/contracts/types.d.ts +24 -0
- package/dist/apps/contracts/types.js +48 -0
- package/dist/apps/identity/index.d.ts +22 -0
- package/dist/apps/identity/index.js +40 -0
- package/dist/apps/identity/types.d.ts +30 -0
- package/dist/apps/identity/types.js +53 -0
- package/dist/apps/index.d.ts +29 -0
- package/dist/apps/index.js +60 -0
- package/dist/apps/markets/index.d.ts +26 -0
- package/dist/apps/markets/index.js +46 -0
- package/dist/apps/markets/types.d.ts +185 -0
- package/dist/apps/markets/types.js +252 -0
- package/dist/apps/oracles/index.d.ts +26 -0
- package/dist/apps/oracles/index.js +46 -0
- package/dist/apps/oracles/types.d.ts +211 -0
- package/dist/apps/oracles/types.js +306 -0
- package/dist/cjs/apps/contracts/index.js +60 -0
- package/dist/cjs/apps/contracts/state-machines/contract.json +420 -0
- package/dist/cjs/apps/contracts/state-machines/escrow.json +426 -0
- package/dist/cjs/apps/contracts/types.js +48 -0
- package/dist/cjs/apps/corporate/index.js +112 -0
- package/dist/cjs/apps/corporate/state-machines/corporate-board.json +1064 -0
- package/dist/cjs/apps/corporate/state-machines/corporate-bylaws.json +751 -0
- package/dist/cjs/apps/corporate/state-machines/corporate-committee.json +957 -0
- package/dist/cjs/apps/corporate/state-machines/corporate-compliance.json +1293 -0
- package/dist/cjs/apps/corporate/state-machines/corporate-entity.json +861 -0
- package/dist/cjs/apps/corporate/state-machines/corporate-officers.json +843 -0
- package/dist/cjs/apps/corporate/state-machines/corporate-proxy.json +783 -0
- package/dist/cjs/apps/corporate/state-machines/corporate-resolution.json +1174 -0
- package/dist/cjs/apps/corporate/state-machines/corporate-securities.json +1215 -0
- package/dist/cjs/apps/corporate/state-machines/corporate-shareholders.json +1298 -0
- package/dist/cjs/apps/corporate/types.js +44 -0
- package/dist/cjs/apps/governance/index.js +203 -0
- package/dist/cjs/apps/governance/state-machines/dao-multisig.json +711 -0
- package/dist/cjs/apps/governance/state-machines/dao-single.json +258 -0
- package/dist/cjs/apps/governance/state-machines/dao-threshold.json +660 -0
- package/dist/cjs/apps/governance/state-machines/dao-token.json +680 -0
- package/dist/cjs/apps/governance/state-machines/governance-constitution.json +401 -0
- package/dist/cjs/apps/governance/state-machines/governance-executive.json +441 -0
- package/dist/cjs/apps/governance/state-machines/governance-judiciary.json +626 -0
- package/dist/cjs/apps/governance/state-machines/governance-legislature.json +726 -0
- package/dist/cjs/apps/governance/state-machines/governance-simple.json +679 -0
- package/dist/cjs/apps/governance/types.js +42 -0
- package/dist/cjs/apps/identity/constants.js +58 -0
- package/dist/cjs/apps/identity/index.js +78 -0
- package/dist/cjs/apps/identity/state-machines/agent-identity.json +320 -0
- package/dist/cjs/apps/identity/types.js +53 -0
- package/dist/cjs/apps/index.js +58 -0
- package/dist/cjs/apps/markets/index.js +55 -0
- package/dist/cjs/apps/markets/state-machines/market-universal.json +354 -0
- package/dist/cjs/apps/markets/types.js +219 -0
- package/dist/cjs/apps/oracles/index.js +62 -0
- package/dist/cjs/apps/oracles/state-machines/oracle.json +452 -0
- package/dist/cjs/apps/oracles/types.js +282 -0
- package/dist/cjs/errors.js +293 -0
- package/dist/cjs/generated/google/protobuf/struct.js +514 -0
- package/dist/cjs/generated/google/protobuf/timestamp.js +92 -0
- package/dist/cjs/generated/index.js +150 -0
- package/dist/cjs/generated/ottochain/apps/contracts/v1/contract.js +873 -0
- package/dist/cjs/generated/ottochain/apps/contracts/v1/contract_pb.js +100 -0
- package/dist/cjs/generated/ottochain/apps/corporate/v1/corporate.js +4515 -0
- package/dist/cjs/generated/ottochain/apps/corporate/v1/corporate_pb.js +392 -0
- package/dist/cjs/generated/ottochain/apps/governance/v1/governance.js +3255 -0
- package/dist/cjs/generated/ottochain/apps/governance/v1/governance_pb.js +235 -0
- package/dist/cjs/generated/ottochain/apps/identity/v1/agent.js +619 -0
- package/dist/cjs/generated/ottochain/apps/identity/v1/agent_pb.js +116 -0
- package/dist/cjs/generated/ottochain/apps/identity/v1/attestation.js +780 -0
- package/dist/cjs/generated/ottochain/apps/identity/v1/attestation_pb.js +79 -0
- package/dist/cjs/generated/ottochain/apps/markets/v1/market.js +1261 -0
- package/dist/cjs/generated/ottochain/apps/markets/v1/market_pb.js +151 -0
- package/dist/cjs/generated/ottochain/apps/oracles/v1/oracle.js +1223 -0
- package/dist/cjs/generated/ottochain/apps/oracles/v1/oracle_pb.js +109 -0
- package/dist/cjs/generated/ottochain/v1/common.js +10 -0
- package/dist/cjs/generated/ottochain/v1/common_pb.js +37 -0
- package/dist/cjs/generated/ottochain/v1/fiber.js +1057 -0
- package/dist/cjs/generated/ottochain/v1/fiber_pb.js +86 -0
- package/dist/cjs/generated/ottochain/v1/messages.js +740 -0
- package/dist/cjs/generated/ottochain/v1/messages_pb.js +44 -0
- package/dist/cjs/generated/ottochain/v1/records.js +1253 -0
- package/dist/cjs/generated/ottochain/v1/records_pb.js +44 -0
- package/dist/cjs/index.js +79 -0
- package/dist/cjs/metakit/binary.js +58 -0
- package/dist/cjs/metakit/canonicalize.js +40 -0
- package/dist/cjs/metakit/codec.js +45 -0
- package/dist/cjs/metakit/currency-transaction.js +319 -0
- package/dist/cjs/metakit/currency-types.js +13 -0
- package/dist/cjs/metakit/hash.js +84 -0
- package/dist/cjs/metakit/index.js +74 -0
- package/dist/cjs/metakit/network/client.js +78 -0
- package/dist/cjs/metakit/network/currency-l1-client.js +101 -0
- package/dist/cjs/metakit/network/data-l1-client.js +76 -0
- package/dist/cjs/metakit/network/index.js +16 -0
- package/dist/cjs/metakit/network/types.js +20 -0
- package/dist/cjs/metakit/sign.js +120 -0
- package/dist/cjs/metakit/signed-object.js +100 -0
- package/dist/cjs/metakit/types.js +14 -0
- package/dist/cjs/metakit/verify.js +217 -0
- package/dist/cjs/metakit/wallet.js +127 -0
- package/dist/cjs/ottochain/index.js +47 -0
- package/dist/cjs/ottochain/metagraph-client.js +157 -0
- package/dist/cjs/ottochain/snapshot.js +110 -0
- package/dist/cjs/ottochain/types.js +11 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/types.js +25 -0
- package/dist/cjs/validation.js +312 -0
- package/dist/errors.d.ts +221 -0
- package/dist/errors.js +293 -0
- package/dist/esm/apps/contracts/index.js +42 -0
- package/dist/esm/apps/contracts/state-machines/contract.json +420 -0
- package/dist/esm/apps/contracts/state-machines/escrow.json +426 -0
- package/dist/esm/apps/contracts/types.js +44 -0
- package/dist/esm/apps/corporate/index.js +57 -0
- package/dist/esm/apps/corporate/state-machines/corporate-board.json +1064 -0
- package/dist/esm/apps/corporate/state-machines/corporate-bylaws.json +751 -0
- package/dist/esm/apps/corporate/state-machines/corporate-committee.json +957 -0
- package/dist/esm/apps/corporate/state-machines/corporate-compliance.json +1293 -0
- package/dist/esm/apps/corporate/state-machines/corporate-entity.json +861 -0
- package/dist/esm/apps/corporate/state-machines/corporate-officers.json +843 -0
- package/dist/esm/apps/corporate/state-machines/corporate-proxy.json +783 -0
- package/dist/esm/apps/corporate/state-machines/corporate-resolution.json +1174 -0
- package/dist/esm/apps/corporate/state-machines/corporate-securities.json +1215 -0
- package/dist/esm/apps/corporate/state-machines/corporate-shareholders.json +1298 -0
- package/dist/esm/apps/corporate/types.js +38 -0
- package/dist/esm/apps/governance/index.js +154 -0
- package/dist/esm/apps/governance/state-machines/dao-multisig.json +711 -0
- package/dist/esm/apps/governance/state-machines/dao-single.json +258 -0
- package/dist/esm/apps/governance/state-machines/dao-threshold.json +660 -0
- package/dist/esm/apps/governance/state-machines/dao-token.json +680 -0
- package/dist/esm/apps/governance/state-machines/governance-constitution.json +401 -0
- package/dist/esm/apps/governance/state-machines/governance-executive.json +441 -0
- package/dist/esm/apps/governance/state-machines/governance-judiciary.json +626 -0
- package/dist/esm/apps/governance/state-machines/governance-legislature.json +726 -0
- package/dist/esm/apps/governance/state-machines/governance-simple.json +679 -0
- package/dist/esm/apps/governance/types.js +35 -0
- package/dist/esm/apps/identity/constants.js +53 -0
- package/dist/esm/apps/identity/index.js +50 -0
- package/dist/esm/apps/identity/state-machines/agent-identity.json +320 -0
- package/dist/esm/apps/identity/types.js +50 -0
- package/dist/esm/apps/index.js +32 -0
- package/dist/esm/apps/markets/index.js +34 -0
- package/dist/esm/apps/markets/state-machines/market-universal.json +354 -0
- package/dist/esm/apps/markets/types.js +206 -0
- package/dist/esm/apps/oracles/index.js +42 -0
- package/dist/esm/apps/oracles/state-machines/oracle.json +452 -0
- package/dist/esm/apps/oracles/types.js +267 -0
- package/dist/esm/errors.js +283 -0
- package/dist/esm/generated/google/protobuf/struct.js +508 -0
- package/dist/esm/generated/google/protobuf/timestamp.js +89 -0
- package/dist/esm/generated/index.js +26 -0
- package/dist/esm/generated/ottochain/apps/contracts/v1/contract.js +867 -0
- package/dist/esm/generated/ottochain/apps/contracts/v1/contract_pb.js +97 -0
- package/dist/esm/generated/ottochain/apps/corporate/v1/corporate.js +4493 -0
- package/dist/esm/generated/ottochain/apps/corporate/v1/corporate_pb.js +389 -0
- package/dist/esm/generated/ottochain/apps/governance/v1/governance.js +3240 -0
- package/dist/esm/generated/ottochain/apps/governance/v1/governance_pb.js +232 -0
- package/dist/esm/generated/ottochain/apps/identity/v1/agent.js +610 -0
- package/dist/esm/generated/ottochain/apps/identity/v1/agent_pb.js +113 -0
- package/dist/esm/generated/ottochain/apps/identity/v1/attestation.js +774 -0
- package/dist/esm/generated/ottochain/apps/identity/v1/attestation_pb.js +76 -0
- package/dist/esm/generated/ottochain/apps/markets/v1/market.js +1252 -0
- package/dist/esm/generated/ottochain/apps/markets/v1/market_pb.js +148 -0
- package/dist/esm/generated/ottochain/apps/oracles/v1/oracle.js +1217 -0
- package/dist/esm/generated/ottochain/apps/oracles/v1/oracle_pb.js +106 -0
- package/dist/esm/generated/ottochain/v1/common.js +7 -0
- package/dist/esm/generated/ottochain/v1/common_pb.js +34 -0
- package/dist/esm/generated/ottochain/v1/fiber.js +1051 -0
- package/dist/esm/generated/ottochain/v1/fiber_pb.js +83 -0
- package/dist/esm/generated/ottochain/v1/messages.js +737 -0
- package/dist/esm/generated/ottochain/v1/messages_pb.js +41 -0
- package/dist/esm/generated/ottochain/v1/records.js +1250 -0
- package/dist/esm/generated/ottochain/v1/records_pb.js +41 -0
- package/dist/esm/index.js +33 -0
- package/dist/esm/metakit/binary.js +53 -0
- package/dist/esm/metakit/canonicalize.js +33 -0
- package/dist/esm/metakit/codec.js +38 -0
- package/dist/esm/metakit/currency-transaction.js +306 -0
- package/dist/esm/metakit/currency-types.js +10 -0
- package/dist/esm/metakit/hash.js +77 -0
- package/dist/esm/metakit/index.js +30 -0
- package/dist/esm/metakit/network/client.js +74 -0
- package/dist/esm/metakit/network/currency-l1-client.js +97 -0
- package/dist/esm/metakit/network/data-l1-client.js +72 -0
- package/dist/esm/metakit/network/index.js +9 -0
- package/dist/esm/metakit/network/types.js +16 -0
- package/dist/esm/metakit/sign.js +114 -0
- package/dist/esm/metakit/signed-object.js +94 -0
- package/dist/esm/metakit/types.js +11 -0
- package/dist/esm/metakit/verify.js +210 -0
- package/dist/esm/metakit/wallet.js +117 -0
- package/dist/esm/ottochain/index.js +13 -0
- package/dist/esm/ottochain/metagraph-client.js +153 -0
- package/dist/esm/ottochain/snapshot.js +100 -0
- package/dist/esm/ottochain/types.js +10 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/types.js +20 -0
- package/dist/esm/validation.js +301 -0
- package/dist/generated/index.d.ts +15 -0
- package/dist/generated/index.js +34 -0
- package/dist/generated/ottochain/apps/contracts/v1/contract_pb.d.ts +274 -0
- package/dist/generated/ottochain/apps/contracts/v1/contract_pb.js +100 -0
- package/dist/generated/ottochain/apps/identity/v1/agent_pb.d.ts +211 -0
- package/dist/generated/ottochain/apps/identity/v1/agent_pb.js +116 -0
- package/dist/generated/ottochain/apps/identity/v1/attestation_pb.d.ts +238 -0
- package/dist/generated/ottochain/apps/identity/v1/attestation_pb.js +79 -0
- package/dist/generated/ottochain/apps/markets/v1/market_pb.d.ts +436 -0
- package/dist/generated/ottochain/apps/markets/v1/market_pb.js +151 -0
- package/dist/generated/ottochain/apps/oracles/v1/oracle_pb.d.ts +393 -0
- package/dist/generated/ottochain/apps/oracles/v1/oracle_pb.js +109 -0
- package/dist/generated/ottochain/v1/common_pb.d.ts +86 -0
- package/dist/generated/ottochain/v1/common_pb.js +37 -0
- package/dist/generated/ottochain/v1/fiber_pb.d.ts +292 -0
- package/dist/generated/ottochain/v1/fiber_pb.js +86 -0
- package/dist/generated/ottochain/v1/messages_pb.d.ts +190 -0
- package/dist/generated/ottochain/v1/messages_pb.js +44 -0
- package/dist/generated/ottochain/v1/records_pb.d.ts +221 -0
- package/dist/generated/ottochain/v1/records_pb.js +44 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +77 -0
- package/dist/metakit/binary.d.ts +38 -0
- package/dist/metakit/binary.js +58 -0
- package/dist/metakit/canonicalize.d.ts +26 -0
- package/dist/metakit/canonicalize.js +40 -0
- package/dist/metakit/codec.d.ts +16 -0
- package/dist/metakit/codec.js +45 -0
- package/dist/metakit/currency-transaction.d.ts +157 -0
- package/dist/metakit/currency-transaction.js +319 -0
- package/dist/metakit/currency-types.d.ts +55 -0
- package/dist/metakit/currency-types.js +13 -0
- package/dist/metakit/hash.d.ts +50 -0
- package/dist/metakit/hash.js +84 -0
- package/dist/metakit/index.d.ts +23 -0
- package/dist/metakit/index.js +74 -0
- package/dist/metakit/network/client.d.ts +23 -0
- package/dist/metakit/network/client.js +78 -0
- package/dist/metakit/network/currency-l1-client.d.ts +71 -0
- package/dist/metakit/network/currency-l1-client.js +101 -0
- package/dist/metakit/network/data-l1-client.d.ts +57 -0
- package/dist/metakit/network/data-l1-client.js +76 -0
- package/dist/metakit/network/index.d.ts +10 -0
- package/dist/metakit/network/index.js +16 -0
- package/dist/metakit/network/types.d.ts +74 -0
- package/dist/metakit/network/types.js +20 -0
- package/dist/metakit/sign.d.ts +65 -0
- package/dist/metakit/sign.js +120 -0
- package/dist/metakit/signed-object.d.ts +66 -0
- package/dist/metakit/signed-object.js +100 -0
- package/dist/metakit/types.d.ts +67 -0
- package/dist/metakit/types.js +14 -0
- package/dist/metakit/verify.d.ts +55 -0
- package/dist/metakit/verify.js +217 -0
- package/dist/metakit/wallet.d.ts +70 -0
- package/dist/metakit/wallet.js +127 -0
- package/dist/ottochain/index.d.ts +13 -0
- package/dist/ottochain/index.js +45 -0
- package/dist/ottochain/metagraph-client.d.ts +111 -0
- package/dist/ottochain/metagraph-client.js +157 -0
- package/dist/ottochain/snapshot.d.ts +86 -0
- package/dist/ottochain/snapshot.js +110 -0
- package/dist/ottochain/types.d.ts +278 -0
- package/dist/ottochain/types.js +11 -0
- package/dist/types/apps/contracts/index.d.ts +30 -0
- package/dist/types/apps/contracts/types.d.ts +24 -0
- package/dist/types/apps/corporate/index.d.ts +27 -0
- package/dist/types/apps/corporate/types.d.ts +9861 -0
- package/dist/types/apps/governance/index.d.ts +77 -0
- package/dist/types/apps/governance/types.d.ts +344 -0
- package/dist/types/apps/identity/constants.d.ts +27 -0
- package/dist/types/apps/identity/index.d.ts +39 -0
- package/dist/types/apps/identity/types.d.ts +30 -0
- package/dist/types/apps/index.d.ts +31 -0
- package/dist/types/apps/markets/index.d.ts +26 -0
- package/dist/types/apps/markets/types.d.ts +155 -0
- package/dist/types/apps/oracles/index.d.ts +34 -0
- package/dist/types/apps/oracles/types.d.ts +193 -0
- package/dist/types/errors.d.ts +221 -0
- package/dist/types/generated/google/protobuf/struct.d.ts +134 -0
- package/dist/types/generated/google/protobuf/timestamp.d.ts +134 -0
- package/dist/types/generated/index.d.ts +18 -0
- package/dist/types/generated/ottochain/apps/contracts/v1/contract.d.ts +112 -0
- package/dist/types/generated/ottochain/apps/contracts/v1/contract_pb.d.ts +274 -0
- package/dist/types/generated/ottochain/apps/corporate/v1/corporate.d.ts +376 -0
- package/dist/types/generated/ottochain/apps/corporate/v1/corporate_pb.d.ts +1172 -0
- package/dist/types/generated/ottochain/apps/governance/v1/governance.d.ts +296 -0
- package/dist/types/generated/ottochain/apps/governance/v1/governance_pb.d.ts +772 -0
- package/dist/types/generated/ottochain/apps/identity/v1/agent.d.ts +94 -0
- package/dist/types/generated/ottochain/apps/identity/v1/agent_pb.d.ts +211 -0
- package/dist/types/generated/ottochain/apps/identity/v1/attestation.d.ts +102 -0
- package/dist/types/generated/ottochain/apps/identity/v1/attestation_pb.d.ts +238 -0
- package/dist/types/generated/ottochain/apps/markets/v1/market.d.ts +174 -0
- package/dist/types/generated/ottochain/apps/markets/v1/market_pb.d.ts +436 -0
- package/dist/types/generated/ottochain/apps/oracles/v1/oracle.d.ts +150 -0
- package/dist/types/generated/ottochain/apps/oracles/v1/oracle_pb.d.ts +393 -0
- package/dist/types/generated/ottochain/v1/common.d.ts +1 -0
- package/dist/types/generated/ottochain/v1/common_pb.d.ts +86 -0
- package/dist/types/generated/ottochain/v1/fiber.d.ts +130 -0
- package/dist/types/generated/ottochain/v1/fiber_pb.d.ts +292 -0
- package/dist/types/generated/ottochain/v1/messages.d.ts +89 -0
- package/dist/types/generated/ottochain/v1/messages_pb.d.ts +190 -0
- package/dist/types/generated/ottochain/v1/records.d.ts +128 -0
- package/dist/types/generated/ottochain/v1/records_pb.d.ts +221 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/metakit/binary.d.ts +38 -0
- package/dist/types/metakit/canonicalize.d.ts +26 -0
- package/dist/types/metakit/codec.d.ts +16 -0
- package/dist/types/metakit/currency-transaction.d.ts +157 -0
- package/dist/types/metakit/currency-types.d.ts +55 -0
- package/dist/types/metakit/hash.d.ts +50 -0
- package/dist/types/metakit/index.d.ts +23 -0
- package/dist/types/metakit/network/client.d.ts +23 -0
- package/dist/types/metakit/network/currency-l1-client.d.ts +71 -0
- package/dist/types/metakit/network/data-l1-client.d.ts +57 -0
- package/dist/types/metakit/network/index.d.ts +10 -0
- package/dist/types/metakit/network/types.d.ts +74 -0
- package/dist/types/metakit/sign.d.ts +65 -0
- package/dist/types/metakit/signed-object.d.ts +66 -0
- package/dist/types/metakit/types.d.ts +67 -0
- package/dist/types/metakit/verify.d.ts +55 -0
- package/dist/types/metakit/wallet.d.ts +70 -0
- package/dist/types/ottochain/index.d.ts +13 -0
- package/dist/types/ottochain/metagraph-client.d.ts +111 -0
- package/dist/types/ottochain/snapshot.d.ts +86 -0
- package/dist/types/ottochain/types.d.ts +210 -0
- package/dist/types/types.d.ts +51 -0
- package/dist/types/validation.d.ts +449 -0
- package/dist/validation.d.ts +449 -0
- package/dist/validation.js +312 -0
- package/package.json +136 -0
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.11.2
|
|
5
|
+
// protoc unknown
|
|
6
|
+
// source: google/protobuf/struct.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ListValue = exports.Value = exports.Struct_FieldsEntry = exports.Struct = exports.nullValueToNumber = exports.nullValueToJSON = exports.nullValueFromJSON = exports.NullValue = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
exports.protobufPackage = "google.protobuf";
|
|
12
|
+
/**
|
|
13
|
+
* `NullValue` is a singleton enumeration to represent the null value for the
|
|
14
|
+
* `Value` type union.
|
|
15
|
+
*
|
|
16
|
+
* The JSON representation for `NullValue` is JSON `null`.
|
|
17
|
+
*/
|
|
18
|
+
var NullValue;
|
|
19
|
+
(function (NullValue) {
|
|
20
|
+
/** NULL_VALUE - Null value. */
|
|
21
|
+
NullValue["NULL_VALUE"] = "NULL_VALUE";
|
|
22
|
+
NullValue["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
23
|
+
})(NullValue || (exports.NullValue = NullValue = {}));
|
|
24
|
+
function nullValueFromJSON(object) {
|
|
25
|
+
switch (object) {
|
|
26
|
+
case 0:
|
|
27
|
+
case "NULL_VALUE":
|
|
28
|
+
return NullValue.NULL_VALUE;
|
|
29
|
+
case -1:
|
|
30
|
+
case "UNRECOGNIZED":
|
|
31
|
+
default:
|
|
32
|
+
return NullValue.UNRECOGNIZED;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.nullValueFromJSON = nullValueFromJSON;
|
|
36
|
+
function nullValueToJSON(object) {
|
|
37
|
+
switch (object) {
|
|
38
|
+
case NullValue.NULL_VALUE:
|
|
39
|
+
return "NULL_VALUE";
|
|
40
|
+
case NullValue.UNRECOGNIZED:
|
|
41
|
+
default:
|
|
42
|
+
return "UNRECOGNIZED";
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.nullValueToJSON = nullValueToJSON;
|
|
46
|
+
function nullValueToNumber(object) {
|
|
47
|
+
switch (object) {
|
|
48
|
+
case NullValue.NULL_VALUE:
|
|
49
|
+
return 0;
|
|
50
|
+
case NullValue.UNRECOGNIZED:
|
|
51
|
+
default:
|
|
52
|
+
return -1;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.nullValueToNumber = nullValueToNumber;
|
|
56
|
+
function createBaseStruct() {
|
|
57
|
+
return { fields: {} };
|
|
58
|
+
}
|
|
59
|
+
exports.Struct = {
|
|
60
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
61
|
+
globalThis.Object.entries(message.fields).forEach(([key, value]) => {
|
|
62
|
+
if (value !== undefined) {
|
|
63
|
+
exports.Struct_FieldsEntry.encode({ key: key, value }, writer.uint32(10).fork()).join();
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
return writer;
|
|
67
|
+
},
|
|
68
|
+
decode(input, length) {
|
|
69
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
70
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
71
|
+
const message = createBaseStruct();
|
|
72
|
+
while (reader.pos < end) {
|
|
73
|
+
const tag = reader.uint32();
|
|
74
|
+
switch (tag >>> 3) {
|
|
75
|
+
case 1: {
|
|
76
|
+
if (tag !== 10) {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
const entry1 = exports.Struct_FieldsEntry.decode(reader, reader.uint32());
|
|
80
|
+
if (entry1.value !== undefined) {
|
|
81
|
+
message.fields[entry1.key] = entry1.value;
|
|
82
|
+
}
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
reader.skip(tag & 7);
|
|
90
|
+
}
|
|
91
|
+
return message;
|
|
92
|
+
},
|
|
93
|
+
fromJSON(object) {
|
|
94
|
+
return {
|
|
95
|
+
fields: isObject(object.fields)
|
|
96
|
+
? globalThis.Object.entries(object.fields).reduce((acc, [key, value]) => {
|
|
97
|
+
acc[key] = value;
|
|
98
|
+
return acc;
|
|
99
|
+
}, {})
|
|
100
|
+
: {},
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
toJSON(message) {
|
|
104
|
+
const obj = {};
|
|
105
|
+
if (message.fields) {
|
|
106
|
+
const entries = globalThis.Object.entries(message.fields);
|
|
107
|
+
if (entries.length > 0) {
|
|
108
|
+
obj.fields = {};
|
|
109
|
+
entries.forEach(([k, v]) => {
|
|
110
|
+
obj.fields[k] = v;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return obj;
|
|
115
|
+
},
|
|
116
|
+
create(base) {
|
|
117
|
+
return exports.Struct.fromPartial(base ?? {});
|
|
118
|
+
},
|
|
119
|
+
fromPartial(object) {
|
|
120
|
+
const message = createBaseStruct();
|
|
121
|
+
message.fields = globalThis.Object.entries(object.fields ?? {}).reduce((acc, [key, value]) => {
|
|
122
|
+
if (value !== undefined) {
|
|
123
|
+
acc[key] = value;
|
|
124
|
+
}
|
|
125
|
+
return acc;
|
|
126
|
+
}, {});
|
|
127
|
+
return message;
|
|
128
|
+
},
|
|
129
|
+
wrap(object) {
|
|
130
|
+
const struct = createBaseStruct();
|
|
131
|
+
if (object !== undefined) {
|
|
132
|
+
for (const key of globalThis.Object.keys(object)) {
|
|
133
|
+
struct.fields[key] = object[key];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return struct;
|
|
137
|
+
},
|
|
138
|
+
unwrap(message) {
|
|
139
|
+
const object = {};
|
|
140
|
+
if (message.fields) {
|
|
141
|
+
for (const key of globalThis.Object.keys(message.fields)) {
|
|
142
|
+
object[key] = message.fields[key];
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return object;
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
function createBaseStruct_FieldsEntry() {
|
|
149
|
+
return { key: "", value: undefined };
|
|
150
|
+
}
|
|
151
|
+
exports.Struct_FieldsEntry = {
|
|
152
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
153
|
+
if (message.key !== "") {
|
|
154
|
+
writer.uint32(10).string(message.key);
|
|
155
|
+
}
|
|
156
|
+
if (message.value !== undefined) {
|
|
157
|
+
exports.Value.encode(exports.Value.wrap(message.value), writer.uint32(18).fork()).join();
|
|
158
|
+
}
|
|
159
|
+
return writer;
|
|
160
|
+
},
|
|
161
|
+
decode(input, length) {
|
|
162
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
163
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
164
|
+
const message = createBaseStruct_FieldsEntry();
|
|
165
|
+
while (reader.pos < end) {
|
|
166
|
+
const tag = reader.uint32();
|
|
167
|
+
switch (tag >>> 3) {
|
|
168
|
+
case 1: {
|
|
169
|
+
if (tag !== 10) {
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
message.key = reader.string();
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
case 2: {
|
|
176
|
+
if (tag !== 18) {
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
message.value = exports.Value.unwrap(exports.Value.decode(reader, reader.uint32()));
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
reader.skip(tag & 7);
|
|
187
|
+
}
|
|
188
|
+
return message;
|
|
189
|
+
},
|
|
190
|
+
fromJSON(object) {
|
|
191
|
+
return {
|
|
192
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
193
|
+
value: isSet(object?.value) ? object.value : undefined,
|
|
194
|
+
};
|
|
195
|
+
},
|
|
196
|
+
toJSON(message) {
|
|
197
|
+
const obj = {};
|
|
198
|
+
if (message.key !== "") {
|
|
199
|
+
obj.key = message.key;
|
|
200
|
+
}
|
|
201
|
+
if (message.value !== undefined) {
|
|
202
|
+
obj.value = message.value;
|
|
203
|
+
}
|
|
204
|
+
return obj;
|
|
205
|
+
},
|
|
206
|
+
create(base) {
|
|
207
|
+
return exports.Struct_FieldsEntry.fromPartial(base ?? {});
|
|
208
|
+
},
|
|
209
|
+
fromPartial(object) {
|
|
210
|
+
const message = createBaseStruct_FieldsEntry();
|
|
211
|
+
message.key = object.key ?? "";
|
|
212
|
+
message.value = object.value ?? undefined;
|
|
213
|
+
return message;
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
function createBaseValue() {
|
|
217
|
+
return { kind: undefined };
|
|
218
|
+
}
|
|
219
|
+
exports.Value = {
|
|
220
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
221
|
+
switch (message.kind?.$case) {
|
|
222
|
+
case "nullValue":
|
|
223
|
+
writer.uint32(8).int32(nullValueToNumber(message.kind.nullValue));
|
|
224
|
+
break;
|
|
225
|
+
case "numberValue":
|
|
226
|
+
writer.uint32(17).double(message.kind.numberValue);
|
|
227
|
+
break;
|
|
228
|
+
case "stringValue":
|
|
229
|
+
writer.uint32(26).string(message.kind.stringValue);
|
|
230
|
+
break;
|
|
231
|
+
case "boolValue":
|
|
232
|
+
writer.uint32(32).bool(message.kind.boolValue);
|
|
233
|
+
break;
|
|
234
|
+
case "structValue":
|
|
235
|
+
exports.Struct.encode(exports.Struct.wrap(message.kind.structValue), writer.uint32(42).fork()).join();
|
|
236
|
+
break;
|
|
237
|
+
case "listValue":
|
|
238
|
+
exports.ListValue.encode(exports.ListValue.wrap(message.kind.listValue), writer.uint32(50).fork()).join();
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
return writer;
|
|
242
|
+
},
|
|
243
|
+
decode(input, length) {
|
|
244
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
245
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
246
|
+
const message = createBaseValue();
|
|
247
|
+
while (reader.pos < end) {
|
|
248
|
+
const tag = reader.uint32();
|
|
249
|
+
switch (tag >>> 3) {
|
|
250
|
+
case 1: {
|
|
251
|
+
if (tag !== 8) {
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
message.kind = { $case: "nullValue", nullValue: nullValueFromJSON(reader.int32()) };
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
case 2: {
|
|
258
|
+
if (tag !== 17) {
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
message.kind = { $case: "numberValue", numberValue: reader.double() };
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
case 3: {
|
|
265
|
+
if (tag !== 26) {
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
message.kind = { $case: "stringValue", stringValue: reader.string() };
|
|
269
|
+
continue;
|
|
270
|
+
}
|
|
271
|
+
case 4: {
|
|
272
|
+
if (tag !== 32) {
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
message.kind = { $case: "boolValue", boolValue: reader.bool() };
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
case 5: {
|
|
279
|
+
if (tag !== 42) {
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
message.kind = { $case: "structValue", structValue: exports.Struct.unwrap(exports.Struct.decode(reader, reader.uint32())) };
|
|
283
|
+
continue;
|
|
284
|
+
}
|
|
285
|
+
case 6: {
|
|
286
|
+
if (tag !== 50) {
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
message.kind = { $case: "listValue", listValue: exports.ListValue.unwrap(exports.ListValue.decode(reader, reader.uint32())) };
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
reader.skip(tag & 7);
|
|
297
|
+
}
|
|
298
|
+
return message;
|
|
299
|
+
},
|
|
300
|
+
fromJSON(object) {
|
|
301
|
+
return {
|
|
302
|
+
kind: isSet(object.nullValue)
|
|
303
|
+
? { $case: "nullValue", nullValue: nullValueFromJSON(object.nullValue) }
|
|
304
|
+
: isSet(object.null_value)
|
|
305
|
+
? { $case: "nullValue", nullValue: nullValueFromJSON(object.null_value) }
|
|
306
|
+
: isSet(object.numberValue)
|
|
307
|
+
? { $case: "numberValue", numberValue: globalThis.Number(object.numberValue) }
|
|
308
|
+
: isSet(object.number_value)
|
|
309
|
+
? { $case: "numberValue", numberValue: globalThis.Number(object.number_value) }
|
|
310
|
+
: isSet(object.stringValue)
|
|
311
|
+
? { $case: "stringValue", stringValue: globalThis.String(object.stringValue) }
|
|
312
|
+
: isSet(object.string_value)
|
|
313
|
+
? { $case: "stringValue", stringValue: globalThis.String(object.string_value) }
|
|
314
|
+
: isSet(object.boolValue)
|
|
315
|
+
? { $case: "boolValue", boolValue: globalThis.Boolean(object.boolValue) }
|
|
316
|
+
: isSet(object.bool_value)
|
|
317
|
+
? { $case: "boolValue", boolValue: globalThis.Boolean(object.bool_value) }
|
|
318
|
+
: isSet(object.structValue)
|
|
319
|
+
? { $case: "structValue", structValue: object.structValue }
|
|
320
|
+
: isSet(object.struct_value)
|
|
321
|
+
? { $case: "structValue", structValue: object.struct_value }
|
|
322
|
+
: isSet(object.listValue)
|
|
323
|
+
? { $case: "listValue", listValue: [...object.listValue] }
|
|
324
|
+
: isSet(object.list_value)
|
|
325
|
+
? { $case: "listValue", listValue: [...object.list_value] }
|
|
326
|
+
: undefined,
|
|
327
|
+
};
|
|
328
|
+
},
|
|
329
|
+
toJSON(message) {
|
|
330
|
+
const obj = {};
|
|
331
|
+
if (message.kind?.$case === "nullValue") {
|
|
332
|
+
obj.nullValue = nullValueToJSON(message.kind.nullValue);
|
|
333
|
+
}
|
|
334
|
+
else if (message.kind?.$case === "numberValue") {
|
|
335
|
+
obj.numberValue = message.kind.numberValue;
|
|
336
|
+
}
|
|
337
|
+
else if (message.kind?.$case === "stringValue") {
|
|
338
|
+
obj.stringValue = message.kind.stringValue;
|
|
339
|
+
}
|
|
340
|
+
else if (message.kind?.$case === "boolValue") {
|
|
341
|
+
obj.boolValue = message.kind.boolValue;
|
|
342
|
+
}
|
|
343
|
+
else if (message.kind?.$case === "structValue") {
|
|
344
|
+
obj.structValue = message.kind.structValue;
|
|
345
|
+
}
|
|
346
|
+
else if (message.kind?.$case === "listValue") {
|
|
347
|
+
obj.listValue = message.kind.listValue;
|
|
348
|
+
}
|
|
349
|
+
return obj;
|
|
350
|
+
},
|
|
351
|
+
create(base) {
|
|
352
|
+
return exports.Value.fromPartial(base ?? {});
|
|
353
|
+
},
|
|
354
|
+
fromPartial(object) {
|
|
355
|
+
const message = createBaseValue();
|
|
356
|
+
switch (object.kind?.$case) {
|
|
357
|
+
case "nullValue": {
|
|
358
|
+
if (object.kind?.nullValue !== undefined && object.kind?.nullValue !== null) {
|
|
359
|
+
message.kind = { $case: "nullValue", nullValue: object.kind.nullValue };
|
|
360
|
+
}
|
|
361
|
+
break;
|
|
362
|
+
}
|
|
363
|
+
case "numberValue": {
|
|
364
|
+
if (object.kind?.numberValue !== undefined && object.kind?.numberValue !== null) {
|
|
365
|
+
message.kind = { $case: "numberValue", numberValue: object.kind.numberValue };
|
|
366
|
+
}
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
case "stringValue": {
|
|
370
|
+
if (object.kind?.stringValue !== undefined && object.kind?.stringValue !== null) {
|
|
371
|
+
message.kind = { $case: "stringValue", stringValue: object.kind.stringValue };
|
|
372
|
+
}
|
|
373
|
+
break;
|
|
374
|
+
}
|
|
375
|
+
case "boolValue": {
|
|
376
|
+
if (object.kind?.boolValue !== undefined && object.kind?.boolValue !== null) {
|
|
377
|
+
message.kind = { $case: "boolValue", boolValue: object.kind.boolValue };
|
|
378
|
+
}
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
case "structValue": {
|
|
382
|
+
if (object.kind?.structValue !== undefined && object.kind?.structValue !== null) {
|
|
383
|
+
message.kind = { $case: "structValue", structValue: object.kind.structValue };
|
|
384
|
+
}
|
|
385
|
+
break;
|
|
386
|
+
}
|
|
387
|
+
case "listValue": {
|
|
388
|
+
if (object.kind?.listValue !== undefined && object.kind?.listValue !== null) {
|
|
389
|
+
message.kind = { $case: "listValue", listValue: object.kind.listValue };
|
|
390
|
+
}
|
|
391
|
+
break;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
return message;
|
|
395
|
+
},
|
|
396
|
+
wrap(value) {
|
|
397
|
+
const result = createBaseValue();
|
|
398
|
+
if (value === null) {
|
|
399
|
+
result.kind = { $case: "nullValue", nullValue: NullValue.NULL_VALUE };
|
|
400
|
+
}
|
|
401
|
+
else if (typeof value === "boolean") {
|
|
402
|
+
result.kind = { $case: "boolValue", boolValue: value };
|
|
403
|
+
}
|
|
404
|
+
else if (typeof value === "number") {
|
|
405
|
+
result.kind = { $case: "numberValue", numberValue: value };
|
|
406
|
+
}
|
|
407
|
+
else if (typeof value === "string") {
|
|
408
|
+
result.kind = { $case: "stringValue", stringValue: value };
|
|
409
|
+
}
|
|
410
|
+
else if (globalThis.Array.isArray(value)) {
|
|
411
|
+
result.kind = { $case: "listValue", listValue: value };
|
|
412
|
+
}
|
|
413
|
+
else if (typeof value === "object") {
|
|
414
|
+
result.kind = { $case: "structValue", structValue: value };
|
|
415
|
+
}
|
|
416
|
+
else if (typeof value !== "undefined") {
|
|
417
|
+
throw new globalThis.Error("Unsupported any value type: " + typeof value);
|
|
418
|
+
}
|
|
419
|
+
return result;
|
|
420
|
+
},
|
|
421
|
+
unwrap(message) {
|
|
422
|
+
if (message.kind?.$case === "nullValue") {
|
|
423
|
+
return null;
|
|
424
|
+
}
|
|
425
|
+
else if (message.kind?.$case === "numberValue") {
|
|
426
|
+
return message.kind?.numberValue;
|
|
427
|
+
}
|
|
428
|
+
else if (message.kind?.$case === "stringValue") {
|
|
429
|
+
return message.kind?.stringValue;
|
|
430
|
+
}
|
|
431
|
+
else if (message.kind?.$case === "boolValue") {
|
|
432
|
+
return message.kind?.boolValue;
|
|
433
|
+
}
|
|
434
|
+
else if (message.kind?.$case === "structValue") {
|
|
435
|
+
return message.kind?.structValue;
|
|
436
|
+
}
|
|
437
|
+
else if (message.kind?.$case === "listValue") {
|
|
438
|
+
return message.kind?.listValue;
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
return undefined;
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
};
|
|
445
|
+
function createBaseListValue() {
|
|
446
|
+
return { values: [] };
|
|
447
|
+
}
|
|
448
|
+
exports.ListValue = {
|
|
449
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
450
|
+
for (const v of message.values) {
|
|
451
|
+
exports.Value.encode(exports.Value.wrap(v), writer.uint32(10).fork()).join();
|
|
452
|
+
}
|
|
453
|
+
return writer;
|
|
454
|
+
},
|
|
455
|
+
decode(input, length) {
|
|
456
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
457
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
458
|
+
const message = createBaseListValue();
|
|
459
|
+
while (reader.pos < end) {
|
|
460
|
+
const tag = reader.uint32();
|
|
461
|
+
switch (tag >>> 3) {
|
|
462
|
+
case 1: {
|
|
463
|
+
if (tag !== 10) {
|
|
464
|
+
break;
|
|
465
|
+
}
|
|
466
|
+
message.values.push(exports.Value.unwrap(exports.Value.decode(reader, reader.uint32())));
|
|
467
|
+
continue;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
471
|
+
break;
|
|
472
|
+
}
|
|
473
|
+
reader.skip(tag & 7);
|
|
474
|
+
}
|
|
475
|
+
return message;
|
|
476
|
+
},
|
|
477
|
+
fromJSON(object) {
|
|
478
|
+
return { values: globalThis.Array.isArray(object?.values) ? [...object.values] : [] };
|
|
479
|
+
},
|
|
480
|
+
toJSON(message) {
|
|
481
|
+
const obj = {};
|
|
482
|
+
if (message.values?.length) {
|
|
483
|
+
obj.values = message.values;
|
|
484
|
+
}
|
|
485
|
+
return obj;
|
|
486
|
+
},
|
|
487
|
+
create(base) {
|
|
488
|
+
return exports.ListValue.fromPartial(base ?? {});
|
|
489
|
+
},
|
|
490
|
+
fromPartial(object) {
|
|
491
|
+
const message = createBaseListValue();
|
|
492
|
+
message.values = object.values?.map((e) => e) || [];
|
|
493
|
+
return message;
|
|
494
|
+
},
|
|
495
|
+
wrap(array) {
|
|
496
|
+
const result = createBaseListValue();
|
|
497
|
+
result.values = array ?? [];
|
|
498
|
+
return result;
|
|
499
|
+
},
|
|
500
|
+
unwrap(message) {
|
|
501
|
+
if (message?.hasOwnProperty("values") && globalThis.Array.isArray(message.values)) {
|
|
502
|
+
return message.values;
|
|
503
|
+
}
|
|
504
|
+
else {
|
|
505
|
+
return message;
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
};
|
|
509
|
+
function isObject(value) {
|
|
510
|
+
return typeof value === "object" && value !== null;
|
|
511
|
+
}
|
|
512
|
+
function isSet(value) {
|
|
513
|
+
return value !== null && value !== undefined;
|
|
514
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.11.2
|
|
5
|
+
// protoc unknown
|
|
6
|
+
// source: google/protobuf/timestamp.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.Timestamp = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
exports.protobufPackage = "google.protobuf";
|
|
12
|
+
function createBaseTimestamp() {
|
|
13
|
+
return { seconds: 0, nanos: 0 };
|
|
14
|
+
}
|
|
15
|
+
exports.Timestamp = {
|
|
16
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
17
|
+
if (message.seconds !== 0) {
|
|
18
|
+
writer.uint32(8).int64(message.seconds);
|
|
19
|
+
}
|
|
20
|
+
if (message.nanos !== 0) {
|
|
21
|
+
writer.uint32(16).int32(message.nanos);
|
|
22
|
+
}
|
|
23
|
+
return writer;
|
|
24
|
+
},
|
|
25
|
+
decode(input, length) {
|
|
26
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
27
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
28
|
+
const message = createBaseTimestamp();
|
|
29
|
+
while (reader.pos < end) {
|
|
30
|
+
const tag = reader.uint32();
|
|
31
|
+
switch (tag >>> 3) {
|
|
32
|
+
case 1: {
|
|
33
|
+
if (tag !== 8) {
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
message.seconds = longToNumber(reader.int64());
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
case 2: {
|
|
40
|
+
if (tag !== 16) {
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
message.nanos = reader.int32();
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
reader.skip(tag & 7);
|
|
51
|
+
}
|
|
52
|
+
return message;
|
|
53
|
+
},
|
|
54
|
+
fromJSON(object) {
|
|
55
|
+
return {
|
|
56
|
+
seconds: isSet(object.seconds) ? globalThis.Number(object.seconds) : 0,
|
|
57
|
+
nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
toJSON(message) {
|
|
61
|
+
const obj = {};
|
|
62
|
+
if (message.seconds !== 0) {
|
|
63
|
+
obj.seconds = Math.round(message.seconds);
|
|
64
|
+
}
|
|
65
|
+
if (message.nanos !== 0) {
|
|
66
|
+
obj.nanos = Math.round(message.nanos);
|
|
67
|
+
}
|
|
68
|
+
return obj;
|
|
69
|
+
},
|
|
70
|
+
create(base) {
|
|
71
|
+
return exports.Timestamp.fromPartial(base ?? {});
|
|
72
|
+
},
|
|
73
|
+
fromPartial(object) {
|
|
74
|
+
const message = createBaseTimestamp();
|
|
75
|
+
message.seconds = object.seconds ?? 0;
|
|
76
|
+
message.nanos = object.nanos ?? 0;
|
|
77
|
+
return message;
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
function longToNumber(int64) {
|
|
81
|
+
const num = globalThis.Number(int64.toString());
|
|
82
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
83
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
84
|
+
}
|
|
85
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
86
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
87
|
+
}
|
|
88
|
+
return num;
|
|
89
|
+
}
|
|
90
|
+
function isSet(value) {
|
|
91
|
+
return value !== null && value !== undefined;
|
|
92
|
+
}
|