@d13co/use-wallet-ui-react 1.0.2 → 1.0.4
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/cjs/index.cjs +11 -11
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +147 -145
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -9561,7 +9561,7 @@ function sA() {
|
|
|
9561
9561
|
const { navigator: n } = globalThis;
|
|
9562
9562
|
return typeof n == "object" && n.product === "ReactNative";
|
|
9563
9563
|
}
|
|
9564
|
-
function
|
|
9564
|
+
function Oe(n) {
|
|
9565
9565
|
if (typeof n > "u")
|
|
9566
9566
|
throw new Error("Value is undefined");
|
|
9567
9567
|
if (typeof n == "bigint") {
|
|
@@ -9577,7 +9577,7 @@ function Le(n) {
|
|
|
9577
9577
|
throw new Error(`Unexpected type ${typeof n}, ${n}`);
|
|
9578
9578
|
}
|
|
9579
9579
|
function Mn(n) {
|
|
9580
|
-
const e =
|
|
9580
|
+
const e = Oe(n);
|
|
9581
9581
|
if (e < 0)
|
|
9582
9582
|
throw new Error(`Value ${e} is negative`);
|
|
9583
9583
|
return e;
|
|
@@ -15934,7 +15934,7 @@ let Dd = class dp {
|
|
|
15934
15934
|
* @param totalBoxes - (tbx) The number of existing boxes created by this account's app.
|
|
15935
15935
|
*/
|
|
15936
15936
|
constructor({ address: e, amount: t, amountWithoutPendingRewards: r, minBalance: i, pendingRewards: o, rewards: s, round: a, status: l, totalAppsOptedIn: c, totalAssetsOptedIn: d, totalCreatedApps: u, totalCreatedAssets: m, appsLocalState: h, appsTotalExtraPages: v, appsTotalSchema: A, assets: x, authAddr: F, createdApps: w, createdAssets: C, incentiveEligible: T, lastHeartbeat: B, lastProposed: b, participation: U, rewardBase: p, sigType: E, totalBoxBytes: S, totalBoxes: V }) {
|
|
15937
|
-
this.address = e, this.amount = ve(t), this.amountWithoutPendingRewards = ve(r), this.minBalance = ve(i), this.pendingRewards = ve(o), this.rewards = ve(s), this.round = ve(a), this.status = l, this.totalAppsOptedIn =
|
|
15937
|
+
this.address = e, this.amount = ve(t), this.amountWithoutPendingRewards = ve(r), this.minBalance = ve(i), this.pendingRewards = ve(o), this.rewards = ve(s), this.round = ve(a), this.status = l, this.totalAppsOptedIn = Oe(c), this.totalAssetsOptedIn = Oe(d), this.totalCreatedApps = Oe(u), this.totalCreatedAssets = Oe(m), this.appsLocalState = h, this.appsTotalExtraPages = typeof v > "u" ? void 0 : Oe(v), this.appsTotalSchema = A, this.assets = x, this.authAddr = typeof F == "string" ? He.fromString(F) : F, this.createdApps = w, this.createdAssets = C, this.incentiveEligible = T, this.lastHeartbeat = typeof B > "u" ? void 0 : Oe(B), this.lastProposed = typeof b > "u" ? void 0 : Oe(b), this.participation = U, this.rewardBase = typeof p > "u" ? void 0 : ve(p), this.sigType = E, this.totalBoxBytes = typeof S > "u" ? void 0 : Oe(S), this.totalBoxes = typeof V > "u" ? void 0 : Oe(V);
|
|
15938
15938
|
}
|
|
15939
15939
|
// eslint-disable-next-line class-methods-use-this
|
|
15940
15940
|
getEncodingSchema() {
|
|
@@ -16191,7 +16191,7 @@ class Td {
|
|
|
16191
16191
|
* next parameter.
|
|
16192
16192
|
*/
|
|
16193
16193
|
constructor({ round: e, assetHoldings: t, nextToken: r }) {
|
|
16194
|
-
this.round =
|
|
16194
|
+
this.round = Oe(e), this.assetHoldings = t, this.nextToken = r;
|
|
16195
16195
|
}
|
|
16196
16196
|
// eslint-disable-next-line class-methods-use-this
|
|
16197
16197
|
getEncodingSchema() {
|
|
@@ -16338,7 +16338,7 @@ class Da {
|
|
|
16338
16338
|
* @param txid - The transaction ID of the outer app call that lead to these logs
|
|
16339
16339
|
*/
|
|
16340
16340
|
constructor({ applicationIndex: e, logs: t, txid: r }) {
|
|
16341
|
-
this.applicationIndex =
|
|
16341
|
+
this.applicationIndex = Oe(e), this.logs = t, this.txid = r;
|
|
16342
16342
|
}
|
|
16343
16343
|
// eslint-disable-next-line class-methods-use-this
|
|
16344
16344
|
getEncodingSchema() {
|
|
@@ -16616,7 +16616,7 @@ let Il = class mp {
|
|
|
16616
16616
|
* @param version - (v) the number of updates to the application programs
|
|
16617
16617
|
*/
|
|
16618
16618
|
constructor({ approvalProgram: e, clearStateProgram: t, creator: r, extraProgramPages: i, globalState: o, globalStateSchema: s, localStateSchema: a, version: l }) {
|
|
16619
|
-
this.approvalProgram = typeof e == "string" ? We(e) : e, this.clearStateProgram = typeof t == "string" ? We(t) : t, this.creator = typeof r == "string" ? He.fromString(r) : r, this.extraProgramPages = typeof i > "u" ? void 0 :
|
|
16619
|
+
this.approvalProgram = typeof e == "string" ? We(e) : e, this.clearStateProgram = typeof t == "string" ? We(t) : t, this.creator = typeof r == "string" ? He.fromString(r) : r, this.extraProgramPages = typeof i > "u" ? void 0 : Oe(i), this.globalState = o, this.globalStateSchema = s, this.localStateSchema = a, this.version = typeof l > "u" ? void 0 : Oe(l);
|
|
16620
16620
|
}
|
|
16621
16621
|
// eslint-disable-next-line class-methods-use-this
|
|
16622
16622
|
getEncodingSchema() {
|
|
@@ -16732,7 +16732,7 @@ let Vr = class wp {
|
|
|
16732
16732
|
* @param numUint - (nui) num of uints.
|
|
16733
16733
|
*/
|
|
16734
16734
|
constructor({ numByteSlice: e, numUint: t }) {
|
|
16735
|
-
this.numByteSlice =
|
|
16735
|
+
this.numByteSlice = Oe(e), this.numUint = Oe(t);
|
|
16736
16736
|
}
|
|
16737
16737
|
// eslint-disable-next-line class-methods-use-this
|
|
16738
16738
|
getEncodingSchema() {
|
|
@@ -16936,7 +16936,7 @@ let Ps = class Sp {
|
|
|
16936
16936
|
* @param urlB64 - Base64 encoded URL where more information about the asset can be retrieved.
|
|
16937
16937
|
*/
|
|
16938
16938
|
constructor({ creator: e, decimals: t, total: r, clawback: i, defaultFrozen: o, freeze: s, manager: a, metadataHash: l, name: c, nameB64: d, reserve: u, unitName: m, unitNameB64: h, url: v, urlB64: A }) {
|
|
16939
|
-
this.creator = e, this.decimals =
|
|
16939
|
+
this.creator = e, this.decimals = Oe(t), this.total = ve(r), this.clawback = i, this.defaultFrozen = o, this.freeze = s, this.manager = a, this.metadataHash = typeof l == "string" ? We(l) : l, this.name = c, this.nameB64 = typeof d == "string" ? We(d) : d, this.reserve = u, this.unitName = m, this.unitNameB64 = typeof h == "string" ? We(h) : h, this.url = v, this.urlB64 = typeof A == "string" ? We(A) : A;
|
|
16940
16940
|
}
|
|
16941
16941
|
// eslint-disable-next-line class-methods-use-this
|
|
16942
16942
|
getEncodingSchema() {
|
|
@@ -17033,7 +17033,7 @@ class Fr {
|
|
|
17033
17033
|
* @param uint - uint value.
|
|
17034
17034
|
*/
|
|
17035
17035
|
constructor({ type: e, bytes: t, uint: r }) {
|
|
17036
|
-
this.type =
|
|
17036
|
+
this.type = Oe(e), this.bytes = typeof t == "string" ? We(t) : t, this.uint = typeof r > "u" ? void 0 : ve(r);
|
|
17037
17037
|
}
|
|
17038
17038
|
// eslint-disable-next-line class-methods-use-this
|
|
17039
17039
|
getEncodingSchema() {
|
|
@@ -17333,7 +17333,7 @@ class Oa {
|
|
|
17333
17333
|
* @param minor -
|
|
17334
17334
|
*/
|
|
17335
17335
|
constructor({ branch: e, buildNumber: t, channel: r, commitHash: i, major: o, minor: s }) {
|
|
17336
|
-
this.branch = e, this.buildNumber =
|
|
17336
|
+
this.branch = e, this.buildNumber = Oe(t), this.channel = r, this.commitHash = i, this.major = Oe(o), this.minor = Oe(s);
|
|
17337
17337
|
}
|
|
17338
17338
|
// eslint-disable-next-line class-methods-use-this
|
|
17339
17339
|
getEncodingSchema() {
|
|
@@ -17475,7 +17475,7 @@ class Ml {
|
|
|
17475
17475
|
* @param txns -
|
|
17476
17476
|
*/
|
|
17477
17477
|
constructor({ accounts: e, apps: t, latestTimestamp: r, protocolVersion: i, round: o, sources: s, txns: a }) {
|
|
17478
|
-
this.accounts = e, this.apps = t, this.latestTimestamp =
|
|
17478
|
+
this.accounts = e, this.apps = t, this.latestTimestamp = Oe(r), this.protocolVersion = i, this.round = ve(o), this.sources = s, this.txns = a;
|
|
17479
17479
|
}
|
|
17480
17480
|
// eslint-disable-next-line class-methods-use-this
|
|
17481
17481
|
getEncodingSchema() {
|
|
@@ -17562,7 +17562,7 @@ class La {
|
|
|
17562
17562
|
* @param txnIndex -
|
|
17563
17563
|
*/
|
|
17564
17564
|
constructor({ appIndex: e, fieldName: t, source: r, txnIndex: i }) {
|
|
17565
|
-
this.appIndex = ve(e), this.fieldName = t, this.source = r, this.txnIndex =
|
|
17565
|
+
this.appIndex = ve(e), this.fieldName = t, this.source = r, this.txnIndex = Oe(i);
|
|
17566
17566
|
}
|
|
17567
17567
|
// eslint-disable-next-line class-methods-use-this
|
|
17568
17568
|
getEncodingSchema() {
|
|
@@ -17612,7 +17612,7 @@ class eo {
|
|
|
17612
17612
|
* @param scratch -
|
|
17613
17613
|
*/
|
|
17614
17614
|
constructor({ line: e, pc: t, stack: r, error: i, scratch: o }) {
|
|
17615
|
-
this.line =
|
|
17615
|
+
this.line = Oe(e), this.pc = Oe(t), this.stack = r, this.error = i, this.scratch = o;
|
|
17616
17616
|
}
|
|
17617
17617
|
// eslint-disable-next-line class-methods-use-this
|
|
17618
17618
|
getEncodingSchema() {
|
|
@@ -17705,7 +17705,7 @@ class Va {
|
|
|
17705
17705
|
* @param logs -
|
|
17706
17706
|
*/
|
|
17707
17707
|
constructor({ disassembly: e, appCallMessages: t, appCallTrace: r, budgetAdded: i, budgetConsumed: o, globalDelta: s, localDeltas: a, logicSigDisassembly: l, logicSigMessages: c, logicSigTrace: d, logs: u }) {
|
|
17708
|
-
this.disassembly = e, this.appCallMessages = t, this.appCallTrace = r, this.budgetAdded = typeof i > "u" ? void 0 :
|
|
17708
|
+
this.disassembly = e, this.appCallMessages = t, this.appCallTrace = r, this.budgetAdded = typeof i > "u" ? void 0 : Oe(i), this.budgetConsumed = typeof o > "u" ? void 0 : Oe(o), this.globalDelta = s, this.localDeltas = a, this.logicSigDisassembly = l, this.logicSigMessages = c, this.logicSigTrace = d, this.logs = u;
|
|
17709
17709
|
}
|
|
17710
17710
|
// eslint-disable-next-line class-methods-use-this
|
|
17711
17711
|
getEncodingSchema() {
|
|
@@ -17812,7 +17812,7 @@ let HI = class Fp {
|
|
|
17812
17812
|
* @param uint - (ui) uint value.
|
|
17813
17813
|
*/
|
|
17814
17814
|
constructor({ action: e, bytes: t, uint: r }) {
|
|
17815
|
-
this.action =
|
|
17815
|
+
this.action = Oe(e), this.bytes = t, this.uint = typeof r > "u" ? void 0 : ve(r);
|
|
17816
17816
|
}
|
|
17817
17817
|
// eslint-disable-next-line class-methods-use-this
|
|
17818
17818
|
getEncodingSchema() {
|
|
@@ -17893,7 +17893,7 @@ let HI = class Fp {
|
|
|
17893
17893
|
* @param devmode -
|
|
17894
17894
|
*/
|
|
17895
17895
|
constructor({ alloc: e, fees: t, id: r, network: i, proto: o, rwd: s, timestamp: a, comment: l, devmode: c }) {
|
|
17896
|
-
this.alloc = e, this.fees = t, this.id = r, this.network = i, this.proto = o, this.rwd = s, this.timestamp =
|
|
17896
|
+
this.alloc = e, this.fees = t, this.id = r, this.network = i, this.proto = o, this.rwd = s, this.timestamp = Oe(a), this.comment = l, this.devmode = c;
|
|
17897
17897
|
}
|
|
17898
17898
|
// eslint-disable-next-line class-methods-use-this
|
|
17899
17899
|
getEncodingSchema() {
|
|
@@ -17979,7 +17979,7 @@ class Bl {
|
|
|
17979
17979
|
* @param offset - Timestamp offset in seconds.
|
|
17980
17980
|
*/
|
|
17981
17981
|
constructor({ offset: e }) {
|
|
17982
|
-
this.offset =
|
|
17982
|
+
this.offset = Oe(e);
|
|
17983
17983
|
}
|
|
17984
17984
|
// eslint-disable-next-line class-methods-use-this
|
|
17985
17985
|
getEncodingSchema() {
|
|
@@ -18077,7 +18077,7 @@ let Cv = class Bp {
|
|
|
18077
18077
|
* from a leaf to the root.
|
|
18078
18078
|
*/
|
|
18079
18079
|
constructor({ index: e, proof: t, treedepth: r }) {
|
|
18080
|
-
this.index =
|
|
18080
|
+
this.index = Oe(e), this.proof = typeof t == "string" ? We(t) : t, this.treedepth = Oe(r);
|
|
18081
18081
|
}
|
|
18082
18082
|
// eslint-disable-next-line class-methods-use-this
|
|
18083
18083
|
getEncodingSchema() {
|
|
@@ -18242,7 +18242,7 @@ class Ua {
|
|
|
18242
18242
|
* @param upgradeYesVotes - Yes votes cast for consensus upgrade
|
|
18243
18243
|
*/
|
|
18244
18244
|
constructor({ catchupTime: e, lastRound: t, lastVersion: r, nextVersion: i, nextVersionRound: o, nextVersionSupported: s, stoppedAtUnsupportedRound: a, timeSinceLastRound: l, catchpoint: c, catchpointAcquiredBlocks: d, catchpointProcessedAccounts: u, catchpointProcessedKvs: m, catchpointTotalAccounts: h, catchpointTotalBlocks: v, catchpointTotalKvs: A, catchpointVerifiedAccounts: x, catchpointVerifiedKvs: F, lastCatchpoint: w, upgradeDelay: C, upgradeNextProtocolVoteBefore: T, upgradeNoVotes: B, upgradeNodeVote: b, upgradeVoteRounds: U, upgradeVotes: p, upgradeVotesRequired: E, upgradeYesVotes: S }) {
|
|
18245
|
-
this.catchupTime = ve(e), this.lastRound = ve(t), this.lastVersion = r, this.nextVersion = i, this.nextVersionRound = ve(o), this.nextVersionSupported = s, this.stoppedAtUnsupportedRound = a, this.timeSinceLastRound = ve(l), this.catchpoint = c, this.catchpointAcquiredBlocks = typeof d > "u" ? void 0 :
|
|
18245
|
+
this.catchupTime = ve(e), this.lastRound = ve(t), this.lastVersion = r, this.nextVersion = i, this.nextVersionRound = ve(o), this.nextVersionSupported = s, this.stoppedAtUnsupportedRound = a, this.timeSinceLastRound = ve(l), this.catchpoint = c, this.catchpointAcquiredBlocks = typeof d > "u" ? void 0 : Oe(d), this.catchpointProcessedAccounts = typeof u > "u" ? void 0 : Oe(u), this.catchpointProcessedKvs = typeof m > "u" ? void 0 : Oe(m), this.catchpointTotalAccounts = typeof h > "u" ? void 0 : Oe(h), this.catchpointTotalBlocks = typeof v > "u" ? void 0 : Oe(v), this.catchpointTotalKvs = typeof A > "u" ? void 0 : Oe(A), this.catchpointVerifiedAccounts = typeof x > "u" ? void 0 : Oe(x), this.catchpointVerifiedKvs = typeof F > "u" ? void 0 : Oe(F), this.lastCatchpoint = w, this.upgradeDelay = typeof C > "u" ? void 0 : ve(C), this.upgradeNextProtocolVoteBefore = typeof T > "u" ? void 0 : ve(T), this.upgradeNoVotes = typeof B > "u" ? void 0 : Oe(B), this.upgradeNodeVote = b, this.upgradeVoteRounds = typeof U > "u" ? void 0 : Oe(U), this.upgradeVotes = typeof p > "u" ? void 0 : Oe(p), this.upgradeVotesRequired = typeof E > "u" ? void 0 : Oe(E), this.upgradeYesVotes = typeof S > "u" ? void 0 : Oe(S);
|
|
18246
18246
|
}
|
|
18247
18247
|
// eslint-disable-next-line class-methods-use-this
|
|
18248
18248
|
getEncodingSchema() {
|
|
@@ -18462,7 +18462,7 @@ class Ga {
|
|
|
18462
18462
|
* @param totalTransactions - Total number of transactions in the pool.
|
|
18463
18463
|
*/
|
|
18464
18464
|
constructor({ topTransactions: e, totalTransactions: t }) {
|
|
18465
|
-
this.topTransactions = e, this.totalTransactions =
|
|
18465
|
+
this.topTransactions = e, this.totalTransactions = Oe(t);
|
|
18466
18466
|
}
|
|
18467
18467
|
// eslint-disable-next-line class-methods-use-this
|
|
18468
18468
|
getEncodingSchema() {
|
|
@@ -18527,7 +18527,7 @@ class Wa {
|
|
|
18527
18527
|
* @param slot - The scratch slot written.
|
|
18528
18528
|
*/
|
|
18529
18529
|
constructor({ newValue: e, slot: t }) {
|
|
18530
|
-
this.newValue = e, this.slot =
|
|
18530
|
+
this.newValue = e, this.slot = Oe(t);
|
|
18531
18531
|
}
|
|
18532
18532
|
// eslint-disable-next-line class-methods-use-this
|
|
18533
18533
|
getEncodingSchema() {
|
|
@@ -18637,7 +18637,7 @@ class Ha {
|
|
|
18637
18637
|
* If not specified, defaults to the latest available round.
|
|
18638
18638
|
*/
|
|
18639
18639
|
constructor({ txnGroups: e, allowEmptySignatures: t, allowMoreLogging: r, allowUnnamedResources: i, execTraceConfig: o, extraOpcodeBudget: s, fixSigners: a, round: l }) {
|
|
18640
|
-
this.txnGroups = e, this.allowEmptySignatures = t, this.allowMoreLogging = r, this.allowUnnamedResources = i, this.execTraceConfig = o, this.extraOpcodeBudget = typeof s > "u" ? void 0 :
|
|
18640
|
+
this.txnGroups = e, this.allowEmptySignatures = t, this.allowMoreLogging = r, this.allowUnnamedResources = i, this.execTraceConfig = o, this.extraOpcodeBudget = typeof s > "u" ? void 0 : Oe(s), this.fixSigners = a, this.round = typeof l > "u" ? void 0 : ve(l);
|
|
18641
18641
|
}
|
|
18642
18642
|
// eslint-disable-next-line class-methods-use-this
|
|
18643
18643
|
getEncodingSchema() {
|
|
@@ -18738,7 +18738,7 @@ class Ol {
|
|
|
18738
18738
|
* @param initialStates - Initial states of resources that were accessed during simulation.
|
|
18739
18739
|
*/
|
|
18740
18740
|
constructor({ lastRound: e, txnGroups: t, version: r, evalOverrides: i, execTraceConfig: o, initialStates: s }) {
|
|
18741
|
-
this.lastRound = ve(e), this.txnGroups = t, this.version =
|
|
18741
|
+
this.lastRound = ve(e), this.txnGroups = t, this.version = Oe(r), this.evalOverrides = i, this.execTraceConfig = o, this.initialStates = s;
|
|
18742
18742
|
}
|
|
18743
18743
|
// eslint-disable-next-line class-methods-use-this
|
|
18744
18744
|
getEncodingSchema() {
|
|
@@ -18882,7 +18882,7 @@ class ja {
|
|
|
18882
18882
|
* transaction which accessed them.
|
|
18883
18883
|
*/
|
|
18884
18884
|
constructor({ txnResults: e, appBudgetAdded: t, appBudgetConsumed: r, failedAt: i, failureMessage: o, unnamedResourcesAccessed: s }) {
|
|
18885
|
-
this.txnResults = e, this.appBudgetAdded = typeof t > "u" ? void 0 :
|
|
18885
|
+
this.txnResults = e, this.appBudgetAdded = typeof t > "u" ? void 0 : Oe(t), this.appBudgetConsumed = typeof r > "u" ? void 0 : Oe(r), this.failedAt = typeof i > "u" ? void 0 : i.map(Oe), this.failureMessage = o, this.unnamedResourcesAccessed = s;
|
|
18886
18886
|
}
|
|
18887
18887
|
// eslint-disable-next-line class-methods-use-this
|
|
18888
18888
|
getEncodingSchema() {
|
|
@@ -18964,7 +18964,7 @@ class Ya {
|
|
|
18964
18964
|
* transaction which accessed them.
|
|
18965
18965
|
*/
|
|
18966
18966
|
constructor({ txnResult: e, appBudgetConsumed: t, execTrace: r, fixedSigner: i, logicSigBudgetConsumed: o, unnamedResourcesAccessed: s }) {
|
|
18967
|
-
this.txnResult = e, this.appBudgetConsumed = typeof t > "u" ? void 0 :
|
|
18967
|
+
this.txnResult = e, this.appBudgetConsumed = typeof t > "u" ? void 0 : Oe(t), this.execTrace = r, this.fixedSigner = typeof i == "string" ? He.fromString(i) : i, this.logicSigBudgetConsumed = typeof o > "u" ? void 0 : Oe(o), this.unnamedResourcesAccessed = s;
|
|
18968
18968
|
}
|
|
18969
18969
|
// eslint-disable-next-line class-methods-use-this
|
|
18970
18970
|
getEncodingSchema() {
|
|
@@ -19050,7 +19050,7 @@ class go {
|
|
|
19050
19050
|
* referenced to unnamed boxes.
|
|
19051
19051
|
*/
|
|
19052
19052
|
constructor({ accounts: e, appLocals: t, apps: r, assetHoldings: i, assets: o, boxes: s, extraBoxRefs: a }) {
|
|
19053
|
-
this.accounts = typeof e < "u" ? e.map((l) => typeof l == "string" ? He.fromString(l) : l) : void 0, this.appLocals = t, this.apps = typeof r > "u" ? void 0 : r.map(ve), this.assetHoldings = i, this.assets = typeof o > "u" ? void 0 : o.map(ve), this.boxes = s, this.extraBoxRefs = typeof a > "u" ? void 0 :
|
|
19053
|
+
this.accounts = typeof e < "u" ? e.map((l) => typeof l == "string" ? He.fromString(l) : l) : void 0, this.appLocals = t, this.apps = typeof r > "u" ? void 0 : r.map(ve), this.assetHoldings = i, this.assets = typeof o > "u" ? void 0 : o.map(ve), this.boxes = s, this.extraBoxRefs = typeof a > "u" ? void 0 : Oe(a);
|
|
19054
19054
|
}
|
|
19055
19055
|
// eslint-disable-next-line class-methods-use-this
|
|
19056
19056
|
getEncodingSchema() {
|
|
@@ -19133,7 +19133,7 @@ class Ka {
|
|
|
19133
19133
|
* @param maxLogSize - The maximum byte number to log during simulation
|
|
19134
19134
|
*/
|
|
19135
19135
|
constructor({ allowEmptySignatures: e, allowUnnamedResources: t, extraOpcodeBudget: r, fixSigners: i, maxLogCalls: o, maxLogSize: s }) {
|
|
19136
|
-
this.allowEmptySignatures = e, this.allowUnnamedResources = t, this.extraOpcodeBudget = typeof r > "u" ? void 0 :
|
|
19136
|
+
this.allowEmptySignatures = e, this.allowUnnamedResources = t, this.extraOpcodeBudget = typeof r > "u" ? void 0 : Oe(r), this.fixSigners = i, this.maxLogCalls = typeof o > "u" ? void 0 : Oe(o), this.maxLogSize = typeof s > "u" ? void 0 : Oe(s);
|
|
19137
19137
|
}
|
|
19138
19138
|
// eslint-disable-next-line class-methods-use-this
|
|
19139
19139
|
getEncodingSchema() {
|
|
@@ -19196,7 +19196,7 @@ class Xr {
|
|
|
19196
19196
|
* @param stateChanges - The operations against the current application's states.
|
|
19197
19197
|
*/
|
|
19198
19198
|
constructor({ pc: e, scratchChanges: t, spawnedInners: r, stackAdditions: i, stackPopCount: o, stateChanges: s }) {
|
|
19199
|
-
this.pc =
|
|
19199
|
+
this.pc = Oe(e), this.scratchChanges = t, this.spawnedInners = typeof r > "u" ? void 0 : r.map(Oe), this.stackAdditions = i, this.stackPopCount = typeof o > "u" ? void 0 : Oe(o), this.stateChanges = s;
|
|
19200
19200
|
}
|
|
19201
19201
|
// eslint-disable-next-line class-methods-use-this
|
|
19202
19202
|
getEncodingSchema() {
|
|
@@ -19522,7 +19522,7 @@ let Vl = class Pp {
|
|
|
19522
19522
|
* @param uint - (ui) uint value.
|
|
19523
19523
|
*/
|
|
19524
19524
|
constructor({ bytes: e, type: t, uint: r }) {
|
|
19525
|
-
this.bytes = typeof e == "string" ? We(e) : e, this.type =
|
|
19525
|
+
this.bytes = typeof e == "string" ? We(e) : e, this.type = Oe(t), this.uint = ve(r);
|
|
19526
19526
|
}
|
|
19527
19527
|
// eslint-disable-next-line class-methods-use-this
|
|
19528
19528
|
getEncodingSchema() {
|
|
@@ -19657,7 +19657,7 @@ class Ul {
|
|
|
19657
19657
|
* * sha256
|
|
19658
19658
|
*/
|
|
19659
19659
|
constructor({ idx: e, proof: t, stibhash: r, treedepth: i, hashtype: o }) {
|
|
19660
|
-
this.idx =
|
|
19660
|
+
this.idx = Oe(e), this.proof = typeof t == "string" ? We(t) : t, this.stibhash = typeof r == "string" ? We(r) : r, this.treedepth = Oe(i), this.hashtype = o;
|
|
19661
19661
|
}
|
|
19662
19662
|
// eslint-disable-next-line class-methods-use-this
|
|
19663
19663
|
getEncodingSchema() {
|
|
@@ -21700,7 +21700,7 @@ class mo {
|
|
|
21700
21700
|
* * or null if unknown
|
|
21701
21701
|
*/
|
|
21702
21702
|
constructor({ address: e, amount: t, amountWithoutPendingRewards: r, minBalance: i, pendingRewards: o, rewards: s, round: a, status: l, totalAppsOptedIn: c, totalAssetsOptedIn: d, totalBoxBytes: u, totalBoxes: m, totalCreatedApps: h, totalCreatedAssets: v, appsLocalState: A, appsTotalExtraPages: x, appsTotalSchema: F, assets: w, authAddr: C, closedAtRound: T, createdApps: B, createdAssets: b, createdAtRound: U, deleted: p, incentiveEligible: E, lastHeartbeat: S, lastProposed: V, participation: R, rewardBase: N, sigType: W }) {
|
|
21703
|
-
this.address = e, this.amount = ve(t), this.amountWithoutPendingRewards = ve(r), this.minBalance =
|
|
21703
|
+
this.address = e, this.amount = ve(t), this.amountWithoutPendingRewards = ve(r), this.minBalance = Oe(i), this.pendingRewards = ve(o), this.rewards = ve(s), this.round = ve(a), this.status = l, this.totalAppsOptedIn = Oe(c), this.totalAssetsOptedIn = Oe(d), this.totalBoxBytes = Oe(u), this.totalBoxes = Oe(m), this.totalCreatedApps = Oe(h), this.totalCreatedAssets = Oe(v), this.appsLocalState = A, this.appsTotalExtraPages = typeof x > "u" ? void 0 : Oe(x), this.appsTotalSchema = F, this.assets = w, this.authAddr = typeof C == "string" ? He.fromString(C) : C, this.closedAtRound = typeof T > "u" ? void 0 : ve(T), this.createdApps = B, this.createdAssets = b, this.createdAtRound = typeof U > "u" ? void 0 : ve(U), this.deleted = p, this.incentiveEligible = E, this.lastHeartbeat = typeof S > "u" ? void 0 : Oe(S), this.lastProposed = typeof V > "u" ? void 0 : Oe(V), this.participation = R, this.rewardBase = typeof N > "u" ? void 0 : ve(N), this.sigType = W;
|
|
21704
21704
|
}
|
|
21705
21705
|
// eslint-disable-next-line class-methods-use-this
|
|
21706
21706
|
getEncodingSchema() {
|
|
@@ -22302,7 +22302,7 @@ class Qa {
|
|
|
22302
22302
|
* @param version - the number of updates to the application programs
|
|
22303
22303
|
*/
|
|
22304
22304
|
constructor({ approvalProgram: e, clearStateProgram: t, creator: r, extraProgramPages: i, globalState: o, globalStateSchema: s, localStateSchema: a, version: l }) {
|
|
22305
|
-
this.approvalProgram = typeof e == "string" ? We(e) : e, this.clearStateProgram = typeof t == "string" ? We(t) : t, this.creator = typeof r == "string" ? He.fromString(r) : r, this.extraProgramPages = typeof i > "u" ? void 0 :
|
|
22305
|
+
this.approvalProgram = typeof e == "string" ? We(e) : e, this.clearStateProgram = typeof t == "string" ? We(t) : t, this.creator = typeof r == "string" ? He.fromString(r) : r, this.extraProgramPages = typeof i > "u" ? void 0 : Oe(i), this.globalState = o, this.globalStateSchema = s, this.localStateSchema = a, this.version = typeof l > "u" ? void 0 : Oe(l);
|
|
22306
22306
|
}
|
|
22307
22307
|
// eslint-disable-next-line class-methods-use-this
|
|
22308
22308
|
getEncodingSchema() {
|
|
@@ -22403,7 +22403,7 @@ class Ir {
|
|
|
22403
22403
|
* @param numUint - number of uints.
|
|
22404
22404
|
*/
|
|
22405
22405
|
constructor({ numByteSlice: e, numUint: t }) {
|
|
22406
|
-
this.numByteSlice =
|
|
22406
|
+
this.numByteSlice = Oe(e), this.numUint = Oe(t);
|
|
22407
22407
|
}
|
|
22408
22408
|
// eslint-disable-next-line class-methods-use-this
|
|
22409
22409
|
getEncodingSchema() {
|
|
@@ -22761,7 +22761,7 @@ class vo {
|
|
|
22761
22761
|
* @param urlB64 - Base64 encoded URL where more information about the asset can be retrieved.
|
|
22762
22762
|
*/
|
|
22763
22763
|
constructor({ creator: e, decimals: t, total: r, clawback: i, defaultFrozen: o, freeze: s, manager: a, metadataHash: l, name: c, nameB64: d, reserve: u, unitName: m, unitNameB64: h, url: v, urlB64: A }) {
|
|
22764
|
-
this.creator = e, this.decimals =
|
|
22764
|
+
this.creator = e, this.decimals = Oe(t), this.total = ve(r), this.clawback = i, this.defaultFrozen = o, this.freeze = s, this.manager = a, this.metadataHash = typeof l == "string" ? We(l) : l, this.name = c, this.nameB64 = typeof d == "string" ? We(d) : d, this.reserve = u, this.unitName = m, this.unitNameB64 = typeof h == "string" ? We(h) : h, this.url = v, this.urlB64 = typeof A == "string" ? We(A) : A;
|
|
22765
22765
|
}
|
|
22766
22766
|
// eslint-disable-next-line class-methods-use-this
|
|
22767
22767
|
getEncodingSchema() {
|
|
@@ -23001,7 +23001,7 @@ class Ls {
|
|
|
23001
23001
|
* @param upgradeVote - Fields relating to voting for a protocol upgrade.
|
|
23002
23002
|
*/
|
|
23003
23003
|
constructor({ genesisHash: e, genesisId: t, previousBlockHash: r, round: i, seed: o, timestamp: s, transactionsRoot: a, transactionsRootSha256: l, bonus: c, feesCollected: d, participationUpdates: u, previousBlockHash512: m, proposer: h, proposerPayout: v, rewards: A, stateProofTracking: x, transactions: F, transactionsRootSha512: w, txnCounter: C, upgradeState: T, upgradeVote: B }) {
|
|
23004
|
-
this.genesisHash = typeof e == "string" ? We(e) : e, this.genesisId = t, this.previousBlockHash = typeof r == "string" ? We(r) : r, this.round = ve(i), this.seed = typeof o == "string" ? We(o) : o, this.timestamp =
|
|
23004
|
+
this.genesisHash = typeof e == "string" ? We(e) : e, this.genesisId = t, this.previousBlockHash = typeof r == "string" ? We(r) : r, this.round = ve(i), this.seed = typeof o == "string" ? We(o) : o, this.timestamp = Oe(s), this.transactionsRoot = typeof a == "string" ? We(a) : a, this.transactionsRootSha256 = typeof l == "string" ? We(l) : l, this.bonus = typeof c > "u" ? void 0 : Oe(c), this.feesCollected = typeof d > "u" ? void 0 : Oe(d), this.participationUpdates = u, this.previousBlockHash512 = typeof m == "string" ? We(m) : m, this.proposer = typeof h == "string" ? He.fromString(h) : h, this.proposerPayout = typeof v > "u" ? void 0 : Oe(v), this.rewards = A, this.stateProofTracking = x, this.transactions = F, this.transactionsRootSha512 = typeof w == "string" ? We(w) : w, this.txnCounter = typeof C > "u" ? void 0 : Oe(C), this.upgradeState = T, this.upgradeVote = B;
|
|
23005
23005
|
}
|
|
23006
23006
|
// eslint-disable-next-line class-methods-use-this
|
|
23007
23007
|
getEncodingSchema() {
|
|
@@ -23230,7 +23230,7 @@ class rc {
|
|
|
23230
23230
|
* after this round).
|
|
23231
23231
|
*/
|
|
23232
23232
|
constructor({ currentProtocol: e, nextProtocol: t, nextProtocolApprovals: r, nextProtocolSwitchOn: i, nextProtocolVoteBefore: o }) {
|
|
23233
|
-
this.currentProtocol = e, this.nextProtocol = t, this.nextProtocolApprovals = typeof r > "u" ? void 0 :
|
|
23233
|
+
this.currentProtocol = e, this.nextProtocol = t, this.nextProtocolApprovals = typeof r > "u" ? void 0 : Oe(r), this.nextProtocolSwitchOn = typeof i > "u" ? void 0 : ve(i), this.nextProtocolVoteBefore = typeof o > "u" ? void 0 : ve(o);
|
|
23234
23234
|
}
|
|
23235
23235
|
// eslint-disable-next-line class-methods-use-this
|
|
23236
23236
|
getEncodingSchema() {
|
|
@@ -23378,7 +23378,7 @@ class xo {
|
|
|
23378
23378
|
* @param name - Base64 encoded box name
|
|
23379
23379
|
*/
|
|
23380
23380
|
constructor({ app: e, name: t }) {
|
|
23381
|
-
this.app =
|
|
23381
|
+
this.app = Oe(e), this.name = typeof t == "string" ? We(t) : t;
|
|
23382
23382
|
}
|
|
23383
23383
|
// eslint-disable-next-line class-methods-use-this
|
|
23384
23384
|
getEncodingSchema() {
|
|
@@ -23503,7 +23503,7 @@ class sc {
|
|
|
23503
23503
|
* @param uint - (ui) uint value.
|
|
23504
23504
|
*/
|
|
23505
23505
|
constructor({ action: e, bytes: t, uint: r }) {
|
|
23506
|
-
this.action =
|
|
23506
|
+
this.action = Oe(e), this.bytes = t, this.uint = typeof r > "u" ? void 0 : ve(r);
|
|
23507
23507
|
}
|
|
23508
23508
|
// eslint-disable-next-line class-methods-use-this
|
|
23509
23509
|
getEncodingSchema() {
|
|
@@ -23570,7 +23570,7 @@ class ac {
|
|
|
23570
23570
|
* @param hashType - (t)
|
|
23571
23571
|
*/
|
|
23572
23572
|
constructor({ hashType: e }) {
|
|
23573
|
-
this.hashType = typeof e > "u" ? void 0 :
|
|
23573
|
+
this.hashType = typeof e > "u" ? void 0 : Oe(e);
|
|
23574
23574
|
}
|
|
23575
23575
|
// eslint-disable-next-line class-methods-use-this
|
|
23576
23576
|
getEncodingSchema() {
|
|
@@ -23724,7 +23724,7 @@ class lc {
|
|
|
23724
23724
|
* @param asset - (s) Asset ID for asset in access list.
|
|
23725
23725
|
*/
|
|
23726
23726
|
constructor({ address: e, asset: t }) {
|
|
23727
|
-
this.address = typeof e == "string" ? He.fromString(e) : e, this.asset =
|
|
23727
|
+
this.address = typeof e == "string" ? He.fromString(e) : e, this.asset = Oe(t);
|
|
23728
23728
|
}
|
|
23729
23729
|
// eslint-disable-next-line class-methods-use-this
|
|
23730
23730
|
getEncodingSchema() {
|
|
@@ -23816,7 +23816,7 @@ class dc {
|
|
|
23816
23816
|
* application.
|
|
23817
23817
|
*/
|
|
23818
23818
|
constructor({ address: e, app: t }) {
|
|
23819
|
-
this.address = typeof e == "string" ? He.fromString(e) : e, this.app =
|
|
23819
|
+
this.address = typeof e == "string" ? He.fromString(e) : e, this.app = Oe(t);
|
|
23820
23820
|
}
|
|
23821
23821
|
// eslint-disable-next-line class-methods-use-this
|
|
23822
23822
|
getEncodingSchema() {
|
|
@@ -23860,7 +23860,7 @@ class Jr {
|
|
|
23860
23860
|
* @param treeDepth - (td)
|
|
23861
23861
|
*/
|
|
23862
23862
|
constructor({ hashFactory: e, path: t, treeDepth: r }) {
|
|
23863
|
-
this.hashFactory = e, this.path = t, this.treeDepth = typeof r > "u" ? void 0 :
|
|
23863
|
+
this.hashFactory = e, this.path = t, this.treeDepth = typeof r > "u" ? void 0 : Oe(r);
|
|
23864
23864
|
}
|
|
23865
23865
|
// eslint-disable-next-line class-methods-use-this
|
|
23866
23866
|
getEncodingSchema() {
|
|
@@ -24022,7 +24022,7 @@ class pc {
|
|
|
24022
24022
|
* @param local - LocalsRef names a local state by referring to an Address and App it belongs to.
|
|
24023
24023
|
*/
|
|
24024
24024
|
constructor({ address: e, applicationId: t, assetId: r, box: i, holding: o, local: s }) {
|
|
24025
|
-
this.address = typeof e == "string" ? He.fromString(e) : e, this.applicationId = typeof t > "u" ? void 0 :
|
|
24025
|
+
this.address = typeof e == "string" ? He.fromString(e) : e, this.applicationId = typeof t > "u" ? void 0 : Oe(t), this.assetId = typeof r > "u" ? void 0 : Oe(r), this.box = i, this.holding = o, this.local = s;
|
|
24026
24026
|
}
|
|
24027
24027
|
// eslint-disable-next-line class-methods-use-this
|
|
24028
24028
|
getEncodingSchema() {
|
|
@@ -24107,7 +24107,7 @@ class gc {
|
|
|
24107
24107
|
* @param signedWeight - (w)
|
|
24108
24108
|
*/
|
|
24109
24109
|
constructor({ partProofs: e, positionsToReveal: t, reveals: r, saltVersion: i, sigCommit: o, sigProofs: s, signedWeight: a }) {
|
|
24110
|
-
this.partProofs = e, this.positionsToReveal = typeof t > "u" ? void 0 : t.map(ve), this.reveals = r, this.saltVersion = typeof i > "u" ? void 0 :
|
|
24110
|
+
this.partProofs = e, this.positionsToReveal = typeof t > "u" ? void 0 : t.map(ve), this.reveals = r, this.saltVersion = typeof i > "u" ? void 0 : Oe(i), this.sigCommit = typeof o == "string" ? We(o) : o, this.sigProofs = s, this.signedWeight = typeof a > "u" ? void 0 : ve(a);
|
|
24111
24111
|
}
|
|
24112
24112
|
// eslint-disable-next-line class-methods-use-this
|
|
24113
24113
|
getEncodingSchema() {
|
|
@@ -24312,7 +24312,7 @@ class vc {
|
|
|
24312
24312
|
* @param verifyingKey - (vkey)
|
|
24313
24313
|
*/
|
|
24314
24314
|
constructor({ falconSignature: e, merkleArrayIndex: t, proof: r, verifyingKey: i }) {
|
|
24315
|
-
this.falconSignature = typeof e == "string" ? We(e) : e, this.merkleArrayIndex = typeof t > "u" ? void 0 :
|
|
24315
|
+
this.falconSignature = typeof e == "string" ? We(e) : e, this.merkleArrayIndex = typeof t > "u" ? void 0 : Oe(t), this.proof = r, this.verifyingKey = typeof i == "string" ? We(i) : i;
|
|
24316
24316
|
}
|
|
24317
24317
|
// eslint-disable-next-line class-methods-use-this
|
|
24318
24318
|
getEncodingSchema() {
|
|
@@ -24370,7 +24370,7 @@ class xc {
|
|
|
24370
24370
|
* the proof.
|
|
24371
24371
|
*/
|
|
24372
24372
|
constructor({ nextRound: e, onlineTotalWeight: t, type: r, votersCommitment: i }) {
|
|
24373
|
-
this.nextRound = typeof e > "u" ? void 0 : ve(e), this.onlineTotalWeight = typeof t > "u" ? void 0 : ve(t), this.type = typeof r > "u" ? void 0 :
|
|
24373
|
+
this.nextRound = typeof e > "u" ? void 0 : ve(e), this.onlineTotalWeight = typeof t > "u" ? void 0 : ve(t), this.type = typeof r > "u" ? void 0 : Oe(r), this.votersCommitment = typeof i == "string" ? We(i) : i;
|
|
24374
24374
|
}
|
|
24375
24375
|
// eslint-disable-next-line class-methods-use-this
|
|
24376
24376
|
getEncodingSchema() {
|
|
@@ -24448,7 +24448,7 @@ class no {
|
|
|
24448
24448
|
* @param numUint - Maximum number of TEAL uints that may be stored in the key/value store.
|
|
24449
24449
|
*/
|
|
24450
24450
|
constructor({ numByteSlice: e, numUint: t }) {
|
|
24451
|
-
this.numByteSlice =
|
|
24451
|
+
this.numByteSlice = Oe(e), this.numUint = Oe(t);
|
|
24452
24452
|
}
|
|
24453
24453
|
// eslint-disable-next-line class-methods-use-this
|
|
24454
24454
|
getEncodingSchema() {
|
|
@@ -24511,7 +24511,7 @@ class bc {
|
|
|
24511
24511
|
* @param uint - uint value.
|
|
24512
24512
|
*/
|
|
24513
24513
|
constructor({ bytes: e, type: t, uint: r }) {
|
|
24514
|
-
this.bytes = typeof e == "string" ? We(e) : e, this.type =
|
|
24514
|
+
this.bytes = typeof e == "string" ? We(e) : e, this.type = Oe(t), this.uint = ve(r);
|
|
24515
24515
|
}
|
|
24516
24516
|
// eslint-disable-next-line class-methods-use-this
|
|
24517
24517
|
getEncodingSchema() {
|
|
@@ -24747,7 +24747,7 @@ class kr {
|
|
|
24747
24747
|
* * (hb) heartbeat-transaction
|
|
24748
24748
|
*/
|
|
24749
24749
|
constructor({ fee: e, firstValid: t, lastValid: r, sender: i, applicationTransaction: o, assetConfigTransaction: s, assetFreezeTransaction: a, assetTransferTransaction: l, authAddr: c, closeRewards: d, closingAmount: u, confirmedRound: m, createdApplicationIndex: h, createdAssetIndex: v, genesisHash: A, genesisId: x, globalStateDelta: F, group: w, heartbeatTransaction: C, id: T, innerTxns: B, intraRoundOffset: b, keyregTransaction: U, lease: p, localStateDelta: E, logs: S, note: V, paymentTransaction: R, receiverRewards: N, rekeyTo: W, roundTime: O, senderRewards: K, signature: Z, stateProofTransaction: _, txType: te }) {
|
|
24750
|
-
this.fee = ve(e), this.firstValid = ve(t), this.lastValid = ve(r), this.sender = i, this.applicationTransaction = o, this.assetConfigTransaction = s, this.assetFreezeTransaction = a, this.assetTransferTransaction = l, this.authAddr = typeof c == "string" ? He.fromString(c) : c, this.closeRewards = typeof d > "u" ? void 0 : ve(d), this.closingAmount = typeof u > "u" ? void 0 : ve(u), this.confirmedRound = typeof m > "u" ? void 0 : ve(m), this.createdApplicationIndex = typeof h > "u" ? void 0 : ve(h), this.createdAssetIndex = typeof v > "u" ? void 0 : ve(v), this.genesisHash = typeof A == "string" ? We(A) : A, this.genesisId = x, this.globalStateDelta = F, this.group = typeof w == "string" ? We(w) : w, this.heartbeatTransaction = C, this.id = T, this.innerTxns = B, this.intraRoundOffset = typeof b > "u" ? void 0 :
|
|
24750
|
+
this.fee = ve(e), this.firstValid = ve(t), this.lastValid = ve(r), this.sender = i, this.applicationTransaction = o, this.assetConfigTransaction = s, this.assetFreezeTransaction = a, this.assetTransferTransaction = l, this.authAddr = typeof c == "string" ? He.fromString(c) : c, this.closeRewards = typeof d > "u" ? void 0 : ve(d), this.closingAmount = typeof u > "u" ? void 0 : ve(u), this.confirmedRound = typeof m > "u" ? void 0 : ve(m), this.createdApplicationIndex = typeof h > "u" ? void 0 : ve(h), this.createdAssetIndex = typeof v > "u" ? void 0 : ve(v), this.genesisHash = typeof A == "string" ? We(A) : A, this.genesisId = x, this.globalStateDelta = F, this.group = typeof w == "string" ? We(w) : w, this.heartbeatTransaction = C, this.id = T, this.innerTxns = B, this.intraRoundOffset = typeof b > "u" ? void 0 : Oe(b), this.keyregTransaction = U, this.lease = typeof p == "string" ? We(p) : p, this.localStateDelta = E, this.logs = S, this.note = typeof V == "string" ? We(V) : V, this.paymentTransaction = R, this.receiverRewards = typeof N > "u" ? void 0 : ve(N), this.rekeyTo = typeof W == "string" ? He.fromString(W) : W, this.roundTime = typeof O > "u" ? void 0 : Oe(O), this.senderRewards = typeof K > "u" ? void 0 : ve(K), this.signature = Z, this.stateProofTransaction = _, this.txType = te;
|
|
24751
24751
|
}
|
|
24752
24752
|
// eslint-disable-next-line class-methods-use-this
|
|
24753
24753
|
getEncodingSchema() {
|
|
@@ -24983,7 +24983,7 @@ class Ec {
|
|
|
24983
24983
|
* immediately fail. 0 indicates that no version check should be performed.
|
|
24984
24984
|
*/
|
|
24985
24985
|
constructor({ applicationId: e, access: t, accounts: r, applicationArgs: i, approvalProgram: o, boxReferences: s, clearStateProgram: a, extraProgramPages: l, foreignApps: c, foreignAssets: d, globalStateSchema: u, localStateSchema: m, onCompletion: h, rejectVersion: v }) {
|
|
24986
|
-
this.applicationId = ve(e), this.access = t, this.accounts = typeof r < "u" ? r.map((A) => typeof A == "string" ? He.fromString(A) : A) : void 0, this.applicationArgs = i, this.approvalProgram = typeof o == "string" ? We(o) : o, this.boxReferences = s, this.clearStateProgram = typeof a == "string" ? We(a) : a, this.extraProgramPages = typeof l > "u" ? void 0 :
|
|
24986
|
+
this.applicationId = ve(e), this.access = t, this.accounts = typeof r < "u" ? r.map((A) => typeof A == "string" ? He.fromString(A) : A) : void 0, this.applicationArgs = i, this.approvalProgram = typeof o == "string" ? We(o) : o, this.boxReferences = s, this.clearStateProgram = typeof a == "string" ? We(a) : a, this.extraProgramPages = typeof l > "u" ? void 0 : Oe(l), this.foreignApps = typeof c > "u" ? void 0 : c.map(ve), this.foreignAssets = typeof d > "u" ? void 0 : d.map(ve), this.globalStateSchema = u, this.localStateSchema = m, this.onCompletion = h, this.rejectVersion = typeof v > "u" ? void 0 : Oe(v);
|
|
24987
24987
|
}
|
|
24988
24988
|
// eslint-disable-next-line class-methods-use-this
|
|
24989
24989
|
getEncodingSchema() {
|
|
@@ -25551,7 +25551,7 @@ class Qr {
|
|
|
25551
25551
|
* @param version - (v)
|
|
25552
25552
|
*/
|
|
25553
25553
|
constructor({ subsignature: e, threshold: t, version: r }) {
|
|
25554
|
-
this.subsignature = e, this.threshold = typeof t > "u" ? void 0 :
|
|
25554
|
+
this.subsignature = e, this.threshold = typeof t > "u" ? void 0 : Oe(t), this.version = typeof r > "u" ? void 0 : Oe(r);
|
|
25555
25555
|
}
|
|
25556
25556
|
// eslint-disable-next-line class-methods-use-this
|
|
25557
25557
|
getEncodingSchema() {
|
|
@@ -25642,7 +25642,7 @@ class Bc {
|
|
|
25642
25642
|
* protocol/stateproof.go
|
|
25643
25643
|
*/
|
|
25644
25644
|
constructor({ message: e, stateProof: t, stateProofType: r }) {
|
|
25645
|
-
this.message = e, this.stateProof = t, this.stateProofType = typeof r > "u" ? void 0 :
|
|
25645
|
+
this.message = e, this.stateProof = t, this.stateProofType = typeof r > "u" ? void 0 : Oe(r);
|
|
25646
25646
|
}
|
|
25647
25647
|
// eslint-disable-next-line class-methods-use-this
|
|
25648
25648
|
getEncodingSchema() {
|
|
@@ -33054,7 +33054,7 @@ function iC(n, e, t) {
|
|
|
33054
33054
|
const r = wn(Xv, n), i = typeof t == "string" ? He.fromString(t) : t;
|
|
33055
33055
|
return th(r, e, i.publicKey);
|
|
33056
33056
|
}
|
|
33057
|
-
const oC = new Error(Zv), sC = new Error(vg),
|
|
33057
|
+
const oC = new Error(Zv), sC = new Error(vg), Le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
33058
33058
|
__proto__: null,
|
|
33059
33059
|
ABIAddressType: Eu,
|
|
33060
33060
|
ABIArrayDynamicType: Us,
|
|
@@ -35341,10 +35341,10 @@ const BC = {
|
|
|
35341
35341
|
};
|
|
35342
35342
|
function NC(n) {
|
|
35343
35343
|
try {
|
|
35344
|
-
return
|
|
35344
|
+
return Le.decodeUnsignedTransaction(n);
|
|
35345
35345
|
} catch {
|
|
35346
35346
|
try {
|
|
35347
|
-
return
|
|
35347
|
+
return Le.decodeSignedTransaction(n).txn;
|
|
35348
35348
|
} catch {
|
|
35349
35349
|
return null;
|
|
35350
35350
|
}
|
|
@@ -35359,7 +35359,7 @@ function OC(n) {
|
|
|
35359
35359
|
for (let i = 0; i < n.length; i++) {
|
|
35360
35360
|
const o = n[i];
|
|
35361
35361
|
let s = null;
|
|
35362
|
-
if (o instanceof Uint8Array ? s = NC(o) : o
|
|
35362
|
+
if (o instanceof Uint8Array ? s = NC(o) : o && typeof o == "object" && "sender" in o && "type" in o && (s = o), s != null && s.rekeyTo && (r = "rekey"), !s) continue;
|
|
35363
35363
|
const a = s.sender.toString(), l = {
|
|
35364
35364
|
index: i,
|
|
35365
35365
|
type: s.type,
|
|
@@ -35551,10 +35551,12 @@ class ul {
|
|
|
35551
35551
|
/** Get Algorand address for a given EVM address (hex, with or without 0x prefix) */
|
|
35552
35552
|
async getAddress({ evmAddress: e }) {
|
|
35553
35553
|
const t = await this.getCompiled(e);
|
|
35554
|
-
return new
|
|
35554
|
+
return new Le.LogicSigAccount(t, []).address().toString();
|
|
35555
35555
|
}
|
|
35556
35556
|
/** Get the payload for the EVM wallet to sign. Group ID if group.length > 1, otherwise Txn ID */
|
|
35557
35557
|
static getSignPayload(e) {
|
|
35558
|
+
if (e.length === 0)
|
|
35559
|
+
throw new Error("Cannot get sign payload from empty transaction group");
|
|
35558
35560
|
return e.length > 1 ? e[0].group : e[0].rawTxID();
|
|
35559
35561
|
}
|
|
35560
35562
|
async signTxn({ evmAddress: e, txns: t, signMessage: r, signature: i }) {
|
|
@@ -35567,8 +35569,8 @@ class ul {
|
|
|
35567
35569
|
s = await r(wy(c));
|
|
35568
35570
|
} else
|
|
35569
35571
|
throw new Error("Either signMessage or signature must be provided");
|
|
35570
|
-
const a = yy(s), l = new
|
|
35571
|
-
return t.map((c) =>
|
|
35572
|
+
const a = yy(s), l = new Le.LogicSigAccount(o, [a]);
|
|
35573
|
+
return t.map((c) => Le.signLogicSigTransactionObject(c, l).blob);
|
|
35572
35574
|
}
|
|
35573
35575
|
/**
|
|
35574
35576
|
* Get an algokit-utils compatible TransactionSigner for the given EVM address using EIP-712 typed data signing.
|
|
@@ -35592,9 +35594,9 @@ class ul {
|
|
|
35592
35594
|
*/
|
|
35593
35595
|
async getSigner({ evmAddress: e, signMessage: t }) {
|
|
35594
35596
|
const r = await this.getCompiled(e);
|
|
35595
|
-
return { addr: new
|
|
35596
|
-
const c = ul.getSignPayload(a), d = await t(wy(c)), u = yy(d), m = new
|
|
35597
|
-
return l.map((h) =>
|
|
35597
|
+
return { addr: new Le.LogicSigAccount(r, []).address().toString(), signer: async (a, l) => {
|
|
35598
|
+
const c = ul.getSignPayload(a), d = await t(wy(c)), u = yy(d), m = new Le.LogicSigAccount(r, [u]);
|
|
35599
|
+
return l.map((h) => Le.signLogicSigTransactionObject(a[h], m).blob);
|
|
35598
35600
|
} };
|
|
35599
35601
|
}
|
|
35600
35602
|
}
|
|
@@ -40246,9 +40248,9 @@ var Ws;
|
|
|
40246
40248
|
(function(n) {
|
|
40247
40249
|
n.TxnGroupSimulated = "TxnGroupSimulated", n.AppCompiled = "AppCompiled";
|
|
40248
40250
|
})(Ws || (Ws = {}));
|
|
40249
|
-
var lf =
|
|
40251
|
+
var lf = Le.modelsv2;
|
|
40250
40252
|
async function sw(n, e, t) {
|
|
40251
|
-
const i = n.buildGroup().map((a) =>
|
|
40253
|
+
const i = n.buildGroup().map((a) => Le.encodeUnsignedSimulateTransaction(a.txn)), o = new lf.SimulateRequest({
|
|
40252
40254
|
allowEmptySignatures: !0,
|
|
40253
40255
|
fixSigners: !0,
|
|
40254
40256
|
allowMoreLogging: !0,
|
|
@@ -40286,12 +40288,12 @@ function UM(n) {
|
|
|
40286
40288
|
}
|
|
40287
40289
|
async function GM(n, e, t, r) {
|
|
40288
40290
|
var v, A, x, F, w, C;
|
|
40289
|
-
const i = new
|
|
40291
|
+
const i = new Le.modelsv2.SimulateRequest({
|
|
40290
40292
|
txnGroups: [],
|
|
40291
40293
|
allowUnnamedResources: !0,
|
|
40292
40294
|
allowEmptySignatures: !0,
|
|
40293
40295
|
fixSigners: !0
|
|
40294
|
-
}), o =
|
|
40296
|
+
}), o = Le.makeEmptyTransactionSigner(), s = n.clone(), a = [];
|
|
40295
40297
|
if (s.transactions.forEach((T, B) => {
|
|
40296
40298
|
var b, U;
|
|
40297
40299
|
if (T.signer = o, t.coverAppCallInnerTransactionFees && T.txn.type === Ot.appl) {
|
|
@@ -40342,7 +40344,7 @@ async function WM(n, e, t, r) {
|
|
|
40342
40344
|
var u, m, h, v, A, x;
|
|
40343
40345
|
const i = await GM(n, e, t, r), o = n.buildGroup(), [s, a] = t.coverAppCallInnerTransactionFees ? i.txns.map((F, w) => {
|
|
40344
40346
|
var p, E;
|
|
40345
|
-
const C = w, T = o[C].txn, B = (E = (p = r == null ? void 0 : r.maxFees) == null ? void 0 : p.get(w)) == null ? void 0 : E.microAlgo, b = B !== void 0 && B === T.fee, U = F.requiredFeeDelta > 0n && (b || T.type !==
|
|
40347
|
+
const C = w, T = o[C].txn, B = (E = (p = r == null ? void 0 : r.maxFees) == null ? void 0 : p.get(w)) == null ? void 0 : E.microAlgo, b = B !== void 0 && B === T.fee, U = F.requiredFeeDelta > 0n && (b || T.type !== Le.TransactionType.appl) ? 1000n : 1n;
|
|
40346
40348
|
return {
|
|
40347
40349
|
...F,
|
|
40348
40350
|
groupIndex: C,
|
|
@@ -40392,7 +40394,7 @@ async function WM(n, e, t, r) {
|
|
|
40392
40394
|
if (t.coverAppCallInnerTransactionFees) {
|
|
40393
40395
|
const ce = a.get(w);
|
|
40394
40396
|
if (ce !== void 0) {
|
|
40395
|
-
if (o[w].txn.type !==
|
|
40397
|
+
if (o[w].txn.type !== Le.TransactionType.appl)
|
|
40396
40398
|
throw Error(`An additional fee of ${ce} µALGO is required for non app call transaction ${w}`);
|
|
40397
40399
|
const me = o[w].txn.fee + ce, de = (he = (te = r == null ? void 0 : r.maxFees) == null ? void 0 : te.get(w)) == null ? void 0 : he.microAlgo;
|
|
40398
40400
|
if (de === void 0 || me > de)
|
|
@@ -40406,7 +40408,7 @@ async function WM(n, e, t, r) {
|
|
|
40406
40408
|
var p, E, S, V, R, N, W, O, K, Z, _, te, he, ce, me, de, ue, Se, Ee, _e, Fe, Te, D, G, q, ne;
|
|
40407
40409
|
const b = (H) => {
|
|
40408
40410
|
var le, se, we, be, Ce, Ue, Ye, bt;
|
|
40409
|
-
if (H.txn.type !==
|
|
40411
|
+
if (H.txn.type !== Le.TransactionType.appl || l(H.txn))
|
|
40410
40412
|
return !1;
|
|
40411
40413
|
const X = ((se = (le = H.txn.applicationCall) == null ? void 0 : le.accounts) == null ? void 0 : se.length) ?? 0, ae = ((be = (we = H.txn.applicationCall) == null ? void 0 : we.foreignAssets) == null ? void 0 : be.length) ?? 0, J = ((Ue = (Ce = H.txn.applicationCall) == null ? void 0 : Ce.foreignApps) == null ? void 0 : Ue.length) ?? 0, oe = ((bt = (Ye = H.txn.applicationCall) == null ? void 0 : Ye.boxes) == null ? void 0 : bt.length) ?? 0;
|
|
40412
40414
|
return X + ae + J + oe < No;
|
|
@@ -40418,7 +40420,7 @@ async function WM(n, e, t, r) {
|
|
|
40418
40420
|
return b(ae) ? (
|
|
40419
40421
|
// account is in the foreign accounts array
|
|
40420
40422
|
((oe = (J = ae.txn.applicationCall) == null ? void 0 : J.accounts) == null ? void 0 : oe.map((we) => we.toString()).includes(H.toString())) || // account is available as an app account
|
|
40421
|
-
((se = (le = ae.txn.applicationCall) == null ? void 0 : le.foreignApps) == null ? void 0 : se.map((we) =>
|
|
40423
|
+
((se = (le = ae.txn.applicationCall) == null ? void 0 : le.foreignApps) == null ? void 0 : se.map((we) => Le.getApplicationAddress(we).toString()).includes(H.toString())) || // account is available since it's in one of the fields
|
|
40422
40424
|
Object.values(ae.txn).some((we) => {
|
|
40423
40425
|
var be;
|
|
40424
40426
|
return (be = Ii(we, (Ce, Ue) => Ue instanceof He ? Ue.toString() : Ue)) == null ? void 0 : be.includes(H.toString());
|
|
@@ -40476,7 +40478,7 @@ async function WM(n, e, t, r) {
|
|
|
40476
40478
|
}
|
|
40477
40479
|
const U = C.findIndex((H) => {
|
|
40478
40480
|
var le, se, we, be, Ce, Ue, Ye, bt;
|
|
40479
|
-
if (H.txn.type !==
|
|
40481
|
+
if (H.txn.type !== Le.TransactionType.appl || l(H.txn))
|
|
40480
40482
|
return !1;
|
|
40481
40483
|
const X = ((se = (le = H.txn.applicationCall) == null ? void 0 : le.accounts) == null ? void 0 : se.length) ?? 0, ae = ((be = (we = H.txn.applicationCall) == null ? void 0 : we.foreignAssets) == null ? void 0 : be.length) ?? 0, J = ((Ue = (Ce = H.txn.applicationCall) == null ? void 0 : Ce.foreignApps) == null ? void 0 : Ue.length) ?? 0, oe = ((bt = (Ye = H.txn.applicationCall) == null ? void 0 : Ye.boxes) == null ? void 0 : bt.length) ?? 0;
|
|
40482
40484
|
return B === "account" ? X < rl && X + ae + J + oe < No : B === "assetHolding" || B === "appLocal" ? X + ae + J + oe < No - 1 && X < rl : B === "box" && BigInt(T.app) !== BigInt(0) ? X + ae + J + oe < No - 1 : X + ae + J + oe < No;
|
|
@@ -40544,11 +40546,11 @@ async function WM(n, e, t, r) {
|
|
|
40544
40546
|
F(o, C, "app");
|
|
40545
40547
|
}), w.extraBoxRefs))
|
|
40546
40548
|
for (let C = 0; C < w.extraBoxRefs; C += 1) {
|
|
40547
|
-
const T = new
|
|
40549
|
+
const T = new Le.modelsv2.BoxReference({ app: 0, name: new Uint8Array(0) });
|
|
40548
40550
|
F(o, T, "box");
|
|
40549
40551
|
}
|
|
40550
40552
|
}
|
|
40551
|
-
const d = new
|
|
40553
|
+
const d = new Le.AtomicTransactionComposer();
|
|
40552
40554
|
return o.forEach((F) => {
|
|
40553
40555
|
F.txn.group = void 0, d.addTransaction(F);
|
|
40554
40556
|
}), d.methodCalls = n.methodCalls, d;
|
|
@@ -40560,7 +40562,7 @@ const zM = async function(n, e) {
|
|
|
40560
40562
|
s = t;
|
|
40561
40563
|
try {
|
|
40562
40564
|
const c = s.buildGroup(), d = (o == null ? void 0 : o.populateAppCallResources) ?? (r == null ? void 0 : r.populateAppCallResources) ?? pt.populateAppCallResources, u = o == null ? void 0 : o.coverAppCallInnerTransactionFees;
|
|
40563
|
-
(d || u) && c.map((F) => F.txn.type).includes(
|
|
40565
|
+
(d || u) && c.map((F) => F.txn.type).includes(Le.TransactionType.appl) && (s = await WM(t, e, { populateAppCallResources: d, coverAppCallInnerTransactionFees: u }, i));
|
|
40564
40566
|
const m = s.buildGroup().map((F) => F.txn);
|
|
40565
40567
|
let h;
|
|
40566
40568
|
if (m.length > 1 && (h = m[0].group ? cn.Buffer.from(m[0].group).toString("base64") : "", pt.getLogger((o == null ? void 0 : o.suppressLog) ?? (r == null ? void 0 : r.suppressLog)).verbose(`Sending group of ${m.length} transactions (${h})`, {
|
|
@@ -40648,7 +40650,7 @@ class ar {
|
|
|
40648
40650
|
compiled: t.result,
|
|
40649
40651
|
compiledHash: t.hash,
|
|
40650
40652
|
compiledBase64ToBytes: new Uint8Array(Buffer.from(t.result, "base64")),
|
|
40651
|
-
sourceMap: new Uv(JSON.parse(
|
|
40653
|
+
sourceMap: new Uv(JSON.parse(Le.encodeJSON(t.sourcemap)))
|
|
40652
40654
|
};
|
|
40653
40655
|
return this._compilationResults[e] = r, r;
|
|
40654
40656
|
}
|
|
@@ -40703,7 +40705,7 @@ class ar {
|
|
|
40703
40705
|
const t = await this._algod.getApplicationByID(Number(e)).do();
|
|
40704
40706
|
return {
|
|
40705
40707
|
appId: BigInt(t.id),
|
|
40706
|
-
appAddress:
|
|
40708
|
+
appAddress: Le.getApplicationAddress(t.id),
|
|
40707
40709
|
approvalProgram: t.params.approvalProgram,
|
|
40708
40710
|
clearStateProgram: t.params.clearStateProgram,
|
|
40709
40711
|
creator: t.params.creator,
|
|
@@ -40890,7 +40892,7 @@ class ar {
|
|
|
40890
40892
|
method: t,
|
|
40891
40893
|
rawReturnValue: new Uint8Array()
|
|
40892
40894
|
};
|
|
40893
|
-
return zg(
|
|
40895
|
+
return zg(Le.AtomicTransactionComposer.parseMethodResponse(t, r, e), t.returns.type);
|
|
40894
40896
|
}
|
|
40895
40897
|
/**
|
|
40896
40898
|
* Replaces AlgoKit deploy-time deployment control parameters within the given TEAL template code.
|
|
@@ -41139,7 +41141,7 @@ class YM {
|
|
|
41139
41141
|
return {
|
|
41140
41142
|
...i,
|
|
41141
41143
|
appId: BigInt(i.confirmation.applicationIndex),
|
|
41142
|
-
appAddress:
|
|
41144
|
+
appAddress: Le.getApplicationAddress(i.confirmation.applicationIndex)
|
|
41143
41145
|
};
|
|
41144
41146
|
};
|
|
41145
41147
|
}
|
|
@@ -41147,7 +41149,7 @@ class YM {
|
|
|
41147
41149
|
function aS(n) {
|
|
41148
41150
|
return n === "devnet-v1" || n === "sandnet-v1" || n === "dockernet-v1";
|
|
41149
41151
|
}
|
|
41150
|
-
var KM =
|
|
41152
|
+
var KM = Le.AtomicTransactionComposer, hf = Le.isTransactionWithSigner, cw = Le.modelsv2;
|
|
41151
41153
|
const qM = (n) => typeof n == "string" ? He.fromString(n) : n, lw = 16;
|
|
41152
41154
|
class XM extends Error {
|
|
41153
41155
|
constructor(e, t) {
|
|
@@ -41179,7 +41181,7 @@ class ei {
|
|
|
41179
41181
|
* @returns The `TransactionComposer` instance
|
|
41180
41182
|
*/
|
|
41181
41183
|
constructor(e) {
|
|
41182
|
-
this.atc = new
|
|
41184
|
+
this.atc = new Le.AtomicTransactionComposer(), this.txnMaxFees = /* @__PURE__ */ new Map(), this.txns = [], this.defaultValidityWindow = 10n, this.defaultValidityWindowIsExplicit = !1, this.algod = e.algod;
|
|
41183
41185
|
const t = () => e.algod.getTransactionParams().do();
|
|
41184
41186
|
this.getSuggestedParams = e.getSuggestedParams ?? t, this.getSigner = e.getSigner, this.defaultValidityWindow = e.defaultValidityWindow ?? this.defaultValidityWindow, this.defaultValidityWindowIsExplicit = e.defaultValidityWindow !== void 0, this.appManager = e.appManager ?? new ar(e.algod), this.errorTransformers = e.errorTransformers ?? [];
|
|
41185
41187
|
}
|
|
@@ -41563,7 +41565,7 @@ class ei {
|
|
|
41563
41565
|
* ```
|
|
41564
41566
|
*/
|
|
41565
41567
|
addAppUpdate(e) {
|
|
41566
|
-
return this.txns.push({ ...e, type: "appCall", onComplete:
|
|
41568
|
+
return this.txns.push({ ...e, type: "appCall", onComplete: Le.OnApplicationComplete.UpdateApplicationOC }), this;
|
|
41567
41569
|
}
|
|
41568
41570
|
/**
|
|
41569
41571
|
* Add an application delete transaction to the transaction group.
|
|
@@ -41601,7 +41603,7 @@ class ei {
|
|
|
41601
41603
|
* ```
|
|
41602
41604
|
*/
|
|
41603
41605
|
addAppDelete(e) {
|
|
41604
|
-
return this.txns.push({ ...e, type: "appCall", onComplete:
|
|
41606
|
+
return this.txns.push({ ...e, type: "appCall", onComplete: Le.OnApplicationComplete.DeleteApplicationOC }), this;
|
|
41605
41607
|
}
|
|
41606
41608
|
/**
|
|
41607
41609
|
* Add an application call transaction to the transaction group.
|
|
@@ -41752,7 +41754,7 @@ class ei {
|
|
|
41752
41754
|
* ```
|
|
41753
41755
|
*/
|
|
41754
41756
|
addAppUpdateMethodCall(e) {
|
|
41755
|
-
return this.txns.push({ ...e, type: "methodCall", onComplete:
|
|
41757
|
+
return this.txns.push({ ...e, type: "methodCall", onComplete: Le.OnApplicationComplete.UpdateApplicationOC }), this;
|
|
41756
41758
|
}
|
|
41757
41759
|
/**
|
|
41758
41760
|
* Add an ABI method delete application call transaction to the transaction group.
|
|
@@ -41802,7 +41804,7 @@ class ei {
|
|
|
41802
41804
|
* ```
|
|
41803
41805
|
*/
|
|
41804
41806
|
addAppDeleteMethodCall(e) {
|
|
41805
|
-
return this.txns.push({ ...e, type: "methodCall", onComplete:
|
|
41807
|
+
return this.txns.push({ ...e, type: "methodCall", onComplete: Le.OnApplicationComplete.DeleteApplicationOC }), this;
|
|
41806
41808
|
}
|
|
41807
41809
|
/**
|
|
41808
41810
|
* Add a non-create/non-update ABI method application call transaction to the transaction group.
|
|
@@ -41980,11 +41982,11 @@ class ei {
|
|
|
41980
41982
|
*/
|
|
41981
41983
|
async buildMethodCall(e, t, r) {
|
|
41982
41984
|
var v, A, x, F, w, C, T, B;
|
|
41983
|
-
const i = [], o = [], s = (b) => Array.isArray(b) ? b.length == 0 || b.every(s) : typeof b == "bigint" || typeof b == "boolean" || typeof b == "number" || typeof b == "string" || b instanceof Uint8Array || b instanceof
|
|
41985
|
+
const i = [], o = [], s = (b) => Array.isArray(b) ? b.length == 0 || b.every(s) : typeof b == "bigint" || typeof b == "boolean" || typeof b == "number" || typeof b == "string" || b instanceof Uint8Array || b instanceof Le.Address;
|
|
41984
41986
|
for (let b = (e.args ?? []).length - 1; b >= 0; b--) {
|
|
41985
41987
|
const U = e.args[b];
|
|
41986
41988
|
if (U === void 0) {
|
|
41987
|
-
if (
|
|
41989
|
+
if (Le.abiTypeIsTransaction(e.method.args[b].type) && o.length > 0) {
|
|
41988
41990
|
const E = o.splice(-1, 1)[0];
|
|
41989
41991
|
i.push(E);
|
|
41990
41992
|
continue;
|
|
@@ -42010,7 +42012,7 @@ class ei {
|
|
|
42010
42012
|
signer: r ? e.signer ? "signer" in e.signer ? e.signer.signer : e.signer : this.getSigner(p.sender) : ei.NULL_SIGNER
|
|
42011
42013
|
});
|
|
42012
42014
|
}
|
|
42013
|
-
const a = new
|
|
42015
|
+
const a = new Le.AtomicTransactionComposer(), l = /* @__PURE__ */ new Map();
|
|
42014
42016
|
o.reverse().forEach(({ context: b, ...U }) => {
|
|
42015
42017
|
a.addTransaction(U);
|
|
42016
42018
|
const p = a.count() - 1;
|
|
@@ -42031,7 +42033,7 @@ class ei {
|
|
|
42031
42033
|
appID: c,
|
|
42032
42034
|
sender: e.sender,
|
|
42033
42035
|
suggestedParams: t,
|
|
42034
|
-
onComplete: e.onComplete ??
|
|
42036
|
+
onComplete: e.onComplete ?? Le.OnApplicationComplete.NoOpOC,
|
|
42035
42037
|
appAccounts: e.accountReferences,
|
|
42036
42038
|
appForeignApps: (v = e.appReferences) == null ? void 0 : v.map((b) => Number(b)),
|
|
42037
42039
|
appForeignAssets: (A = e.assetReferences) == null ? void 0 : A.map((b) => Number(b)),
|
|
@@ -42072,7 +42074,7 @@ class ei {
|
|
|
42072
42074
|
});
|
|
42073
42075
|
}
|
|
42074
42076
|
buildPayment(e, t) {
|
|
42075
|
-
return this.commonTxnBuildStep(
|
|
42077
|
+
return this.commonTxnBuildStep(Le.makePaymentTxnWithSuggestedParamsFromObject, e, {
|
|
42076
42078
|
sender: e.sender,
|
|
42077
42079
|
receiver: e.receiver,
|
|
42078
42080
|
amount: e.amount.microAlgo,
|
|
@@ -42081,7 +42083,7 @@ class ei {
|
|
|
42081
42083
|
});
|
|
42082
42084
|
}
|
|
42083
42085
|
buildAssetCreate(e, t) {
|
|
42084
|
-
return this.commonTxnBuildStep(
|
|
42086
|
+
return this.commonTxnBuildStep(Le.makeAssetCreateTxnWithSuggestedParamsFromObject, e, {
|
|
42085
42087
|
sender: e.sender,
|
|
42086
42088
|
total: e.total,
|
|
42087
42089
|
decimals: e.decimals ?? 0,
|
|
@@ -42098,7 +42100,7 @@ class ei {
|
|
|
42098
42100
|
});
|
|
42099
42101
|
}
|
|
42100
42102
|
buildAssetConfig(e, t) {
|
|
42101
|
-
return this.commonTxnBuildStep(
|
|
42103
|
+
return this.commonTxnBuildStep(Le.makeAssetConfigTxnWithSuggestedParamsFromObject, e, {
|
|
42102
42104
|
sender: e.sender,
|
|
42103
42105
|
assetIndex: e.assetId,
|
|
42104
42106
|
suggestedParams: t,
|
|
@@ -42110,14 +42112,14 @@ class ei {
|
|
|
42110
42112
|
});
|
|
42111
42113
|
}
|
|
42112
42114
|
buildAssetDestroy(e, t) {
|
|
42113
|
-
return this.commonTxnBuildStep(
|
|
42115
|
+
return this.commonTxnBuildStep(Le.makeAssetDestroyTxnWithSuggestedParamsFromObject, e, {
|
|
42114
42116
|
sender: e.sender,
|
|
42115
42117
|
assetIndex: e.assetId,
|
|
42116
42118
|
suggestedParams: t
|
|
42117
42119
|
});
|
|
42118
42120
|
}
|
|
42119
42121
|
buildAssetFreeze(e, t) {
|
|
42120
|
-
return this.commonTxnBuildStep(
|
|
42122
|
+
return this.commonTxnBuildStep(Le.makeAssetFreezeTxnWithSuggestedParamsFromObject, e, {
|
|
42121
42123
|
sender: e.sender,
|
|
42122
42124
|
assetIndex: e.assetId,
|
|
42123
42125
|
freezeTarget: e.account,
|
|
@@ -42126,7 +42128,7 @@ class ei {
|
|
|
42126
42128
|
});
|
|
42127
42129
|
}
|
|
42128
42130
|
buildAssetTransfer(e, t) {
|
|
42129
|
-
return this.commonTxnBuildStep(
|
|
42131
|
+
return this.commonTxnBuildStep(Le.makeAssetTransferTxnWithSuggestedParamsFromObject, e, {
|
|
42130
42132
|
sender: e.sender,
|
|
42131
42133
|
receiver: e.receiver,
|
|
42132
42134
|
assetIndex: e.assetId,
|
|
@@ -42142,7 +42144,7 @@ class ei {
|
|
|
42142
42144
|
sender: e.sender,
|
|
42143
42145
|
suggestedParams: t,
|
|
42144
42146
|
appArgs: e.args,
|
|
42145
|
-
onComplete: e.onComplete ??
|
|
42147
|
+
onComplete: e.onComplete ?? Le.OnApplicationComplete.NoOpOC,
|
|
42146
42148
|
accounts: e.accountReferences,
|
|
42147
42149
|
foreignApps: (a = e.appReferences) == null ? void 0 : a.map((A) => Number(A)),
|
|
42148
42150
|
foreignAssets: (l = e.assetReferences) == null ? void 0 : l.map((A) => Number(A)),
|
|
@@ -42155,7 +42157,7 @@ class ei {
|
|
|
42155
42157
|
if (r === 0n) {
|
|
42156
42158
|
if (s.approvalProgram === void 0 || s.clearProgram === void 0)
|
|
42157
42159
|
throw new Error("approvalProgram and clearStateProgram are required for application creation");
|
|
42158
|
-
return this.commonTxnBuildStep(
|
|
42160
|
+
return this.commonTxnBuildStep(Le.makeApplicationCreateTxnFromObject, e, {
|
|
42159
42161
|
...s,
|
|
42160
42162
|
extraPages: "extraProgramPages" in e && e.extraProgramPages !== void 0 ? e.extraProgramPages : Jp(i, o),
|
|
42161
42163
|
numLocalInts: "schema" in e ? ((u = e.schema) == null ? void 0 : u.localInts) ?? 0 : 0,
|
|
@@ -42166,10 +42168,10 @@ class ei {
|
|
|
42166
42168
|
clearProgram: o
|
|
42167
42169
|
});
|
|
42168
42170
|
} else
|
|
42169
|
-
return this.commonTxnBuildStep(
|
|
42171
|
+
return this.commonTxnBuildStep(Le.makeApplicationCallTxnFromObject, e, { ...s, appIndex: r });
|
|
42170
42172
|
}
|
|
42171
42173
|
buildKeyReg(e, t) {
|
|
42172
|
-
return "voteKey" in e ? this.commonTxnBuildStep(
|
|
42174
|
+
return "voteKey" in e ? this.commonTxnBuildStep(Le.makeKeyRegistrationTxnWithSuggestedParamsFromObject, e, {
|
|
42173
42175
|
sender: e.sender,
|
|
42174
42176
|
voteKey: e.voteKey,
|
|
42175
42177
|
selectionKey: e.selectionKey,
|
|
@@ -42179,7 +42181,7 @@ class ei {
|
|
|
42179
42181
|
suggestedParams: t,
|
|
42180
42182
|
nonParticipation: !1,
|
|
42181
42183
|
stateProofKey: e.stateProofKey
|
|
42182
|
-
}) : this.commonTxnBuildStep(
|
|
42184
|
+
}) : this.commonTxnBuildStep(Le.makeKeyRegistrationTxnWithSuggestedParamsFromObject, e, {
|
|
42183
42185
|
sender: e.sender,
|
|
42184
42186
|
suggestedParams: t,
|
|
42185
42187
|
nonParticipation: e.preventAccountFromEverParticipatingAgain
|
|
@@ -42267,7 +42269,7 @@ class ei {
|
|
|
42267
42269
|
* ```
|
|
42268
42270
|
*/
|
|
42269
42271
|
async build() {
|
|
42270
|
-
if (this.atc.getStatus() ===
|
|
42272
|
+
if (this.atc.getStatus() === Le.AtomicTransactionComposerStatus.BUILDING) {
|
|
42271
42273
|
const t = await this.getSuggestedParams(), r = [];
|
|
42272
42274
|
for (const o of this.txns)
|
|
42273
42275
|
r.push(...await this.buildTxnWithSigner(o, t));
|
|
@@ -42289,7 +42291,7 @@ class ei {
|
|
|
42289
42291
|
* ```
|
|
42290
42292
|
*/
|
|
42291
42293
|
async rebuild() {
|
|
42292
|
-
return this.atc = new
|
|
42294
|
+
return this.atc = new Le.AtomicTransactionComposer(), await this.build();
|
|
42293
42295
|
}
|
|
42294
42296
|
/**
|
|
42295
42297
|
* Compose the atomic transaction group and send it to the network.
|
|
@@ -42389,7 +42391,7 @@ class ei {
|
|
|
42389
42391
|
return new TextEncoder().encode(t);
|
|
42390
42392
|
}
|
|
42391
42393
|
}
|
|
42392
|
-
ei.NULL_SIGNER =
|
|
42394
|
+
ei.NULL_SIGNER = Le.makeEmptyTransactionSigner();
|
|
42393
42395
|
function uw(n) {
|
|
42394
42396
|
return {
|
|
42395
42397
|
address: typeof n.address == "string" ? He.fromString(n.address) : n.address,
|
|
@@ -42586,7 +42588,7 @@ async function nR(n, e, t) {
|
|
|
42586
42588
|
let s = e(n.searchForTransactions()).limit(cS);
|
|
42587
42589
|
return o && (s = s.nextToken(o)), s;
|
|
42588
42590
|
});
|
|
42589
|
-
return new
|
|
42591
|
+
return new Le.indexerModels.TransactionsResponse({
|
|
42590
42592
|
currentRound: r,
|
|
42591
42593
|
nextToken: void 0,
|
|
42592
42594
|
transactions: i
|
|
@@ -42724,7 +42726,7 @@ class rR {
|
|
|
42724
42726
|
pt.getLogger(u == null ? void 0 : u.suppressLog).warn(`Sent transactions ${Se.txID()} to create app with id ${ue.applicationIndex} and ${Ee.txID()} to delete app with id ${he.appId} from ${s.sender} account.`);
|
|
42725
42727
|
const _e = {
|
|
42726
42728
|
appId: BigInt(ue.applicationIndex),
|
|
42727
|
-
appAddress:
|
|
42729
|
+
appAddress: Le.getApplicationAddress(ue.applicationIndex),
|
|
42728
42730
|
...t,
|
|
42729
42731
|
createdMetadata: t,
|
|
42730
42732
|
createdRound: BigInt(ue.confirmedRound),
|
|
@@ -42802,7 +42804,7 @@ class rR {
|
|
|
42802
42804
|
throw new Error("Didn't receive an indexer client when this AppManager was created, but received a call to getCreatorApps");
|
|
42803
42805
|
const o = (await tR(this._indexer, e)).map((l) => ({ id: l.id, createdAtRound: l.createdAtRound, deleted: l.deleted })).sort((l, c) => Number(l.createdAtRound - c.createdAtRound));
|
|
42804
42806
|
(await Promise.all(o.map(async (l) => {
|
|
42805
|
-
const c = await nR(this._indexer, (m) => m.minRound(l.createdAtRound).txType(
|
|
42807
|
+
const c = await nR(this._indexer, (m) => m.minRound(l.createdAtRound).txType(Le.TransactionType.appl).applicationID(Number(l.id)).address(e).addressRole("sender").notePrefix(Buffer.from(Xu).toString("base64"))), d = c.transactions.filter((m) => {
|
|
42806
42808
|
var h;
|
|
42807
42809
|
return ((h = m.applicationTransaction) == null ? void 0 : h.applicationId) === 0n && m.sender.toString() === e.toString();
|
|
42808
42810
|
})[0], u = c.transactions.filter((m) => m.sender.toString() === e.toString()).sort((m, h) => m.confirmedRound === h.confirmedRound ? (h.intraRoundOffset - m.intraRoundOffset) / 10 : Number(h.confirmedRound - m.confirmedRound))[0];
|
|
@@ -42816,7 +42818,7 @@ class rR {
|
|
|
42816
42818
|
const h = m(d.note ? Buffer.from(d.note).toString("utf-8") : void 0), v = m(u.note ? Buffer.from(u.note).toString("utf-8") : void 0);
|
|
42817
42819
|
h != null && h.name && (r[h.name] = {
|
|
42818
42820
|
appId: c.id,
|
|
42819
|
-
appAddress:
|
|
42821
|
+
appAddress: Le.getApplicationAddress(c.id),
|
|
42820
42822
|
createdMetadata: h,
|
|
42821
42823
|
createdRound: d.confirmedRound ?? 0n,
|
|
42822
42824
|
...v ?? h,
|
|
@@ -42835,14 +42837,14 @@ class rR {
|
|
|
42835
42837
|
return this._appLookups.set(e.toString(), a), a;
|
|
42836
42838
|
}
|
|
42837
42839
|
}
|
|
42838
|
-
class iR extends
|
|
42840
|
+
class iR extends Le.ABIMethod {
|
|
42839
42841
|
constructor(e) {
|
|
42840
42842
|
super(e), this.method = e, this.args = e.args.map((t) => ({
|
|
42841
42843
|
...t,
|
|
42842
|
-
type:
|
|
42844
|
+
type: Le.abiTypeIsTransaction(t.type) || Le.abiTypeIsReference(t.type) ? t.type : Le.ABIType.from(t.type)
|
|
42843
42845
|
})), this.returns = {
|
|
42844
42846
|
...this.method.returns,
|
|
42845
|
-
type: this.method.returns.type === "void" ? "void" :
|
|
42847
|
+
type: this.method.returns.type === "void" ? "void" : Le.ABIType.from(this.method.returns.type)
|
|
42846
42848
|
};
|
|
42847
42849
|
}
|
|
42848
42850
|
toJSON() {
|
|
@@ -42850,12 +42852,12 @@ class iR extends Oe.ABIMethod {
|
|
|
42850
42852
|
}
|
|
42851
42853
|
}
|
|
42852
42854
|
function Pc(n, e) {
|
|
42853
|
-
return new
|
|
42855
|
+
return new Le.ABITupleType(n.map((t) => typeof t.type == "string" ? e[t.type] ? Pc(e[t.type], e) : Le.ABIType.from(t.type) : Pc(t.type, e)));
|
|
42854
42856
|
}
|
|
42855
42857
|
function jg(n, e, t) {
|
|
42856
42858
|
return Object.fromEntries(e.map(({ name: r, type: i }, o) => {
|
|
42857
42859
|
let s;
|
|
42858
|
-
typeof i == "string" ? i in t ? s = Pc(t[i], t) : s =
|
|
42860
|
+
typeof i == "string" ? i in t ? s = Pc(t[i], t) : s = Le.ABIType.from(i) : s = Pc(i, t);
|
|
42859
42861
|
const a = Nc(n[o], s), l = su(a, s);
|
|
42860
42862
|
return [
|
|
42861
42863
|
r,
|
|
@@ -42875,19 +42877,19 @@ function rr(n, e, t) {
|
|
|
42875
42877
|
if (e === "AVMString")
|
|
42876
42878
|
return Buffer.from(n).toString("utf-8");
|
|
42877
42879
|
if (e === "AVMUint64")
|
|
42878
|
-
return
|
|
42880
|
+
return Le.ABIType.from("uint64").decode(n);
|
|
42879
42881
|
if (t[e]) {
|
|
42880
42882
|
const o = Pc(t[e], t).decode(n);
|
|
42881
42883
|
return jg(o, t[e], t);
|
|
42882
42884
|
}
|
|
42883
|
-
const r =
|
|
42885
|
+
const r = Le.ABIType.from(e), i = Nc(r.decode(n), r);
|
|
42884
42886
|
return su(i, r);
|
|
42885
42887
|
}
|
|
42886
42888
|
function dw(n, e, t) {
|
|
42887
42889
|
if (typeof n == "object" && n instanceof Uint8Array)
|
|
42888
42890
|
return n;
|
|
42889
42891
|
if (e === "AVMUint64")
|
|
42890
|
-
return
|
|
42892
|
+
return Le.ABIType.from("uint64").encode(n);
|
|
42891
42893
|
if (e === "AVMBytes" || e === "AVMString") {
|
|
42892
42894
|
if (typeof n == "string")
|
|
42893
42895
|
return Buffer.from(n, "utf-8");
|
|
@@ -42902,12 +42904,12 @@ function dw(n, e, t) {
|
|
|
42902
42904
|
else
|
|
42903
42905
|
return r.encode(au(n, t[e], t));
|
|
42904
42906
|
}
|
|
42905
|
-
return
|
|
42907
|
+
return Le.ABIType.from(e).encode(n);
|
|
42906
42908
|
}
|
|
42907
42909
|
function _n(n, e) {
|
|
42908
42910
|
let t;
|
|
42909
42911
|
if (n.includes("(")) {
|
|
42910
|
-
const r = e.methods.find((i) => new
|
|
42912
|
+
const r = e.methods.find((i) => new Le.ABIMethod(i).getSignature() === n);
|
|
42911
42913
|
if (!r)
|
|
42912
42914
|
throw new Error(`Unable to find method ${n} in ${e.name} app.`);
|
|
42913
42915
|
t = r;
|
|
@@ -42916,7 +42918,7 @@ function _n(n, e) {
|
|
|
42916
42918
|
if (r.length === 0)
|
|
42917
42919
|
throw new Error(`Unable to find method ${n} in ${e.name} app.`);
|
|
42918
42920
|
if (r.length > 1)
|
|
42919
|
-
throw new Error(`Received a call to method ${n} in contract ${e.name}, but this resolved to multiple methods; please pass in an ABI signature instead: ${e.methods.map((i) => new
|
|
42921
|
+
throw new Error(`Received a call to method ${n} in contract ${e.name}, but this resolved to multiple methods; please pass in an ABI signature instead: ${e.methods.map((i) => new Le.ABIMethod(i).getSignature()).join(", ")}`);
|
|
42920
42922
|
t = r[0];
|
|
42921
42923
|
}
|
|
42922
42924
|
return new iR(t);
|
|
@@ -42926,9 +42928,9 @@ function na(n, e, t) {
|
|
|
42926
42928
|
if (n != null && n.decodeError)
|
|
42927
42929
|
throw n.decodeError;
|
|
42928
42930
|
if (!(i === void 0 || i === "void" || (n == null ? void 0 : n.returnValue) === void 0))
|
|
42929
|
-
return i === "AVMBytes" ? n.rawReturnValue : i === "AVMString" ? Buffer.from(n.rawReturnValue).toString("utf-8") : i === "AVMUint64" ?
|
|
42931
|
+
return i === "AVMBytes" ? n.rawReturnValue : i === "AVMString" ? Buffer.from(n.rawReturnValue).toString("utf-8") : i === "AVMUint64" ? Le.ABIType.from("uint64").decode(n.rawReturnValue) : t[i] ? jg(n.returnValue, t[i], t) : Nc(n.returnValue, Le.ABIType.from(i));
|
|
42930
42932
|
}
|
|
42931
|
-
var oR =
|
|
42933
|
+
var oR = Le.ABIMethod;
|
|
42932
42934
|
function sR(n) {
|
|
42933
42935
|
const e = Object.values(n.hints).flatMap((l) => Object.entries(l.structs ?? {})), t = Object.fromEntries(e.map(([l, c]) => {
|
|
42934
42936
|
const d = c.elements.map((u) => ({ name: u[0], type: u[1] }));
|
|
@@ -42946,7 +42948,7 @@ function sR(n) {
|
|
|
42946
42948
|
data: c.data.name
|
|
42947
42949
|
} : {
|
|
42948
42950
|
source: c.source === "constant" ? "literal" : c.source === "global-state" ? "global" : "local",
|
|
42949
|
-
data: Buffer.from(typeof c.data == "number" ?
|
|
42951
|
+
data: Buffer.from(typeof c.data == "number" ? Le.ABIType.from("uint64").encode(c.data) : c.data).toString("base64"),
|
|
42950
42952
|
type: l === "string" ? "AVMString" : l
|
|
42951
42953
|
};
|
|
42952
42954
|
};
|
|
@@ -43069,7 +43071,7 @@ class ff extends Error {
|
|
|
43069
43071
|
}
|
|
43070
43072
|
}
|
|
43071
43073
|
}
|
|
43072
|
-
var gr =
|
|
43074
|
+
var gr = Le.OnApplicationComplete, hw = Le.ProgramSourceMap;
|
|
43073
43075
|
const lR = 2e4 * 16, pf = 38, fw = 32;
|
|
43074
43076
|
function uR(n) {
|
|
43075
43077
|
const e = [...n], t = e.length;
|
|
@@ -43137,7 +43139,7 @@ class pn {
|
|
|
43137
43139
|
${c}`);
|
|
43138
43140
|
}
|
|
43139
43141
|
return r;
|
|
43140
|
-
}, this._appId = e.appId, this._appAddress =
|
|
43142
|
+
}, this._appId = e.appId, this._appAddress = Le.getApplicationAddress(this._appId), this._appSpec = pn.normaliseAppSpec(e.appSpec), this._appName = e.appName ?? this._appSpec.name, this._algorand = e.algorand, this._algorand.registerErrorTransformer(this.handleCallErrors), this._defaultSender = typeof e.defaultSender == "string" ? He.fromString(e.defaultSender) : e.defaultSender, this._defaultSigner = e.defaultSigner, this._lastCompiled = {}, this._approvalSourceMap = e.approvalSourceMap, this._clearSourceMap = e.clearSourceMap, this._localStateMethods = (t) => this.getStateMethods(() => this.getLocalState(t), () => this._appSpec.state.keys.local, () => this._appSpec.state.maps.local), this._globalStateMethods = this.getStateMethods(() => this.getGlobalState(), () => this._appSpec.state.keys.global, () => this._appSpec.state.maps.global), this._boxStateMethods = this.getBoxMethods(), this._paramsMethods = {
|
|
43141
43143
|
...this.getMethodCallParamsMethods(),
|
|
43142
43144
|
/** Get parameters to define bare (raw) transactions to the current app */
|
|
43143
43145
|
bare: this.getBareParamsMethods()
|
|
@@ -43615,7 +43617,7 @@ ${c}`);
|
|
|
43615
43617
|
return rr(m, ((u = i.method.args[s].defaultValue) == null ? void 0 : u.type) ?? i.method.args[s].type, this._appSpec.structs);
|
|
43616
43618
|
}
|
|
43617
43619
|
}
|
|
43618
|
-
if (!
|
|
43620
|
+
if (!Le.abiTypeIsTransaction(a.type))
|
|
43619
43621
|
throw new Error(`No value provided for required argument ${a.name ?? `arg${s + 1}`} in call to method ${i.name}`);
|
|
43620
43622
|
})) ?? []);
|
|
43621
43623
|
}
|
|
@@ -43987,7 +43989,7 @@ class dR {
|
|
|
43987
43989
|
return this._signer;
|
|
43988
43990
|
}
|
|
43989
43991
|
constructor(e, t) {
|
|
43990
|
-
this._params = e, this._signingAccounts = t, this._addr =
|
|
43992
|
+
this._params = e, this._signingAccounts = t, this._addr = Le.multisigAddress(e), this._signer = Le.makeMultiSigAccountTransactionSigner(e, t.map((r) => r.sk));
|
|
43991
43993
|
}
|
|
43992
43994
|
/**
|
|
43993
43995
|
* Sign the given transaction
|
|
@@ -44001,7 +44003,7 @@ class dR {
|
|
|
44001
44003
|
sign(e) {
|
|
44002
44004
|
let t = "sender" in e ? void 0 : e;
|
|
44003
44005
|
for (const r of this._signingAccounts)
|
|
44004
|
-
t ? t =
|
|
44006
|
+
t ? t = Le.appendSignMultisigTransaction(t, this._params, r.sk).blob : t = Le.signMultisigTransaction(e, this._params, r.sk).blob;
|
|
44005
44007
|
return t;
|
|
44006
44008
|
}
|
|
44007
44009
|
}
|
|
@@ -44034,7 +44036,7 @@ class Qp {
|
|
|
44034
44036
|
};
|
|
44035
44037
|
}
|
|
44036
44038
|
constructor(e, t) {
|
|
44037
|
-
this._account = e, this._sender = typeof t == "string" ? He.fromString(t) : t ?? e.addr, this._signer =
|
|
44039
|
+
this._account = e, this._sender = typeof t == "string" ? He.fromString(t) : t ?? e.addr, this._signer = Le.makeBasicAccountTransactionSigner(e);
|
|
44038
44040
|
}
|
|
44039
44041
|
}
|
|
44040
44042
|
class Jn {
|
|
@@ -44048,11 +44050,11 @@ class Jn {
|
|
|
44048
44050
|
}
|
|
44049
44051
|
/** Return the amount as a number in Algo */
|
|
44050
44052
|
get algos() {
|
|
44051
|
-
return
|
|
44053
|
+
return Le.microalgosToAlgos(Number(this.amountInMicroAlgo));
|
|
44052
44054
|
}
|
|
44053
44055
|
/** Return the amount as a number in Algo */
|
|
44054
44056
|
get algo() {
|
|
44055
|
-
return
|
|
44057
|
+
return Le.microalgosToAlgos(Number(this.amountInMicroAlgo));
|
|
44056
44058
|
}
|
|
44057
44059
|
/**
|
|
44058
44060
|
* Create a new `AlgoAmount` instance.
|
|
@@ -44065,7 +44067,7 @@ class Jn {
|
|
|
44065
44067
|
* ```
|
|
44066
44068
|
*/
|
|
44067
44069
|
constructor(e) {
|
|
44068
|
-
this.amountInMicroAlgo = "microAlgos" in e ? BigInt(e.microAlgos) : "microAlgo" in e ? BigInt(e.microAlgo) : "algos" in e ? BigInt(
|
|
44070
|
+
this.amountInMicroAlgo = "microAlgos" in e ? BigInt(e.microAlgos) : "microAlgo" in e ? BigInt(e.microAlgo) : "algos" in e ? BigInt(Le.algosToMicroalgos(Number(e.algos))) : BigInt(Le.algosToMicroalgos(Number(e.algo)));
|
|
44069
44071
|
}
|
|
44070
44072
|
toString() {
|
|
44071
44073
|
return `${this.microAlgo.toLocaleString("en-US")} µALGO`;
|
|
@@ -44147,7 +44149,7 @@ cr.RETRY_ERROR_CODES = [
|
|
|
44147
44149
|
"EPROTO"
|
|
44148
44150
|
// We get this intermittently with AlgoNode API
|
|
44149
44151
|
];
|
|
44150
|
-
var gw =
|
|
44152
|
+
var gw = Le.ProgramSourceMap, Zs = Le.OnApplicationComplete;
|
|
44151
44153
|
class uS {
|
|
44152
44154
|
/**
|
|
44153
44155
|
* Create a new app factory.
|
|
@@ -44634,7 +44636,7 @@ class yw {
|
|
|
44634
44636
|
return { amount: (await (await this.processDispenserRequest(this.authToken, `fund/${gf[ua.Algo].assetId}/limit`, null, "GET")).json()).amount };
|
|
44635
44637
|
}
|
|
44636
44638
|
}
|
|
44637
|
-
var pR =
|
|
44639
|
+
var pR = Le.Kmd, gR = Le.Indexer;
|
|
44638
44640
|
class qt {
|
|
44639
44641
|
/**
|
|
44640
44642
|
* algosdk clients or config for interacting with the official Algorand APIs.
|
|
@@ -45105,7 +45107,7 @@ class qt {
|
|
|
45105
45107
|
*/
|
|
45106
45108
|
static getAlgodClient(e) {
|
|
45107
45109
|
const { token: t, server: r, port: i } = e, o = typeof t == "string" ? { "X-Algo-API-Token": t } : t ?? {}, s = new cr(o, r, i);
|
|
45108
|
-
return new
|
|
45110
|
+
return new Le.Algodv2(s, r);
|
|
45109
45111
|
}
|
|
45110
45112
|
/**
|
|
45111
45113
|
* Returns an algod SDK client that automatically retries on idempotent calls loaded from environment variables (expects to be called from a Node.js environment).
|
|
@@ -45261,7 +45263,7 @@ class mR {
|
|
|
45261
45263
|
}
|
|
45262
45264
|
if (!c)
|
|
45263
45265
|
return;
|
|
45264
|
-
const d = (await i.exportKey(l, "", c)).private_key, u =
|
|
45266
|
+
const d = (await i.exportKey(l, "", c)).private_key, u = Le.secretKeyToMnemonic(d), m = Le.mnemonicToSecretKey(u), h = new Qp(m, r);
|
|
45265
45267
|
return {
|
|
45266
45268
|
account: h,
|
|
45267
45269
|
addr: h.addr,
|
|
@@ -45330,9 +45332,9 @@ class mR {
|
|
|
45330
45332
|
throw new Error("Error retrieving LocalNet dispenser account; couldn't find the default account in KMD");
|
|
45331
45333
|
}
|
|
45332
45334
|
}
|
|
45333
|
-
var yR =
|
|
45335
|
+
var yR = Le.LogicSigAccount;
|
|
45334
45336
|
const mr = (n) => typeof n == "string" ? He.fromString(n) : n, wR = _M(function(n) {
|
|
45335
|
-
return "signer" in n ? n.signer : "lsig" in n ?
|
|
45337
|
+
return "signer" in n ? n.signer : "lsig" in n ? Le.makeLogicSigAccountTransactionSigner(n) : Le.makeBasicAccountTransactionSigner(n);
|
|
45336
45338
|
});
|
|
45337
45339
|
class vR {
|
|
45338
45340
|
/**
|
|
@@ -45537,7 +45539,7 @@ class vR {
|
|
|
45537
45539
|
* @returns The account
|
|
45538
45540
|
*/
|
|
45539
45541
|
fromMnemonic(e, t) {
|
|
45540
|
-
const r =
|
|
45542
|
+
const r = Le.mnemonicToSecretKey(e);
|
|
45541
45543
|
return this.signerAccount(new Qp(r, t));
|
|
45542
45544
|
}
|
|
45543
45545
|
/**
|
|
@@ -45587,7 +45589,7 @@ class vR {
|
|
|
45587
45589
|
throw new Error("Attempt to get account with private key from a non Node.js context; this is not supported!");
|
|
45588
45590
|
const r = process.env[`${e.toUpperCase()}_MNEMONIC`], i = process.env[`${e.toUpperCase()}_SENDER`];
|
|
45589
45591
|
if (r) {
|
|
45590
|
-
const o =
|
|
45592
|
+
const o = Le.mnemonicToSecretKey(r);
|
|
45591
45593
|
return this.signerAccount(new Qp(o, i));
|
|
45592
45594
|
}
|
|
45593
45595
|
if (await this._clientManager.isLocalNet()) {
|
|
@@ -45656,7 +45658,7 @@ class vR {
|
|
|
45656
45658
|
* @returns The account
|
|
45657
45659
|
*/
|
|
45658
45660
|
random() {
|
|
45659
|
-
return this.signerAccount(
|
|
45661
|
+
return this.signerAccount(Le.generateAccount());
|
|
45660
45662
|
}
|
|
45661
45663
|
/**
|
|
45662
45664
|
* Returns an account (with private key loaded) that can act as a dispenser from
|
|
@@ -47209,7 +47211,7 @@ function DR(n, e = /* @__PURE__ */ new Set()) {
|
|
|
47209
47211
|
if (!(!b || !t || !r)) {
|
|
47210
47212
|
c("signing"), u(null), h(null);
|
|
47211
47213
|
try {
|
|
47212
|
-
const E = await r.getTransactionParams().do(), S =
|
|
47214
|
+
const E = await r.getTransactionParams().do(), S = Le.makeAssetTransferTxnWithSuggestedParamsFromObject({
|
|
47213
47215
|
sender: t,
|
|
47214
47216
|
receiver: t,
|
|
47215
47217
|
amount: 0,
|
|
@@ -47219,7 +47221,7 @@ function DR(n, e = /* @__PURE__ */ new Set()) {
|
|
|
47219
47221
|
if (!R) throw new Error("Transaction was not signed");
|
|
47220
47222
|
c("sending");
|
|
47221
47223
|
const N = S.txID();
|
|
47222
|
-
await r.sendRawTransaction(R).do(), await
|
|
47224
|
+
await r.sendRawTransaction(R).do(), await Le.waitForConfirmation(r, N, 4), o.invalidateQueries({ queryKey: ["account-info"] }), h(N), c("success");
|
|
47223
47225
|
} catch (E) {
|
|
47224
47226
|
c("error"), u(E instanceof Error ? E.message : "Opt-in failed");
|
|
47225
47227
|
}
|
|
@@ -47253,7 +47255,7 @@ function bw(n, e) {
|
|
|
47253
47255
|
return o;
|
|
47254
47256
|
}
|
|
47255
47257
|
function TR() {
|
|
47256
|
-
const { activeAddress: n, algodClient: e, signTransactions: t } = Dr(), r = js(), [i, o] = it("algo"), [s, a] = it(""), [l, c] = it(""), [d, u] = it("idle"), [m, h] = it(null), [v, A] = it(null), x = fS({ enabled: i === "asa" }), [F, w] = it("idle"), C = s.length > 0 && !
|
|
47258
|
+
const { activeAddress: n, algodClient: e, signTransactions: t } = Dr(), r = js(), [i, o] = it("algo"), [s, a] = it(""), [l, c] = it(""), [d, u] = it("idle"), [m, h] = it(null), [v, A] = it(null), x = fS({ enabled: i === "asa" }), [F, w] = it("idle"), C = s.length > 0 && !Le.isValidAddress(s) ? "Invalid Algorand address" : null, T = x.assetIdInput;
|
|
47257
47259
|
Jt(() => {
|
|
47258
47260
|
if (i !== "asa" || !T || !s || !e) {
|
|
47259
47261
|
w("idle");
|
|
@@ -47261,7 +47263,7 @@ function TR() {
|
|
|
47261
47263
|
}
|
|
47262
47264
|
let p = !1;
|
|
47263
47265
|
try {
|
|
47264
|
-
p =
|
|
47266
|
+
p = Le.isValidAddress(s);
|
|
47265
47267
|
} catch {
|
|
47266
47268
|
}
|
|
47267
47269
|
if (!p) {
|
|
@@ -47297,7 +47299,7 @@ function TR() {
|
|
|
47297
47299
|
let E;
|
|
47298
47300
|
if (i === "algo") {
|
|
47299
47301
|
const N = bw(l, 6);
|
|
47300
|
-
E =
|
|
47302
|
+
E = Le.makePaymentTxnWithSuggestedParamsFromObject({
|
|
47301
47303
|
sender: n,
|
|
47302
47304
|
receiver: s,
|
|
47303
47305
|
amount: N,
|
|
@@ -47306,7 +47308,7 @@ function TR() {
|
|
|
47306
47308
|
} else {
|
|
47307
47309
|
if (!x.assetInfo) throw new Error("No asset selected");
|
|
47308
47310
|
const N = bw(l, x.assetInfo.decimals);
|
|
47309
|
-
E =
|
|
47311
|
+
E = Le.makeAssetTransferTxnWithSuggestedParamsFromObject({
|
|
47310
47312
|
sender: n,
|
|
47311
47313
|
receiver: s,
|
|
47312
47314
|
amount: N,
|
|
@@ -47318,7 +47320,7 @@ function TR() {
|
|
|
47318
47320
|
if (!V) throw new Error("Transaction was not signed");
|
|
47319
47321
|
u("sending");
|
|
47320
47322
|
const R = E.txID();
|
|
47321
|
-
await e.sendRawTransaction(V).do(), await
|
|
47323
|
+
await e.sendRawTransaction(V).do(), await Le.waitForConfirmation(e, R, 4), r.invalidateQueries({ queryKey: ["account-info"] }), A(R), u("success");
|
|
47322
47324
|
} catch (p) {
|
|
47323
47325
|
u("error"), h(p instanceof Error ? p.message : "Send failed");
|
|
47324
47326
|
}
|