stargate: Update codec

This commit is contained in:
willclarktech 2020-10-20 17:30:27 +02:00
parent de1e3d7ce2
commit 2b30e51be6
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7
3 changed files with 1343 additions and 6 deletions

View File

@ -478,6 +478,361 @@ export namespace cosmos {
namespace bank {
/** Namespace v1beta1. */
namespace v1beta1 {
/** Properties of a Params. */
interface IParams {
/** Params sendEnabled */
sendEnabled?: cosmos.bank.v1beta1.ISendEnabled[] | null;
/** Params defaultSendEnabled */
defaultSendEnabled?: boolean | null;
}
/** Represents a Params. */
class Params implements IParams {
/**
* Constructs a new Params.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.IParams);
/** Params sendEnabled. */
public sendEnabled: cosmos.bank.v1beta1.ISendEnabled[];
/** Params defaultSendEnabled. */
public defaultSendEnabled: boolean;
/**
* Creates a new Params instance using the specified properties.
* @param [properties] Properties to set
* @returns Params instance
*/
public static create(properties?: cosmos.bank.v1beta1.IParams): cosmos.bank.v1beta1.Params;
/**
* Encodes the specified Params message. Does not implicitly {@link cosmos.bank.v1beta1.Params.verify|verify} messages.
* @param m Params message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.IParams, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Params message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns Params
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.Params;
}
/** Properties of a SendEnabled. */
interface ISendEnabled {
/** SendEnabled denom */
denom?: string | null;
/** SendEnabled enabled */
enabled?: boolean | null;
}
/** Represents a SendEnabled. */
class SendEnabled implements ISendEnabled {
/**
* Constructs a new SendEnabled.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.ISendEnabled);
/** SendEnabled denom. */
public denom: string;
/** SendEnabled enabled. */
public enabled: boolean;
/**
* Creates a new SendEnabled instance using the specified properties.
* @param [properties] Properties to set
* @returns SendEnabled instance
*/
public static create(properties?: cosmos.bank.v1beta1.ISendEnabled): cosmos.bank.v1beta1.SendEnabled;
/**
* Encodes the specified SendEnabled message. Does not implicitly {@link cosmos.bank.v1beta1.SendEnabled.verify|verify} messages.
* @param m SendEnabled message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.ISendEnabled, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a SendEnabled message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns SendEnabled
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.SendEnabled;
}
/** Properties of an Input. */
interface IInput {
/** Input address */
address?: string | null;
/** Input coins */
coins?: cosmos.base.v1beta1.ICoin[] | null;
}
/** Represents an Input. */
class Input implements IInput {
/**
* Constructs a new Input.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.IInput);
/** Input address. */
public address: string;
/** Input coins. */
public coins: cosmos.base.v1beta1.ICoin[];
/**
* Creates a new Input instance using the specified properties.
* @param [properties] Properties to set
* @returns Input instance
*/
public static create(properties?: cosmos.bank.v1beta1.IInput): cosmos.bank.v1beta1.Input;
/**
* Encodes the specified Input message. Does not implicitly {@link cosmos.bank.v1beta1.Input.verify|verify} messages.
* @param m Input message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.IInput, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an Input message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns Input
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.Input;
}
/** Properties of an Output. */
interface IOutput {
/** Output address */
address?: string | null;
/** Output coins */
coins?: cosmos.base.v1beta1.ICoin[] | null;
}
/** Represents an Output. */
class Output implements IOutput {
/**
* Constructs a new Output.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.IOutput);
/** Output address. */
public address: string;
/** Output coins. */
public coins: cosmos.base.v1beta1.ICoin[];
/**
* Creates a new Output instance using the specified properties.
* @param [properties] Properties to set
* @returns Output instance
*/
public static create(properties?: cosmos.bank.v1beta1.IOutput): cosmos.bank.v1beta1.Output;
/**
* Encodes the specified Output message. Does not implicitly {@link cosmos.bank.v1beta1.Output.verify|verify} messages.
* @param m Output message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.IOutput, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an Output message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns Output
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.Output;
}
/** Properties of a Supply. */
interface ISupply {
/** Supply total */
total?: cosmos.base.v1beta1.ICoin[] | null;
}
/** Represents a Supply. */
class Supply implements ISupply {
/**
* Constructs a new Supply.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.ISupply);
/** Supply total. */
public total: cosmos.base.v1beta1.ICoin[];
/**
* Creates a new Supply instance using the specified properties.
* @param [properties] Properties to set
* @returns Supply instance
*/
public static create(properties?: cosmos.bank.v1beta1.ISupply): cosmos.bank.v1beta1.Supply;
/**
* Encodes the specified Supply message. Does not implicitly {@link cosmos.bank.v1beta1.Supply.verify|verify} messages.
* @param m Supply message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.ISupply, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Supply message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns Supply
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.Supply;
}
/** Properties of a DenomUnit. */
interface IDenomUnit {
/** DenomUnit denom */
denom?: string | null;
/** DenomUnit exponent */
exponent?: number | null;
/** DenomUnit aliases */
aliases?: string[] | null;
}
/** Represents a DenomUnit. */
class DenomUnit implements IDenomUnit {
/**
* Constructs a new DenomUnit.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.IDenomUnit);
/** DenomUnit denom. */
public denom: string;
/** DenomUnit exponent. */
public exponent: number;
/** DenomUnit aliases. */
public aliases: string[];
/**
* Creates a new DenomUnit instance using the specified properties.
* @param [properties] Properties to set
* @returns DenomUnit instance
*/
public static create(properties?: cosmos.bank.v1beta1.IDenomUnit): cosmos.bank.v1beta1.DenomUnit;
/**
* Encodes the specified DenomUnit message. Does not implicitly {@link cosmos.bank.v1beta1.DenomUnit.verify|verify} messages.
* @param m DenomUnit message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.IDenomUnit, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a DenomUnit message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns DenomUnit
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.DenomUnit;
}
/** Properties of a Metadata. */
interface IMetadata {
/** Metadata description */
description?: string | null;
/** Metadata denomUnits */
denomUnits?: cosmos.bank.v1beta1.IDenomUnit[] | null;
/** Metadata base */
base?: string | null;
/** Metadata display */
display?: string | null;
}
/** Represents a Metadata. */
class Metadata implements IMetadata {
/**
* Constructs a new Metadata.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.IMetadata);
/** Metadata description. */
public description: string;
/** Metadata denomUnits. */
public denomUnits: cosmos.bank.v1beta1.IDenomUnit[];
/** Metadata base. */
public base: string;
/** Metadata display. */
public display: string;
/**
* Creates a new Metadata instance using the specified properties.
* @param [properties] Properties to set
* @returns Metadata instance
*/
public static create(properties?: cosmos.bank.v1beta1.IMetadata): cosmos.bank.v1beta1.Metadata;
/**
* Encodes the specified Metadata message. Does not implicitly {@link cosmos.bank.v1beta1.Metadata.verify|verify} messages.
* @param m Metadata message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.IMetadata, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Metadata message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns Metadata
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.Metadata;
}
/** Represents a Query */
class Query extends $protobuf.rpc.Service {
/**
@ -1117,7 +1472,7 @@ export namespace cosmos {
/** Properties of a QueryParamsResponse. */
interface IQueryParamsResponse {
/** QueryParamsResponse params */
params?: cosmos.auth.v1beta1.IParams | null;
params?: cosmos.bank.v1beta1.IParams | null;
}
/** Represents a QueryParamsResponse. */
@ -1129,7 +1484,7 @@ export namespace cosmos {
constructor(p?: cosmos.bank.v1beta1.IQueryParamsResponse);
/** QueryParamsResponse params. */
public params?: cosmos.auth.v1beta1.IParams | null;
public params?: cosmos.bank.v1beta1.IParams | null;
/**
* Creates a new QueryParamsResponse instance using the specified properties.
@ -1164,6 +1519,112 @@ export namespace cosmos {
l?: number,
): cosmos.bank.v1beta1.QueryParamsResponse;
}
/** Properties of a MsgSend. */
interface IMsgSend {
/** MsgSend fromAddress */
fromAddress?: string | null;
/** MsgSend toAddress */
toAddress?: string | null;
/** MsgSend amount */
amount?: cosmos.base.v1beta1.ICoin[] | null;
}
/** Represents a MsgSend. */
class MsgSend implements IMsgSend {
/**
* Constructs a new MsgSend.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.IMsgSend);
/** MsgSend fromAddress. */
public fromAddress: string;
/** MsgSend toAddress. */
public toAddress: string;
/** MsgSend amount. */
public amount: cosmos.base.v1beta1.ICoin[];
/**
* Creates a new MsgSend instance using the specified properties.
* @param [properties] Properties to set
* @returns MsgSend instance
*/
public static create(properties?: cosmos.bank.v1beta1.IMsgSend): cosmos.bank.v1beta1.MsgSend;
/**
* Encodes the specified MsgSend message. Does not implicitly {@link cosmos.bank.v1beta1.MsgSend.verify|verify} messages.
* @param m MsgSend message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.IMsgSend, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a MsgSend message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns MsgSend
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.MsgSend;
}
/** Properties of a MsgMultiSend. */
interface IMsgMultiSend {
/** MsgMultiSend inputs */
inputs?: cosmos.bank.v1beta1.IInput[] | null;
/** MsgMultiSend outputs */
outputs?: cosmos.bank.v1beta1.IOutput[] | null;
}
/** Represents a MsgMultiSend. */
class MsgMultiSend implements IMsgMultiSend {
/**
* Constructs a new MsgMultiSend.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.IMsgMultiSend);
/** MsgMultiSend inputs. */
public inputs: cosmos.bank.v1beta1.IInput[];
/** MsgMultiSend outputs. */
public outputs: cosmos.bank.v1beta1.IOutput[];
/**
* Creates a new MsgMultiSend instance using the specified properties.
* @param [properties] Properties to set
* @returns MsgMultiSend instance
*/
public static create(
properties?: cosmos.bank.v1beta1.IMsgMultiSend,
): cosmos.bank.v1beta1.MsgMultiSend;
/**
* Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSend.verify|verify} messages.
* @param m MsgMultiSend message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.IMsgMultiSend, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a MsgMultiSend message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns MsgMultiSend
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.MsgMultiSend;
}
}
}

View File

@ -349,6 +349,321 @@ exports.cosmos = $root.cosmos = (() => {
const bank = {};
bank.v1beta1 = (function () {
const v1beta1 = {};
v1beta1.Params = (function () {
function Params(p) {
this.sendEnabled = [];
if (p)
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
Params.prototype.sendEnabled = $util.emptyArray;
Params.prototype.defaultSendEnabled = false;
Params.create = function create(properties) {
return new Params(properties);
};
Params.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.sendEnabled != null && m.sendEnabled.length) {
for (var i = 0; i < m.sendEnabled.length; ++i)
$root.cosmos.bank.v1beta1.SendEnabled.encode(m.sendEnabled[i], w.uint32(10).fork()).ldelim();
}
if (m.defaultSendEnabled != null && Object.hasOwnProperty.call(m, "defaultSendEnabled"))
w.uint32(16).bool(m.defaultSendEnabled);
return w;
};
Params.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
var c = l === undefined ? r.len : r.pos + l,
m = new $root.cosmos.bank.v1beta1.Params();
while (r.pos < c) {
var t = r.uint32();
switch (t >>> 3) {
case 1:
if (!(m.sendEnabled && m.sendEnabled.length)) m.sendEnabled = [];
m.sendEnabled.push($root.cosmos.bank.v1beta1.SendEnabled.decode(r, r.uint32()));
break;
case 2:
m.defaultSendEnabled = r.bool();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return Params;
})();
v1beta1.SendEnabled = (function () {
function SendEnabled(p) {
if (p)
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
SendEnabled.prototype.denom = "";
SendEnabled.prototype.enabled = false;
SendEnabled.create = function create(properties) {
return new SendEnabled(properties);
};
SendEnabled.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.denom != null && Object.hasOwnProperty.call(m, "denom")) w.uint32(10).string(m.denom);
if (m.enabled != null && Object.hasOwnProperty.call(m, "enabled")) w.uint32(16).bool(m.enabled);
return w;
};
SendEnabled.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
var c = l === undefined ? r.len : r.pos + l,
m = new $root.cosmos.bank.v1beta1.SendEnabled();
while (r.pos < c) {
var t = r.uint32();
switch (t >>> 3) {
case 1:
m.denom = r.string();
break;
case 2:
m.enabled = r.bool();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return SendEnabled;
})();
v1beta1.Input = (function () {
function Input(p) {
this.coins = [];
if (p)
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
Input.prototype.address = "";
Input.prototype.coins = $util.emptyArray;
Input.create = function create(properties) {
return new Input(properties);
};
Input.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.address != null && Object.hasOwnProperty.call(m, "address")) w.uint32(10).string(m.address);
if (m.coins != null && m.coins.length) {
for (var i = 0; i < m.coins.length; ++i)
$root.cosmos.base.v1beta1.Coin.encode(m.coins[i], w.uint32(18).fork()).ldelim();
}
return w;
};
Input.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
var c = l === undefined ? r.len : r.pos + l,
m = new $root.cosmos.bank.v1beta1.Input();
while (r.pos < c) {
var t = r.uint32();
switch (t >>> 3) {
case 1:
m.address = r.string();
break;
case 2:
if (!(m.coins && m.coins.length)) m.coins = [];
m.coins.push($root.cosmos.base.v1beta1.Coin.decode(r, r.uint32()));
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return Input;
})();
v1beta1.Output = (function () {
function Output(p) {
this.coins = [];
if (p)
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
Output.prototype.address = "";
Output.prototype.coins = $util.emptyArray;
Output.create = function create(properties) {
return new Output(properties);
};
Output.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.address != null && Object.hasOwnProperty.call(m, "address")) w.uint32(10).string(m.address);
if (m.coins != null && m.coins.length) {
for (var i = 0; i < m.coins.length; ++i)
$root.cosmos.base.v1beta1.Coin.encode(m.coins[i], w.uint32(18).fork()).ldelim();
}
return w;
};
Output.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
var c = l === undefined ? r.len : r.pos + l,
m = new $root.cosmos.bank.v1beta1.Output();
while (r.pos < c) {
var t = r.uint32();
switch (t >>> 3) {
case 1:
m.address = r.string();
break;
case 2:
if (!(m.coins && m.coins.length)) m.coins = [];
m.coins.push($root.cosmos.base.v1beta1.Coin.decode(r, r.uint32()));
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return Output;
})();
v1beta1.Supply = (function () {
function Supply(p) {
this.total = [];
if (p)
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
Supply.prototype.total = $util.emptyArray;
Supply.create = function create(properties) {
return new Supply(properties);
};
Supply.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.total != null && m.total.length) {
for (var i = 0; i < m.total.length; ++i)
$root.cosmos.base.v1beta1.Coin.encode(m.total[i], w.uint32(10).fork()).ldelim();
}
return w;
};
Supply.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
var c = l === undefined ? r.len : r.pos + l,
m = new $root.cosmos.bank.v1beta1.Supply();
while (r.pos < c) {
var t = r.uint32();
switch (t >>> 3) {
case 1:
if (!(m.total && m.total.length)) m.total = [];
m.total.push($root.cosmos.base.v1beta1.Coin.decode(r, r.uint32()));
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return Supply;
})();
v1beta1.DenomUnit = (function () {
function DenomUnit(p) {
this.aliases = [];
if (p)
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
DenomUnit.prototype.denom = "";
DenomUnit.prototype.exponent = 0;
DenomUnit.prototype.aliases = $util.emptyArray;
DenomUnit.create = function create(properties) {
return new DenomUnit(properties);
};
DenomUnit.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.denom != null && Object.hasOwnProperty.call(m, "denom")) w.uint32(10).string(m.denom);
if (m.exponent != null && Object.hasOwnProperty.call(m, "exponent"))
w.uint32(16).uint32(m.exponent);
if (m.aliases != null && m.aliases.length) {
for (var i = 0; i < m.aliases.length; ++i) w.uint32(26).string(m.aliases[i]);
}
return w;
};
DenomUnit.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
var c = l === undefined ? r.len : r.pos + l,
m = new $root.cosmos.bank.v1beta1.DenomUnit();
while (r.pos < c) {
var t = r.uint32();
switch (t >>> 3) {
case 1:
m.denom = r.string();
break;
case 2:
m.exponent = r.uint32();
break;
case 3:
if (!(m.aliases && m.aliases.length)) m.aliases = [];
m.aliases.push(r.string());
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return DenomUnit;
})();
v1beta1.Metadata = (function () {
function Metadata(p) {
this.denomUnits = [];
if (p)
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
Metadata.prototype.description = "";
Metadata.prototype.denomUnits = $util.emptyArray;
Metadata.prototype.base = "";
Metadata.prototype.display = "";
Metadata.create = function create(properties) {
return new Metadata(properties);
};
Metadata.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.description != null && Object.hasOwnProperty.call(m, "description"))
w.uint32(10).string(m.description);
if (m.denomUnits != null && m.denomUnits.length) {
for (var i = 0; i < m.denomUnits.length; ++i)
$root.cosmos.bank.v1beta1.DenomUnit.encode(m.denomUnits[i], w.uint32(18).fork()).ldelim();
}
if (m.base != null && Object.hasOwnProperty.call(m, "base")) w.uint32(26).string(m.base);
if (m.display != null && Object.hasOwnProperty.call(m, "display")) w.uint32(34).string(m.display);
return w;
};
Metadata.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
var c = l === undefined ? r.len : r.pos + l,
m = new $root.cosmos.bank.v1beta1.Metadata();
while (r.pos < c) {
var t = r.uint32();
switch (t >>> 3) {
case 1:
m.description = r.string();
break;
case 2:
if (!(m.denomUnits && m.denomUnits.length)) m.denomUnits = [];
m.denomUnits.push($root.cosmos.bank.v1beta1.DenomUnit.decode(r, r.uint32()));
break;
case 3:
m.base = r.string();
break;
case 4:
m.display = r.string();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return Metadata;
})();
v1beta1.Query = (function () {
function Query(rpcImpl, requestDelimited, responseDelimited) {
$protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
@ -762,7 +1077,7 @@ exports.cosmos = $root.cosmos = (() => {
QueryParamsResponse.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.params != null && Object.hasOwnProperty.call(m, "params"))
$root.cosmos.auth.v1beta1.Params.encode(m.params, w.uint32(10).fork()).ldelim();
$root.cosmos.bank.v1beta1.Params.encode(m.params, w.uint32(10).fork()).ldelim();
return w;
};
QueryParamsResponse.decode = function decode(r, l) {
@ -773,7 +1088,7 @@ exports.cosmos = $root.cosmos = (() => {
var t = r.uint32();
switch (t >>> 3) {
case 1:
m.params = $root.cosmos.auth.v1beta1.Params.decode(r, r.uint32());
m.params = $root.cosmos.bank.v1beta1.Params.decode(r, r.uint32());
break;
default:
r.skipType(t & 7);
@ -784,6 +1099,106 @@ exports.cosmos = $root.cosmos = (() => {
};
return QueryParamsResponse;
})();
v1beta1.MsgSend = (function () {
function MsgSend(p) {
this.amount = [];
if (p)
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
MsgSend.prototype.fromAddress = "";
MsgSend.prototype.toAddress = "";
MsgSend.prototype.amount = $util.emptyArray;
MsgSend.create = function create(properties) {
return new MsgSend(properties);
};
MsgSend.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.fromAddress != null && Object.hasOwnProperty.call(m, "fromAddress"))
w.uint32(10).string(m.fromAddress);
if (m.toAddress != null && Object.hasOwnProperty.call(m, "toAddress"))
w.uint32(18).string(m.toAddress);
if (m.amount != null && m.amount.length) {
for (var i = 0; i < m.amount.length; ++i)
$root.cosmos.base.v1beta1.Coin.encode(m.amount[i], w.uint32(26).fork()).ldelim();
}
return w;
};
MsgSend.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
var c = l === undefined ? r.len : r.pos + l,
m = new $root.cosmos.bank.v1beta1.MsgSend();
while (r.pos < c) {
var t = r.uint32();
switch (t >>> 3) {
case 1:
m.fromAddress = r.string();
break;
case 2:
m.toAddress = r.string();
break;
case 3:
if (!(m.amount && m.amount.length)) m.amount = [];
m.amount.push($root.cosmos.base.v1beta1.Coin.decode(r, r.uint32()));
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return MsgSend;
})();
v1beta1.MsgMultiSend = (function () {
function MsgMultiSend(p) {
this.inputs = [];
this.outputs = [];
if (p)
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
MsgMultiSend.prototype.inputs = $util.emptyArray;
MsgMultiSend.prototype.outputs = $util.emptyArray;
MsgMultiSend.create = function create(properties) {
return new MsgMultiSend(properties);
};
MsgMultiSend.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.inputs != null && m.inputs.length) {
for (var i = 0; i < m.inputs.length; ++i)
$root.cosmos.bank.v1beta1.Input.encode(m.inputs[i], w.uint32(10).fork()).ldelim();
}
if (m.outputs != null && m.outputs.length) {
for (var i = 0; i < m.outputs.length; ++i)
$root.cosmos.bank.v1beta1.Output.encode(m.outputs[i], w.uint32(18).fork()).ldelim();
}
return w;
};
MsgMultiSend.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
var c = l === undefined ? r.len : r.pos + l,
m = new $root.cosmos.bank.v1beta1.MsgMultiSend();
while (r.pos < c) {
var t = r.uint32();
switch (t >>> 3) {
case 1:
if (!(m.inputs && m.inputs.length)) m.inputs = [];
m.inputs.push($root.cosmos.bank.v1beta1.Input.decode(r, r.uint32()));
break;
case 2:
if (!(m.outputs && m.outputs.length)) m.outputs = [];
m.outputs.push($root.cosmos.bank.v1beta1.Output.decode(r, r.uint32()));
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return MsgMultiSend;
})();
return v1beta1;
})();
return bank;

View File

@ -478,6 +478,361 @@ export namespace cosmos {
namespace bank {
/** Namespace v1beta1. */
namespace v1beta1 {
/** Properties of a Params. */
interface IParams {
/** Params sendEnabled */
sendEnabled?: cosmos.bank.v1beta1.ISendEnabled[] | null;
/** Params defaultSendEnabled */
defaultSendEnabled?: boolean | null;
}
/** Represents a Params. */
class Params implements IParams {
/**
* Constructs a new Params.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.IParams);
/** Params sendEnabled. */
public sendEnabled: cosmos.bank.v1beta1.ISendEnabled[];
/** Params defaultSendEnabled. */
public defaultSendEnabled: boolean;
/**
* Creates a new Params instance using the specified properties.
* @param [properties] Properties to set
* @returns Params instance
*/
public static create(properties?: cosmos.bank.v1beta1.IParams): cosmos.bank.v1beta1.Params;
/**
* Encodes the specified Params message. Does not implicitly {@link cosmos.bank.v1beta1.Params.verify|verify} messages.
* @param m Params message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.IParams, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Params message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns Params
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.Params;
}
/** Properties of a SendEnabled. */
interface ISendEnabled {
/** SendEnabled denom */
denom?: string | null;
/** SendEnabled enabled */
enabled?: boolean | null;
}
/** Represents a SendEnabled. */
class SendEnabled implements ISendEnabled {
/**
* Constructs a new SendEnabled.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.ISendEnabled);
/** SendEnabled denom. */
public denom: string;
/** SendEnabled enabled. */
public enabled: boolean;
/**
* Creates a new SendEnabled instance using the specified properties.
* @param [properties] Properties to set
* @returns SendEnabled instance
*/
public static create(properties?: cosmos.bank.v1beta1.ISendEnabled): cosmos.bank.v1beta1.SendEnabled;
/**
* Encodes the specified SendEnabled message. Does not implicitly {@link cosmos.bank.v1beta1.SendEnabled.verify|verify} messages.
* @param m SendEnabled message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.ISendEnabled, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a SendEnabled message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns SendEnabled
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.SendEnabled;
}
/** Properties of an Input. */
interface IInput {
/** Input address */
address?: string | null;
/** Input coins */
coins?: cosmos.base.v1beta1.ICoin[] | null;
}
/** Represents an Input. */
class Input implements IInput {
/**
* Constructs a new Input.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.IInput);
/** Input address. */
public address: string;
/** Input coins. */
public coins: cosmos.base.v1beta1.ICoin[];
/**
* Creates a new Input instance using the specified properties.
* @param [properties] Properties to set
* @returns Input instance
*/
public static create(properties?: cosmos.bank.v1beta1.IInput): cosmos.bank.v1beta1.Input;
/**
* Encodes the specified Input message. Does not implicitly {@link cosmos.bank.v1beta1.Input.verify|verify} messages.
* @param m Input message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.IInput, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an Input message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns Input
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.Input;
}
/** Properties of an Output. */
interface IOutput {
/** Output address */
address?: string | null;
/** Output coins */
coins?: cosmos.base.v1beta1.ICoin[] | null;
}
/** Represents an Output. */
class Output implements IOutput {
/**
* Constructs a new Output.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.IOutput);
/** Output address. */
public address: string;
/** Output coins. */
public coins: cosmos.base.v1beta1.ICoin[];
/**
* Creates a new Output instance using the specified properties.
* @param [properties] Properties to set
* @returns Output instance
*/
public static create(properties?: cosmos.bank.v1beta1.IOutput): cosmos.bank.v1beta1.Output;
/**
* Encodes the specified Output message. Does not implicitly {@link cosmos.bank.v1beta1.Output.verify|verify} messages.
* @param m Output message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.IOutput, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an Output message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns Output
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.Output;
}
/** Properties of a Supply. */
interface ISupply {
/** Supply total */
total?: cosmos.base.v1beta1.ICoin[] | null;
}
/** Represents a Supply. */
class Supply implements ISupply {
/**
* Constructs a new Supply.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.ISupply);
/** Supply total. */
public total: cosmos.base.v1beta1.ICoin[];
/**
* Creates a new Supply instance using the specified properties.
* @param [properties] Properties to set
* @returns Supply instance
*/
public static create(properties?: cosmos.bank.v1beta1.ISupply): cosmos.bank.v1beta1.Supply;
/**
* Encodes the specified Supply message. Does not implicitly {@link cosmos.bank.v1beta1.Supply.verify|verify} messages.
* @param m Supply message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.ISupply, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Supply message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns Supply
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.Supply;
}
/** Properties of a DenomUnit. */
interface IDenomUnit {
/** DenomUnit denom */
denom?: string | null;
/** DenomUnit exponent */
exponent?: number | null;
/** DenomUnit aliases */
aliases?: string[] | null;
}
/** Represents a DenomUnit. */
class DenomUnit implements IDenomUnit {
/**
* Constructs a new DenomUnit.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.IDenomUnit);
/** DenomUnit denom. */
public denom: string;
/** DenomUnit exponent. */
public exponent: number;
/** DenomUnit aliases. */
public aliases: string[];
/**
* Creates a new DenomUnit instance using the specified properties.
* @param [properties] Properties to set
* @returns DenomUnit instance
*/
public static create(properties?: cosmos.bank.v1beta1.IDenomUnit): cosmos.bank.v1beta1.DenomUnit;
/**
* Encodes the specified DenomUnit message. Does not implicitly {@link cosmos.bank.v1beta1.DenomUnit.verify|verify} messages.
* @param m DenomUnit message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.IDenomUnit, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a DenomUnit message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns DenomUnit
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.DenomUnit;
}
/** Properties of a Metadata. */
interface IMetadata {
/** Metadata description */
description?: string | null;
/** Metadata denomUnits */
denomUnits?: cosmos.bank.v1beta1.IDenomUnit[] | null;
/** Metadata base */
base?: string | null;
/** Metadata display */
display?: string | null;
}
/** Represents a Metadata. */
class Metadata implements IMetadata {
/**
* Constructs a new Metadata.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.IMetadata);
/** Metadata description. */
public description: string;
/** Metadata denomUnits. */
public denomUnits: cosmos.bank.v1beta1.IDenomUnit[];
/** Metadata base. */
public base: string;
/** Metadata display. */
public display: string;
/**
* Creates a new Metadata instance using the specified properties.
* @param [properties] Properties to set
* @returns Metadata instance
*/
public static create(properties?: cosmos.bank.v1beta1.IMetadata): cosmos.bank.v1beta1.Metadata;
/**
* Encodes the specified Metadata message. Does not implicitly {@link cosmos.bank.v1beta1.Metadata.verify|verify} messages.
* @param m Metadata message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.IMetadata, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Metadata message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns Metadata
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.Metadata;
}
/** Represents a Query */
class Query extends $protobuf.rpc.Service {
/**
@ -1117,7 +1472,7 @@ export namespace cosmos {
/** Properties of a QueryParamsResponse. */
interface IQueryParamsResponse {
/** QueryParamsResponse params */
params?: cosmos.auth.v1beta1.IParams | null;
params?: cosmos.bank.v1beta1.IParams | null;
}
/** Represents a QueryParamsResponse. */
@ -1129,7 +1484,7 @@ export namespace cosmos {
constructor(p?: cosmos.bank.v1beta1.IQueryParamsResponse);
/** QueryParamsResponse params. */
public params?: cosmos.auth.v1beta1.IParams | null;
public params?: cosmos.bank.v1beta1.IParams | null;
/**
* Creates a new QueryParamsResponse instance using the specified properties.
@ -1164,6 +1519,112 @@ export namespace cosmos {
l?: number,
): cosmos.bank.v1beta1.QueryParamsResponse;
}
/** Properties of a MsgSend. */
interface IMsgSend {
/** MsgSend fromAddress */
fromAddress?: string | null;
/** MsgSend toAddress */
toAddress?: string | null;
/** MsgSend amount */
amount?: cosmos.base.v1beta1.ICoin[] | null;
}
/** Represents a MsgSend. */
class MsgSend implements IMsgSend {
/**
* Constructs a new MsgSend.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.IMsgSend);
/** MsgSend fromAddress. */
public fromAddress: string;
/** MsgSend toAddress. */
public toAddress: string;
/** MsgSend amount. */
public amount: cosmos.base.v1beta1.ICoin[];
/**
* Creates a new MsgSend instance using the specified properties.
* @param [properties] Properties to set
* @returns MsgSend instance
*/
public static create(properties?: cosmos.bank.v1beta1.IMsgSend): cosmos.bank.v1beta1.MsgSend;
/**
* Encodes the specified MsgSend message. Does not implicitly {@link cosmos.bank.v1beta1.MsgSend.verify|verify} messages.
* @param m MsgSend message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.IMsgSend, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a MsgSend message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns MsgSend
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.MsgSend;
}
/** Properties of a MsgMultiSend. */
interface IMsgMultiSend {
/** MsgMultiSend inputs */
inputs?: cosmos.bank.v1beta1.IInput[] | null;
/** MsgMultiSend outputs */
outputs?: cosmos.bank.v1beta1.IOutput[] | null;
}
/** Represents a MsgMultiSend. */
class MsgMultiSend implements IMsgMultiSend {
/**
* Constructs a new MsgMultiSend.
* @param [p] Properties to set
*/
constructor(p?: cosmos.bank.v1beta1.IMsgMultiSend);
/** MsgMultiSend inputs. */
public inputs: cosmos.bank.v1beta1.IInput[];
/** MsgMultiSend outputs. */
public outputs: cosmos.bank.v1beta1.IOutput[];
/**
* Creates a new MsgMultiSend instance using the specified properties.
* @param [properties] Properties to set
* @returns MsgMultiSend instance
*/
public static create(
properties?: cosmos.bank.v1beta1.IMsgMultiSend,
): cosmos.bank.v1beta1.MsgMultiSend;
/**
* Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSend.verify|verify} messages.
* @param m MsgMultiSend message or plain object to encode
* @param [w] Writer to encode to
* @returns Writer
*/
public static encode(m: cosmos.bank.v1beta1.IMsgMultiSend, w?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a MsgMultiSend message from the specified reader or buffer.
* @param r Reader or buffer to decode from
* @param [l] Message length if known beforehand
* @returns MsgMultiSend
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.v1beta1.MsgMultiSend;
}
}
}