@sparkdreamnft/sparkdreamjs 0.0.45 → 0.0.47
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/akash/bundle.d.ts +134 -134
- package/akash/bundle.js +150 -150
- package/amino-schema.d.ts +5741 -0
- package/amino-schema.js +8 -0
- package/chain-amino.d.ts +61 -0
- package/chain-amino.js +670 -0
- package/cosmos/bundle.d.ts +160 -160
- package/cosmos/bundle.js +182 -182
- package/esm/akash/bundle.js +150 -150
- package/esm/amino-schema.js +5 -0
- package/esm/chain-amino.js +665 -0
- package/esm/cosmos/bundle.js +182 -182
- package/esm/ibc/bundle.js +116 -116
- package/esm/nested-amino.js +12 -4
- package/esm/sparkdream/artifact/v1/genesis.js +217 -3
- package/esm/sparkdream/artifact/v1/params.js +146 -2
- package/esm/sparkdream/artifact/v1/query.js +3767 -5
- package/esm/sparkdream/artifact/v1/query.lcd.js +173 -0
- package/esm/sparkdream/artifact/v1/query.rpc.Query.js +195 -1
- package/esm/sparkdream/artifact/v1/tx.amino.js +16 -158
- package/esm/sparkdream/artifact/v1/tx.js +7498 -5
- package/esm/sparkdream/artifact/v1/tx.registry.js +704 -2
- package/esm/sparkdream/artifact/v1/tx.rpc.msg.js +241 -1
- package/esm/sparkdream/artifact/v1/types.js +4312 -1120
- package/esm/sparkdream/blog/v1/tx.amino.js +15 -115
- package/esm/sparkdream/bundle.js +329 -291
- package/esm/sparkdream/client.js +5 -2
- package/esm/sparkdream/collect/v1/tx.amino.js +15 -239
- package/esm/sparkdream/commons/v1/tx.amino.js +12 -226
- package/esm/sparkdream/commons/v1/tx.js +25 -1
- package/esm/sparkdream/ecosystem/v1/tx.amino.js +15 -26
- package/esm/sparkdream/federation/v1/tx.amino.js +16 -128
- package/esm/sparkdream/forum/v1/tx.amino.js +15 -211
- package/esm/sparkdream/futarchy/v1/tx.amino.js +16 -38
- package/esm/sparkdream/guardian/v1/tx.amino.js +17 -8
- package/esm/sparkdream/lcd.js +5 -0
- package/esm/sparkdream/name/v1/tx.amino.js +16 -63
- package/esm/sparkdream/rep/v1/genesis.js +74 -1
- package/esm/sparkdream/rep/v1/member.js +110 -1
- package/esm/sparkdream/rep/v1/migration.js +957 -0
- package/esm/sparkdream/rep/v1/params.js +181 -1
- package/esm/sparkdream/rep/v1/query.js +1060 -0
- package/esm/sparkdream/rep/v1/query.lcd.js +48 -0
- package/esm/sparkdream/rep/v1/query.rpc.Query.js +65 -1
- package/esm/sparkdream/rep/v1/tx.amino.js +12 -414
- package/esm/sparkdream/rep/v1/tx.js +1741 -1
- package/esm/sparkdream/rep/v1/tx.registry.js +200 -2
- package/esm/sparkdream/rep/v1/tx.rpc.msg.js +67 -1
- package/esm/sparkdream/reveal/v1/tx.amino.js +15 -73
- package/esm/sparkdream/rpc.query.js +3 -0
- package/esm/sparkdream/rpc.tx.js +3 -0
- package/esm/sparkdream/season/v1/tx.amino.js +16 -218
- package/esm/sparkdream/service/v1/tx.amino.js +16 -78
- package/esm/sparkdream/session/v1/tx.amino.js +16 -271
- package/esm/sparkdream/session/v1/tx.js +38 -2
- package/esm/sparkdream/shield/v1/tx.amino.js +15 -80
- package/esm/sparkdream/sparkdream/v1/tx.amino.js +16 -8
- package/esm/sparkdream/split/v1/tx.amino.js +16 -8
- package/esm/sparkdream/vault/module/v1/module.js +71 -0
- package/esm/sparkdream/vault/v1/genesis.js +104 -0
- package/esm/sparkdream/vault/v1/params.js +90 -0
- package/esm/sparkdream/vault/v1/query.js +1535 -0
- package/esm/sparkdream/vault/v1/query.lcd.js +100 -0
- package/esm/sparkdream/vault/v1/query.rpc.Query.js +111 -0
- package/esm/sparkdream/vault/v1/tx.amino.js +18 -0
- package/esm/sparkdream/vault/v1/tx.js +1393 -0
- package/esm/sparkdream/vault/v1/tx.registry.js +159 -0
- package/esm/sparkdream/vault/v1/tx.rpc.msg.js +60 -0
- package/esm/sparkdream/vault/v1/vault.js +163 -0
- package/esm/sparkdream/vault/v1/vault_proposal.js +277 -0
- package/esm/sparkdream/vault/v1/vault_signer.js +85 -0
- package/esm/tendermint/bundle.js +20 -20
- package/ibc/bundle.d.ts +99 -99
- package/ibc/bundle.js +116 -116
- package/nested-amino.d.ts +7 -2
- package/nested-amino.js +13 -4
- package/package.json +1 -13
- package/sparkdream/artifact/v1/genesis.d.ts +37 -4
- package/sparkdream/artifact/v1/genesis.js +216 -2
- package/sparkdream/artifact/v1/params.d.ts +92 -0
- package/sparkdream/artifact/v1/params.js +146 -2
- package/sparkdream/artifact/v1/query.d.ts +2373 -168
- package/sparkdream/artifact/v1/query.js +3768 -5
- package/sparkdream/artifact/v1/query.lcd.d.ts +22 -1
- package/sparkdream/artifact/v1/query.lcd.js +173 -0
- package/sparkdream/artifact/v1/query.rpc.Query.d.ts +98 -1
- package/sparkdream/artifact/v1/query.rpc.Query.js +194 -0
- package/sparkdream/artifact/v1/tx.amino.d.ts +1 -158
- package/sparkdream/artifact/v1/tx.amino.js +49 -158
- package/sparkdream/artifact/v1/tx.d.ts +5188 -930
- package/sparkdream/artifact/v1/tx.js +7499 -5
- package/sparkdream/artifact/v1/tx.registry.d.ts +469 -1
- package/sparkdream/artifact/v1/tx.registry.js +703 -1
- package/sparkdream/artifact/v1/tx.rpc.msg.d.ts +136 -1
- package/sparkdream/artifact/v1/tx.rpc.msg.js +240 -0
- package/sparkdream/artifact/v1/types.d.ts +1797 -25
- package/sparkdream/artifact/v1/types.js +4322 -1121
- package/sparkdream/blog/v1/tx.amino.d.ts +1 -83
- package/sparkdream/blog/v1/tx.amino.js +50 -117
- package/sparkdream/bundle.d.ts +12983 -10912
- package/sparkdream/bundle.js +329 -291
- package/sparkdream/client.d.ts +1 -1629
- package/sparkdream/client.js +5 -2
- package/sparkdream/collect/v1/tx.amino.d.ts +1 -138
- package/sparkdream/collect/v1/tx.amino.js +50 -241
- package/sparkdream/commons/v1/tx.amino.d.ts +1 -103
- package/sparkdream/commons/v1/tx.amino.js +49 -230
- package/sparkdream/commons/v1/tx.d.ts +18 -0
- package/sparkdream/commons/v1/tx.js +25 -1
- package/sparkdream/ecosystem/v1/tx.amino.d.ts +1 -13
- package/sparkdream/ecosystem/v1/tx.amino.js +50 -28
- package/sparkdream/federation/v1/tx.amino.d.ts +1 -128
- package/sparkdream/federation/v1/tx.amino.js +49 -128
- package/sparkdream/forum/v1/tx.amino.d.ts +1 -183
- package/sparkdream/forum/v1/tx.amino.js +50 -213
- package/sparkdream/futarchy/v1/tx.amino.d.ts +1 -38
- package/sparkdream/futarchy/v1/tx.amino.js +49 -38
- package/sparkdream/guardian/v1/tx.amino.d.ts +2 -8
- package/sparkdream/guardian/v1/tx.amino.js +52 -9
- package/sparkdream/lcd.d.ts +3 -0
- package/sparkdream/lcd.js +5 -0
- package/sparkdream/name/v1/tx.amino.d.ts +1 -63
- package/sparkdream/name/v1/tx.amino.js +49 -63
- package/sparkdream/rep/v1/genesis.d.ts +19 -0
- package/sparkdream/rep/v1/genesis.js +74 -1
- package/sparkdream/rep/v1/member.d.ts +92 -0
- package/sparkdream/rep/v1/member.js +110 -1
- package/sparkdream/rep/v1/migration.d.ts +587 -0
- package/sparkdream/rep/v1/migration.js +964 -0
- package/sparkdream/rep/v1/params.d.ts +174 -0
- package/sparkdream/rep/v1/params.js +181 -1
- package/sparkdream/rep/v1/query.d.ts +679 -0
- package/sparkdream/rep/v1/query.js +1061 -1
- package/sparkdream/rep/v1/query.lcd.d.ts +8 -1
- package/sparkdream/rep/v1/query.lcd.js +48 -0
- package/sparkdream/rep/v1/query.rpc.Query.d.ts +32 -1
- package/sparkdream/rep/v1/query.rpc.Query.js +64 -0
- package/sparkdream/rep/v1/tx.amino.d.ts +1 -283
- package/sparkdream/rep/v1/tx.amino.js +47 -416
- package/sparkdream/rep/v1/tx.d.ts +1185 -0
- package/sparkdream/rep/v1/tx.js +1742 -2
- package/sparkdream/rep/v1/tx.registry.d.ts +133 -1
- package/sparkdream/rep/v1/tx.registry.js +199 -1
- package/sparkdream/rep/v1/tx.rpc.msg.d.ts +34 -1
- package/sparkdream/rep/v1/tx.rpc.msg.js +66 -0
- package/sparkdream/reveal/v1/tx.amino.d.ts +1 -53
- package/sparkdream/reveal/v1/tx.amino.js +50 -75
- package/sparkdream/rpc.query.d.ts +42 -0
- package/sparkdream/rpc.query.js +3 -0
- package/sparkdream/rpc.tx.d.ts +3 -0
- package/sparkdream/rpc.tx.js +3 -0
- package/sparkdream/season/v1/tx.amino.d.ts +1 -218
- package/sparkdream/season/v1/tx.amino.js +49 -218
- package/sparkdream/service/v1/tx.amino.d.ts +1 -78
- package/sparkdream/service/v1/tx.amino.js +49 -78
- package/sparkdream/session/v1/tx.amino.d.ts +1 -93
- package/sparkdream/session/v1/tx.amino.js +48 -270
- package/sparkdream/session/v1/tx.d.ts +30 -0
- package/sparkdream/session/v1/tx.js +38 -2
- package/sparkdream/shield/v1/tx.amino.d.ts +1 -28
- package/sparkdream/shield/v1/tx.amino.js +50 -82
- package/sparkdream/sparkdream/v1/tx.amino.d.ts +1 -8
- package/sparkdream/sparkdream/v1/tx.amino.js +49 -8
- package/sparkdream/split/v1/tx.amino.d.ts +1 -8
- package/sparkdream/split/v1/tx.amino.js +49 -8
- package/sparkdream/vault/module/v1/module.d.ts +54 -0
- package/sparkdream/vault/module/v1/module.js +74 -0
- package/sparkdream/vault/v1/genesis.d.ts +59 -0
- package/sparkdream/vault/v1/genesis.js +107 -0
- package/sparkdream/vault/v1/params.d.ts +68 -0
- package/sparkdream/vault/v1/params.js +93 -0
- package/sparkdream/vault/v1/query.d.ts +935 -0
- package/sparkdream/vault/v1/query.js +1538 -0
- package/sparkdream/vault/v1/query.lcd.d.ts +18 -0
- package/sparkdream/vault/v1/query.lcd.js +104 -0
- package/sparkdream/vault/v1/query.rpc.Query.d.ts +56 -0
- package/sparkdream/vault/v1/query.rpc.Query.js +116 -0
- package/sparkdream/vault/v1/tx.amino.d.ts +2 -0
- package/sparkdream/vault/v1/tx.amino.js +55 -0
- package/sparkdream/vault/v1/tx.d.ts +826 -0
- package/sparkdream/vault/v1/tx.js +1399 -0
- package/sparkdream/vault/v1/tx.registry.d.ts +109 -0
- package/sparkdream/vault/v1/tx.registry.js +163 -0
- package/sparkdream/vault/v1/tx.rpc.msg.d.ts +37 -0
- package/sparkdream/vault/v1/tx.rpc.msg.js +65 -0
- package/sparkdream/vault/v1/vault.d.ts +117 -0
- package/sparkdream/vault/v1/vault.js +166 -0
- package/sparkdream/vault/v1/vault_proposal.d.ts +158 -0
- package/sparkdream/vault/v1/vault_proposal.js +285 -0
- package/sparkdream/vault/v1/vault_signer.d.ts +54 -0
- package/sparkdream/vault/v1/vault_signer.js +88 -0
- package/tendermint/bundle.d.ts +844 -844
- package/tendermint/bundle.js +20 -20
- package/varint.d.ts +1 -1
|
@@ -1,275 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// session/v1/tx.proto must have an entry here — a message added to the proto
|
|
8
|
-
// but not to this map ships in the registry with no amino converter, and
|
|
9
|
-
// Keplr/Ledger (amino-json) signing of it fails.
|
|
10
|
-
//
|
|
11
|
-
// Three shapes telescope gets wrong for this module:
|
|
12
|
-
//
|
|
13
|
-
// 1. MsgExecSession / OneshotExec carry google.protobuf.Any, which needs the
|
|
14
|
-
// recursive conversion in ../../../nested-amino.
|
|
15
|
-
// 2. MsgCreateGrant.payload and ScheduledOneshotPayload.action are oneofs
|
|
16
|
-
// with (amino.oneof_name). cosmossdk.io/x/tx/signing/aminojson renders a
|
|
17
|
-
// set oneof member as
|
|
18
|
-
//
|
|
19
|
-
// "<CamelCase oneof name>": {"type": "<oneof_name>", "value": {"<field>": {...}}}
|
|
20
|
-
//
|
|
21
|
-
// e.g. "Payload": {"type": "sparkdream/session/RecurringPullPayload",
|
|
22
|
-
// "value": {"recurring_pull": {...}}}
|
|
23
|
-
//
|
|
24
|
-
// while telescope emits the bare member ("recurring_pull": {...}).
|
|
25
|
-
// 3. Repeated fields must be omitted when empty (omitempty), never `[]`.
|
|
26
|
-
//
|
|
27
|
-
// cosmjs rebuilds the TxBody from fromAmino(signed msgs), so each fromAmino
|
|
28
|
-
// below must exactly invert its toAmino.
|
|
29
|
-
//
|
|
30
|
-
// 64-bit ints are coerced here rather than trusting callers to pass BigInt:
|
|
31
|
-
// cosmjs hands toAmino the caller's raw value (no fromPartial), and a Number
|
|
32
|
-
// 0 would otherwise sign a key the chain omits.
|
|
33
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
exports.AminoConverter = void 0;
|
|
35
|
-
const tx_1 = require("./tx");
|
|
36
|
-
const coin_1 = require("../../../cosmos/base/v1beta1/coin");
|
|
37
|
-
const timestamp_1 = require("../../../google/protobuf/timestamp");
|
|
38
|
-
const helpers_1 = require("../../../helpers");
|
|
39
|
-
const nested_amino_1 = require("../../../nested-amino");
|
|
40
|
-
const str = (v) => (v === "" || v === undefined || v === null ? undefined : v);
|
|
41
|
-
const int64 = (v) => {
|
|
42
|
-
if (v === undefined || v === null || v === "")
|
|
43
|
-
return undefined;
|
|
44
|
-
const b = BigInt(v);
|
|
45
|
-
return b === BigInt(0) ? undefined : b.toString();
|
|
46
|
-
};
|
|
47
|
-
const bool = (v) => (v ? true : undefined);
|
|
48
|
-
const list = (v) => ((v?.length ?? 0) > 0 ? v.map((e) => e) : undefined);
|
|
49
|
-
const coin = (v) => (v ? coin_1.Coin.toAmino(coin_1.Coin.fromPartial(v)) : undefined);
|
|
50
|
-
const time = (v) => (v ? timestamp_1.Timestamp.toAmino((0, helpers_1.toTimestamp)(v)) : undefined);
|
|
51
|
-
const toBig = (v) => (v === undefined || v === null ? BigInt(0) : BigInt(v));
|
|
52
|
-
const fromCoin = (v) => (v ? coin_1.Coin.fromAmino(v) : undefined);
|
|
53
|
-
const fromTime = (v) => (v ? (0, helpers_1.fromTimestamp)(timestamp_1.Timestamp.fromAmino(v)) : undefined);
|
|
54
|
-
// ── Payloads ────────────────────────────────────────────────────────────
|
|
55
|
-
const sessionKeyToAmino = (p) => ({
|
|
56
|
-
allowed_msg_types: list(p.allowedMsgTypes),
|
|
57
|
-
spend_limit: coin(p.spendLimit),
|
|
58
|
-
spent: coin(p.spent),
|
|
59
|
-
max_exec_count: int64(p.maxExecCount),
|
|
60
|
-
exec_count: int64(p.execCount),
|
|
61
|
-
last_used_at: time(p.lastUsedAt),
|
|
62
|
-
allow_self_revoke: bool(p.allowSelfRevoke),
|
|
63
|
-
});
|
|
64
|
-
const sessionKeyFromAmino = (o) => ({
|
|
65
|
-
allowedMsgTypes: o.allowed_msg_types ?? [],
|
|
66
|
-
spendLimit: fromCoin(o.spend_limit),
|
|
67
|
-
spent: fromCoin(o.spent),
|
|
68
|
-
maxExecCount: toBig(o.max_exec_count),
|
|
69
|
-
execCount: toBig(o.exec_count),
|
|
70
|
-
lastUsedAt: fromTime(o.last_used_at),
|
|
71
|
-
allowSelfRevoke: o.allow_self_revoke ?? false,
|
|
72
|
-
});
|
|
73
|
-
const recurringPullToAmino = (p) => ({
|
|
74
|
-
amount_per_period: coin(p.amountPerPeriod),
|
|
75
|
-
period_seconds: int64(p.periodSeconds),
|
|
76
|
-
start_time: int64(p.startTime),
|
|
77
|
-
last_claim_advance: int64(p.lastClaimAdvance),
|
|
78
|
-
claims_made: int64(p.claimsMade),
|
|
79
|
-
max_per_epoch: str(p.maxPerEpoch),
|
|
80
|
-
});
|
|
81
|
-
const recurringPullFromAmino = (o) => ({
|
|
82
|
-
amountPerPeriod: fromCoin(o.amount_per_period),
|
|
83
|
-
periodSeconds: toBig(o.period_seconds),
|
|
84
|
-
startTime: toBig(o.start_time),
|
|
85
|
-
lastClaimAdvance: toBig(o.last_claim_advance),
|
|
86
|
-
claimsMade: toBig(o.claims_made),
|
|
87
|
-
maxPerEpoch: o.max_per_epoch ?? "",
|
|
88
|
-
});
|
|
89
|
-
const spendingAllowanceToAmino = (p) => ({
|
|
90
|
-
max_per_period: coin(p.maxPerPeriod),
|
|
91
|
-
period_seconds: int64(p.periodSeconds),
|
|
92
|
-
current_period_start: int64(p.currentPeriodStart),
|
|
93
|
-
spent_in_current_period: coin(p.spentInCurrentPeriod),
|
|
94
|
-
allowed_recipients: list(p.allowedRecipients),
|
|
95
|
-
denom: str(p.denom),
|
|
96
|
-
});
|
|
97
|
-
const spendingAllowanceFromAmino = (o) => ({
|
|
98
|
-
maxPerPeriod: fromCoin(o.max_per_period),
|
|
99
|
-
periodSeconds: toBig(o.period_seconds),
|
|
100
|
-
currentPeriodStart: toBig(o.current_period_start),
|
|
101
|
-
spentInCurrentPeriod: fromCoin(o.spent_in_current_period),
|
|
102
|
-
allowedRecipients: o.allowed_recipients ?? [],
|
|
103
|
-
denom: o.denom ?? "",
|
|
104
|
-
});
|
|
105
|
-
const scheduledOneshotToAmino = (p) => {
|
|
106
|
-
let action = undefined;
|
|
107
|
-
if (p.transfer) {
|
|
108
|
-
action = {
|
|
109
|
-
type: "sparkdream/session/OneshotTransfer",
|
|
110
|
-
value: { transfer: { recipient: str(p.transfer.recipient), amount: coin(p.transfer.amount) } },
|
|
111
|
-
};
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
112
7
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
122
24
|
};
|
|
123
|
-
|
|
124
|
-
return {
|
|
125
|
-
// aminojson writes `null` for an unset oneof rather than omitting it.
|
|
126
|
-
Action: action ?? null,
|
|
127
|
-
fire_at: int64(p.fireAt),
|
|
128
|
-
fire_error: str(p.fireError),
|
|
25
|
+
return ownKeys(o);
|
|
129
26
|
};
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
: undefined,
|
|
137
|
-
exec: v.exec
|
|
138
|
-
? { msg: v.exec.msg ? (0, nested_amino_1.aminoToAny)(v.exec.msg) : undefined, gasLimit: toBig(v.exec.gas_limit) }
|
|
139
|
-
: undefined,
|
|
140
|
-
fireAt: toBig(o.fire_at),
|
|
141
|
-
fireError: o.fire_error ?? "",
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
142
33
|
};
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
//
|
|
154
|
-
//
|
|
155
|
-
// the
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
toAmino: tx_1.MsgUpdateParams.toAmino,
|
|
164
|
-
fromAmino: tx_1.MsgUpdateParams.fromAmino,
|
|
165
|
-
},
|
|
166
|
-
"/sparkdream.session.v1.MsgUpdateOperationalParams": {
|
|
167
|
-
aminoType: "sparkdream/x/session/MsgUpdateOperationalParams",
|
|
168
|
-
toAmino: tx_1.MsgUpdateOperationalParams.toAmino,
|
|
169
|
-
fromAmino: tx_1.MsgUpdateOperationalParams.fromAmino,
|
|
170
|
-
},
|
|
171
|
-
// `allowed_msg_types` is the repeated string field that gets emitted as `[]`
|
|
172
|
-
// when a session is created with no type allowlist (i.e. allow-all).
|
|
173
|
-
"/sparkdream.session.v1.MsgCreateSession": {
|
|
174
|
-
aminoType: "sparkdream/x/session/MsgCreateSession",
|
|
175
|
-
toAmino(message) {
|
|
176
|
-
const obj = {};
|
|
177
|
-
obj.granter = message.granter === "" ? undefined : message.granter;
|
|
178
|
-
obj.grantee = message.grantee === "" ? undefined : message.grantee;
|
|
179
|
-
obj.allowed_msg_types = (message.allowedMsgTypes?.length ?? 0) > 0
|
|
180
|
-
? message.allowedMsgTypes.map((e) => e)
|
|
181
|
-
: undefined;
|
|
182
|
-
obj.spend_limit = message.spendLimit ? coin_1.Coin.toAmino(message.spendLimit) : undefined;
|
|
183
|
-
obj.expiration = message.expiration ? timestamp_1.Timestamp.toAmino((0, helpers_1.toTimestamp)(message.expiration)) : undefined;
|
|
184
|
-
obj.max_exec_count = message.maxExecCount !== BigInt(0) ? message.maxExecCount?.toString() : undefined;
|
|
185
|
-
return obj;
|
|
186
|
-
},
|
|
187
|
-
fromAmino: tx_1.MsgCreateSession.fromAmino,
|
|
188
|
-
},
|
|
189
|
-
"/sparkdream.session.v1.MsgRevokeSession": {
|
|
190
|
-
aminoType: "sparkdream/x/session/MsgRevokeSession",
|
|
191
|
-
toAmino: tx_1.MsgRevokeSession.toAmino,
|
|
192
|
-
fromAmino: tx_1.MsgRevokeSession.fromAmino,
|
|
193
|
-
},
|
|
194
|
-
"/sparkdream.session.v1.MsgExecSession": {
|
|
195
|
-
aminoType: "sparkdream/x/session/MsgExecSession",
|
|
196
|
-
toAmino(message) {
|
|
197
|
-
const obj = {};
|
|
198
|
-
obj.grantee = message.grantee === "" ? undefined : message.grantee;
|
|
199
|
-
obj.granter = message.granter === "" ? undefined : message.granter;
|
|
200
|
-
// Omit when empty to match the chain's aminojson default for
|
|
201
|
-
// repeated fields.
|
|
202
|
-
obj.msgs = (message.msgs?.length ?? 0) > 0
|
|
203
|
-
? message.msgs.map((a) => (0, nested_amino_1.anyToAmino)(a))
|
|
204
|
-
: undefined;
|
|
205
|
-
return obj;
|
|
206
|
-
},
|
|
207
|
-
fromAmino(object) {
|
|
208
|
-
return {
|
|
209
|
-
grantee: object.grantee ?? "",
|
|
210
|
-
granter: object.granter ?? "",
|
|
211
|
-
msgs: (object.msgs ?? []).map((e) => (0, nested_amino_1.aminoToAny)(e)),
|
|
212
|
-
};
|
|
213
|
-
},
|
|
214
|
-
},
|
|
215
|
-
"/sparkdream.session.v1.MsgCreateGrant": {
|
|
216
|
-
aminoType: "sparkdream/x/session/MsgCreateGrant",
|
|
217
|
-
toAmino(message) {
|
|
218
|
-
const set = PAYLOADS.find(([key]) => message[key]);
|
|
219
|
-
return {
|
|
220
|
-
granter: str(message.granter),
|
|
221
|
-
grantee: str(message.grantee),
|
|
222
|
-
expires_at: time(message.expiresAt),
|
|
223
|
-
note: str(message.note),
|
|
224
|
-
Payload: set
|
|
225
|
-
? { type: set[2], value: { [set[1]]: set[3](message[set[0]]) } }
|
|
226
|
-
: null,
|
|
227
|
-
};
|
|
228
|
-
},
|
|
229
|
-
fromAmino(object) {
|
|
230
|
-
const out = {
|
|
231
|
-
granter: object.granter ?? "",
|
|
232
|
-
grantee: object.grantee ?? "",
|
|
233
|
-
expiresAt: fromTime(object.expires_at),
|
|
234
|
-
note: object.note ?? "",
|
|
235
|
-
};
|
|
236
|
-
const inner = object.Payload?.value ?? {};
|
|
237
|
-
for (const [key, field, , , fromAmino] of PAYLOADS) {
|
|
238
|
-
if (inner[field])
|
|
239
|
-
out[key] = fromAmino(inner[field]);
|
|
240
|
-
}
|
|
241
|
-
return out;
|
|
242
|
-
},
|
|
243
|
-
},
|
|
244
|
-
"/sparkdream.session.v1.MsgClaimRecurringPull": {
|
|
245
|
-
aminoType: "sparkdream/x/session/MsgClaimRecurringPull",
|
|
246
|
-
...grantIdMsg("grantee"),
|
|
247
|
-
},
|
|
248
|
-
"/sparkdream.session.v1.MsgPullAllowance": {
|
|
249
|
-
aminoType: "sparkdream/x/session/MsgPullAllowance",
|
|
250
|
-
toAmino: (m) => ({
|
|
251
|
-
grantee: str(m.grantee),
|
|
252
|
-
grant_id: int64(m.grantId),
|
|
253
|
-
recipient: str(m.recipient),
|
|
254
|
-
amount: coin(m.amount),
|
|
255
|
-
}),
|
|
256
|
-
fromAmino: (o) => ({
|
|
257
|
-
grantee: o.grantee ?? "",
|
|
258
|
-
grantId: toBig(o.grant_id),
|
|
259
|
-
recipient: o.recipient ?? "",
|
|
260
|
-
amount: fromCoin(o.amount),
|
|
261
|
-
}),
|
|
262
|
-
},
|
|
263
|
-
"/sparkdream.session.v1.MsgRetryScheduledOneshot": {
|
|
264
|
-
aminoType: "sparkdream/x/session/MsgRetryScheduledOneshot",
|
|
265
|
-
...grantIdMsg("caller"),
|
|
266
|
-
},
|
|
267
|
-
"/sparkdream.session.v1.MsgRevokeGrant": {
|
|
268
|
-
aminoType: "sparkdream/x/session/MsgRevokeGrant",
|
|
269
|
-
...grantIdMsg("granter"),
|
|
270
|
-
},
|
|
271
|
-
"/sparkdream.session.v1.MsgDeclineGrant": {
|
|
272
|
-
aminoType: "sparkdream/x/session/MsgDeclineGrant",
|
|
273
|
-
...grantIdMsg("grantee"),
|
|
274
|
-
},
|
|
275
|
-
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.AminoConverter = void 0;
|
|
37
|
+
//@ts-nocheck
|
|
38
|
+
// HAND-WRITTEN OVERRIDE — overlaid on top of the Telescope-generated tx.amino.ts
|
|
39
|
+
// by scripts/codegen.ts after each codegen run. Do not let codegen wipe this.
|
|
40
|
+
//
|
|
41
|
+
// Why: Telescope's generated converters (and the per-message overrides that
|
|
42
|
+
// used to patch them) disagree with the chain's aminojson on empty lists,
|
|
43
|
+
// empty bytes, Dec strings, oneofs and non-nullable messages, and went stale
|
|
44
|
+
// whenever a proto changed. Every Msg of x/session is converted by the
|
|
45
|
+
// schema-driven engine in chain-amino.ts instead, which renders amino JSON
|
|
46
|
+
// from the protobuf bytes exactly as the chain does.
|
|
47
|
+
//
|
|
48
|
+
// MAINTENANCE: none per message. The schema (amino-schema.ts, regenerated from
|
|
49
|
+
// the chain on every proto sync) lists every Msg; __tests__/amino-golden.test.ts
|
|
50
|
+
// checks them all against the chain's encoder.
|
|
51
|
+
const tx = __importStar(require("./tx"));
|
|
52
|
+
const chain_amino_1 = require("../../../chain-amino");
|
|
53
|
+
exports.AminoConverter = (0, chain_amino_1.chainAminoConverters)("sparkdream.session.v1", tx);
|
|
@@ -426,6 +426,16 @@ export interface MsgClaimRecurringPullResponse {
|
|
|
426
426
|
* Unix timestamp at which the next claim becomes eligible.
|
|
427
427
|
*/
|
|
428
428
|
nextClaimTime: bigint;
|
|
429
|
+
/**
|
|
430
|
+
* true when the granter could not cover the period: nothing moved and the
|
|
431
|
+
* grant is now PAUSED_INSUFFICIENT_FUNDS (a later claim resumes it).
|
|
432
|
+
*/
|
|
433
|
+
paused: boolean;
|
|
434
|
+
/**
|
|
435
|
+
* true when the grant's window had closed: nothing moved and the grant
|
|
436
|
+
* is now COMPLETED.
|
|
437
|
+
*/
|
|
438
|
+
completed: boolean;
|
|
429
439
|
}
|
|
430
440
|
export interface MsgClaimRecurringPullResponseProtoMsg {
|
|
431
441
|
typeUrl: "/sparkdream.session.v1.MsgClaimRecurringPullResponse";
|
|
@@ -445,6 +455,16 @@ export interface MsgClaimRecurringPullResponseAmino {
|
|
|
445
455
|
* Unix timestamp at which the next claim becomes eligible.
|
|
446
456
|
*/
|
|
447
457
|
next_claim_time?: string;
|
|
458
|
+
/**
|
|
459
|
+
* true when the granter could not cover the period: nothing moved and the
|
|
460
|
+
* grant is now PAUSED_INSUFFICIENT_FUNDS (a later claim resumes it).
|
|
461
|
+
*/
|
|
462
|
+
paused?: boolean;
|
|
463
|
+
/**
|
|
464
|
+
* true when the grant's window had closed: nothing moved and the grant
|
|
465
|
+
* is now COMPLETED.
|
|
466
|
+
*/
|
|
467
|
+
completed?: boolean;
|
|
448
468
|
}
|
|
449
469
|
export interface MsgClaimRecurringPullResponseAminoMsg {
|
|
450
470
|
type: "/sparkdream.session.v1.MsgClaimRecurringPullResponse";
|
|
@@ -500,6 +520,11 @@ export interface MsgPullAllowanceResponse {
|
|
|
500
520
|
* Total spent in the current rolling-window period after this pull.
|
|
501
521
|
*/
|
|
502
522
|
spentInPeriod: Coin;
|
|
523
|
+
/**
|
|
524
|
+
* true when the granter could not cover the pull: nothing moved and the
|
|
525
|
+
* grant is now PAUSED_INSUFFICIENT_FUNDS (a later pull resumes it).
|
|
526
|
+
*/
|
|
527
|
+
paused: boolean;
|
|
503
528
|
}
|
|
504
529
|
export interface MsgPullAllowanceResponseProtoMsg {
|
|
505
530
|
typeUrl: "/sparkdream.session.v1.MsgPullAllowanceResponse";
|
|
@@ -521,6 +546,11 @@ export interface MsgPullAllowanceResponseAmino {
|
|
|
521
546
|
* Total spent in the current rolling-window period after this pull.
|
|
522
547
|
*/
|
|
523
548
|
spent_in_period?: CoinAmino;
|
|
549
|
+
/**
|
|
550
|
+
* true when the granter could not cover the pull: nothing moved and the
|
|
551
|
+
* grant is now PAUSED_INSUFFICIENT_FUNDS (a later pull resumes it).
|
|
552
|
+
*/
|
|
553
|
+
paused?: boolean;
|
|
524
554
|
}
|
|
525
555
|
export interface MsgPullAllowanceResponseAminoMsg {
|
|
526
556
|
type: "/sparkdream.session.v1.MsgPullAllowanceResponse";
|
|
@@ -1125,7 +1125,9 @@ exports.MsgClaimRecurringPull = {
|
|
|
1125
1125
|
function createBaseMsgClaimRecurringPullResponse() {
|
|
1126
1126
|
return {
|
|
1127
1127
|
claimNumber: BigInt(0),
|
|
1128
|
-
nextClaimTime: BigInt(0)
|
|
1128
|
+
nextClaimTime: BigInt(0),
|
|
1129
|
+
paused: false,
|
|
1130
|
+
completed: false
|
|
1129
1131
|
};
|
|
1130
1132
|
}
|
|
1131
1133
|
/**
|
|
@@ -1142,6 +1144,12 @@ exports.MsgClaimRecurringPullResponse = {
|
|
|
1142
1144
|
if (message.nextClaimTime !== BigInt(0)) {
|
|
1143
1145
|
writer.uint32(16).int64(message.nextClaimTime);
|
|
1144
1146
|
}
|
|
1147
|
+
if (message.paused === true) {
|
|
1148
|
+
writer.uint32(24).bool(message.paused);
|
|
1149
|
+
}
|
|
1150
|
+
if (message.completed === true) {
|
|
1151
|
+
writer.uint32(32).bool(message.completed);
|
|
1152
|
+
}
|
|
1145
1153
|
return writer;
|
|
1146
1154
|
},
|
|
1147
1155
|
decode(input, length) {
|
|
@@ -1157,6 +1165,12 @@ exports.MsgClaimRecurringPullResponse = {
|
|
|
1157
1165
|
case 2:
|
|
1158
1166
|
message.nextClaimTime = reader.int64();
|
|
1159
1167
|
break;
|
|
1168
|
+
case 3:
|
|
1169
|
+
message.paused = reader.bool();
|
|
1170
|
+
break;
|
|
1171
|
+
case 4:
|
|
1172
|
+
message.completed = reader.bool();
|
|
1173
|
+
break;
|
|
1160
1174
|
default:
|
|
1161
1175
|
reader.skipType(tag & 7);
|
|
1162
1176
|
break;
|
|
@@ -1168,6 +1182,8 @@ exports.MsgClaimRecurringPullResponse = {
|
|
|
1168
1182
|
const message = createBaseMsgClaimRecurringPullResponse();
|
|
1169
1183
|
message.claimNumber = object.claimNumber !== undefined && object.claimNumber !== null ? BigInt(object.claimNumber.toString()) : BigInt(0);
|
|
1170
1184
|
message.nextClaimTime = object.nextClaimTime !== undefined && object.nextClaimTime !== null ? BigInt(object.nextClaimTime.toString()) : BigInt(0);
|
|
1185
|
+
message.paused = object.paused ?? false;
|
|
1186
|
+
message.completed = object.completed ?? false;
|
|
1171
1187
|
return message;
|
|
1172
1188
|
},
|
|
1173
1189
|
fromAmino(object) {
|
|
@@ -1178,12 +1194,20 @@ exports.MsgClaimRecurringPullResponse = {
|
|
|
1178
1194
|
if (object.next_claim_time !== undefined && object.next_claim_time !== null) {
|
|
1179
1195
|
message.nextClaimTime = BigInt(object.next_claim_time);
|
|
1180
1196
|
}
|
|
1197
|
+
if (object.paused !== undefined && object.paused !== null) {
|
|
1198
|
+
message.paused = object.paused;
|
|
1199
|
+
}
|
|
1200
|
+
if (object.completed !== undefined && object.completed !== null) {
|
|
1201
|
+
message.completed = object.completed;
|
|
1202
|
+
}
|
|
1181
1203
|
return message;
|
|
1182
1204
|
},
|
|
1183
1205
|
toAmino(message) {
|
|
1184
1206
|
const obj = {};
|
|
1185
1207
|
obj.claim_number = message.claimNumber !== BigInt(0) ? message.claimNumber?.toString() : undefined;
|
|
1186
1208
|
obj.next_claim_time = message.nextClaimTime !== BigInt(0) ? message.nextClaimTime?.toString() : undefined;
|
|
1209
|
+
obj.paused = message.paused === false ? undefined : message.paused;
|
|
1210
|
+
obj.completed = message.completed === false ? undefined : message.completed;
|
|
1187
1211
|
return obj;
|
|
1188
1212
|
},
|
|
1189
1213
|
fromAminoMsg(object) {
|
|
@@ -1318,7 +1342,8 @@ exports.MsgPullAllowance = {
|
|
|
1318
1342
|
function createBaseMsgPullAllowanceResponse() {
|
|
1319
1343
|
return {
|
|
1320
1344
|
transferred: coin_1.Coin.fromPartial({}),
|
|
1321
|
-
spentInPeriod: coin_1.Coin.fromPartial({})
|
|
1345
|
+
spentInPeriod: coin_1.Coin.fromPartial({}),
|
|
1346
|
+
paused: false
|
|
1322
1347
|
};
|
|
1323
1348
|
}
|
|
1324
1349
|
/**
|
|
@@ -1335,6 +1360,9 @@ exports.MsgPullAllowanceResponse = {
|
|
|
1335
1360
|
if (message.spentInPeriod !== undefined) {
|
|
1336
1361
|
coin_1.Coin.encode(message.spentInPeriod, writer.uint32(18).fork()).ldelim();
|
|
1337
1362
|
}
|
|
1363
|
+
if (message.paused === true) {
|
|
1364
|
+
writer.uint32(24).bool(message.paused);
|
|
1365
|
+
}
|
|
1338
1366
|
return writer;
|
|
1339
1367
|
},
|
|
1340
1368
|
decode(input, length) {
|
|
@@ -1350,6 +1378,9 @@ exports.MsgPullAllowanceResponse = {
|
|
|
1350
1378
|
case 2:
|
|
1351
1379
|
message.spentInPeriod = coin_1.Coin.decode(reader, reader.uint32());
|
|
1352
1380
|
break;
|
|
1381
|
+
case 3:
|
|
1382
|
+
message.paused = reader.bool();
|
|
1383
|
+
break;
|
|
1353
1384
|
default:
|
|
1354
1385
|
reader.skipType(tag & 7);
|
|
1355
1386
|
break;
|
|
@@ -1361,6 +1392,7 @@ exports.MsgPullAllowanceResponse = {
|
|
|
1361
1392
|
const message = createBaseMsgPullAllowanceResponse();
|
|
1362
1393
|
message.transferred = object.transferred !== undefined && object.transferred !== null ? coin_1.Coin.fromPartial(object.transferred) : undefined;
|
|
1363
1394
|
message.spentInPeriod = object.spentInPeriod !== undefined && object.spentInPeriod !== null ? coin_1.Coin.fromPartial(object.spentInPeriod) : undefined;
|
|
1395
|
+
message.paused = object.paused ?? false;
|
|
1364
1396
|
return message;
|
|
1365
1397
|
},
|
|
1366
1398
|
fromAmino(object) {
|
|
@@ -1371,12 +1403,16 @@ exports.MsgPullAllowanceResponse = {
|
|
|
1371
1403
|
if (object.spent_in_period !== undefined && object.spent_in_period !== null) {
|
|
1372
1404
|
message.spentInPeriod = coin_1.Coin.fromAmino(object.spent_in_period);
|
|
1373
1405
|
}
|
|
1406
|
+
if (object.paused !== undefined && object.paused !== null) {
|
|
1407
|
+
message.paused = object.paused;
|
|
1408
|
+
}
|
|
1374
1409
|
return message;
|
|
1375
1410
|
},
|
|
1376
1411
|
toAmino(message) {
|
|
1377
1412
|
const obj = {};
|
|
1378
1413
|
obj.transferred = message.transferred ? coin_1.Coin.toAmino(message.transferred) : undefined;
|
|
1379
1414
|
obj.spent_in_period = message.spentInPeriod ? coin_1.Coin.toAmino(message.spentInPeriod) : undefined;
|
|
1415
|
+
obj.paused = message.paused === false ? undefined : message.paused;
|
|
1380
1416
|
return obj;
|
|
1381
1417
|
},
|
|
1382
1418
|
fromAminoMsg(object) {
|
|
@@ -1,28 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const AminoConverter: {
|
|
3
|
-
"/sparkdream.shield.v1.MsgUpdateParams": {
|
|
4
|
-
aminoType: string;
|
|
5
|
-
toAmino: (message: MsgUpdateParams) => import("./tx").MsgUpdateParamsAmino;
|
|
6
|
-
fromAmino: (object: import("./tx").MsgUpdateParamsAmino) => MsgUpdateParams;
|
|
7
|
-
};
|
|
8
|
-
"/sparkdream.shield.v1.MsgShieldedExec": {
|
|
9
|
-
aminoType: string;
|
|
10
|
-
toAmino(message: any): any;
|
|
11
|
-
fromAmino(object: any): any;
|
|
12
|
-
};
|
|
13
|
-
"/sparkdream.shield.v1.MsgTriggerDkg": {
|
|
14
|
-
aminoType: string;
|
|
15
|
-
toAmino: (message: MsgTriggerDkg) => import("./tx").MsgTriggerDkgAmino;
|
|
16
|
-
fromAmino: (object: import("./tx").MsgTriggerDkgAmino) => MsgTriggerDkg;
|
|
17
|
-
};
|
|
18
|
-
"/sparkdream.shield.v1.MsgRegisterShieldedOp": {
|
|
19
|
-
aminoType: string;
|
|
20
|
-
toAmino: (message: MsgRegisterShieldedOp) => import("./tx").MsgRegisterShieldedOpAmino;
|
|
21
|
-
fromAmino: (object: import("./tx").MsgRegisterShieldedOpAmino) => MsgRegisterShieldedOp;
|
|
22
|
-
};
|
|
23
|
-
"/sparkdream.shield.v1.MsgDeregisterShieldedOp": {
|
|
24
|
-
aminoType: string;
|
|
25
|
-
toAmino: (message: MsgDeregisterShieldedOp) => import("./tx").MsgDeregisterShieldedOpAmino;
|
|
26
|
-
fromAmino: (object: import("./tx").MsgDeregisterShieldedOpAmino) => MsgDeregisterShieldedOp;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
1
|
+
export declare const AminoConverter: Record<string, import("../../../chain-amino").ChainAminoConverter>;
|