@ottochain/sdk 1.7.0-beta.1 → 1.7.0-beta.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/dist/cjs/apps/identity/constants.js +28 -14
- package/dist/cjs/apps/identity/index.js +40 -17
- package/dist/cjs/generated/google/protobuf/struct.js +1 -1
- package/dist/cjs/generated/google/protobuf/timestamp.js +1 -1
- package/dist/cjs/generated/index.js +19 -22
- package/dist/cjs/generated/ottochain/apps/contracts/v1/contract.js +1 -1
- package/dist/cjs/generated/ottochain/apps/corporate/v1/corporate.js +1 -1
- package/dist/cjs/generated/ottochain/apps/governance/v1/governance.js +1 -1
- package/dist/cjs/generated/ottochain/apps/identity/v1/attestation.js +12 -12
- package/dist/cjs/generated/ottochain/apps/identity/v1/identity.js +1689 -0
- package/dist/cjs/generated/ottochain/apps/markets/v1/market.js +1 -1
- package/dist/cjs/generated/ottochain/v1/common.js +1 -1
- package/dist/cjs/generated/ottochain/v1/fiber.js +1 -1
- package/dist/cjs/generated/ottochain/v1/messages.js +1 -1
- package/dist/cjs/generated/ottochain/v1/records.js +1 -1
- package/dist/esm/apps/identity/constants.js +27 -13
- package/dist/esm/apps/identity/index.js +19 -8
- 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 +2 -3
- package/dist/esm/generated/ottochain/apps/contracts/v1/contract.js +1 -1
- 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 +2 -2
- package/dist/esm/generated/ottochain/apps/identity/v1/identity.js +1677 -0
- package/dist/esm/generated/ottochain/apps/markets/v1/market.js +1 -1
- package/dist/esm/generated/ottochain/v1/common.js +1 -1
- package/dist/esm/generated/ottochain/v1/fiber.js +1 -1
- package/dist/esm/generated/ottochain/v1/messages.js +1 -1
- package/dist/esm/generated/ottochain/v1/records.js +1 -1
- package/dist/types/apps/identity/constants.d.ts +10 -5
- package/dist/types/apps/identity/index.d.ts +21 -10
- package/dist/types/generated/index.d.ts +1 -2
- package/dist/types/generated/ottochain/apps/identity/v1/attestation.d.ts +1 -1
- package/dist/types/generated/ottochain/apps/identity/v1/identity.d.ts +208 -0
- package/package.json +1 -1
- package/dist/cjs/generated/ottochain/apps/identity/v1/agent.js +0 -619
- package/dist/cjs/generated/ottochain/apps/oracles/v1/oracle.js +0 -1223
- package/dist/esm/generated/ottochain/apps/identity/v1/agent.js +0 -610
- package/dist/esm/generated/ottochain/apps/oracles/v1/oracle.js +0 -1217
- package/dist/types/generated/ottochain/apps/identity/v1/agent.d.ts +0 -94
- package/dist/types/generated/ottochain/apps/oracles/v1/oracle.d.ts +0 -150
|
@@ -2,31 +2,35 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Identity Constants
|
|
4
4
|
*
|
|
5
|
-
* State machine transitions and configuration constants for
|
|
5
|
+
* State machine transitions and configuration constants for identities.
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.getReputationDelta = exports.canTransition = exports.ATTESTATION_DELTAS = exports.AGENT_TRANSITIONS = void 0;
|
|
11
|
-
const
|
|
10
|
+
exports.IDENTITY_TYPE_NAMES = exports.getReputationDelta = exports.canTransition = exports.ATTESTATION_DELTAS = exports.AGENT_TRANSITIONS = exports.IDENTITY_TRANSITIONS = void 0;
|
|
11
|
+
const identity_js_1 = require("../../generated/ottochain/apps/identity/v1/identity.js");
|
|
12
12
|
const attestation_js_1 = require("../../generated/ottochain/apps/identity/v1/attestation.js");
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
14
|
// State Machine Transitions
|
|
15
15
|
// ---------------------------------------------------------------------------
|
|
16
16
|
/**
|
|
17
|
-
* Valid transitions for each
|
|
17
|
+
* Valid transitions for each identity state.
|
|
18
18
|
* Maps current state to allowed event names.
|
|
19
19
|
*/
|
|
20
|
-
exports.
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
20
|
+
exports.IDENTITY_TRANSITIONS = {
|
|
21
|
+
[identity_js_1.IdentityState.IDENTITY_STATE_UNSPECIFIED]: [],
|
|
22
|
+
[identity_js_1.IdentityState.IDENTITY_STATE_UNREGISTERED]: ['register'],
|
|
23
|
+
[identity_js_1.IdentityState.IDENTITY_STATE_REGISTERED]: ['activate', 'withdraw'],
|
|
24
|
+
[identity_js_1.IdentityState.IDENTITY_STATE_ACTIVE]: ['challenge', 'deactivate', 'withdraw', 'penalize'],
|
|
25
|
+
[identity_js_1.IdentityState.IDENTITY_STATE_INACTIVE]: ['activate', 'withdraw'],
|
|
26
|
+
[identity_js_1.IdentityState.IDENTITY_STATE_CHALLENGED]: ['uphold_challenge', 'dismiss_challenge'],
|
|
27
|
+
[identity_js_1.IdentityState.IDENTITY_STATE_SUSPENDED]: ['begin_probation', 'withdraw'],
|
|
28
|
+
[identity_js_1.IdentityState.IDENTITY_STATE_PROBATION]: ['complete_probation'],
|
|
29
|
+
[identity_js_1.IdentityState.IDENTITY_STATE_WITHDRAWN]: [], // Terminal state
|
|
30
|
+
[identity_js_1.IdentityState.UNRECOGNIZED]: [],
|
|
29
31
|
};
|
|
32
|
+
// Legacy alias for backward compatibility
|
|
33
|
+
exports.AGENT_TRANSITIONS = exports.IDENTITY_TRANSITIONS;
|
|
30
34
|
// ---------------------------------------------------------------------------
|
|
31
35
|
// Reputation Configuration
|
|
32
36
|
// ---------------------------------------------------------------------------
|
|
@@ -46,7 +50,7 @@ exports.ATTESTATION_DELTAS = {
|
|
|
46
50
|
* Check if a transition is valid for the given state.
|
|
47
51
|
*/
|
|
48
52
|
function canTransition(state, event) {
|
|
49
|
-
return exports.
|
|
53
|
+
return exports.IDENTITY_TRANSITIONS[state]?.includes(event) ?? false;
|
|
50
54
|
}
|
|
51
55
|
exports.canTransition = canTransition;
|
|
52
56
|
/**
|
|
@@ -56,3 +60,13 @@ function getReputationDelta(type) {
|
|
|
56
60
|
return exports.ATTESTATION_DELTAS[type] ?? 0;
|
|
57
61
|
}
|
|
58
62
|
exports.getReputationDelta = getReputationDelta;
|
|
63
|
+
/**
|
|
64
|
+
* Identity type display names
|
|
65
|
+
*/
|
|
66
|
+
exports.IDENTITY_TYPE_NAMES = {
|
|
67
|
+
[identity_js_1.IdentityType.IDENTITY_TYPE_UNSPECIFIED]: 'Unknown',
|
|
68
|
+
[identity_js_1.IdentityType.IDENTITY_TYPE_AGENT]: 'Agent',
|
|
69
|
+
[identity_js_1.IdentityType.IDENTITY_TYPE_ORACLE]: 'Oracle',
|
|
70
|
+
[identity_js_1.IdentityType.IDENTITY_TYPE_SERVICE]: 'Service',
|
|
71
|
+
[identity_js_1.IdentityType.UNRECOGNIZED]: 'Unknown',
|
|
72
|
+
};
|
|
@@ -1,35 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Identity Application
|
|
4
4
|
*
|
|
5
|
-
* Types and utilities for the
|
|
5
|
+
* Types and utilities for the Identity system on OttoChain.
|
|
6
|
+
* Includes agents, oracles, and services.
|
|
6
7
|
*
|
|
7
8
|
* @example
|
|
8
9
|
* ```typescript
|
|
9
10
|
* import {
|
|
10
|
-
*
|
|
11
|
-
*
|
|
11
|
+
* IdentityState,
|
|
12
|
+
* IdentityType,
|
|
12
13
|
* getIdentityDefinition
|
|
13
14
|
* } from '@ottochain/sdk/apps/identity';
|
|
14
15
|
*
|
|
15
|
-
* const
|
|
16
|
+
* const oracleDef = getIdentityDefinition('oracle');
|
|
16
17
|
* ```
|
|
17
18
|
*
|
|
18
19
|
* @packageDocumentation
|
|
19
20
|
*/
|
|
20
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.getIdentityDefinition = exports.IDENTITY_DEFINITIONS = exports.identityOracleDef = exports.identityAgentDef = exports.identityUniversalDef = exports.DEFAULT_REPUTATION_CONFIG = exports.getReputationDelta = exports.canTransition = exports.ATTESTATION_DELTAS = exports.AGENT_TRANSITIONS = exports.attestationTypeToJSON = exports.attestationTypeFromJSON = exports.ReputationConfig = exports.ChallengeRequest = exports.VouchRequest = exports.Attestation = exports.ReputationDelta = exports.AttestationType = exports.platformToJSON = exports.platformFromJSON = exports.
|
|
22
|
+
exports.getIdentityDefinition = exports.IDENTITY_DEFINITIONS = exports.identityOracleDef = exports.identityAgentDef = exports.identityUniversalDef = exports.DEFAULT_ORACLE_CONFIG = exports.DEFAULT_REPUTATION_CONFIG = exports.getReputationDelta = exports.canTransition = exports.IDENTITY_TYPE_NAMES = exports.ATTESTATION_DELTAS = exports.AGENT_TRANSITIONS = exports.IDENTITY_TRANSITIONS = exports.attestationTypeToJSON = exports.attestationTypeFromJSON = exports.ReputationConfig = exports.ChallengeRequest = exports.VouchRequest = exports.Attestation = exports.ReputationDelta = exports.AttestationType = exports.platformToJSON = exports.platformFromJSON = exports.identityStateToJSON = exports.identityStateFromJSON = exports.identityTypeToJSON = exports.identityTypeFromJSON = exports.IdentityDefinition = exports.WithdrawIdentityRequest = exports.PenalizeIdentityRequest = exports.ChallengeIdentityRequest = exports.UpdateStakeRequest = exports.ActivateIdentityRequest = exports.RegisterIdentityRequest = exports.Identity = exports.PenaltyEvent = exports.Reputation = exports.PlatformLink = exports.Platform = exports.IdentityState = exports.IdentityType = void 0;
|
|
22
23
|
// Re-export generated protobuf types (source of truth)
|
|
23
|
-
var
|
|
24
|
-
Object.defineProperty(exports, "
|
|
25
|
-
Object.defineProperty(exports, "
|
|
26
|
-
Object.defineProperty(exports, "
|
|
27
|
-
Object.defineProperty(exports, "
|
|
28
|
-
Object.defineProperty(exports, "
|
|
29
|
-
Object.defineProperty(exports, "
|
|
30
|
-
Object.defineProperty(exports, "
|
|
31
|
-
Object.defineProperty(exports, "
|
|
32
|
-
Object.defineProperty(exports, "
|
|
24
|
+
var identity_js_1 = require("../../generated/ottochain/apps/identity/v1/identity.js");
|
|
25
|
+
Object.defineProperty(exports, "IdentityType", { enumerable: true, get: function () { return identity_js_1.IdentityType; } });
|
|
26
|
+
Object.defineProperty(exports, "IdentityState", { enumerable: true, get: function () { return identity_js_1.IdentityState; } });
|
|
27
|
+
Object.defineProperty(exports, "Platform", { enumerable: true, get: function () { return identity_js_1.Platform; } });
|
|
28
|
+
Object.defineProperty(exports, "PlatformLink", { enumerable: true, get: function () { return identity_js_1.PlatformLink; } });
|
|
29
|
+
Object.defineProperty(exports, "Reputation", { enumerable: true, get: function () { return identity_js_1.Reputation; } });
|
|
30
|
+
Object.defineProperty(exports, "PenaltyEvent", { enumerable: true, get: function () { return identity_js_1.PenaltyEvent; } });
|
|
31
|
+
Object.defineProperty(exports, "Identity", { enumerable: true, get: function () { return identity_js_1.Identity; } });
|
|
32
|
+
Object.defineProperty(exports, "RegisterIdentityRequest", { enumerable: true, get: function () { return identity_js_1.RegisterIdentityRequest; } });
|
|
33
|
+
Object.defineProperty(exports, "ActivateIdentityRequest", { enumerable: true, get: function () { return identity_js_1.ActivateIdentityRequest; } });
|
|
34
|
+
Object.defineProperty(exports, "UpdateStakeRequest", { enumerable: true, get: function () { return identity_js_1.UpdateStakeRequest; } });
|
|
35
|
+
Object.defineProperty(exports, "ChallengeIdentityRequest", { enumerable: true, get: function () { return identity_js_1.ChallengeIdentityRequest; } });
|
|
36
|
+
Object.defineProperty(exports, "PenalizeIdentityRequest", { enumerable: true, get: function () { return identity_js_1.PenalizeIdentityRequest; } });
|
|
37
|
+
Object.defineProperty(exports, "WithdrawIdentityRequest", { enumerable: true, get: function () { return identity_js_1.WithdrawIdentityRequest; } });
|
|
38
|
+
Object.defineProperty(exports, "IdentityDefinition", { enumerable: true, get: function () { return identity_js_1.IdentityDefinition; } });
|
|
39
|
+
Object.defineProperty(exports, "identityTypeFromJSON", { enumerable: true, get: function () { return identity_js_1.identityTypeFromJSON; } });
|
|
40
|
+
Object.defineProperty(exports, "identityTypeToJSON", { enumerable: true, get: function () { return identity_js_1.identityTypeToJSON; } });
|
|
41
|
+
Object.defineProperty(exports, "identityStateFromJSON", { enumerable: true, get: function () { return identity_js_1.identityStateFromJSON; } });
|
|
42
|
+
Object.defineProperty(exports, "identityStateToJSON", { enumerable: true, get: function () { return identity_js_1.identityStateToJSON; } });
|
|
43
|
+
Object.defineProperty(exports, "platformFromJSON", { enumerable: true, get: function () { return identity_js_1.platformFromJSON; } });
|
|
44
|
+
Object.defineProperty(exports, "platformToJSON", { enumerable: true, get: function () { return identity_js_1.platformToJSON; } });
|
|
33
45
|
var attestation_js_1 = require("../../generated/ottochain/apps/identity/v1/attestation.js");
|
|
34
46
|
Object.defineProperty(exports, "AttestationType", { enumerable: true, get: function () { return attestation_js_1.AttestationType; } });
|
|
35
47
|
Object.defineProperty(exports, "ReputationDelta", { enumerable: true, get: function () { return attestation_js_1.ReputationDelta; } });
|
|
@@ -41,15 +53,17 @@ Object.defineProperty(exports, "attestationTypeFromJSON", { enumerable: true, ge
|
|
|
41
53
|
Object.defineProperty(exports, "attestationTypeToJSON", { enumerable: true, get: function () { return attestation_js_1.attestationTypeToJSON; } });
|
|
42
54
|
// Re-export constants and utilities
|
|
43
55
|
var constants_js_1 = require("./constants.js");
|
|
56
|
+
Object.defineProperty(exports, "IDENTITY_TRANSITIONS", { enumerable: true, get: function () { return constants_js_1.IDENTITY_TRANSITIONS; } });
|
|
44
57
|
Object.defineProperty(exports, "AGENT_TRANSITIONS", { enumerable: true, get: function () { return constants_js_1.AGENT_TRANSITIONS; } });
|
|
45
58
|
Object.defineProperty(exports, "ATTESTATION_DELTAS", { enumerable: true, get: function () { return constants_js_1.ATTESTATION_DELTAS; } });
|
|
59
|
+
Object.defineProperty(exports, "IDENTITY_TYPE_NAMES", { enumerable: true, get: function () { return constants_js_1.IDENTITY_TYPE_NAMES; } });
|
|
46
60
|
Object.defineProperty(exports, "canTransition", { enumerable: true, get: function () { return constants_js_1.canTransition; } });
|
|
47
61
|
Object.defineProperty(exports, "getReputationDelta", { enumerable: true, get: function () { return constants_js_1.getReputationDelta; } });
|
|
48
62
|
// ---------------------------------------------------------------------------
|
|
49
63
|
// Configuration Defaults
|
|
50
64
|
// ---------------------------------------------------------------------------
|
|
51
65
|
/**
|
|
52
|
-
* Default reputation configuration for
|
|
66
|
+
* Default reputation configuration for identities
|
|
53
67
|
*/
|
|
54
68
|
exports.DEFAULT_REPUTATION_CONFIG = {
|
|
55
69
|
baseReputation: 10,
|
|
@@ -60,6 +74,15 @@ exports.DEFAULT_REPUTATION_CONFIG = {
|
|
|
60
74
|
minReputation: 0,
|
|
61
75
|
challengeThreshold: 5,
|
|
62
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Default oracle configuration
|
|
79
|
+
*/
|
|
80
|
+
exports.DEFAULT_ORACLE_CONFIG = {
|
|
81
|
+
minStake: 100,
|
|
82
|
+
slashCooldownEpochs: 7,
|
|
83
|
+
accuracyThreshold: 70,
|
|
84
|
+
maxDisputeRate: 30,
|
|
85
|
+
};
|
|
63
86
|
// ---------------------------------------------------------------------------
|
|
64
87
|
// State Machine Definitions (generated from JSON at build time)
|
|
65
88
|
// ---------------------------------------------------------------------------
|
|
@@ -1,7 +1,7 @@
|
|
|
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.5
|
|
5
5
|
// protoc unknown
|
|
6
6
|
// source: google/protobuf/struct.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,7 +1,7 @@
|
|
|
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.5
|
|
5
5
|
// protoc unknown
|
|
6
6
|
// source: google/protobuf/timestamp.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
* See docs/type-architecture.md for full migration plan.
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.
|
|
22
|
-
exports.BoardMeeting = exports.QuorumRules = exports.SeatInfo = exports.Director = exports.CorporateBoard = exports.ShareStructure = exports.Incorporator = exports.RegisteredAgent = exports.CorporateEntity = exports.ShareClass = exports.Jurisdiction = exports.ResolutionStatus = exports.BoardMeetingType = exports.OfficerStatus = exports.DirectorStatus = exports.EntityState = exports.EntityType = exports.ExecuteRequest = exports.VoteRequest = exports.ProposeRequest = exports.CreateDAORequest = exports.ThresholdHistoryEntry = exports.ThresholdVotes = exports.ThresholdDAO = exports.TokenProposalResult = exports.TokenDAO = exports.MultisigAction = exports.MultisigDAO = exports.OwnershipTransfer = exports.SingleOwnerAction = exports.SingleOwnerDAO = exports.VoteTally = exports.Vote = exports.Proposal = exports.DAOMetadata = exports.VoteChoice = exports.ProposalStatus = exports.DAOStatus = exports.DAOType = exports.
|
|
23
|
-
exports.ProposeResolutionRequest = exports.IssueSharesRequest = exports.AppointDirectorRequest = exports.CreateEntityRequest = exports.ComplianceRequirement = exports.FilingRecord = exports.CorporateCompliance = exports.SecurityTransfer = exports.SecurityIssuance = exports.CorporateSecurities = exports.ResolutionVote = exports.CorporateResolution = exports.ShareHolding = exports.Shareholder = exports.CorporateShareholders = exports.OfficerAction = exports.Officer =
|
|
21
|
+
exports.MarketType = exports.ContractDefinition = exports.DisputeContractRequest = exports.RejectContractRequest = exports.CompleteContractRequest = exports.AcceptContractRequest = exports.ProposeContractRequest = exports.Contract = exports.ContractState = exports.ReputationConfig = exports.ChallengeRequest = exports.VouchRequest = exports.Attestation = exports.ReputationDelta = exports.AttestationType = exports.IdentityDefinition = exports.WithdrawIdentityRequest = exports.PenalizeIdentityRequest = exports.ChallengeIdentityRequest = exports.UpdateStakeRequest = exports.ActivateIdentityRequest = exports.RegisterIdentityRequest = exports.Identity = exports.PenaltyEvent = exports.Reputation = exports.PlatformLink = exports.Platform = exports.IdentityState = exports.IdentityType = exports.CalculatedState = exports.OnChainState = exports.FiberCommit = exports.ScriptFiberRecord = exports.StateMachineFiberRecord = exports.OttochainMessage = exports.InvokeScript = exports.CreateScript = exports.ArchiveStateMachine = exports.TransitionStateMachine = exports.CreateStateMachine = exports.FiberLogEntry = exports.ScriptInvocation = exports.EventReceipt = exports.EmittedEvent = exports.StateMachineDefinition = exports.FiberOwnedAccess = exports.WhitelistAccess = exports.PublicAccess = exports.AccessControlPolicy = exports.FiberStatus = void 0;
|
|
22
|
+
exports.CorporateOfficers = exports.MeetingAttendee = exports.BoardMeeting = exports.QuorumRules = exports.SeatInfo = exports.Director = exports.CorporateBoard = exports.ShareStructure = exports.Incorporator = exports.RegisteredAgent = exports.CorporateEntity = exports.ShareClass = exports.Jurisdiction = exports.ResolutionStatus = exports.BoardMeetingType = exports.OfficerStatus = exports.DirectorStatus = exports.EntityState = exports.EntityType = exports.ExecuteRequest = exports.VoteRequest = exports.ProposeRequest = exports.CreateDAORequest = exports.ThresholdHistoryEntry = exports.ThresholdVotes = exports.ThresholdDAO = exports.TokenProposalResult = exports.TokenDAO = exports.MultisigAction = exports.MultisigDAO = exports.OwnershipTransfer = exports.SingleOwnerAction = exports.SingleOwnerDAO = exports.VoteTally = exports.Vote = exports.Proposal = exports.DAOMetadata = exports.VoteChoice = exports.ProposalStatus = exports.DAOStatus = exports.DAOType = exports.MarketDefinition = exports.CancelMarketRequest = exports.SubmitResolutionRequest = exports.CommitToMarketRequest = exports.CreateMarketRequest = exports.Market = exports.Resolution = exports.Commitment = exports.MarketState = void 0;
|
|
23
|
+
exports.ProposeResolutionRequest = exports.IssueSharesRequest = exports.AppointDirectorRequest = exports.CreateEntityRequest = exports.ComplianceRequirement = exports.FilingRecord = exports.CorporateCompliance = exports.SecurityTransfer = exports.SecurityIssuance = exports.CorporateSecurities = exports.ResolutionVote = exports.CorporateResolution = exports.ShareHolding = exports.Shareholder = exports.CorporateShareholders = exports.OfficerAction = exports.Officer = void 0;
|
|
24
24
|
// Core types (primitives - no wrapper messages)
|
|
25
25
|
// Type aliases are in src/types.ts
|
|
26
26
|
var fiber_js_1 = require("./ottochain/v1/fiber.js");
|
|
@@ -48,12 +48,21 @@ Object.defineProperty(exports, "FiberCommit", { enumerable: true, get: function
|
|
|
48
48
|
Object.defineProperty(exports, "OnChainState", { enumerable: true, get: function () { return records_js_1.OnChainState; } });
|
|
49
49
|
Object.defineProperty(exports, "CalculatedState", { enumerable: true, get: function () { return records_js_1.CalculatedState; } });
|
|
50
50
|
// App: Identity
|
|
51
|
-
var
|
|
52
|
-
Object.defineProperty(exports, "
|
|
53
|
-
Object.defineProperty(exports, "
|
|
54
|
-
Object.defineProperty(exports, "
|
|
55
|
-
Object.defineProperty(exports, "
|
|
56
|
-
Object.defineProperty(exports, "
|
|
51
|
+
var identity_js_1 = require("./ottochain/apps/identity/v1/identity.js");
|
|
52
|
+
Object.defineProperty(exports, "IdentityType", { enumerable: true, get: function () { return identity_js_1.IdentityType; } });
|
|
53
|
+
Object.defineProperty(exports, "IdentityState", { enumerable: true, get: function () { return identity_js_1.IdentityState; } });
|
|
54
|
+
Object.defineProperty(exports, "Platform", { enumerable: true, get: function () { return identity_js_1.Platform; } });
|
|
55
|
+
Object.defineProperty(exports, "PlatformLink", { enumerable: true, get: function () { return identity_js_1.PlatformLink; } });
|
|
56
|
+
Object.defineProperty(exports, "Reputation", { enumerable: true, get: function () { return identity_js_1.Reputation; } });
|
|
57
|
+
Object.defineProperty(exports, "PenaltyEvent", { enumerable: true, get: function () { return identity_js_1.PenaltyEvent; } });
|
|
58
|
+
Object.defineProperty(exports, "Identity", { enumerable: true, get: function () { return identity_js_1.Identity; } });
|
|
59
|
+
Object.defineProperty(exports, "RegisterIdentityRequest", { enumerable: true, get: function () { return identity_js_1.RegisterIdentityRequest; } });
|
|
60
|
+
Object.defineProperty(exports, "ActivateIdentityRequest", { enumerable: true, get: function () { return identity_js_1.ActivateIdentityRequest; } });
|
|
61
|
+
Object.defineProperty(exports, "UpdateStakeRequest", { enumerable: true, get: function () { return identity_js_1.UpdateStakeRequest; } });
|
|
62
|
+
Object.defineProperty(exports, "ChallengeIdentityRequest", { enumerable: true, get: function () { return identity_js_1.ChallengeIdentityRequest; } });
|
|
63
|
+
Object.defineProperty(exports, "PenalizeIdentityRequest", { enumerable: true, get: function () { return identity_js_1.PenalizeIdentityRequest; } });
|
|
64
|
+
Object.defineProperty(exports, "WithdrawIdentityRequest", { enumerable: true, get: function () { return identity_js_1.WithdrawIdentityRequest; } });
|
|
65
|
+
Object.defineProperty(exports, "IdentityDefinition", { enumerable: true, get: function () { return identity_js_1.IdentityDefinition; } });
|
|
57
66
|
var attestation_js_1 = require("./ottochain/apps/identity/v1/attestation.js");
|
|
58
67
|
Object.defineProperty(exports, "AttestationType", { enumerable: true, get: function () { return attestation_js_1.AttestationType; } });
|
|
59
68
|
Object.defineProperty(exports, "ReputationDelta", { enumerable: true, get: function () { return attestation_js_1.ReputationDelta; } });
|
|
@@ -83,19 +92,7 @@ Object.defineProperty(exports, "CommitToMarketRequest", { enumerable: true, get:
|
|
|
83
92
|
Object.defineProperty(exports, "SubmitResolutionRequest", { enumerable: true, get: function () { return market_js_1.SubmitResolutionRequest; } });
|
|
84
93
|
Object.defineProperty(exports, "CancelMarketRequest", { enumerable: true, get: function () { return market_js_1.CancelMarketRequest; } });
|
|
85
94
|
Object.defineProperty(exports, "MarketDefinition", { enumerable: true, get: function () { return market_js_1.MarketDefinition; } });
|
|
86
|
-
//
|
|
87
|
-
var oracle_js_1 = require("./ottochain/apps/oracles/v1/oracle.js");
|
|
88
|
-
Object.defineProperty(exports, "OracleState", { enumerable: true, get: function () { return oracle_js_1.OracleState; } });
|
|
89
|
-
Object.defineProperty(exports, "OracleReputation", { enumerable: true, get: function () { return oracle_js_1.OracleReputation; } });
|
|
90
|
-
Object.defineProperty(exports, "SlashingEvent", { enumerable: true, get: function () { return oracle_js_1.SlashingEvent; } });
|
|
91
|
-
Object.defineProperty(exports, "Oracle", { enumerable: true, get: function () { return oracle_js_1.Oracle; } });
|
|
92
|
-
Object.defineProperty(exports, "RegisterOracleRequest", { enumerable: true, get: function () { return oracle_js_1.RegisterOracleRequest; } });
|
|
93
|
-
Object.defineProperty(exports, "ActivateOracleRequest", { enumerable: true, get: function () { return oracle_js_1.ActivateOracleRequest; } });
|
|
94
|
-
Object.defineProperty(exports, "AddStakeRequest", { enumerable: true, get: function () { return oracle_js_1.AddStakeRequest; } });
|
|
95
|
-
Object.defineProperty(exports, "WithdrawStakeRequest", { enumerable: true, get: function () { return oracle_js_1.WithdrawStakeRequest; } });
|
|
96
|
-
Object.defineProperty(exports, "SlashOracleRequest", { enumerable: true, get: function () { return oracle_js_1.SlashOracleRequest; } });
|
|
97
|
-
Object.defineProperty(exports, "WithdrawOracleRequest", { enumerable: true, get: function () { return oracle_js_1.WithdrawOracleRequest; } });
|
|
98
|
-
Object.defineProperty(exports, "OracleDefinition", { enumerable: true, get: function () { return oracle_js_1.OracleDefinition; } });
|
|
95
|
+
// Note: Oracle types merged into Identity (IdentityType.ORACLE)
|
|
99
96
|
// App: Governance
|
|
100
97
|
var governance_js_1 = require("./ottochain/apps/governance/v1/governance.js");
|
|
101
98
|
Object.defineProperty(exports, "DAOType", { enumerable: true, get: function () { return governance_js_1.DAOType; } });
|
|
@@ -1,7 +1,7 @@
|
|
|
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.5
|
|
5
5
|
// protoc unknown
|
|
6
6
|
// source: ottochain/apps/contracts/v1/contract.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,7 +1,7 @@
|
|
|
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.5
|
|
5
5
|
// protoc unknown
|
|
6
6
|
// source: ottochain/apps/corporate/v1/corporate.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,7 +1,7 @@
|
|
|
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.5
|
|
5
5
|
// protoc unknown
|
|
6
6
|
// source: ottochain/apps/governance/v1/governance.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,7 +1,7 @@
|
|
|
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.5
|
|
5
5
|
// protoc unknown
|
|
6
6
|
// source: ottochain/apps/identity/v1/attestation.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -9,7 +9,7 @@ exports.ReputationConfig = exports.ChallengeRequest = exports.VouchRequest = exp
|
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
11
|
const timestamp_js_1 = require("../../../../google/protobuf/timestamp.js");
|
|
12
|
-
const
|
|
12
|
+
const identity_js_1 = require("./identity.js");
|
|
13
13
|
exports.protobufPackage = "ottochain.apps.identity.v1";
|
|
14
14
|
/** Types of attestations that affect reputation */
|
|
15
15
|
var AttestationType;
|
|
@@ -197,7 +197,7 @@ function createBaseAttestation() {
|
|
|
197
197
|
type: AttestationType.ATTESTATION_TYPE_UNSPECIFIED,
|
|
198
198
|
subject: "",
|
|
199
199
|
issuer: "",
|
|
200
|
-
issuerPlatform:
|
|
200
|
+
issuerPlatform: identity_js_1.Platform.PLATFORM_UNSPECIFIED,
|
|
201
201
|
delta: 0,
|
|
202
202
|
reason: "",
|
|
203
203
|
txHash: "",
|
|
@@ -218,8 +218,8 @@ exports.Attestation = {
|
|
|
218
218
|
if (message.issuer !== "") {
|
|
219
219
|
writer.uint32(34).string(message.issuer);
|
|
220
220
|
}
|
|
221
|
-
if (message.issuerPlatform !==
|
|
222
|
-
writer.uint32(40).int32((0,
|
|
221
|
+
if (message.issuerPlatform !== identity_js_1.Platform.PLATFORM_UNSPECIFIED) {
|
|
222
|
+
writer.uint32(40).int32((0, identity_js_1.platformToNumber)(message.issuerPlatform));
|
|
223
223
|
}
|
|
224
224
|
if (message.delta !== 0) {
|
|
225
225
|
writer.uint32(48).int32(message.delta);
|
|
@@ -274,7 +274,7 @@ exports.Attestation = {
|
|
|
274
274
|
if (tag !== 40) {
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
|
-
message.issuerPlatform = (0,
|
|
277
|
+
message.issuerPlatform = (0, identity_js_1.platformFromJSON)(reader.int32());
|
|
278
278
|
continue;
|
|
279
279
|
}
|
|
280
280
|
case 6: {
|
|
@@ -320,10 +320,10 @@ exports.Attestation = {
|
|
|
320
320
|
subject: isSet(object.subject) ? globalThis.String(object.subject) : "",
|
|
321
321
|
issuer: isSet(object.issuer) ? globalThis.String(object.issuer) : "",
|
|
322
322
|
issuerPlatform: isSet(object.issuerPlatform)
|
|
323
|
-
? (0,
|
|
323
|
+
? (0, identity_js_1.platformFromJSON)(object.issuerPlatform)
|
|
324
324
|
: isSet(object.issuer_platform)
|
|
325
|
-
? (0,
|
|
326
|
-
:
|
|
325
|
+
? (0, identity_js_1.platformFromJSON)(object.issuer_platform)
|
|
326
|
+
: identity_js_1.Platform.PLATFORM_UNSPECIFIED,
|
|
327
327
|
delta: isSet(object.delta) ? globalThis.Number(object.delta) : 0,
|
|
328
328
|
reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
|
|
329
329
|
txHash: isSet(object.txHash)
|
|
@@ -352,8 +352,8 @@ exports.Attestation = {
|
|
|
352
352
|
if (message.issuer !== "") {
|
|
353
353
|
obj.issuer = message.issuer;
|
|
354
354
|
}
|
|
355
|
-
if (message.issuerPlatform !==
|
|
356
|
-
obj.issuerPlatform = (0,
|
|
355
|
+
if (message.issuerPlatform !== identity_js_1.Platform.PLATFORM_UNSPECIFIED) {
|
|
356
|
+
obj.issuerPlatform = (0, identity_js_1.platformToJSON)(message.issuerPlatform);
|
|
357
357
|
}
|
|
358
358
|
if (message.delta !== 0) {
|
|
359
359
|
obj.delta = Math.round(message.delta);
|
|
@@ -378,7 +378,7 @@ exports.Attestation = {
|
|
|
378
378
|
message.type = object.type ?? AttestationType.ATTESTATION_TYPE_UNSPECIFIED;
|
|
379
379
|
message.subject = object.subject ?? "";
|
|
380
380
|
message.issuer = object.issuer ?? "";
|
|
381
|
-
message.issuerPlatform = object.issuerPlatform ??
|
|
381
|
+
message.issuerPlatform = object.issuerPlatform ?? identity_js_1.Platform.PLATFORM_UNSPECIFIED;
|
|
382
382
|
message.delta = object.delta ?? 0;
|
|
383
383
|
message.reason = object.reason ?? "";
|
|
384
384
|
message.txHash = object.txHash ?? "";
|