@dfinity/nns-proto 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ module.exports = require('./cjs/index.cjs.js');
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './esm/index.js';
@@ -0,0 +1,60 @@
1
+ syntax = "proto3";
2
+
3
+ package ic_base_types.pb.v1;
4
+
5
+ import "google/protobuf/descriptor.proto";
6
+
7
+ // The annotated message is supported by hardware wallet signing.
8
+ // The numbering was chosen as the range 19000-19999 is anyway reserved in protobuf.
9
+ extend google.protobuf.MessageOptions {
10
+ bool tui_signed_message = 20000;
11
+ }
12
+
13
+ // The annotated field is displayed on the hardware wallet in the specification
14
+ // used by launch of the Internet Computer.
15
+ extend google.protobuf.FieldOptions {
16
+ bool tui_signed_display_q2_2021 = 20001;
17
+ }
18
+
19
+ // A PB container for a PrincipalId, which uniquely identifies
20
+ // a principal.
21
+ message PrincipalId {
22
+ option (tui_signed_message) = true;
23
+ bytes serialized_id = 1 [(tui_signed_display_q2_2021) = true];
24
+ }
25
+
26
+ // A PB container for a CanisterId, which uniquely identifies
27
+ // a principal.
28
+ message CanisterId {
29
+ bytes serialized_id = 1;
30
+ }
31
+
32
+ // A container for a NeuronId blob, which uniquely identifies
33
+ // a Neuron.
34
+ message NeuronId {
35
+ option (ic_base_types.pb.v1.tui_signed_message) = true;
36
+ // bytes serialized_id = 1;
37
+ reserved 1;
38
+ reserved 'serialized_id';
39
+ uint64 id = 2 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true, jstype = JS_STRING];;
40
+ }
41
+
42
+ // The id of a specific proposal.
43
+ message ProposalId {
44
+ uint64 id = 1 [jstype = JS_STRING];
45
+ }
46
+
47
+ // A descriptor of the authorization of a single method.
48
+ // Any of the principals in the list are authorized to execute
49
+ // the method.
50
+ message MethodAuthzInfo {
51
+ string method_name = 1;
52
+ repeated bytes principal_ids = 2;
53
+ }
54
+
55
+ // A descriptor of the authorization of all the update methods in a
56
+ // canister that require authorization.
57
+ // Methods that should be accessible to anyone should not appear in this list
58
+ message CanisterAuthzInfo {
59
+ repeated MethodAuthzInfo methods_authz = 1;
60
+ }
@@ -0,0 +1,144 @@
1
+ // package: ic_base_types.pb.v1
2
+ // file: proto/base_types.proto
3
+
4
+ import * as jspb from "google-protobuf";
5
+ import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb";
6
+
7
+ export class PrincipalId extends jspb.Message {
8
+ getSerializedId(): Uint8Array | string;
9
+ getSerializedId_asU8(): Uint8Array;
10
+ getSerializedId_asB64(): string;
11
+ setSerializedId(value: Uint8Array | string): void;
12
+
13
+ serializeBinary(): Uint8Array;
14
+ toObject(includeInstance?: boolean): PrincipalId.AsObject;
15
+ static toObject(includeInstance: boolean, msg: PrincipalId): PrincipalId.AsObject;
16
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
17
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
18
+ static serializeBinaryToWriter(message: PrincipalId, writer: jspb.BinaryWriter): void;
19
+ static deserializeBinary(bytes: Uint8Array): PrincipalId;
20
+ static deserializeBinaryFromReader(message: PrincipalId, reader: jspb.BinaryReader): PrincipalId;
21
+ }
22
+
23
+ export namespace PrincipalId {
24
+ export type AsObject = {
25
+ serializedId: Uint8Array | string,
26
+ }
27
+ }
28
+
29
+ export class CanisterId extends jspb.Message {
30
+ getSerializedId(): Uint8Array | string;
31
+ getSerializedId_asU8(): Uint8Array;
32
+ getSerializedId_asB64(): string;
33
+ setSerializedId(value: Uint8Array | string): void;
34
+
35
+ serializeBinary(): Uint8Array;
36
+ toObject(includeInstance?: boolean): CanisterId.AsObject;
37
+ static toObject(includeInstance: boolean, msg: CanisterId): CanisterId.AsObject;
38
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
39
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
40
+ static serializeBinaryToWriter(message: CanisterId, writer: jspb.BinaryWriter): void;
41
+ static deserializeBinary(bytes: Uint8Array): CanisterId;
42
+ static deserializeBinaryFromReader(message: CanisterId, reader: jspb.BinaryReader): CanisterId;
43
+ }
44
+
45
+ export namespace CanisterId {
46
+ export type AsObject = {
47
+ serializedId: Uint8Array | string,
48
+ }
49
+ }
50
+
51
+ export class NeuronId extends jspb.Message {
52
+ getId(): string;
53
+ setId(value: string): void;
54
+
55
+ serializeBinary(): Uint8Array;
56
+ toObject(includeInstance?: boolean): NeuronId.AsObject;
57
+ static toObject(includeInstance: boolean, msg: NeuronId): NeuronId.AsObject;
58
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
59
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
60
+ static serializeBinaryToWriter(message: NeuronId, writer: jspb.BinaryWriter): void;
61
+ static deserializeBinary(bytes: Uint8Array): NeuronId;
62
+ static deserializeBinaryFromReader(message: NeuronId, reader: jspb.BinaryReader): NeuronId;
63
+ }
64
+
65
+ export namespace NeuronId {
66
+ export type AsObject = {
67
+ id: string,
68
+ }
69
+ }
70
+
71
+ export class ProposalId extends jspb.Message {
72
+ getId(): string;
73
+ setId(value: string): void;
74
+
75
+ serializeBinary(): Uint8Array;
76
+ toObject(includeInstance?: boolean): ProposalId.AsObject;
77
+ static toObject(includeInstance: boolean, msg: ProposalId): ProposalId.AsObject;
78
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
79
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
80
+ static serializeBinaryToWriter(message: ProposalId, writer: jspb.BinaryWriter): void;
81
+ static deserializeBinary(bytes: Uint8Array): ProposalId;
82
+ static deserializeBinaryFromReader(message: ProposalId, reader: jspb.BinaryReader): ProposalId;
83
+ }
84
+
85
+ export namespace ProposalId {
86
+ export type AsObject = {
87
+ id: string,
88
+ }
89
+ }
90
+
91
+ export class MethodAuthzInfo extends jspb.Message {
92
+ getMethodName(): string;
93
+ setMethodName(value: string): void;
94
+
95
+ clearPrincipalIdsList(): void;
96
+ getPrincipalIdsList(): Array<Uint8Array | string>;
97
+ getPrincipalIdsList_asU8(): Array<Uint8Array>;
98
+ getPrincipalIdsList_asB64(): Array<string>;
99
+ setPrincipalIdsList(value: Array<Uint8Array | string>): void;
100
+ addPrincipalIds(value: Uint8Array | string, index?: number): Uint8Array | string;
101
+
102
+ serializeBinary(): Uint8Array;
103
+ toObject(includeInstance?: boolean): MethodAuthzInfo.AsObject;
104
+ static toObject(includeInstance: boolean, msg: MethodAuthzInfo): MethodAuthzInfo.AsObject;
105
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
106
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
107
+ static serializeBinaryToWriter(message: MethodAuthzInfo, writer: jspb.BinaryWriter): void;
108
+ static deserializeBinary(bytes: Uint8Array): MethodAuthzInfo;
109
+ static deserializeBinaryFromReader(message: MethodAuthzInfo, reader: jspb.BinaryReader): MethodAuthzInfo;
110
+ }
111
+
112
+ export namespace MethodAuthzInfo {
113
+ export type AsObject = {
114
+ methodName: string,
115
+ principalIdsList: Array<Uint8Array | string>,
116
+ }
117
+ }
118
+
119
+ export class CanisterAuthzInfo extends jspb.Message {
120
+ clearMethodsAuthzList(): void;
121
+ getMethodsAuthzList(): Array<MethodAuthzInfo>;
122
+ setMethodsAuthzList(value: Array<MethodAuthzInfo>): void;
123
+ addMethodsAuthz(value?: MethodAuthzInfo, index?: number): MethodAuthzInfo;
124
+
125
+ serializeBinary(): Uint8Array;
126
+ toObject(includeInstance?: boolean): CanisterAuthzInfo.AsObject;
127
+ static toObject(includeInstance: boolean, msg: CanisterAuthzInfo): CanisterAuthzInfo.AsObject;
128
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
129
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
130
+ static serializeBinaryToWriter(message: CanisterAuthzInfo, writer: jspb.BinaryWriter): void;
131
+ static deserializeBinary(bytes: Uint8Array): CanisterAuthzInfo;
132
+ static deserializeBinaryFromReader(message: CanisterAuthzInfo, reader: jspb.BinaryReader): CanisterAuthzInfo;
133
+ }
134
+
135
+ export namespace CanisterAuthzInfo {
136
+ export type AsObject = {
137
+ methodsAuthzList: Array<MethodAuthzInfo.AsObject>,
138
+ }
139
+ }
140
+
141
+ export const tuiSignedMessage: jspb.ExtensionFieldInfo<boolean>;
142
+
143
+ export const tuiSignedDisplayQ22021: jspb.ExtensionFieldInfo<boolean>;
144
+