@iconlake/client 0.1.8 → 0.1.10
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.iife.js +22 -0
- package/dist/index.js +22 -0
- package/dist/{client.mjs → index.mjs} +62 -1
- package/dist/{client.umd.js → index.umd.js} +2 -2
- package/package.json +12 -11
- package/types/iconlake.drop/module.d.ts +12 -1
- package/types/iconlake.drop/types/iconlake/drop/tx.d.ts +19 -0
- package/types/index.d.ts +8 -0
|
@@ -89348,6 +89348,48 @@ const MsgMint$1 = {
|
|
|
89348
89348
|
return t.creator = e.creator ?? "", t.amount = e.amount !== void 0 && e.amount !== null ? Coin.fromPartial(e.amount) : void 0, t;
|
|
89349
89349
|
}
|
|
89350
89350
|
};
|
|
89351
|
+
function createBaseMsgInit() {
|
|
89352
|
+
return { creator: "", address: "" };
|
|
89353
|
+
}
|
|
89354
|
+
const MsgInit = {
|
|
89355
|
+
encode(e, t = _m0.Writer.create()) {
|
|
89356
|
+
return e.creator !== "" && t.uint32(10).string(e.creator), e.address !== "" && t.uint32(18).string(e.address), t;
|
|
89357
|
+
},
|
|
89358
|
+
decode(e, t) {
|
|
89359
|
+
const n = e instanceof _m0.Reader ? e : new _m0.Reader(e);
|
|
89360
|
+
let p = t === void 0 ? n.len : n.pos + t;
|
|
89361
|
+
const l = createBaseMsgInit();
|
|
89362
|
+
for (; n.pos < p; ) {
|
|
89363
|
+
const g = n.uint32();
|
|
89364
|
+
switch (g >>> 3) {
|
|
89365
|
+
case 1:
|
|
89366
|
+
l.creator = n.string();
|
|
89367
|
+
break;
|
|
89368
|
+
case 2:
|
|
89369
|
+
l.address = n.string();
|
|
89370
|
+
break;
|
|
89371
|
+
default:
|
|
89372
|
+
n.skipType(g & 7);
|
|
89373
|
+
break;
|
|
89374
|
+
}
|
|
89375
|
+
}
|
|
89376
|
+
return l;
|
|
89377
|
+
},
|
|
89378
|
+
fromJSON(e) {
|
|
89379
|
+
return {
|
|
89380
|
+
creator: isSet$4(e.creator) ? String(e.creator) : "",
|
|
89381
|
+
address: isSet$4(e.address) ? String(e.address) : ""
|
|
89382
|
+
};
|
|
89383
|
+
},
|
|
89384
|
+
toJSON(e) {
|
|
89385
|
+
const t = {};
|
|
89386
|
+
return e.creator !== void 0 && (t.creator = e.creator), e.address !== void 0 && (t.address = e.address), t;
|
|
89387
|
+
},
|
|
89388
|
+
fromPartial(e) {
|
|
89389
|
+
const t = createBaseMsgInit();
|
|
89390
|
+
return t.creator = e.creator ?? "", t.address = e.address ?? "", t;
|
|
89391
|
+
}
|
|
89392
|
+
};
|
|
89351
89393
|
var globalThis$3 = (() => {
|
|
89352
89394
|
if (typeof globalThis$3 < "u")
|
|
89353
89395
|
return globalThis$3;
|
|
@@ -89364,7 +89406,8 @@ function isSet$4(e) {
|
|
|
89364
89406
|
return e != null;
|
|
89365
89407
|
}
|
|
89366
89408
|
const msgTypes$1 = [
|
|
89367
|
-
["/iconlake.drop.MsgMint", MsgMint$1]
|
|
89409
|
+
["/iconlake.drop.MsgMint", MsgMint$1],
|
|
89410
|
+
["/iconlake.drop.MsgInit", MsgInit]
|
|
89368
89411
|
];
|
|
89369
89412
|
let HttpClient$1 = class {
|
|
89370
89413
|
constructor({ securityWorker: t, secure: n, format: p, ...l } = {}) {
|
|
@@ -89551,12 +89594,30 @@ const defaultFee$1 = {
|
|
|
89551
89594
|
throw new Error("TxClient:sendMsgMint: Could not broadcast Tx: " + y.message);
|
|
89552
89595
|
}
|
|
89553
89596
|
},
|
|
89597
|
+
async sendMsgInit({ value: p, fee: l, memo: g }) {
|
|
89598
|
+
if (!e)
|
|
89599
|
+
throw new Error("TxClient:sendMsgInit: Unable to sign Tx. Signer is not present.");
|
|
89600
|
+
try {
|
|
89601
|
+
const { address: y } = (await e.getAccounts())[0], P = await build$5.SigningStargateClient.connectWithSigner(n, e, { registry: registry$2 });
|
|
89602
|
+
let N = this.msgInit({ value: MsgInit.fromPartial(p) });
|
|
89603
|
+
return await P.signAndBroadcast(y, [N], l || defaultFee$1, g);
|
|
89604
|
+
} catch (y) {
|
|
89605
|
+
throw new Error("TxClient:sendMsgInit: Could not broadcast Tx: " + y.message);
|
|
89606
|
+
}
|
|
89607
|
+
},
|
|
89554
89608
|
msgMint({ value: p }) {
|
|
89555
89609
|
try {
|
|
89556
89610
|
return { typeUrl: "/iconlake.drop.MsgMint", value: MsgMint$1.fromPartial(p) };
|
|
89557
89611
|
} catch (l) {
|
|
89558
89612
|
throw new Error("TxClient:MsgMint: Could not create message: " + l.message);
|
|
89559
89613
|
}
|
|
89614
|
+
},
|
|
89615
|
+
msgInit({ value: p }) {
|
|
89616
|
+
try {
|
|
89617
|
+
return { typeUrl: "/iconlake.drop.MsgInit", value: MsgInit.fromPartial(p) };
|
|
89618
|
+
} catch (l) {
|
|
89619
|
+
throw new Error("TxClient:MsgInit: Could not create message: " + l.message);
|
|
89620
|
+
}
|
|
89560
89621
|
}
|
|
89561
89622
|
}), queryClient$1 = ({ addr: e } = { addr: "http://localhost:1317" }) => new Api$1({ baseURL: e });
|
|
89562
89623
|
let SDKModule$1 = class {
|