@iconlake/client 0.1.13 → 0.2.0

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/index.mjs CHANGED
@@ -89416,8 +89416,8 @@ function isSet$6(e) {
89416
89416
  return e != null;
89417
89417
  }
89418
89418
  const msgTypes$1 = [
89419
- ["/iconlake.drop.MsgMint", MsgMint$1],
89420
- ["/iconlake.drop.MsgInit", MsgInit]
89419
+ ["/iconlake.drop.MsgInit", MsgInit],
89420
+ ["/iconlake.drop.MsgMint", MsgMint$1]
89421
89421
  ];
89422
89422
  let HttpClient$1 = class {
89423
89423
  constructor({ securityWorker: t, secure: n, format: p, ...u } = {}) {
@@ -89531,11 +89531,11 @@ const Info = {
89531
89531
  }
89532
89532
  };
89533
89533
  function createBaseInfoRaw() {
89534
- return { accAddress: new Uint8Array(), lastMintTime: 0 };
89534
+ return { address: new Uint8Array(), lastMintTime: 0 };
89535
89535
  }
89536
89536
  const InfoRaw = {
89537
89537
  encode(e, t = _m0.Writer.create()) {
89538
- return e.accAddress.length !== 0 && t.uint32(10).bytes(e.accAddress), e.lastMintTime !== 0 && t.uint32(16).int64(e.lastMintTime), t;
89538
+ return e.address.length !== 0 && t.uint32(10).bytes(e.address), e.lastMintTime !== 0 && t.uint32(16).int64(e.lastMintTime), t;
89539
89539
  },
89540
89540
  decode(e, t) {
89541
89541
  const n = e instanceof _m0.Reader ? e : new _m0.Reader(e);
@@ -89545,7 +89545,7 @@ const InfoRaw = {
89545
89545
  const g = n.uint32();
89546
89546
  switch (g >>> 3) {
89547
89547
  case 1:
89548
- u.accAddress = n.bytes();
89548
+ u.address = n.bytes();
89549
89549
  break;
89550
89550
  case 2:
89551
89551
  u.lastMintTime = longToNumber$4(n.int64());
@@ -89559,17 +89559,17 @@ const InfoRaw = {
89559
89559
  },
89560
89560
  fromJSON(e) {
89561
89561
  return {
89562
- accAddress: isSet$5(e.accAddress) ? bytesFromBase64$3(e.accAddress) : new Uint8Array(),
89562
+ address: isSet$5(e.address) ? bytesFromBase64$3(e.address) : new Uint8Array(),
89563
89563
  lastMintTime: isSet$5(e.lastMintTime) ? Number(e.lastMintTime) : 0
89564
89564
  };
89565
89565
  },
89566
89566
  toJSON(e) {
89567
89567
  const t = {};
89568
- return e.accAddress !== void 0 && (t.accAddress = base64FromBytes$3(e.accAddress !== void 0 ? e.accAddress : new Uint8Array())), e.lastMintTime !== void 0 && (t.lastMintTime = Math.round(e.lastMintTime)), t;
89568
+ return e.address !== void 0 && (t.address = base64FromBytes$3(e.address !== void 0 ? e.address : new Uint8Array())), e.lastMintTime !== void 0 && (t.lastMintTime = Math.round(e.lastMintTime)), t;
89569
89569
  },
89570
89570
  fromPartial(e) {
89571
89571
  const t = createBaseInfoRaw();
89572
- return t.accAddress = e.accAddress ?? new Uint8Array(), t.lastMintTime = e.lastMintTime ?? 0, t;
89572
+ return t.address = e.address ?? new Uint8Array(), t.lastMintTime = e.lastMintTime ?? 0, t;
89573
89573
  }
89574
89574
  };
89575
89575
  var globalThis$7 = (() => {
@@ -89655,40 +89655,40 @@ const defaultFee$1 = {
89655
89655
  amount: [],
89656
89656
  gas: "200000"
89657
89657
  }, txClient$1 = ({ signer: e, prefix: t, addr: n } = { addr: "http://localhost:26657", prefix: "cosmos" }) => ({
89658
- async sendMsgMint({ value: p, fee: u, memo: g }) {
89658
+ async sendMsgInit({ value: p, fee: u, memo: g }) {
89659
89659
  if (!e)
89660
- throw new Error("TxClient:sendMsgMint: Unable to sign Tx. Signer is not present.");
89660
+ throw new Error("TxClient:sendMsgInit: Unable to sign Tx. Signer is not present.");
89661
89661
  try {
89662
89662
  const { address: y } = (await e.getAccounts())[0], P = await build$5.SigningStargateClient.connectWithSigner(n, e, { registry: registry$2, prefix: t });
89663
- let N = this.msgMint({ value: MsgMint$1.fromPartial(p) });
89663
+ let N = this.msgInit({ value: MsgInit.fromPartial(p) });
89664
89664
  return await P.signAndBroadcast(y, [N], u || defaultFee$1, g);
89665
89665
  } catch (y) {
89666
- throw new Error("TxClient:sendMsgMint: Could not broadcast Tx: " + y.message);
89666
+ throw new Error("TxClient:sendMsgInit: Could not broadcast Tx: " + y.message);
89667
89667
  }
89668
89668
  },
89669
- async sendMsgInit({ value: p, fee: u, memo: g }) {
89669
+ async sendMsgMint({ value: p, fee: u, memo: g }) {
89670
89670
  if (!e)
89671
- throw new Error("TxClient:sendMsgInit: Unable to sign Tx. Signer is not present.");
89671
+ throw new Error("TxClient:sendMsgMint: Unable to sign Tx. Signer is not present.");
89672
89672
  try {
89673
89673
  const { address: y } = (await e.getAccounts())[0], P = await build$5.SigningStargateClient.connectWithSigner(n, e, { registry: registry$2, prefix: t });
89674
- let N = this.msgInit({ value: MsgInit.fromPartial(p) });
89674
+ let N = this.msgMint({ value: MsgMint$1.fromPartial(p) });
89675
89675
  return await P.signAndBroadcast(y, [N], u || defaultFee$1, g);
89676
89676
  } catch (y) {
89677
- throw new Error("TxClient:sendMsgInit: Could not broadcast Tx: " + y.message);
89677
+ throw new Error("TxClient:sendMsgMint: Could not broadcast Tx: " + y.message);
89678
89678
  }
89679
89679
  },
89680
- msgMint({ value: p }) {
89680
+ msgInit({ value: p }) {
89681
89681
  try {
89682
- return { typeUrl: "/iconlake.drop.MsgMint", value: MsgMint$1.fromPartial(p) };
89682
+ return { typeUrl: "/iconlake.drop.MsgInit", value: MsgInit.fromPartial(p) };
89683
89683
  } catch (u) {
89684
- throw new Error("TxClient:MsgMint: Could not create message: " + u.message);
89684
+ throw new Error("TxClient:MsgInit: Could not create message: " + u.message);
89685
89685
  }
89686
89686
  },
89687
- msgInit({ value: p }) {
89687
+ msgMint({ value: p }) {
89688
89688
  try {
89689
- return { typeUrl: "/iconlake.drop.MsgInit", value: MsgInit.fromPartial(p) };
89689
+ return { typeUrl: "/iconlake.drop.MsgMint", value: MsgMint$1.fromPartial(p) };
89690
89690
  } catch (u) {
89691
- throw new Error("TxClient:MsgInit: Could not create message: " + u.message);
89691
+ throw new Error("TxClient:MsgMint: Could not create message: " + u.message);
89692
89692
  }
89693
89693
  }
89694
89694
  }), queryClient$1 = ({ addr: e } = { addr: "http://localhost:1317" }) => new Api$1({ baseURL: e });
@@ -89868,8 +89868,8 @@ function isSet$4(e) {
89868
89868
  return e != null;
89869
89869
  }
89870
89870
  const msgTypes = [
89871
- ["/iconlake.icon.MsgMint", MsgMint],
89872
- ["/iconlake.icon.MsgUpdateClass", MsgUpdateClass]
89871
+ ["/iconlake.icon.MsgUpdateClass", MsgUpdateClass],
89872
+ ["/iconlake.icon.MsgMint", MsgMint]
89873
89873
  ];
89874
89874
  class HttpClient {
89875
89875
  constructor({ securityWorker: t, secure: n, format: p, ...u } = {}) {
@@ -90580,40 +90580,40 @@ const defaultFee = {
90580
90580
  amount: [],
90581
90581
  gas: "200000"
90582
90582
  }, txClient = ({ signer: e, prefix: t, addr: n } = { addr: "http://localhost:26657", prefix: "cosmos" }) => ({
90583
- async sendMsgMint({ value: p, fee: u, memo: g }) {
90583
+ async sendMsgUpdateClass({ value: p, fee: u, memo: g }) {
90584
90584
  if (!e)
90585
- throw new Error("TxClient:sendMsgMint: Unable to sign Tx. Signer is not present.");
90585
+ throw new Error("TxClient:sendMsgUpdateClass: Unable to sign Tx. Signer is not present.");
90586
90586
  try {
90587
90587
  const { address: y } = (await e.getAccounts())[0], P = await build$5.SigningStargateClient.connectWithSigner(n, e, { registry: registry$1, prefix: t });
90588
- let N = this.msgMint({ value: MsgMint.fromPartial(p) });
90588
+ let N = this.msgUpdateClass({ value: MsgUpdateClass.fromPartial(p) });
90589
90589
  return await P.signAndBroadcast(y, [N], u || defaultFee, g);
90590
90590
  } catch (y) {
90591
- throw new Error("TxClient:sendMsgMint: Could not broadcast Tx: " + y.message);
90591
+ throw new Error("TxClient:sendMsgUpdateClass: Could not broadcast Tx: " + y.message);
90592
90592
  }
90593
90593
  },
90594
- async sendMsgUpdateClass({ value: p, fee: u, memo: g }) {
90594
+ async sendMsgMint({ value: p, fee: u, memo: g }) {
90595
90595
  if (!e)
90596
- throw new Error("TxClient:sendMsgUpdateClass: Unable to sign Tx. Signer is not present.");
90596
+ throw new Error("TxClient:sendMsgMint: Unable to sign Tx. Signer is not present.");
90597
90597
  try {
90598
90598
  const { address: y } = (await e.getAccounts())[0], P = await build$5.SigningStargateClient.connectWithSigner(n, e, { registry: registry$1, prefix: t });
90599
- let N = this.msgUpdateClass({ value: MsgUpdateClass.fromPartial(p) });
90599
+ let N = this.msgMint({ value: MsgMint.fromPartial(p) });
90600
90600
  return await P.signAndBroadcast(y, [N], u || defaultFee, g);
90601
90601
  } catch (y) {
90602
- throw new Error("TxClient:sendMsgUpdateClass: Could not broadcast Tx: " + y.message);
90602
+ throw new Error("TxClient:sendMsgMint: Could not broadcast Tx: " + y.message);
90603
90603
  }
90604
90604
  },
90605
- msgMint({ value: p }) {
90605
+ msgUpdateClass({ value: p }) {
90606
90606
  try {
90607
- return { typeUrl: "/iconlake.icon.MsgMint", value: MsgMint.fromPartial(p) };
90607
+ return { typeUrl: "/iconlake.icon.MsgUpdateClass", value: MsgUpdateClass.fromPartial(p) };
90608
90608
  } catch (u) {
90609
- throw new Error("TxClient:MsgMint: Could not create message: " + u.message);
90609
+ throw new Error("TxClient:MsgUpdateClass: Could not create message: " + u.message);
90610
90610
  }
90611
90611
  },
90612
- msgUpdateClass({ value: p }) {
90612
+ msgMint({ value: p }) {
90613
90613
  try {
90614
- return { typeUrl: "/iconlake.icon.MsgUpdateClass", value: MsgUpdateClass.fromPartial(p) };
90614
+ return { typeUrl: "/iconlake.icon.MsgMint", value: MsgMint.fromPartial(p) };
90615
90615
  } catch (u) {
90616
- throw new Error("TxClient:MsgUpdateClass: Could not create message: " + u.message);
90616
+ throw new Error("TxClient:MsgMint: Could not create message: " + u.message);
90617
90617
  }
90618
90618
  }
90619
90619
  }), queryClient = ({ addr: e } = { addr: "http://localhost:1317" }) => new Api({ baseURL: e });