Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: lowercase the field names for MsgCall #132

Merged
merged 5 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gnolang/gno-js-client",
"version": "1.2.3",
"version": "1.3.0",
"description": "Gno JS / TS Client",
"main": "./bin/index.js",
"author": "Milos Zivkovic <milos.zivkovic@tendermint.com>",
Expand Down Expand Up @@ -48,8 +48,8 @@
"prepublishOnly": "yarn lint && yarn prettier"
},
"dependencies": {
"@cosmjs/ledger-amino": "^0.32.0",
"@gnolang/tm2-js-client": "^1.2.0",
"@cosmjs/ledger-amino": "^0.32.4",
"@gnolang/tm2-js-client": "^1.2.1",
"long": "^5.2.3",
"protobufjs": "^7.2.3"
}
Expand Down
12 changes: 5 additions & 7 deletions proto/gno/vm.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ syntax = "proto3";

package gno.vm;



// MsgCall is the method invocation tx message,
// denoted as "m_call"
message MsgCall {
Expand Down Expand Up @@ -45,18 +43,18 @@ message MsgRun {
// package / realm deployment
message MemPackage {
// the name of the package
string name = 1 [json_name = "Name"];
string name = 1;
// the gno path of the package
string path = 2 [json_name = "Path"];
string path = 2;
// the associated package gno source
repeated MemFile files = 3 [json_name = "Files"];
repeated MemFile files = 3;
}

// MemFile is the metadata information tied to
// a single gno package / realm file
message MemFile {
// the name of the source gno file
string name = 1 [json_name = "Name"];
string name = 1;
// the content of the source gno file
string body = 2 [json_name = "Body"];
string body = 2;
}
6 changes: 0 additions & 6 deletions src/proto/gno/bank.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v1.180.0
// protoc v5.27.1
// source: gno/bank.proto

/* eslint-disable */
import Long from 'long';
import _m0 from 'protobufjs/minimal';
Expand Down
32 changes: 13 additions & 19 deletions src/proto/gno/vm.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v1.180.0
// protoc v5.27.1
// source: gno/vm.proto

/* eslint-disable */
import Long from 'long';
import _m0 from 'protobufjs/minimal';
Expand Down Expand Up @@ -280,12 +274,12 @@ export const MsgAddPackage = {
},

toJSON(message: MsgAddPackage): unknown {
const obj = createBaseMsgAddPackage();
const obj: any = {};
if (message.creator !== undefined) {
obj.creator = message.creator;
}
if (message.package !== undefined) {
obj.package = MemPackage.toJSON(message.package) as MemPackage;
obj.package = MemPackage.toJSON(message.package);
}
if (message.deposit !== undefined) {
obj.deposit = message.deposit;
Expand Down Expand Up @@ -471,24 +465,24 @@ export const MemPackage = {

fromJSON(object: any): MemPackage {
return {
name: isSet(object.Name) ? globalThis.String(object.Name) : '',
path: isSet(object.Path) ? globalThis.String(object.Path) : '',
files: globalThis.Array.isArray(object?.Files)
? object.Files.map((e: any) => MemFile.fromJSON(e))
name: isSet(object.name) ? globalThis.String(object.name) : '',
path: isSet(object.path) ? globalThis.String(object.path) : '',
files: globalThis.Array.isArray(object?.files)
? object.files.map((e: any) => MemFile.fromJSON(e))
: [],
};
},

toJSON(message: MemPackage): unknown {
const obj: any = {};
if (message.name !== undefined) {
obj.Name = message.name;
obj.name = message.name;
}
if (message.path !== undefined) {
obj.Path = message.path;
obj.path = message.path;
}
if (message.files?.length) {
obj.Files = message.files.map((e) => MemFile.toJSON(e));
obj.files = message.files.map((e) => MemFile.toJSON(e));
}
return obj;
},
Expand Down Expand Up @@ -558,18 +552,18 @@ export const MemFile = {

fromJSON(object: any): MemFile {
return {
name: isSet(object.Name) ? globalThis.String(object.Name) : '',
body: isSet(object.Body) ? globalThis.String(object.Body) : '',
name: isSet(object.name) ? globalThis.String(object.name) : '',
body: isSet(object.body) ? globalThis.String(object.body) : '',
};
},

toJSON(message: MemFile): unknown {
const obj: any = {};
if (message.name !== undefined) {
obj.Name = message.name;
obj.name = message.name;
}
if (message.body !== undefined) {
obj.Body = message.body;
obj.body = message.body;
}
return obj;
},
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@cosmjs/amino@^0.32.0", "@cosmjs/amino@^0.32.4":
"@cosmjs/amino@^0.32.4":
version "0.32.4"
resolved "https://registry.yarnpkg.com/@cosmjs/amino/-/amino-0.32.4.tgz#3908946c0394e6d431694c8992c5147079a1c860"
integrity sha512-zKYOt6hPy8obIFtLie/xtygCkH9ZROiQ12UHfKsOkWaZfPQUvVbtgmu6R4Kn1tFLI/SRkw7eqhaogmW/3NYu/Q==
Expand All @@ -318,7 +318,7 @@
"@cosmjs/math" "^0.32.4"
"@cosmjs/utils" "^0.32.4"

"@cosmjs/crypto@^0.32.0", "@cosmjs/crypto@^0.32.4":
"@cosmjs/crypto@^0.32.4":
version "0.32.4"
resolved "https://registry.yarnpkg.com/@cosmjs/crypto/-/crypto-0.32.4.tgz#5d29633b661eaf092ddb3e7ea6299cfd6f4507a2"
integrity sha512-zicjGU051LF1V9v7bp8p7ovq+VyC91xlaHdsFOTo2oVry3KQikp8L/81RkXmUIT8FxMwdx1T7DmFwVQikcSDIw==
Expand All @@ -340,7 +340,7 @@
bech32 "^1.1.4"
readonly-date "^1.0.0"

"@cosmjs/ledger-amino@^0.32.0":
"@cosmjs/ledger-amino@^0.32.4":
version "0.32.4"
resolved "https://registry.yarnpkg.com/@cosmjs/ledger-amino/-/ledger-amino-0.32.4.tgz#fa2fba0390b0e4fab73491fbc57bc9f3e77a1160"
integrity sha512-Toys0CD/4pBfYDQmhQbmWualKJT98YVPpE8Ilkx1Rx0dcFtm57Mg7R4BgRFiL1sSoff5RWcDY6Chqp6zwAbrjA==
Expand Down Expand Up @@ -397,14 +397,14 @@
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f"
integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==

"@gnolang/tm2-js-client@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@gnolang/tm2-js-client/-/tm2-js-client-1.2.0.tgz#cc8b4e038202cf2feaee688cef2888c9a983b01e"
integrity sha512-PjE2QT6tb1SGeY4lkT0MCh7S1aowJBj519NoaQWG9lK3VIYi4DbrVpuplg/e4RSb4b2g1Zo/6rWCtsLHdXT9Jg==
"@gnolang/tm2-js-client@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@gnolang/tm2-js-client/-/tm2-js-client-1.2.1.tgz#850b8e1f1d90226d5047c097f27fce25366c1dd8"
integrity sha512-zjQ5vFw7tyRJAyXdc9Z++x5Yp9qtWuHXhFBEAV0SkHcuBuKmv71Y4qo/0J3aVgHYnri4pc5YEmgX9KVeDgf9Og==
dependencies:
"@cosmjs/amino" "^0.32.0"
"@cosmjs/crypto" "^0.32.0"
"@cosmjs/ledger-amino" "^0.32.0"
"@cosmjs/amino" "^0.32.4"
"@cosmjs/crypto" "^0.32.4"
"@cosmjs/ledger-amino" "^0.32.4"
"@types/uuid" "^9.0.4"
axios "^1.4.0"
long "^5.2.3"
Expand Down