@ottochain/sdk 2.3.0 → 2.5.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/dist/cjs/apps/compute/index.js +33 -0
- package/dist/cjs/apps/compute/state-machines/compute-rule110.js +164 -0
- package/dist/cjs/apps/compute/state-machines/index.js +9 -0
- package/dist/cjs/apps/contracts/index.js +16 -9
- package/dist/cjs/apps/contracts/state-machines/contract-agreement.js +134 -161
- package/dist/cjs/apps/contracts/state-machines/contract-escrow.js +192 -170
- package/dist/cjs/apps/contracts/state-machines/contract-universal.js +46 -58
- package/dist/cjs/apps/corporate/index.js +2 -2
- package/dist/cjs/apps/corporate/state-machines/corp-board.js +500 -456
- package/dist/cjs/apps/corporate/state-machines/corp-entity.js +487 -361
- package/dist/cjs/apps/corporate/state-machines/corp-securities.js +769 -576
- package/dist/cjs/apps/corporate/state-machines/corp-shareholders.js +567 -557
- package/dist/cjs/apps/governance/index.js +21 -21
- package/dist/cjs/apps/governance/state-machines/dao-multisig.js +188 -209
- package/dist/cjs/apps/governance/state-machines/dao-reputation.js +181 -228
- package/dist/cjs/apps/governance/state-machines/dao-single.js +105 -88
- package/dist/cjs/apps/governance/state-machines/dao-token.js +199 -227
- package/dist/cjs/apps/governance/state-machines/governance-simple.js +231 -231
- package/dist/cjs/apps/governance/state-machines/governance-universal.js +64 -64
- package/dist/cjs/apps/identity/constants.js +55 -22
- package/dist/cjs/apps/identity/index.js +28 -12
- package/dist/cjs/apps/identity/state-machines/identity-agent.js +124 -158
- package/dist/cjs/apps/identity/state-machines/identity-oracle.js +158 -173
- package/dist/cjs/apps/identity/state-machines/identity-registry.js +262 -0
- package/dist/cjs/apps/identity/state-machines/identity-universal.js +51 -57
- package/dist/cjs/apps/identity/state-machines/index.js +3 -1
- package/dist/cjs/apps/index.js +22 -8
- package/dist/cjs/apps/lending/assets.js +247 -0
- package/dist/cjs/apps/lending/credit-scoring.js +87 -0
- package/dist/cjs/apps/lending/eligibility.js +105 -0
- package/dist/cjs/apps/lending/index.js +91 -0
- package/dist/cjs/apps/lending/state-machines/index.js +9 -0
- package/dist/cjs/apps/lending/state-machines/lending-zk-loan.js +433 -0
- package/dist/cjs/apps/markets/index.js +22 -12
- package/dist/cjs/apps/markets/state-machines/market-auction.js +116 -134
- package/dist/cjs/apps/markets/state-machines/market-crowdfund.js +131 -141
- package/dist/cjs/apps/markets/state-machines/market-group-buy.js +163 -184
- package/dist/cjs/apps/markets/state-machines/market-prediction.js +226 -233
- package/dist/cjs/apps/markets/state-machines/market-universal.js +65 -80
- package/dist/cjs/apps/oracles/index.js +3 -3
- package/dist/cjs/apps/privacy/index.js +67 -0
- package/dist/cjs/apps/privacy/state-machines/index.js +17 -0
- package/dist/cjs/apps/privacy/state-machines/mixer-ddhRing.js +286 -0
- package/dist/cjs/apps/privacy/state-machines/note-pool.js +476 -0
- package/dist/cjs/apps/staked-pool/assets.js +103 -0
- package/dist/cjs/apps/staked-pool/base.js +498 -0
- package/dist/cjs/apps/staked-pool/consumer.js +55 -0
- package/dist/cjs/apps/staked-pool/index.js +83 -0
- package/dist/cjs/apps/staked-pool/state-machines/index.js +12 -0
- package/dist/cjs/apps/staked-pool/state-machines/staked-pool-base.js +49 -0
- package/dist/cjs/apps/staked-pool/state-machines/staked-pool-oracle.js +131 -0
- package/dist/cjs/errors.js +3 -3
- package/dist/cjs/generated/google/protobuf/struct.js +5 -5
- package/dist/cjs/generated/google/protobuf/timestamp.js +1 -1
- package/dist/cjs/generated/index.js +11 -7
- package/dist/cjs/generated/openapi.js +6 -0
- package/dist/cjs/generated/ottochain/apps/contracts/v1/contract.js +51 -51
- package/dist/cjs/generated/ottochain/apps/corporate/v1/corporate.js +20 -21
- package/dist/cjs/generated/ottochain/apps/governance/v1/governance.js +14 -14
- package/dist/cjs/generated/ottochain/apps/identity/v1/attestation.js +5 -5
- package/dist/cjs/generated/ottochain/apps/identity/v1/identity.js +125 -131
- package/dist/cjs/generated/ottochain/apps/markets/v1/market.js +108 -108
- package/dist/cjs/generated/ottochain/v1/common.js +5 -5
- package/dist/cjs/generated/ottochain/v1/fiber.js +44 -6
- package/dist/cjs/generated/ottochain/v1/messages.js +1 -1
- package/dist/cjs/generated/ottochain/v1/records.js +1 -1
- package/dist/cjs/index.js +58 -7
- package/dist/cjs/openapi.js +2 -0
- package/dist/cjs/ottochain/drop-nulls.js +1 -2
- package/dist/cjs/ottochain/genesis-manifest.js +17 -11
- package/dist/cjs/ottochain/index.js +23 -13
- package/dist/cjs/ottochain/metagraph-client.js +81 -16
- package/dist/cjs/ottochain/snapshot.js +13 -16
- package/dist/cjs/ottochain/transaction.js +67 -14
- package/dist/cjs/ottochain/types.js +16 -2
- package/dist/cjs/privacy/index.js +14 -0
- package/dist/cjs/privacy/sealed-bid.js +213 -0
- package/dist/cjs/privacy/shield-app.js +131 -0
- package/dist/cjs/schema/effects.js +156 -0
- package/dist/cjs/schema/fiber-app.js +150 -15
- package/dist/cjs/schema/guard-lint.js +343 -0
- package/dist/cjs/schema/guards.js +246 -0
- package/dist/cjs/signing.js +80 -0
- package/dist/cjs/templates/asset-policy.js +190 -0
- package/dist/cjs/templates/index.js +86 -0
- package/dist/cjs/templates/machine.js +130 -0
- package/dist/cjs/templates/migration.js +39 -0
- package/dist/cjs/templates/state-shape.js +38 -0
- package/dist/cjs/types.js +2 -3
- package/dist/cjs/validation.js +9 -11
- package/dist/cjs/verify.js +9 -4
- package/dist/cjs/zk/commit.js +53 -0
- package/dist/cjs/zk/guard.js +107 -0
- package/dist/cjs/zk/index.js +48 -0
- package/dist/cjs/zk/preimage.js +37 -0
- package/dist/cjs/zk/prover.js +87 -0
- package/dist/cjs/zk/registry.js +62 -0
- package/dist/cjs/zk/types.js +28 -0
- package/dist/cjs/zk/witness.js +19 -0
- package/dist/esm/apps/compute/index.js +29 -0
- package/dist/esm/apps/compute/state-machines/compute-rule110.js +161 -0
- package/dist/esm/apps/compute/state-machines/index.js +5 -0
- package/dist/esm/apps/contracts/index.js +9 -5
- package/dist/esm/apps/contracts/state-machines/contract-agreement.js +135 -162
- package/dist/esm/apps/contracts/state-machines/contract-escrow.js +193 -171
- package/dist/esm/apps/contracts/state-machines/contract-universal.js +47 -59
- package/dist/esm/apps/corporate/index.js +2 -2
- package/dist/esm/apps/corporate/state-machines/corp-board.js +501 -457
- package/dist/esm/apps/corporate/state-machines/corp-entity.js +488 -362
- package/dist/esm/apps/corporate/state-machines/corp-securities.js +770 -577
- package/dist/esm/apps/corporate/state-machines/corp-shareholders.js +568 -558
- package/dist/esm/apps/governance/index.js +10 -10
- package/dist/esm/apps/governance/state-machines/dao-multisig.js +189 -210
- package/dist/esm/apps/governance/state-machines/dao-reputation.js +182 -229
- package/dist/esm/apps/governance/state-machines/dao-single.js +106 -89
- package/dist/esm/apps/governance/state-machines/dao-token.js +200 -228
- package/dist/esm/apps/governance/state-machines/governance-simple.js +232 -232
- package/dist/esm/apps/governance/state-machines/governance-universal.js +65 -65
- package/dist/esm/apps/identity/constants.js +52 -21
- package/dist/esm/apps/identity/index.js +14 -9
- package/dist/esm/apps/identity/state-machines/identity-agent.js +125 -159
- package/dist/esm/apps/identity/state-machines/identity-oracle.js +159 -174
- package/dist/esm/apps/identity/state-machines/identity-registry.js +259 -0
- package/dist/esm/apps/identity/state-machines/identity-universal.js +52 -58
- package/dist/esm/apps/identity/state-machines/index.js +1 -0
- package/dist/esm/apps/index.js +9 -5
- package/dist/esm/apps/lending/assets.js +231 -0
- package/dist/esm/apps/lending/credit-scoring.js +81 -0
- package/dist/esm/apps/lending/eligibility.js +99 -0
- package/dist/esm/apps/lending/index.js +69 -0
- package/dist/esm/apps/lending/state-machines/index.js +5 -0
- package/dist/esm/apps/lending/state-machines/lending-zk-loan.js +430 -0
- package/dist/esm/apps/markets/index.js +11 -7
- package/dist/esm/apps/markets/state-machines/market-auction.js +117 -135
- package/dist/esm/apps/markets/state-machines/market-crowdfund.js +132 -142
- package/dist/esm/apps/markets/state-machines/market-group-buy.js +164 -185
- package/dist/esm/apps/markets/state-machines/market-prediction.js +227 -234
- package/dist/esm/apps/markets/state-machines/market-universal.js +66 -81
- package/dist/esm/apps/oracles/index.js +3 -3
- package/dist/esm/apps/privacy/index.js +56 -0
- package/dist/esm/apps/privacy/state-machines/index.js +6 -0
- package/dist/esm/apps/privacy/state-machines/mixer-ddhRing.js +282 -0
- package/dist/esm/apps/privacy/state-machines/note-pool.js +470 -0
- package/dist/esm/apps/staked-pool/assets.js +91 -0
- package/dist/esm/apps/staked-pool/base.js +493 -0
- package/dist/esm/apps/staked-pool/consumer.js +49 -0
- package/dist/esm/apps/staked-pool/index.js +60 -0
- package/dist/esm/apps/staked-pool/state-machines/index.js +6 -0
- package/dist/esm/apps/staked-pool/state-machines/staked-pool-base.js +46 -0
- package/dist/esm/apps/staked-pool/state-machines/staked-pool-oracle.js +127 -0
- package/dist/esm/generated/google/protobuf/struct.js +1 -1
- package/dist/esm/generated/google/protobuf/timestamp.js +1 -1
- package/dist/esm/generated/index.js +9 -5
- package/dist/esm/generated/openapi.js +5 -0
- package/dist/esm/generated/ottochain/apps/contracts/v1/contract.js +47 -47
- package/dist/esm/generated/ottochain/apps/corporate/v1/corporate.js +1 -1
- package/dist/esm/generated/ottochain/apps/governance/v1/governance.js +1 -1
- package/dist/esm/generated/ottochain/apps/identity/v1/attestation.js +1 -1
- package/dist/esm/generated/ottochain/apps/identity/v1/identity.js +115 -121
- package/dist/esm/generated/ottochain/apps/markets/v1/market.js +101 -101
- package/dist/esm/generated/ottochain/v1/common.js +1 -1
- package/dist/esm/generated/ottochain/v1/fiber.js +40 -2
- package/dist/esm/generated/ottochain/v1/messages.js +1 -1
- package/dist/esm/generated/ottochain/v1/records.js +1 -1
- package/dist/esm/index.js +28 -3
- package/dist/esm/openapi.js +1 -0
- package/dist/esm/ottochain/genesis-manifest.js +15 -9
- package/dist/esm/ottochain/index.js +2 -3
- package/dist/esm/ottochain/metagraph-client.js +81 -16
- package/dist/esm/ottochain/snapshot.js +6 -8
- package/dist/esm/ottochain/transaction.js +51 -3
- package/dist/esm/ottochain/types.js +15 -1
- package/dist/esm/privacy/index.js +6 -0
- package/dist/esm/privacy/sealed-bid.js +209 -0
- package/dist/esm/privacy/shield-app.js +127 -0
- package/dist/esm/schema/effects.js +145 -0
- package/dist/esm/schema/fiber-app.js +139 -8
- package/dist/esm/schema/guard-lint.js +337 -0
- package/dist/esm/schema/guards.js +228 -0
- package/dist/esm/signing.js +74 -0
- package/dist/esm/templates/asset-policy.js +182 -0
- package/dist/esm/templates/index.js +41 -0
- package/dist/esm/templates/machine.js +125 -0
- package/dist/esm/templates/migration.js +34 -0
- package/dist/esm/templates/state-shape.js +34 -0
- package/dist/esm/validation.js +1 -3
- package/dist/esm/verify.js +8 -2
- package/dist/esm/zk/commit.js +44 -0
- package/dist/esm/zk/guard.js +99 -0
- package/dist/esm/zk/index.js +19 -0
- package/dist/esm/zk/preimage.js +30 -0
- package/dist/esm/zk/prover.js +82 -0
- package/dist/esm/zk/registry.js +55 -0
- package/dist/esm/zk/types.js +25 -0
- package/dist/esm/zk/witness.js +15 -0
- package/dist/types/apps/compute/index.d.ts +176 -0
- package/dist/types/apps/compute/state-machines/compute-rule110.d.ts +157 -0
- package/dist/types/apps/compute/state-machines/index.d.ts +5 -0
- package/dist/types/apps/contracts/index.d.ts +81 -221
- package/dist/types/apps/contracts/state-machines/contract-agreement.d.ts +23 -98
- package/dist/types/apps/contracts/state-machines/contract-escrow.d.ts +49 -115
- package/dist/types/apps/contracts/state-machines/contract-universal.d.ts +4 -4
- package/dist/types/apps/corporate/index.d.ts +1176 -440
- package/dist/types/apps/corporate/state-machines/corp-board.d.ts +271 -135
- package/dist/types/apps/corporate/state-machines/corp-entity.d.ts +279 -74
- package/dist/types/apps/corporate/state-machines/corp-securities.d.ts +373 -149
- package/dist/types/apps/corporate/state-machines/corp-shareholders.d.ts +252 -80
- package/dist/types/apps/governance/index.d.ts +368 -470
- package/dist/types/apps/governance/state-machines/dao-multisig.d.ts +92 -107
- package/dist/types/apps/governance/state-machines/dao-reputation.d.ts +61 -85
- package/dist/types/apps/governance/state-machines/dao-single.d.ts +25 -47
- package/dist/types/apps/governance/state-machines/dao-token.d.ts +79 -68
- package/dist/types/apps/governance/state-machines/governance-simple.d.ts +95 -125
- package/dist/types/apps/governance/state-machines/governance-universal.d.ts +6 -6
- package/dist/types/apps/identity/constants.d.ts +33 -5
- package/dist/types/apps/identity/index.d.ts +415 -131
- package/dist/types/apps/identity/state-machines/identity-agent.d.ts +23 -23
- package/dist/types/apps/identity/state-machines/identity-oracle.d.ts +27 -98
- package/dist/types/apps/identity/state-machines/identity-registry.d.ts +379 -0
- package/dist/types/apps/identity/state-machines/identity-universal.d.ts +4 -4
- package/dist/types/apps/identity/state-machines/index.d.ts +1 -0
- package/dist/types/apps/index.d.ts +9 -5
- package/dist/types/apps/lending/assets.d.ts +258 -0
- package/dist/types/apps/lending/credit-scoring.d.ts +80 -0
- package/dist/types/apps/lending/eligibility.d.ts +83 -0
- package/dist/types/apps/lending/index.d.ts +556 -0
- package/dist/types/apps/lending/state-machines/index.d.ts +5 -0
- package/dist/types/apps/lending/state-machines/lending-zk-loan.d.ts +536 -0
- package/dist/types/apps/markets/index.d.ts +181 -276
- package/dist/types/apps/markets/state-machines/market-auction.d.ts +25 -49
- package/dist/types/apps/markets/state-machines/market-crowdfund.d.ts +35 -53
- package/dist/types/apps/markets/state-machines/market-group-buy.d.ts +35 -61
- package/dist/types/apps/markets/state-machines/market-prediction.d.ts +65 -86
- package/dist/types/apps/markets/state-machines/market-universal.d.ts +12 -12
- package/dist/types/apps/oracles/index.d.ts +1 -1
- package/dist/types/apps/privacy/index.d.ts +328 -0
- package/dist/types/apps/privacy/state-machines/index.d.ts +6 -0
- package/dist/types/apps/privacy/state-machines/mixer-ddhRing.d.ts +337 -0
- package/dist/types/apps/privacy/state-machines/note-pool.d.ts +196 -0
- package/dist/types/apps/staked-pool/assets.d.ts +53 -0
- package/dist/types/apps/staked-pool/base.d.ts +80 -0
- package/dist/types/apps/staked-pool/consumer.d.ts +29 -0
- package/dist/types/apps/staked-pool/index.d.ts +51 -0
- package/dist/types/apps/staked-pool/state-machines/index.d.ts +6 -0
- package/dist/types/apps/staked-pool/state-machines/staked-pool-base.d.ts +8 -0
- package/dist/types/apps/staked-pool/state-machines/staked-pool-oracle.d.ts +34 -0
- package/dist/types/generated/index.d.ts +5 -5
- package/dist/types/generated/openapi.d.ts +1270 -0
- package/dist/types/generated/ottochain/apps/contracts/v1/contract.d.ts +5 -5
- package/dist/types/generated/ottochain/apps/identity/v1/identity.d.ts +12 -12
- package/dist/types/generated/ottochain/apps/markets/v1/market.d.ts +11 -11
- package/dist/types/generated/ottochain/v1/fiber.d.ts +7 -0
- package/dist/types/index.d.ts +7 -3
- package/dist/types/openapi.d.ts +24 -0
- package/dist/types/ottochain/genesis-manifest.d.ts +11 -5
- package/dist/types/ottochain/index.d.ts +5 -6
- package/dist/types/ottochain/metagraph-client.d.ts +49 -7
- package/dist/types/ottochain/snapshot.d.ts +6 -6
- package/dist/types/ottochain/transaction.d.ts +41 -1
- package/dist/types/ottochain/types.d.ts +336 -31
- package/dist/types/privacy/index.d.ts +6 -0
- package/dist/types/privacy/sealed-bid.d.ts +348 -0
- package/dist/types/privacy/shield-app.d.ts +48 -0
- package/dist/types/schema/effects.d.ts +141 -0
- package/dist/types/schema/fiber-app.d.ts +282 -2
- package/dist/types/schema/guard-lint.d.ts +111 -0
- package/dist/types/schema/guards.d.ts +146 -0
- package/dist/types/signing.d.ts +45 -0
- package/dist/types/templates/asset-policy.d.ts +119 -0
- package/dist/types/templates/index.d.ts +26 -0
- package/dist/types/templates/machine.d.ts +139 -0
- package/dist/types/templates/migration.d.ts +34 -0
- package/dist/types/templates/state-shape.d.ts +30 -0
- package/dist/types/validation.d.ts +22 -217
- package/dist/types/verify.d.ts +4 -0
- package/dist/types/zk/commit.d.ts +28 -0
- package/dist/types/zk/guard.d.ts +46 -0
- package/dist/types/zk/index.d.ts +19 -0
- package/dist/types/zk/preimage.d.ts +10 -0
- package/dist/types/zk/prover.d.ts +34 -0
- package/dist/types/zk/registry.d.ts +34 -0
- package/dist/types/zk/types.d.ts +33 -0
- package/dist/types/zk/witness.d.ts +40 -0
- package/package.json +47 -15
- package/dist/cjs/ottochain/normalize.js +0 -186
- package/dist/esm/ottochain/normalize.js +0 -179
- package/dist/types/ottochain/normalize.d.ts +0 -79
|
@@ -1,202 +1,205 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.11.
|
|
4
|
+
// protoc-gen-ts_proto v2.11.8
|
|
5
5
|
// protoc unknown
|
|
6
6
|
// source: ottochain/apps/identity/v1/identity.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.IdentityDefinition = exports.WithdrawIdentityRequest = exports.AddStakeRequest = exports.ChallengeIdentityRequest = exports.LinkPlatformRequest = exports.ActivateIdentityRequest = exports.RegisterIdentityRequest = exports.Identity = exports.PenaltyEvent = exports.Reputation = exports.PlatformLink = exports.
|
|
8
|
+
exports.IdentityDefinition = exports.WithdrawIdentityRequest = exports.AddStakeRequest = exports.ChallengeIdentityRequest = exports.LinkPlatformRequest = exports.ActivateIdentityRequest = exports.RegisterIdentityRequest = exports.Identity = exports.PenaltyEvent = exports.Reputation = exports.PlatformLink = exports.Platform = exports.State = exports.Type = exports.protobufPackage = void 0;
|
|
9
|
+
exports.typeFromJSON = typeFromJSON;
|
|
10
|
+
exports.typeToJSON = typeToJSON;
|
|
11
|
+
exports.typeToNumber = typeToNumber;
|
|
12
|
+
exports.stateFromJSON = stateFromJSON;
|
|
13
|
+
exports.stateToJSON = stateToJSON;
|
|
14
|
+
exports.stateToNumber = stateToNumber;
|
|
15
|
+
exports.platformFromJSON = platformFromJSON;
|
|
16
|
+
exports.platformToJSON = platformToJSON;
|
|
17
|
+
exports.platformToNumber = platformToNumber;
|
|
9
18
|
/* eslint-disable */
|
|
10
19
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
20
|
const timestamp_js_1 = require("../../../../google/protobuf/timestamp.js");
|
|
12
21
|
exports.protobufPackage = "ottochain.apps.identity.v1";
|
|
13
22
|
/** Identity type - determines which state machine variant applies */
|
|
14
|
-
var
|
|
15
|
-
(function (
|
|
16
|
-
|
|
23
|
+
var Type;
|
|
24
|
+
(function (Type) {
|
|
25
|
+
Type["IDENTITY_TYPE_UNSPECIFIED"] = "IDENTITY_TYPE_UNSPECIFIED";
|
|
17
26
|
/** IDENTITY_TYPE_AGENT - AI agent identity */
|
|
18
|
-
|
|
27
|
+
Type["IDENTITY_TYPE_AGENT"] = "IDENTITY_TYPE_AGENT";
|
|
19
28
|
/** IDENTITY_TYPE_ORACLE - Oracle service identity */
|
|
20
|
-
|
|
29
|
+
Type["IDENTITY_TYPE_ORACLE"] = "IDENTITY_TYPE_ORACLE";
|
|
21
30
|
/** IDENTITY_TYPE_SERVICE - Generic service identity */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
})(
|
|
25
|
-
function
|
|
31
|
+
Type["IDENTITY_TYPE_SERVICE"] = "IDENTITY_TYPE_SERVICE";
|
|
32
|
+
Type["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
33
|
+
})(Type || (exports.Type = Type = {}));
|
|
34
|
+
function typeFromJSON(object) {
|
|
26
35
|
switch (object) {
|
|
27
36
|
case 0:
|
|
28
37
|
case "IDENTITY_TYPE_UNSPECIFIED":
|
|
29
|
-
return
|
|
38
|
+
return Type.IDENTITY_TYPE_UNSPECIFIED;
|
|
30
39
|
case 1:
|
|
31
40
|
case "IDENTITY_TYPE_AGENT":
|
|
32
|
-
return
|
|
41
|
+
return Type.IDENTITY_TYPE_AGENT;
|
|
33
42
|
case 2:
|
|
34
43
|
case "IDENTITY_TYPE_ORACLE":
|
|
35
|
-
return
|
|
44
|
+
return Type.IDENTITY_TYPE_ORACLE;
|
|
36
45
|
case 3:
|
|
37
46
|
case "IDENTITY_TYPE_SERVICE":
|
|
38
|
-
return
|
|
47
|
+
return Type.IDENTITY_TYPE_SERVICE;
|
|
39
48
|
case -1:
|
|
40
49
|
case "UNRECOGNIZED":
|
|
41
50
|
default:
|
|
42
|
-
return
|
|
51
|
+
return Type.UNRECOGNIZED;
|
|
43
52
|
}
|
|
44
53
|
}
|
|
45
|
-
|
|
46
|
-
function identityTypeToJSON(object) {
|
|
54
|
+
function typeToJSON(object) {
|
|
47
55
|
switch (object) {
|
|
48
|
-
case
|
|
56
|
+
case Type.IDENTITY_TYPE_UNSPECIFIED:
|
|
49
57
|
return "IDENTITY_TYPE_UNSPECIFIED";
|
|
50
|
-
case
|
|
58
|
+
case Type.IDENTITY_TYPE_AGENT:
|
|
51
59
|
return "IDENTITY_TYPE_AGENT";
|
|
52
|
-
case
|
|
60
|
+
case Type.IDENTITY_TYPE_ORACLE:
|
|
53
61
|
return "IDENTITY_TYPE_ORACLE";
|
|
54
|
-
case
|
|
62
|
+
case Type.IDENTITY_TYPE_SERVICE:
|
|
55
63
|
return "IDENTITY_TYPE_SERVICE";
|
|
56
|
-
case
|
|
64
|
+
case Type.UNRECOGNIZED:
|
|
57
65
|
default:
|
|
58
66
|
return "UNRECOGNIZED";
|
|
59
67
|
}
|
|
60
68
|
}
|
|
61
|
-
|
|
62
|
-
function identityTypeToNumber(object) {
|
|
69
|
+
function typeToNumber(object) {
|
|
63
70
|
switch (object) {
|
|
64
|
-
case
|
|
71
|
+
case Type.IDENTITY_TYPE_UNSPECIFIED:
|
|
65
72
|
return 0;
|
|
66
|
-
case
|
|
73
|
+
case Type.IDENTITY_TYPE_AGENT:
|
|
67
74
|
return 1;
|
|
68
|
-
case
|
|
75
|
+
case Type.IDENTITY_TYPE_ORACLE:
|
|
69
76
|
return 2;
|
|
70
|
-
case
|
|
77
|
+
case Type.IDENTITY_TYPE_SERVICE:
|
|
71
78
|
return 3;
|
|
72
|
-
case
|
|
79
|
+
case Type.UNRECOGNIZED:
|
|
73
80
|
default:
|
|
74
81
|
return -1;
|
|
75
82
|
}
|
|
76
83
|
}
|
|
77
|
-
exports.identityTypeToNumber = identityTypeToNumber;
|
|
78
84
|
/**
|
|
79
85
|
* Unified identity lifecycle states
|
|
80
86
|
* Shared across all identity types with type-specific transitions
|
|
81
87
|
*/
|
|
82
|
-
var
|
|
83
|
-
(function (
|
|
84
|
-
|
|
88
|
+
var State;
|
|
89
|
+
(function (State) {
|
|
90
|
+
State["IDENTITY_STATE_UNSPECIFIED"] = "IDENTITY_STATE_UNSPECIFIED";
|
|
85
91
|
/** IDENTITY_STATE_UNREGISTERED - Not yet registered (oracle initial) */
|
|
86
|
-
|
|
92
|
+
State["IDENTITY_STATE_UNREGISTERED"] = "IDENTITY_STATE_UNREGISTERED";
|
|
87
93
|
/** IDENTITY_STATE_REGISTERED - Registered, pending activation */
|
|
88
|
-
|
|
94
|
+
State["IDENTITY_STATE_REGISTERED"] = "IDENTITY_STATE_REGISTERED";
|
|
89
95
|
/** IDENTITY_STATE_ACTIVE - Active and participating */
|
|
90
|
-
|
|
96
|
+
State["IDENTITY_STATE_ACTIVE"] = "IDENTITY_STATE_ACTIVE";
|
|
91
97
|
/** IDENTITY_STATE_CHALLENGED - Under dispute (agent-specific) */
|
|
92
|
-
|
|
98
|
+
State["IDENTITY_STATE_CHALLENGED"] = "IDENTITY_STATE_CHALLENGED";
|
|
93
99
|
/** IDENTITY_STATE_SUSPENDED - Temporarily suspended */
|
|
94
|
-
|
|
100
|
+
State["IDENTITY_STATE_SUSPENDED"] = "IDENTITY_STATE_SUSPENDED";
|
|
95
101
|
/** IDENTITY_STATE_PROBATION - Recovering from suspension */
|
|
96
|
-
|
|
102
|
+
State["IDENTITY_STATE_PROBATION"] = "IDENTITY_STATE_PROBATION";
|
|
97
103
|
/** IDENTITY_STATE_SLASHED - Penalized (oracle-specific) */
|
|
98
|
-
|
|
104
|
+
State["IDENTITY_STATE_SLASHED"] = "IDENTITY_STATE_SLASHED";
|
|
99
105
|
/** IDENTITY_STATE_INACTIVE - Voluntarily inactive but can reactivate */
|
|
100
|
-
|
|
106
|
+
State["IDENTITY_STATE_INACTIVE"] = "IDENTITY_STATE_INACTIVE";
|
|
101
107
|
/** IDENTITY_STATE_WITHDRAWN - Terminal - exited permanently */
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
})(
|
|
105
|
-
function
|
|
108
|
+
State["IDENTITY_STATE_WITHDRAWN"] = "IDENTITY_STATE_WITHDRAWN";
|
|
109
|
+
State["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
110
|
+
})(State || (exports.State = State = {}));
|
|
111
|
+
function stateFromJSON(object) {
|
|
106
112
|
switch (object) {
|
|
107
113
|
case 0:
|
|
108
114
|
case "IDENTITY_STATE_UNSPECIFIED":
|
|
109
|
-
return
|
|
115
|
+
return State.IDENTITY_STATE_UNSPECIFIED;
|
|
110
116
|
case 1:
|
|
111
117
|
case "IDENTITY_STATE_UNREGISTERED":
|
|
112
|
-
return
|
|
118
|
+
return State.IDENTITY_STATE_UNREGISTERED;
|
|
113
119
|
case 2:
|
|
114
120
|
case "IDENTITY_STATE_REGISTERED":
|
|
115
|
-
return
|
|
121
|
+
return State.IDENTITY_STATE_REGISTERED;
|
|
116
122
|
case 3:
|
|
117
123
|
case "IDENTITY_STATE_ACTIVE":
|
|
118
|
-
return
|
|
124
|
+
return State.IDENTITY_STATE_ACTIVE;
|
|
119
125
|
case 4:
|
|
120
126
|
case "IDENTITY_STATE_CHALLENGED":
|
|
121
|
-
return
|
|
127
|
+
return State.IDENTITY_STATE_CHALLENGED;
|
|
122
128
|
case 5:
|
|
123
129
|
case "IDENTITY_STATE_SUSPENDED":
|
|
124
|
-
return
|
|
130
|
+
return State.IDENTITY_STATE_SUSPENDED;
|
|
125
131
|
case 6:
|
|
126
132
|
case "IDENTITY_STATE_PROBATION":
|
|
127
|
-
return
|
|
133
|
+
return State.IDENTITY_STATE_PROBATION;
|
|
128
134
|
case 7:
|
|
129
135
|
case "IDENTITY_STATE_SLASHED":
|
|
130
|
-
return
|
|
136
|
+
return State.IDENTITY_STATE_SLASHED;
|
|
131
137
|
case 8:
|
|
132
138
|
case "IDENTITY_STATE_INACTIVE":
|
|
133
|
-
return
|
|
139
|
+
return State.IDENTITY_STATE_INACTIVE;
|
|
134
140
|
case 9:
|
|
135
141
|
case "IDENTITY_STATE_WITHDRAWN":
|
|
136
|
-
return
|
|
142
|
+
return State.IDENTITY_STATE_WITHDRAWN;
|
|
137
143
|
case -1:
|
|
138
144
|
case "UNRECOGNIZED":
|
|
139
145
|
default:
|
|
140
|
-
return
|
|
146
|
+
return State.UNRECOGNIZED;
|
|
141
147
|
}
|
|
142
148
|
}
|
|
143
|
-
|
|
144
|
-
function identityStateToJSON(object) {
|
|
149
|
+
function stateToJSON(object) {
|
|
145
150
|
switch (object) {
|
|
146
|
-
case
|
|
151
|
+
case State.IDENTITY_STATE_UNSPECIFIED:
|
|
147
152
|
return "IDENTITY_STATE_UNSPECIFIED";
|
|
148
|
-
case
|
|
153
|
+
case State.IDENTITY_STATE_UNREGISTERED:
|
|
149
154
|
return "IDENTITY_STATE_UNREGISTERED";
|
|
150
|
-
case
|
|
155
|
+
case State.IDENTITY_STATE_REGISTERED:
|
|
151
156
|
return "IDENTITY_STATE_REGISTERED";
|
|
152
|
-
case
|
|
157
|
+
case State.IDENTITY_STATE_ACTIVE:
|
|
153
158
|
return "IDENTITY_STATE_ACTIVE";
|
|
154
|
-
case
|
|
159
|
+
case State.IDENTITY_STATE_CHALLENGED:
|
|
155
160
|
return "IDENTITY_STATE_CHALLENGED";
|
|
156
|
-
case
|
|
161
|
+
case State.IDENTITY_STATE_SUSPENDED:
|
|
157
162
|
return "IDENTITY_STATE_SUSPENDED";
|
|
158
|
-
case
|
|
163
|
+
case State.IDENTITY_STATE_PROBATION:
|
|
159
164
|
return "IDENTITY_STATE_PROBATION";
|
|
160
|
-
case
|
|
165
|
+
case State.IDENTITY_STATE_SLASHED:
|
|
161
166
|
return "IDENTITY_STATE_SLASHED";
|
|
162
|
-
case
|
|
167
|
+
case State.IDENTITY_STATE_INACTIVE:
|
|
163
168
|
return "IDENTITY_STATE_INACTIVE";
|
|
164
|
-
case
|
|
169
|
+
case State.IDENTITY_STATE_WITHDRAWN:
|
|
165
170
|
return "IDENTITY_STATE_WITHDRAWN";
|
|
166
|
-
case
|
|
171
|
+
case State.UNRECOGNIZED:
|
|
167
172
|
default:
|
|
168
173
|
return "UNRECOGNIZED";
|
|
169
174
|
}
|
|
170
175
|
}
|
|
171
|
-
|
|
172
|
-
function identityStateToNumber(object) {
|
|
176
|
+
function stateToNumber(object) {
|
|
173
177
|
switch (object) {
|
|
174
|
-
case
|
|
178
|
+
case State.IDENTITY_STATE_UNSPECIFIED:
|
|
175
179
|
return 0;
|
|
176
|
-
case
|
|
180
|
+
case State.IDENTITY_STATE_UNREGISTERED:
|
|
177
181
|
return 1;
|
|
178
|
-
case
|
|
182
|
+
case State.IDENTITY_STATE_REGISTERED:
|
|
179
183
|
return 2;
|
|
180
|
-
case
|
|
184
|
+
case State.IDENTITY_STATE_ACTIVE:
|
|
181
185
|
return 3;
|
|
182
|
-
case
|
|
186
|
+
case State.IDENTITY_STATE_CHALLENGED:
|
|
183
187
|
return 4;
|
|
184
|
-
case
|
|
188
|
+
case State.IDENTITY_STATE_SUSPENDED:
|
|
185
189
|
return 5;
|
|
186
|
-
case
|
|
190
|
+
case State.IDENTITY_STATE_PROBATION:
|
|
187
191
|
return 6;
|
|
188
|
-
case
|
|
192
|
+
case State.IDENTITY_STATE_SLASHED:
|
|
189
193
|
return 7;
|
|
190
|
-
case
|
|
194
|
+
case State.IDENTITY_STATE_INACTIVE:
|
|
191
195
|
return 8;
|
|
192
|
-
case
|
|
196
|
+
case State.IDENTITY_STATE_WITHDRAWN:
|
|
193
197
|
return 9;
|
|
194
|
-
case
|
|
198
|
+
case State.UNRECOGNIZED:
|
|
195
199
|
default:
|
|
196
200
|
return -1;
|
|
197
201
|
}
|
|
198
202
|
}
|
|
199
|
-
exports.identityStateToNumber = identityStateToNumber;
|
|
200
203
|
/** Platform where identity is linked */
|
|
201
204
|
var Platform;
|
|
202
205
|
(function (Platform) {
|
|
@@ -234,7 +237,6 @@ function platformFromJSON(object) {
|
|
|
234
237
|
return Platform.UNRECOGNIZED;
|
|
235
238
|
}
|
|
236
239
|
}
|
|
237
|
-
exports.platformFromJSON = platformFromJSON;
|
|
238
240
|
function platformToJSON(object) {
|
|
239
241
|
switch (object) {
|
|
240
242
|
case Platform.PLATFORM_UNSPECIFIED:
|
|
@@ -254,7 +256,6 @@ function platformToJSON(object) {
|
|
|
254
256
|
return "UNRECOGNIZED";
|
|
255
257
|
}
|
|
256
258
|
}
|
|
257
|
-
exports.platformToJSON = platformToJSON;
|
|
258
259
|
function platformToNumber(object) {
|
|
259
260
|
switch (object) {
|
|
260
261
|
case Platform.PLATFORM_UNSPECIFIED:
|
|
@@ -274,7 +275,6 @@ function platformToNumber(object) {
|
|
|
274
275
|
return -1;
|
|
275
276
|
}
|
|
276
277
|
}
|
|
277
|
-
exports.platformToNumber = platformToNumber;
|
|
278
278
|
function createBasePlatformLink() {
|
|
279
279
|
return {
|
|
280
280
|
platform: Platform.PLATFORM_UNSPECIFIED,
|
|
@@ -639,8 +639,8 @@ function createBaseIdentity() {
|
|
|
639
639
|
address: "",
|
|
640
640
|
publicKey: "",
|
|
641
641
|
displayName: "",
|
|
642
|
-
identityType:
|
|
643
|
-
state:
|
|
642
|
+
identityType: Type.IDENTITY_TYPE_UNSPECIFIED,
|
|
643
|
+
state: State.IDENTITY_STATE_UNSPECIFIED,
|
|
644
644
|
reputation: undefined,
|
|
645
645
|
stake: 0,
|
|
646
646
|
domains: [],
|
|
@@ -664,11 +664,11 @@ exports.Identity = {
|
|
|
664
664
|
if (message.displayName !== "") {
|
|
665
665
|
writer.uint32(34).string(message.displayName);
|
|
666
666
|
}
|
|
667
|
-
if (message.identityType !==
|
|
668
|
-
writer.uint32(40).int32(
|
|
667
|
+
if (message.identityType !== Type.IDENTITY_TYPE_UNSPECIFIED) {
|
|
668
|
+
writer.uint32(40).int32(typeToNumber(message.identityType));
|
|
669
669
|
}
|
|
670
|
-
if (message.state !==
|
|
671
|
-
writer.uint32(48).int32(
|
|
670
|
+
if (message.state !== State.IDENTITY_STATE_UNSPECIFIED) {
|
|
671
|
+
writer.uint32(48).int32(stateToNumber(message.state));
|
|
672
672
|
}
|
|
673
673
|
if (message.reputation !== undefined) {
|
|
674
674
|
exports.Reputation.encode(message.reputation, writer.uint32(58).fork()).join();
|
|
@@ -732,14 +732,14 @@ exports.Identity = {
|
|
|
732
732
|
if (tag !== 40) {
|
|
733
733
|
break;
|
|
734
734
|
}
|
|
735
|
-
message.identityType =
|
|
735
|
+
message.identityType = typeFromJSON(reader.int32());
|
|
736
736
|
continue;
|
|
737
737
|
}
|
|
738
738
|
case 6: {
|
|
739
739
|
if (tag !== 48) {
|
|
740
740
|
break;
|
|
741
741
|
}
|
|
742
|
-
message.state =
|
|
742
|
+
message.state = stateFromJSON(reader.int32());
|
|
743
743
|
continue;
|
|
744
744
|
}
|
|
745
745
|
case 7: {
|
|
@@ -814,11 +814,11 @@ exports.Identity = {
|
|
|
814
814
|
? globalThis.String(object.display_name)
|
|
815
815
|
: "",
|
|
816
816
|
identityType: isSet(object.identityType)
|
|
817
|
-
?
|
|
817
|
+
? typeFromJSON(object.identityType)
|
|
818
818
|
: isSet(object.identity_type)
|
|
819
|
-
?
|
|
820
|
-
:
|
|
821
|
-
state: isSet(object.state) ?
|
|
819
|
+
? typeFromJSON(object.identity_type)
|
|
820
|
+
: Type.IDENTITY_TYPE_UNSPECIFIED,
|
|
821
|
+
state: isSet(object.state) ? stateFromJSON(object.state) : State.IDENTITY_STATE_UNSPECIFIED,
|
|
822
822
|
reputation: isSet(object.reputation) ? exports.Reputation.fromJSON(object.reputation) : undefined,
|
|
823
823
|
stake: isSet(object.stake) ? globalThis.Number(object.stake) : 0,
|
|
824
824
|
domains: globalThis.Array.isArray(object?.domains) ? object.domains.map((e) => globalThis.String(e)) : [],
|
|
@@ -858,11 +858,11 @@ exports.Identity = {
|
|
|
858
858
|
if (message.displayName !== "") {
|
|
859
859
|
obj.displayName = message.displayName;
|
|
860
860
|
}
|
|
861
|
-
if (message.identityType !==
|
|
862
|
-
obj.identityType =
|
|
861
|
+
if (message.identityType !== Type.IDENTITY_TYPE_UNSPECIFIED) {
|
|
862
|
+
obj.identityType = typeToJSON(message.identityType);
|
|
863
863
|
}
|
|
864
|
-
if (message.state !==
|
|
865
|
-
obj.state =
|
|
864
|
+
if (message.state !== State.IDENTITY_STATE_UNSPECIFIED) {
|
|
865
|
+
obj.state = stateToJSON(message.state);
|
|
866
866
|
}
|
|
867
867
|
if (message.reputation !== undefined) {
|
|
868
868
|
obj.reputation = exports.Reputation.toJSON(message.reputation);
|
|
@@ -896,8 +896,8 @@ exports.Identity = {
|
|
|
896
896
|
message.address = object.address ?? "";
|
|
897
897
|
message.publicKey = object.publicKey ?? "";
|
|
898
898
|
message.displayName = object.displayName ?? "";
|
|
899
|
-
message.identityType = object.identityType ??
|
|
900
|
-
message.state = object.state ??
|
|
899
|
+
message.identityType = object.identityType ?? Type.IDENTITY_TYPE_UNSPECIFIED;
|
|
900
|
+
message.state = object.state ?? State.IDENTITY_STATE_UNSPECIFIED;
|
|
901
901
|
message.reputation = (object.reputation !== undefined && object.reputation !== null)
|
|
902
902
|
? exports.Reputation.fromPartial(object.reputation)
|
|
903
903
|
: undefined;
|
|
@@ -911,18 +911,12 @@ exports.Identity = {
|
|
|
911
911
|
},
|
|
912
912
|
};
|
|
913
913
|
function createBaseRegisterIdentityRequest() {
|
|
914
|
-
return {
|
|
915
|
-
identityType: IdentityType.IDENTITY_TYPE_UNSPECIFIED,
|
|
916
|
-
address: "",
|
|
917
|
-
displayName: "",
|
|
918
|
-
initialStake: 0,
|
|
919
|
-
domains: [],
|
|
920
|
-
};
|
|
914
|
+
return { identityType: Type.IDENTITY_TYPE_UNSPECIFIED, address: "", displayName: "", initialStake: 0, domains: [] };
|
|
921
915
|
}
|
|
922
916
|
exports.RegisterIdentityRequest = {
|
|
923
917
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
924
|
-
if (message.identityType !==
|
|
925
|
-
writer.uint32(8).int32(
|
|
918
|
+
if (message.identityType !== Type.IDENTITY_TYPE_UNSPECIFIED) {
|
|
919
|
+
writer.uint32(8).int32(typeToNumber(message.identityType));
|
|
926
920
|
}
|
|
927
921
|
if (message.address !== "") {
|
|
928
922
|
writer.uint32(18).string(message.address);
|
|
@@ -949,7 +943,7 @@ exports.RegisterIdentityRequest = {
|
|
|
949
943
|
if (tag !== 8) {
|
|
950
944
|
break;
|
|
951
945
|
}
|
|
952
|
-
message.identityType =
|
|
946
|
+
message.identityType = typeFromJSON(reader.int32());
|
|
953
947
|
continue;
|
|
954
948
|
}
|
|
955
949
|
case 2: {
|
|
@@ -991,10 +985,10 @@ exports.RegisterIdentityRequest = {
|
|
|
991
985
|
fromJSON(object) {
|
|
992
986
|
return {
|
|
993
987
|
identityType: isSet(object.identityType)
|
|
994
|
-
?
|
|
988
|
+
? typeFromJSON(object.identityType)
|
|
995
989
|
: isSet(object.identity_type)
|
|
996
|
-
?
|
|
997
|
-
:
|
|
990
|
+
? typeFromJSON(object.identity_type)
|
|
991
|
+
: Type.IDENTITY_TYPE_UNSPECIFIED,
|
|
998
992
|
address: isSet(object.address) ? globalThis.String(object.address) : "",
|
|
999
993
|
displayName: isSet(object.displayName)
|
|
1000
994
|
? globalThis.String(object.displayName)
|
|
@@ -1011,8 +1005,8 @@ exports.RegisterIdentityRequest = {
|
|
|
1011
1005
|
},
|
|
1012
1006
|
toJSON(message) {
|
|
1013
1007
|
const obj = {};
|
|
1014
|
-
if (message.identityType !==
|
|
1015
|
-
obj.identityType =
|
|
1008
|
+
if (message.identityType !== Type.IDENTITY_TYPE_UNSPECIFIED) {
|
|
1009
|
+
obj.identityType = typeToJSON(message.identityType);
|
|
1016
1010
|
}
|
|
1017
1011
|
if (message.address !== "") {
|
|
1018
1012
|
obj.address = message.address;
|
|
@@ -1033,7 +1027,7 @@ exports.RegisterIdentityRequest = {
|
|
|
1033
1027
|
},
|
|
1034
1028
|
fromPartial(object) {
|
|
1035
1029
|
const message = createBaseRegisterIdentityRequest();
|
|
1036
|
-
message.identityType = object.identityType ??
|
|
1030
|
+
message.identityType = object.identityType ?? Type.IDENTITY_TYPE_UNSPECIFIED;
|
|
1037
1031
|
message.address = object.address ?? "";
|
|
1038
1032
|
message.displayName = object.displayName ?? "";
|
|
1039
1033
|
message.initialStake = object.initialStake ?? 0;
|
|
@@ -1475,7 +1469,7 @@ exports.WithdrawIdentityRequest = {
|
|
|
1475
1469
|
};
|
|
1476
1470
|
function createBaseIdentityDefinition() {
|
|
1477
1471
|
return {
|
|
1478
|
-
identityType:
|
|
1472
|
+
identityType: Type.IDENTITY_TYPE_UNSPECIFIED,
|
|
1479
1473
|
initialReputation: 0,
|
|
1480
1474
|
activationThreshold: 0,
|
|
1481
1475
|
minStake: 0,
|
|
@@ -1486,8 +1480,8 @@ function createBaseIdentityDefinition() {
|
|
|
1486
1480
|
}
|
|
1487
1481
|
exports.IdentityDefinition = {
|
|
1488
1482
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1489
|
-
if (message.identityType !==
|
|
1490
|
-
writer.uint32(8).int32(
|
|
1483
|
+
if (message.identityType !== Type.IDENTITY_TYPE_UNSPECIFIED) {
|
|
1484
|
+
writer.uint32(8).int32(typeToNumber(message.identityType));
|
|
1491
1485
|
}
|
|
1492
1486
|
if (message.initialReputation !== 0) {
|
|
1493
1487
|
writer.uint32(16).int32(message.initialReputation);
|
|
@@ -1520,7 +1514,7 @@ exports.IdentityDefinition = {
|
|
|
1520
1514
|
if (tag !== 8) {
|
|
1521
1515
|
break;
|
|
1522
1516
|
}
|
|
1523
|
-
message.identityType =
|
|
1517
|
+
message.identityType = typeFromJSON(reader.int32());
|
|
1524
1518
|
continue;
|
|
1525
1519
|
}
|
|
1526
1520
|
case 2: {
|
|
@@ -1576,10 +1570,10 @@ exports.IdentityDefinition = {
|
|
|
1576
1570
|
fromJSON(object) {
|
|
1577
1571
|
return {
|
|
1578
1572
|
identityType: isSet(object.identityType)
|
|
1579
|
-
?
|
|
1573
|
+
? typeFromJSON(object.identityType)
|
|
1580
1574
|
: isSet(object.identity_type)
|
|
1581
|
-
?
|
|
1582
|
-
:
|
|
1575
|
+
? typeFromJSON(object.identity_type)
|
|
1576
|
+
: Type.IDENTITY_TYPE_UNSPECIFIED,
|
|
1583
1577
|
initialReputation: isSet(object.initialReputation)
|
|
1584
1578
|
? globalThis.Number(object.initialReputation)
|
|
1585
1579
|
: isSet(object.initial_reputation)
|
|
@@ -1614,8 +1608,8 @@ exports.IdentityDefinition = {
|
|
|
1614
1608
|
},
|
|
1615
1609
|
toJSON(message) {
|
|
1616
1610
|
const obj = {};
|
|
1617
|
-
if (message.identityType !==
|
|
1618
|
-
obj.identityType =
|
|
1611
|
+
if (message.identityType !== Type.IDENTITY_TYPE_UNSPECIFIED) {
|
|
1612
|
+
obj.identityType = typeToJSON(message.identityType);
|
|
1619
1613
|
}
|
|
1620
1614
|
if (message.initialReputation !== 0) {
|
|
1621
1615
|
obj.initialReputation = Math.round(message.initialReputation);
|
|
@@ -1642,7 +1636,7 @@ exports.IdentityDefinition = {
|
|
|
1642
1636
|
},
|
|
1643
1637
|
fromPartial(object) {
|
|
1644
1638
|
const message = createBaseIdentityDefinition();
|
|
1645
|
-
message.identityType = object.identityType ??
|
|
1639
|
+
message.identityType = object.identityType ?? Type.IDENTITY_TYPE_UNSPECIFIED;
|
|
1646
1640
|
message.initialReputation = object.initialReputation ?? 0;
|
|
1647
1641
|
message.activationThreshold = object.activationThreshold ?? 0;
|
|
1648
1642
|
message.minStake = object.minStake ?? 0;
|