@iconlake/client 0.2.1 → 0.3.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.MsgInit", MsgInit],
89420
- ["/iconlake.drop.MsgMint", MsgMint$1]
89419
+ ["/iconlake.drop.MsgMint", MsgMint$1],
89420
+ ["/iconlake.drop.MsgInit", MsgInit]
89421
89421
  ];
89422
89422
  let HttpClient$1 = class {
89423
89423
  constructor({ securityWorker: t, secure: n, format: p, ...u } = {}) {
@@ -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 sendMsgInit({ value: p, fee: u, memo: g }) {
89658
+ async sendMsgMint({ value: p, fee: u, memo: g }) {
89659
89659
  if (!e)
89660
- throw new Error("TxClient:sendMsgInit: Unable to sign Tx. Signer is not present.");
89660
+ throw new Error("TxClient:sendMsgMint: 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.msgInit({ value: MsgInit.fromPartial(p) });
89663
+ let N = this.msgMint({ value: MsgMint$1.fromPartial(p) });
89664
89664
  return await P.signAndBroadcast(y, [N], u || defaultFee$1, g);
89665
89665
  } catch (y) {
89666
- throw new Error("TxClient:sendMsgInit: Could not broadcast Tx: " + y.message);
89666
+ throw new Error("TxClient:sendMsgMint: Could not broadcast Tx: " + y.message);
89667
89667
  }
89668
89668
  },
89669
- async sendMsgMint({ value: p, fee: u, memo: g }) {
89669
+ async sendMsgInit({ value: p, fee: u, memo: g }) {
89670
89670
  if (!e)
89671
- throw new Error("TxClient:sendMsgMint: Unable to sign Tx. Signer is not present.");
89671
+ throw new Error("TxClient:sendMsgInit: 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.msgMint({ value: MsgMint$1.fromPartial(p) });
89674
+ let N = this.msgInit({ value: MsgInit.fromPartial(p) });
89675
89675
  return await P.signAndBroadcast(y, [N], u || defaultFee$1, g);
89676
89676
  } catch (y) {
89677
- throw new Error("TxClient:sendMsgMint: Could not broadcast Tx: " + y.message);
89677
+ throw new Error("TxClient:sendMsgInit: Could not broadcast Tx: " + y.message);
89678
89678
  }
89679
89679
  },
89680
- msgInit({ value: p }) {
89680
+ msgMint({ value: p }) {
89681
89681
  try {
89682
- return { typeUrl: "/iconlake.drop.MsgInit", value: MsgInit.fromPartial(p) };
89682
+ return { typeUrl: "/iconlake.drop.MsgMint", value: MsgMint$1.fromPartial(p) };
89683
89683
  } catch (u) {
89684
- throw new Error("TxClient:MsgInit: Could not create message: " + u.message);
89684
+ throw new Error("TxClient:MsgMint: Could not create message: " + u.message);
89685
89685
  }
89686
89686
  },
89687
- msgMint({ value: p }) {
89687
+ msgInit({ value: p }) {
89688
89688
  try {
89689
- return { typeUrl: "/iconlake.drop.MsgMint", value: MsgMint$1.fromPartial(p) };
89689
+ return { typeUrl: "/iconlake.drop.MsgInit", value: MsgInit.fromPartial(p) };
89690
89690
  } catch (u) {
89691
- throw new Error("TxClient:MsgMint: Could not create message: " + u.message);
89691
+ throw new Error("TxClient:MsgInit: 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 });
@@ -89724,7 +89724,7 @@ function createBaseMsgMint() {
89724
89724
  }
89725
89725
  const MsgMint = {
89726
89726
  encode(e, t = _m0.Writer.create()) {
89727
- return e.creator !== "" && t.uint32(10).string(e.creator), e.classId !== "" && t.uint32(18).string(e.classId), e.id !== "" && t.uint32(26).string(e.id), e.name !== "" && t.uint32(34).string(e.name), e.description !== "" && t.uint32(42).string(e.description), e.uri !== "" && t.uint32(50).string(e.uri), e.uriHash !== "" && t.uint32(58).string(e.uriHash), e.supply !== 0 && t.uint32(72).uint64(e.supply), t;
89727
+ return e.creator !== "" && t.uint32(10).string(e.creator), e.classId !== "" && t.uint32(18).string(e.classId), e.id !== "" && t.uint32(26).string(e.id), e.name !== "" && t.uint32(34).string(e.name), e.description !== "" && t.uint32(42).string(e.description), e.uri !== "" && t.uint32(50).string(e.uri), e.uriHash !== "" && t.uint32(58).string(e.uriHash), e.supply !== 0 && t.uint32(64).uint64(e.supply), t;
89728
89728
  },
89729
89729
  decode(e, t) {
89730
89730
  const n = e instanceof _m0.Reader ? e : new _m0.Reader(e);
@@ -89754,7 +89754,7 @@ const MsgMint = {
89754
89754
  case 7:
89755
89755
  u.uriHash = n.string();
89756
89756
  break;
89757
- case 9:
89757
+ case 8:
89758
89758
  u.supply = longToNumber$3(n.uint64());
89759
89759
  break;
89760
89760
  default:
@@ -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 } = {}) {
@@ -90582,40 +90582,40 @@ const defaultFee = {
90582
90582
  amount: [],
90583
90583
  gas: "200000"
90584
90584
  }, txClient = ({ signer: e, prefix: t, addr: n } = { addr: "http://localhost:26657", prefix: "cosmos" }) => ({
90585
- async sendMsgMint({ value: p, fee: u, memo: g }) {
90585
+ async sendMsgUpdateClass({ value: p, fee: u, memo: g }) {
90586
90586
  if (!e)
90587
- throw new Error("TxClient:sendMsgMint: Unable to sign Tx. Signer is not present.");
90587
+ throw new Error("TxClient:sendMsgUpdateClass: Unable to sign Tx. Signer is not present.");
90588
90588
  try {
90589
90589
  const { address: y } = (await e.getAccounts())[0], P = await build$5.SigningStargateClient.connectWithSigner(n, e, { registry: registry$1, prefix: t });
90590
- let N = this.msgMint({ value: MsgMint.fromPartial(p) });
90590
+ let N = this.msgUpdateClass({ value: MsgUpdateClass.fromPartial(p) });
90591
90591
  return await P.signAndBroadcast(y, [N], u || defaultFee, g);
90592
90592
  } catch (y) {
90593
- throw new Error("TxClient:sendMsgMint: Could not broadcast Tx: " + y.message);
90593
+ throw new Error("TxClient:sendMsgUpdateClass: Could not broadcast Tx: " + y.message);
90594
90594
  }
90595
90595
  },
90596
- async sendMsgUpdateClass({ value: p, fee: u, memo: g }) {
90596
+ async sendMsgMint({ value: p, fee: u, memo: g }) {
90597
90597
  if (!e)
90598
- throw new Error("TxClient:sendMsgUpdateClass: Unable to sign Tx. Signer is not present.");
90598
+ throw new Error("TxClient:sendMsgMint: Unable to sign Tx. Signer is not present.");
90599
90599
  try {
90600
90600
  const { address: y } = (await e.getAccounts())[0], P = await build$5.SigningStargateClient.connectWithSigner(n, e, { registry: registry$1, prefix: t });
90601
- let N = this.msgUpdateClass({ value: MsgUpdateClass.fromPartial(p) });
90601
+ let N = this.msgMint({ value: MsgMint.fromPartial(p) });
90602
90602
  return await P.signAndBroadcast(y, [N], u || defaultFee, g);
90603
90603
  } catch (y) {
90604
- throw new Error("TxClient:sendMsgUpdateClass: Could not broadcast Tx: " + y.message);
90604
+ throw new Error("TxClient:sendMsgMint: Could not broadcast Tx: " + y.message);
90605
90605
  }
90606
90606
  },
90607
- msgMint({ value: p }) {
90607
+ msgUpdateClass({ value: p }) {
90608
90608
  try {
90609
- return { typeUrl: "/iconlake.icon.MsgMint", value: MsgMint.fromPartial(p) };
90609
+ return { typeUrl: "/iconlake.icon.MsgUpdateClass", value: MsgUpdateClass.fromPartial(p) };
90610
90610
  } catch (u) {
90611
- throw new Error("TxClient:MsgMint: Could not create message: " + u.message);
90611
+ throw new Error("TxClient:MsgUpdateClass: Could not create message: " + u.message);
90612
90612
  }
90613
90613
  },
90614
- msgUpdateClass({ value: p }) {
90614
+ msgMint({ value: p }) {
90615
90615
  try {
90616
- return { typeUrl: "/iconlake.icon.MsgUpdateClass", value: MsgUpdateClass.fromPartial(p) };
90616
+ return { typeUrl: "/iconlake.icon.MsgMint", value: MsgMint.fromPartial(p) };
90617
90617
  } catch (u) {
90618
- throw new Error("TxClient:MsgUpdateClass: Could not create message: " + u.message);
90618
+ throw new Error("TxClient:MsgMint: Could not create message: " + u.message);
90619
90619
  }
90620
90620
  }
90621
90621
  }), queryClient = ({ addr: e } = { addr: "http://localhost:1317" }) => new Api({ baseURL: e });