@vocdoni/proto 1.15.0 → 1.15.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.
@@ -5,6 +5,7 @@ on:
5
5
  push:
6
6
  branches:
7
7
  - master
8
+ pull_request:
8
9
 
9
10
  jobs:
10
11
  protobuf-build:
@@ -14,17 +15,16 @@ jobs:
14
15
  uses: actions/checkout@v3
15
16
  - uses: actions/setup-node@v3
16
17
  with:
17
- node-version: "14"
18
+ node-version: "18"
18
19
  - uses: actions/setup-go@v3
19
20
  - name: Build
20
21
  run: |
22
+ make clean
21
23
  make init
22
- make golang
23
- make ts
24
+ make all
24
25
  - name: Commit changes
25
- uses: stefanzweifel/git-auto-commit-action@v2.3.0
26
+ uses: stefanzweifel/git-auto-commit-action@v4
26
27
  with:
27
- commit_message: Auto build commit
28
- branch: master
28
+ commit_message: auto build commit
29
29
  env:
30
30
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/DEVELOPING.md ADDED
@@ -0,0 +1,86 @@
1
+ # Developing
2
+
3
+ ## Introduce changes in dvote-protobuf
4
+
5
+ Do whatever changes you need to do in the `src/**/*.proto` files, and commit them.
6
+
7
+ For example:
8
+
9
+ ```sh
10
+ git clone git@github.com:vocdoni/dvote-protobuf.git && cd dvote-protobuf
11
+ git checkout -b feat-add-DummyMessage # don't use slashes (/)
12
+ cat >> src/vochain/vochain.proto << EOF
13
+ message DummyMessage {
14
+ bytes payload = 1;
15
+ }
16
+ EOF
17
+ git commit . -m "add DummyMessage"
18
+ git push --set-upstream origin feat-add-DummyMessage
19
+ ```
20
+
21
+ if you use slashes in the branch name (say, `example/branch-name`), you won't be able to `go get go.vocdoni.io/proto@example/branch-name` in the next step due to https://github.com/golang/go/issues/32955
22
+
23
+ You don't need to `make all`, just open a PR (see next step) and a github action will do the `make all` for you and autocommit the changes in your PR branch.
24
+
25
+ ## Stage them in a PR of dvote-protobuf
26
+
27
+ Now create a PR:
28
+
29
+ https://github.com/vocdoni/dvote-protobuf/pull/new/feat-add-DummyMessage
30
+
31
+ and wait a minute for the CI to run, it will auto commit the build changes
32
+ ("auto build commit" is pushed to the PR automatically)
33
+
34
+ Don't merge the PR, leave it "staged" (open) because you might want to introduce more changes while developing the other components.
35
+
36
+ ## Use that "staged" dvote-protobuf in vocdoni-node
37
+
38
+ ```sh
39
+ git clone git@github.com:vocdoni/vocdoni-node.git && cd vocdoni-node
40
+ git checkout -b wonderful-feature # here it doesn't matter if you use slashes (/)
41
+ go get go.vocdoni.io/proto@feat-add-DummyMessage # this will pull the code from your PR
42
+ go mod tidy
43
+ git add go.mod go.sum
44
+ git commit -m "bump go.vocdoni.io/proto@feat-add-DummyMessage"
45
+ git push --set-upstream origin wonderful-feature
46
+ ```
47
+
48
+ Now if you create a PR in vocdoni-node with your `wonderful-feature` branch, you'll see the CI of vocdoni-node pulls the dvote-protobuf from `feat-add-DummyMessage`
49
+
50
+ ## Use that "staged" dvote-protobuf in vocdoni-sdk
51
+
52
+ ```sh
53
+ git clone git@github.com:vocdoni/vocdoni-sdk.git && cd vocdoni-sdk
54
+ git checkout -b wonderful-feature # here it doesn't matter if you use slashes (/)
55
+ # edit package.json, so that @vocdoni/proto is pulled from github repo
56
+ # "@vocdoni/proto": "vocdoni/dvote-protobuf#feat-add-DummyMessage"
57
+ git add package.json
58
+ git commit -m "pull @vocdoni/proto from branch feat-add-DummyMessage"
59
+ git push --set-upstream origin wonderful-feature
60
+ ```
61
+
62
+ Now if you create a PR in vocdoni-sdk with your `wonderful-feature` branch, you'll see the CI of vocdoni-sdk pulls the dvote-protobuf from `feat-add-DummyMessage`
63
+
64
+ # Merging
65
+
66
+ When the feature is ready to be merged in all 3 repos (dvote-protobuf, vocdoni-node and vocdoni-sdk), you will:
67
+
68
+ * First, merge the PR in dvote-protobuf, bump the version (say, `1.2.3`) and publish a release (see next step)
69
+ * Then, in vocdoni-node: `go get go.vocdoni.io/proto@v1.2.3` and `go mod tidy`, commit those changes and squash them in the `wonderful-feature` PR, before merging.
70
+ * Then, in vocdoni-sdk, edit `package.json` to point to the release `"@vocdoni/proto": "1.2.3"`, commit those changes an squash them in the `wonderful-feature` PR, before merging.
71
+
72
+ # Release
73
+
74
+ For publishing a new release, a github action has been created in
75
+ order to minimize the work. Just follow these steps:
76
+
77
+ - Checkout `master` branch: `git checkout master`
78
+ - Update the version (say, `1.2.3`) in the `package.json` file
79
+ - Commit the changes: `git commit package.json -m "@vocdoni/proto 1.2.3"`
80
+ - Tag the commit: `git tag v1.2.3`
81
+ - Push the ref and the tag: `git push origin master v1.2.3`
82
+ - Create a new github release: https://github.com/vocdoni/dvote-protobuf/releases/new?tag=v1.2.3
83
+
84
+ As soon as the github release is done, the github action will take care of the rest automatically: build the npm package and publish it on https://www.npmjs.com/package/@vocdoni/proto
85
+
86
+ TODO(gui): automate the release creation step, using the github action, triggered by the push of a tag
package/Makefile CHANGED
@@ -61,7 +61,7 @@ init: protoc $(PROTOC_TS_PLUGIN) protoc-go-plugin
61
61
 
62
62
  ## clean: Remove the build artifacts
63
63
  clean:
64
- rm -Rf build include dist
64
+ rm -Rf build include
65
65
 
66
66
  ## :
67
67
 
@@ -71,7 +71,7 @@ clean:
71
71
 
72
72
 
73
73
  ## all: Generate the source code for all supported languages
74
- all: protoc build/ts build/go/models
74
+ all: golang js
75
75
 
76
76
  ## golang: Generate the Golang protobuf artifacts
77
77
  golang: protoc protoc-go-plugin build/go/models
@@ -97,9 +97,8 @@ build/dart: $(CLIENT_STORE_SOURCES) $(METADATA_SOURCES) $(VOCHAIN_SOURCES)
97
97
  done
98
98
  @touch $@
99
99
 
100
- ## js: Generate the TypeScript protobuf artifacts
101
- js: protoc $(PROTOC_TS_PLUGIN) build/ts
102
- ts: js
100
+ ## ts: Generate the TypeScript protobuf artifacts
101
+ ts: protoc $(PROTOC_TS_PLUGIN) build/ts
103
102
 
104
103
  build/ts: $(VOCHAIN_SOURCES) $(CLIENT_STORE_SOURCES) $(METADATA_SOURCES)
105
104
  mkdir -p build
@@ -111,6 +110,13 @@ build/ts: $(VOCHAIN_SOURCES) $(CLIENT_STORE_SOURCES) $(METADATA_SOURCES)
111
110
  @touch $@
112
111
  npm i --no-package-lock
113
112
 
113
+ ## js: Generate the JavaScript bundle
114
+ js: ts build/js
115
+
116
+ build/js:
117
+ yarn
118
+ yarn build
119
+
114
120
  #-----------------------------------------------------------------------
115
121
  # COMPILERS
116
122
  #-----------------------------------------------------------------------
package/README.md CHANGED
@@ -55,17 +55,9 @@ Then, run `make all` to build all the targets
55
55
  + Build JS/TS models: `make ts`
56
56
  + Build GoLang models: `make golang`
57
57
 
58
- ### Publishing a new npmjs version (ts/js)
58
+ ## Develop / Release
59
59
 
60
- For publishing a new release into npmjs, a github action has been created in
61
- order to minimize the work. Just follow these steps:
62
-
63
- - Do whatever changes you need to do in the `proto` files
64
- - Update the version in the `package.json` file
65
- - Commit the changes
66
- - Create a new release & tag with the version number you used in `package.json`
67
-
68
- The github action will take care of the rest.
60
+ See [DEVELOPING.md]
69
61
 
70
62
  ## Artifacts
71
63
 
@@ -122,3 +114,4 @@ This SDK is licensed under the [GNU Affero General Public License v3.0][license]
122
114
  along with this program. If not, see <https://www.gnu.org/licenses/>.
123
115
 
124
116
  [license]: ./LICENSE
117
+ [DEVELOPING.md]: ./DEVELOPING.md
@@ -5696,13 +5696,13 @@ __export(vochain_exports, {
5696
5696
  QuestionResult: () => QuestionResult,
5697
5697
  RegisterKeyTx: () => RegisterKeyTx,
5698
5698
  RegisterSIKTx: () => RegisterSIKTx,
5699
+ SIKTx: () => SIKTx,
5699
5700
  SendTokensTx: () => SendTokensTx,
5700
5701
  SetAccountTx: () => SetAccountTx,
5701
5702
  SetKeykeeperTx: () => SetKeykeeperTx,
5702
5703
  SetProcessTx: () => SetProcessTx,
5703
5704
  SetTransactionCostsTx: () => SetTransactionCostsTx,
5704
5705
  SignedTx: () => SignedTx,
5705
- SikTx: () => SikTx,
5706
5706
  SourceNetworkId: () => SourceNetworkId,
5707
5707
  StoredKeys: () => StoredKeys,
5708
5708
  TendermintHeader: () => TendermintHeader,
@@ -5760,6 +5760,7 @@ var TxType = /* @__PURE__ */ ((TxType2) => {
5760
5760
  TxType2[TxType2["CREATE_ACCOUNT"] = 23] = "CREATE_ACCOUNT";
5761
5761
  TxType2[TxType2["SET_ACCOUNT_SIK"] = 24] = "SET_ACCOUNT_SIK";
5762
5762
  TxType2[TxType2["DEL_ACCOUNT_SIK"] = 25] = "DEL_ACCOUNT_SIK";
5763
+ TxType2[TxType2["REGISTER_SIK"] = 26] = "REGISTER_SIK";
5763
5764
  TxType2[TxType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
5764
5765
  return TxType2;
5765
5766
  })(TxType || {});
@@ -5843,6 +5844,9 @@ function txTypeFromJSON(object) {
5843
5844
  case 25:
5844
5845
  case "DEL_ACCOUNT_SIK":
5845
5846
  return 25 /* DEL_ACCOUNT_SIK */;
5847
+ case 26:
5848
+ case "REGISTER_SIK":
5849
+ return 26 /* REGISTER_SIK */;
5846
5850
  case -1:
5847
5851
  case "UNRECOGNIZED":
5848
5852
  default:
@@ -5903,6 +5907,8 @@ function txTypeToJSON(object) {
5903
5907
  return "SET_ACCOUNT_SIK";
5904
5908
  case 25 /* DEL_ACCOUNT_SIK */:
5905
5909
  return "DEL_ACCOUNT_SIK";
5910
+ case 26 /* REGISTER_SIK */:
5911
+ return "REGISTER_SIK";
5906
5912
  case -1 /* UNRECOGNIZED */:
5907
5913
  default:
5908
5914
  return "UNRECOGNIZED";
@@ -7615,11 +7621,14 @@ var Tx = {
7615
7621
  case "setKeykeeper":
7616
7622
  SetKeykeeperTx.encode(message.payload.setKeykeeper, writer.uint32(90).fork()).ldelim();
7617
7623
  break;
7618
- case "setSik":
7619
- SikTx.encode(message.payload.setSik, writer.uint32(98).fork()).ldelim();
7624
+ case "setSIK":
7625
+ SIKTx.encode(message.payload.setSIK, writer.uint32(98).fork()).ldelim();
7620
7626
  break;
7621
- case "delSik":
7622
- SikTx.encode(message.payload.delSik, writer.uint32(106).fork()).ldelim();
7627
+ case "delSIK":
7628
+ SIKTx.encode(message.payload.delSIK, writer.uint32(106).fork()).ldelim();
7629
+ break;
7630
+ case "registerSIK":
7631
+ RegisterSIKTx.encode(message.payload.registerSIK, writer.uint32(114).fork()).ldelim();
7623
7632
  break;
7624
7633
  }
7625
7634
  return writer;
@@ -7704,13 +7713,19 @@ var Tx = {
7704
7713
  if (tag !== 98) {
7705
7714
  break;
7706
7715
  }
7707
- message.payload = { $case: "setSik", setSik: SikTx.decode(reader, reader.uint32()) };
7716
+ message.payload = { $case: "setSIK", setSIK: SIKTx.decode(reader, reader.uint32()) };
7708
7717
  continue;
7709
7718
  case 13:
7710
7719
  if (tag !== 106) {
7711
7720
  break;
7712
7721
  }
7713
- message.payload = { $case: "delSik", delSik: SikTx.decode(reader, reader.uint32()) };
7722
+ message.payload = { $case: "delSIK", delSIK: SIKTx.decode(reader, reader.uint32()) };
7723
+ continue;
7724
+ case 14:
7725
+ if (tag !== 114) {
7726
+ break;
7727
+ }
7728
+ message.payload = { $case: "registerSIK", registerSIK: RegisterSIKTx.decode(reader, reader.uint32()) };
7714
7729
  continue;
7715
7730
  }
7716
7731
  if ((tag & 7) === 4 || tag === 0) {
@@ -7725,7 +7740,7 @@ var Tx = {
7725
7740
  payload: isSet8(object.vote) ? { $case: "vote", vote: VoteEnvelope.fromJSON(object.vote) } : isSet8(object.newProcess) ? { $case: "newProcess", newProcess: NewProcessTx.fromJSON(object.newProcess) } : isSet8(object.admin) ? { $case: "admin", admin: AdminTx.fromJSON(object.admin) } : isSet8(object.setProcess) ? { $case: "setProcess", setProcess: SetProcessTx.fromJSON(object.setProcess) } : isSet8(object.registerKey) ? { $case: "registerKey", registerKey: RegisterKeyTx.fromJSON(object.registerKey) } : isSet8(object.mintTokens) ? { $case: "mintTokens", mintTokens: MintTokensTx.fromJSON(object.mintTokens) } : isSet8(object.sendTokens) ? { $case: "sendTokens", sendTokens: SendTokensTx.fromJSON(object.sendTokens) } : isSet8(object.setTransactionCosts) ? {
7726
7741
  $case: "setTransactionCosts",
7727
7742
  setTransactionCosts: SetTransactionCostsTx.fromJSON(object.setTransactionCosts)
7728
- } : isSet8(object.setAccount) ? { $case: "setAccount", setAccount: SetAccountTx.fromJSON(object.setAccount) } : isSet8(object.collectFaucet) ? { $case: "collectFaucet", collectFaucet: CollectFaucetTx.fromJSON(object.collectFaucet) } : isSet8(object.setKeykeeper) ? { $case: "setKeykeeper", setKeykeeper: SetKeykeeperTx.fromJSON(object.setKeykeeper) } : isSet8(object.setSik) ? { $case: "setSik", setSik: SikTx.fromJSON(object.setSik) } : isSet8(object.delSik) ? { $case: "delSik", delSik: SikTx.fromJSON(object.delSik) } : void 0
7743
+ } : isSet8(object.setAccount) ? { $case: "setAccount", setAccount: SetAccountTx.fromJSON(object.setAccount) } : isSet8(object.collectFaucet) ? { $case: "collectFaucet", collectFaucet: CollectFaucetTx.fromJSON(object.collectFaucet) } : isSet8(object.setKeykeeper) ? { $case: "setKeykeeper", setKeykeeper: SetKeykeeperTx.fromJSON(object.setKeykeeper) } : isSet8(object.setSIK) ? { $case: "setSIK", setSIK: SIKTx.fromJSON(object.setSIK) } : isSet8(object.delSIK) ? { $case: "delSIK", delSIK: SIKTx.fromJSON(object.delSIK) } : isSet8(object.registerSIK) ? { $case: "registerSIK", registerSIK: RegisterSIKTx.fromJSON(object.registerSIK) } : void 0
7729
7744
  };
7730
7745
  },
7731
7746
  toJSON(message) {
@@ -7763,11 +7778,14 @@ var Tx = {
7763
7778
  if (message.payload?.$case === "setKeykeeper") {
7764
7779
  obj.setKeykeeper = SetKeykeeperTx.toJSON(message.payload.setKeykeeper);
7765
7780
  }
7766
- if (message.payload?.$case === "setSik") {
7767
- obj.setSik = SikTx.toJSON(message.payload.setSik);
7781
+ if (message.payload?.$case === "setSIK") {
7782
+ obj.setSIK = SIKTx.toJSON(message.payload.setSIK);
7768
7783
  }
7769
- if (message.payload?.$case === "delSik") {
7770
- obj.delSik = SikTx.toJSON(message.payload.delSik);
7784
+ if (message.payload?.$case === "delSIK") {
7785
+ obj.delSIK = SIKTx.toJSON(message.payload.delSIK);
7786
+ }
7787
+ if (message.payload?.$case === "registerSIK") {
7788
+ obj.registerSIK = RegisterSIKTx.toJSON(message.payload.registerSIK);
7771
7789
  }
7772
7790
  return obj;
7773
7791
  },
@@ -7818,11 +7836,14 @@ var Tx = {
7818
7836
  setKeykeeper: SetKeykeeperTx.fromPartial(object.payload.setKeykeeper)
7819
7837
  };
7820
7838
  }
7821
- if (object.payload?.$case === "setSik" && object.payload?.setSik !== void 0 && object.payload?.setSik !== null) {
7822
- message.payload = { $case: "setSik", setSik: SikTx.fromPartial(object.payload.setSik) };
7839
+ if (object.payload?.$case === "setSIK" && object.payload?.setSIK !== void 0 && object.payload?.setSIK !== null) {
7840
+ message.payload = { $case: "setSIK", setSIK: SIKTx.fromPartial(object.payload.setSIK) };
7841
+ }
7842
+ if (object.payload?.$case === "delSIK" && object.payload?.delSIK !== void 0 && object.payload?.delSIK !== null) {
7843
+ message.payload = { $case: "delSIK", delSIK: SIKTx.fromPartial(object.payload.delSIK) };
7823
7844
  }
7824
- if (object.payload?.$case === "delSik" && object.payload?.delSik !== void 0 && object.payload?.delSik !== null) {
7825
- message.payload = { $case: "delSik", delSik: SikTx.fromPartial(object.payload.delSik) };
7845
+ if (object.payload?.$case === "registerSIK" && object.payload?.registerSIK !== void 0 && object.payload?.registerSIK !== null) {
7846
+ message.payload = { $case: "registerSIK", registerSIK: RegisterSIKTx.fromPartial(object.payload.registerSIK) };
7826
7847
  }
7827
7848
  return message;
7828
7849
  }
@@ -7983,7 +8004,8 @@ function createBaseSetProcessTx() {
7983
8004
  censusRoot: void 0,
7984
8005
  censusURI: void 0,
7985
8006
  proof: void 0,
7986
- results: void 0
8007
+ results: void 0,
8008
+ tempSIKs: void 0
7987
8009
  };
7988
8010
  }
7989
8011
  var SetProcessTx = {
@@ -8015,6 +8037,9 @@ var SetProcessTx = {
8015
8037
  if (message.results !== void 0) {
8016
8038
  ProcessResult.encode(message.results, writer.uint32(74).fork()).ldelim();
8017
8039
  }
8040
+ if (message.tempSIKs !== void 0) {
8041
+ writer.uint32(80).bool(message.tempSIKs);
8042
+ }
8018
8043
  return writer;
8019
8044
  },
8020
8045
  decode(input, length) {
@@ -8078,6 +8103,12 @@ var SetProcessTx = {
8078
8103
  }
8079
8104
  message.results = ProcessResult.decode(reader, reader.uint32());
8080
8105
  continue;
8106
+ case 10:
8107
+ if (tag !== 80) {
8108
+ break;
8109
+ }
8110
+ message.tempSIKs = reader.bool();
8111
+ continue;
8081
8112
  }
8082
8113
  if ((tag & 7) === 4 || tag === 0) {
8083
8114
  break;
@@ -8096,7 +8127,8 @@ var SetProcessTx = {
8096
8127
  censusRoot: isSet8(object.censusRoot) ? bytesFromBase643(object.censusRoot) : void 0,
8097
8128
  censusURI: isSet8(object.censusURI) ? String(object.censusURI) : void 0,
8098
8129
  proof: isSet8(object.proof) ? Proof.fromJSON(object.proof) : void 0,
8099
- results: isSet8(object.results) ? ProcessResult.fromJSON(object.results) : void 0
8130
+ results: isSet8(object.results) ? ProcessResult.fromJSON(object.results) : void 0,
8131
+ tempSIKs: isSet8(object.tempSIKs) ? Boolean(object.tempSIKs) : void 0
8100
8132
  };
8101
8133
  },
8102
8134
  toJSON(message) {
@@ -8128,6 +8160,9 @@ var SetProcessTx = {
8128
8160
  if (message.results !== void 0) {
8129
8161
  obj.results = ProcessResult.toJSON(message.results);
8130
8162
  }
8163
+ if (message.tempSIKs !== void 0) {
8164
+ obj.tempSIKs = message.tempSIKs;
8165
+ }
8131
8166
  return obj;
8132
8167
  },
8133
8168
  create(base) {
@@ -8144,6 +8179,7 @@ var SetProcessTx = {
8144
8179
  message.censusURI = object.censusURI ?? void 0;
8145
8180
  message.proof = object.proof !== void 0 && object.proof !== null ? Proof.fromPartial(object.proof) : void 0;
8146
8181
  message.results = object.results !== void 0 && object.results !== null ? ProcessResult.fromPartial(object.results) : void 0;
8182
+ message.tempSIKs = object.tempSIKs ?? void 0;
8147
8183
  return message;
8148
8184
  }
8149
8185
  };
@@ -8719,7 +8755,7 @@ function createBaseSetAccountTx() {
8719
8755
  account: void 0,
8720
8756
  faucetPackage: void 0,
8721
8757
  delegates: [],
8722
- sik: void 0
8758
+ SIK: void 0
8723
8759
  };
8724
8760
  }
8725
8761
  var SetAccountTx = {
@@ -8742,8 +8778,8 @@ var SetAccountTx = {
8742
8778
  for (const v of message.delegates) {
8743
8779
  writer.uint32(50).bytes(v);
8744
8780
  }
8745
- if (message.sik !== void 0) {
8746
- writer.uint32(58).bytes(message.sik);
8781
+ if (message.SIK !== void 0) {
8782
+ writer.uint32(58).bytes(message.SIK);
8747
8783
  }
8748
8784
  return writer;
8749
8785
  },
@@ -8794,7 +8830,7 @@ var SetAccountTx = {
8794
8830
  if (tag !== 58) {
8795
8831
  break;
8796
8832
  }
8797
- message.sik = reader.bytes();
8833
+ message.SIK = reader.bytes();
8798
8834
  continue;
8799
8835
  }
8800
8836
  if ((tag & 7) === 4 || tag === 0) {
@@ -8812,7 +8848,7 @@ var SetAccountTx = {
8812
8848
  account: isSet8(object.account) ? bytesFromBase643(object.account) : void 0,
8813
8849
  faucetPackage: isSet8(object.faucetPackage) ? FaucetPackage.fromJSON(object.faucetPackage) : void 0,
8814
8850
  delegates: Array.isArray(object?.delegates) ? object.delegates.map((e) => bytesFromBase643(e)) : [],
8815
- sik: isSet8(object.sik) ? bytesFromBase643(object.sik) : void 0
8851
+ SIK: isSet8(object.SIK) ? bytesFromBase643(object.SIK) : void 0
8816
8852
  };
8817
8853
  },
8818
8854
  toJSON(message) {
@@ -8835,8 +8871,8 @@ var SetAccountTx = {
8835
8871
  if (message.delegates?.length) {
8836
8872
  obj.delegates = message.delegates.map((e) => base64FromBytes3(e));
8837
8873
  }
8838
- if (message.sik !== void 0) {
8839
- obj.sik = base64FromBytes3(message.sik);
8874
+ if (message.SIK !== void 0) {
8875
+ obj.SIK = base64FromBytes3(message.SIK);
8840
8876
  }
8841
8877
  return obj;
8842
8878
  },
@@ -8851,27 +8887,27 @@ var SetAccountTx = {
8851
8887
  message.account = object.account ?? void 0;
8852
8888
  message.faucetPackage = object.faucetPackage !== void 0 && object.faucetPackage !== null ? FaucetPackage.fromPartial(object.faucetPackage) : void 0;
8853
8889
  message.delegates = object.delegates?.map((e) => e) || [];
8854
- message.sik = object.sik ?? void 0;
8890
+ message.SIK = object.SIK ?? void 0;
8855
8891
  return message;
8856
8892
  }
8857
8893
  };
8858
- function createBaseSikTx() {
8859
- return { txtype: 0, sik: void 0 };
8894
+ function createBaseSIKTx() {
8895
+ return { txtype: 0, SIK: void 0 };
8860
8896
  }
8861
- var SikTx = {
8897
+ var SIKTx = {
8862
8898
  encode(message, writer = import_minimal8.default.Writer.create()) {
8863
8899
  if (message.txtype !== 0) {
8864
8900
  writer.uint32(8).int32(message.txtype);
8865
8901
  }
8866
- if (message.sik !== void 0) {
8867
- writer.uint32(26).bytes(message.sik);
8902
+ if (message.SIK !== void 0) {
8903
+ writer.uint32(26).bytes(message.SIK);
8868
8904
  }
8869
8905
  return writer;
8870
8906
  },
8871
8907
  decode(input, length) {
8872
8908
  const reader = input instanceof import_minimal8.default.Reader ? input : import_minimal8.default.Reader.create(input);
8873
8909
  let end = length === void 0 ? reader.len : reader.pos + length;
8874
- const message = createBaseSikTx();
8910
+ const message = createBaseSIKTx();
8875
8911
  while (reader.pos < end) {
8876
8912
  const tag = reader.uint32();
8877
8913
  switch (tag >>> 3) {
@@ -8885,7 +8921,7 @@ var SikTx = {
8885
8921
  if (tag !== 26) {
8886
8922
  break;
8887
8923
  }
8888
- message.sik = reader.bytes();
8924
+ message.SIK = reader.bytes();
8889
8925
  continue;
8890
8926
  }
8891
8927
  if ((tag & 7) === 4 || tag === 0) {
@@ -8898,7 +8934,7 @@ var SikTx = {
8898
8934
  fromJSON(object) {
8899
8935
  return {
8900
8936
  txtype: isSet8(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
8901
- sik: isSet8(object.sik) ? bytesFromBase643(object.sik) : void 0
8937
+ SIK: isSet8(object.SIK) ? bytesFromBase643(object.SIK) : void 0
8902
8938
  };
8903
8939
  },
8904
8940
  toJSON(message) {
@@ -8906,23 +8942,23 @@ var SikTx = {
8906
8942
  if (message.txtype !== 0) {
8907
8943
  obj.txtype = txTypeToJSON(message.txtype);
8908
8944
  }
8909
- if (message.sik !== void 0) {
8910
- obj.sik = base64FromBytes3(message.sik);
8945
+ if (message.SIK !== void 0) {
8946
+ obj.SIK = base64FromBytes3(message.SIK);
8911
8947
  }
8912
8948
  return obj;
8913
8949
  },
8914
8950
  create(base) {
8915
- return SikTx.fromPartial(base ?? {});
8951
+ return SIKTx.fromPartial(base ?? {});
8916
8952
  },
8917
8953
  fromPartial(object) {
8918
- const message = createBaseSikTx();
8954
+ const message = createBaseSIKTx();
8919
8955
  message.txtype = object.txtype ?? 0;
8920
- message.sik = object.sik ?? void 0;
8956
+ message.SIK = object.SIK ?? void 0;
8921
8957
  return message;
8922
8958
  }
8923
8959
  };
8924
8960
  function createBaseRegisterSIKTx() {
8925
- return { electionId: new Uint8Array(0), censusProof: void 0, sik: new Uint8Array(0) };
8961
+ return { electionId: new Uint8Array(0), censusProof: void 0, SIK: new Uint8Array(0) };
8926
8962
  }
8927
8963
  var RegisterSIKTx = {
8928
8964
  encode(message, writer = import_minimal8.default.Writer.create()) {
@@ -8932,8 +8968,8 @@ var RegisterSIKTx = {
8932
8968
  if (message.censusProof !== void 0) {
8933
8969
  Proof.encode(message.censusProof, writer.uint32(18).fork()).ldelim();
8934
8970
  }
8935
- if (message.sik.length !== 0) {
8936
- writer.uint32(26).bytes(message.sik);
8971
+ if (message.SIK.length !== 0) {
8972
+ writer.uint32(26).bytes(message.SIK);
8937
8973
  }
8938
8974
  return writer;
8939
8975
  },
@@ -8960,7 +8996,7 @@ var RegisterSIKTx = {
8960
8996
  if (tag !== 26) {
8961
8997
  break;
8962
8998
  }
8963
- message.sik = reader.bytes();
8999
+ message.SIK = reader.bytes();
8964
9000
  continue;
8965
9001
  }
8966
9002
  if ((tag & 7) === 4 || tag === 0) {
@@ -8974,7 +9010,7 @@ var RegisterSIKTx = {
8974
9010
  return {
8975
9011
  electionId: isSet8(object.electionId) ? bytesFromBase643(object.electionId) : new Uint8Array(0),
8976
9012
  censusProof: isSet8(object.censusProof) ? Proof.fromJSON(object.censusProof) : void 0,
8977
- sik: isSet8(object.sik) ? bytesFromBase643(object.sik) : new Uint8Array(0)
9013
+ SIK: isSet8(object.SIK) ? bytesFromBase643(object.SIK) : new Uint8Array(0)
8978
9014
  };
8979
9015
  },
8980
9016
  toJSON(message) {
@@ -8985,8 +9021,8 @@ var RegisterSIKTx = {
8985
9021
  if (message.censusProof !== void 0) {
8986
9022
  obj.censusProof = Proof.toJSON(message.censusProof);
8987
9023
  }
8988
- if (message.sik.length !== 0) {
8989
- obj.sik = base64FromBytes3(message.sik);
9024
+ if (message.SIK.length !== 0) {
9025
+ obj.SIK = base64FromBytes3(message.SIK);
8990
9026
  }
8991
9027
  return obj;
8992
9028
  },
@@ -8997,7 +9033,7 @@ var RegisterSIKTx = {
8997
9033
  const message = createBaseRegisterSIKTx();
8998
9034
  message.electionId = object.electionId ?? new Uint8Array(0);
8999
9035
  message.censusProof = object.censusProof !== void 0 && object.censusProof !== null ? Proof.fromPartial(object.censusProof) : void 0;
9000
- message.sik = object.sik ?? new Uint8Array(0);
9036
+ message.SIK = object.SIK ?? new Uint8Array(0);
9001
9037
  return message;
9002
9038
  }
9003
9039
  };
@@ -9338,7 +9374,8 @@ function createBaseProcess() {
9338
9374
  rollingCensusSize: void 0,
9339
9375
  nullifiersRoot: void 0,
9340
9376
  sourceNetworkContractAddr: void 0,
9341
- tokenDecimals: void 0
9377
+ tokenDecimals: void 0,
9378
+ tempSIKs: void 0
9342
9379
  };
9343
9380
  }
9344
9381
  var Process = {
@@ -9433,6 +9470,9 @@ var Process = {
9433
9470
  if (message.tokenDecimals !== void 0) {
9434
9471
  writer.uint32(264).uint32(message.tokenDecimals);
9435
9472
  }
9473
+ if (message.tempSIKs !== void 0) {
9474
+ writer.uint32(272).bool(message.tempSIKs);
9475
+ }
9436
9476
  return writer;
9437
9477
  },
9438
9478
  decode(input, length) {
@@ -9622,6 +9662,12 @@ var Process = {
9622
9662
  }
9623
9663
  message.tokenDecimals = reader.uint32();
9624
9664
  continue;
9665
+ case 34:
9666
+ if (tag !== 272) {
9667
+ break;
9668
+ }
9669
+ message.tempSIKs = reader.bool();
9670
+ continue;
9625
9671
  }
9626
9672
  if ((tag & 7) === 4 || tag === 0) {
9627
9673
  break;
@@ -9661,7 +9707,8 @@ var Process = {
9661
9707
  rollingCensusSize: isSet8(object.rollingCensusSize) ? Number(object.rollingCensusSize) : void 0,
9662
9708
  nullifiersRoot: isSet8(object.nullifiersRoot) ? bytesFromBase643(object.nullifiersRoot) : void 0,
9663
9709
  sourceNetworkContractAddr: isSet8(object.sourceNetworkContractAddr) ? bytesFromBase643(object.sourceNetworkContractAddr) : void 0,
9664
- tokenDecimals: isSet8(object.tokenDecimals) ? Number(object.tokenDecimals) : void 0
9710
+ tokenDecimals: isSet8(object.tokenDecimals) ? Number(object.tokenDecimals) : void 0,
9711
+ tempSIKs: isSet8(object.tempSIKs) ? Boolean(object.tempSIKs) : void 0
9665
9712
  };
9666
9713
  },
9667
9714
  toJSON(message) {
@@ -9756,6 +9803,9 @@ var Process = {
9756
9803
  if (message.tokenDecimals !== void 0) {
9757
9804
  obj.tokenDecimals = Math.round(message.tokenDecimals);
9758
9805
  }
9806
+ if (message.tempSIKs !== void 0) {
9807
+ obj.tempSIKs = message.tempSIKs;
9808
+ }
9759
9809
  return obj;
9760
9810
  },
9761
9811
  create(base) {
@@ -9793,6 +9843,7 @@ var Process = {
9793
9843
  message.nullifiersRoot = object.nullifiersRoot ?? void 0;
9794
9844
  message.sourceNetworkContractAddr = object.sourceNetworkContractAddr ?? void 0;
9795
9845
  message.tokenDecimals = object.tokenDecimals ?? void 0;
9846
+ message.tempSIKs = object.tempSIKs ?? void 0;
9796
9847
  return message;
9797
9848
  }
9798
9849
  };