@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.
Files changed (194) hide show
  1. package/akash/bundle.d.ts +134 -134
  2. package/akash/bundle.js +150 -150
  3. package/amino-schema.d.ts +5741 -0
  4. package/amino-schema.js +8 -0
  5. package/chain-amino.d.ts +61 -0
  6. package/chain-amino.js +670 -0
  7. package/cosmos/bundle.d.ts +160 -160
  8. package/cosmos/bundle.js +182 -182
  9. package/esm/akash/bundle.js +150 -150
  10. package/esm/amino-schema.js +5 -0
  11. package/esm/chain-amino.js +665 -0
  12. package/esm/cosmos/bundle.js +182 -182
  13. package/esm/ibc/bundle.js +116 -116
  14. package/esm/nested-amino.js +12 -4
  15. package/esm/sparkdream/artifact/v1/genesis.js +217 -3
  16. package/esm/sparkdream/artifact/v1/params.js +146 -2
  17. package/esm/sparkdream/artifact/v1/query.js +3767 -5
  18. package/esm/sparkdream/artifact/v1/query.lcd.js +173 -0
  19. package/esm/sparkdream/artifact/v1/query.rpc.Query.js +195 -1
  20. package/esm/sparkdream/artifact/v1/tx.amino.js +16 -158
  21. package/esm/sparkdream/artifact/v1/tx.js +7498 -5
  22. package/esm/sparkdream/artifact/v1/tx.registry.js +704 -2
  23. package/esm/sparkdream/artifact/v1/tx.rpc.msg.js +241 -1
  24. package/esm/sparkdream/artifact/v1/types.js +4312 -1120
  25. package/esm/sparkdream/blog/v1/tx.amino.js +15 -115
  26. package/esm/sparkdream/bundle.js +329 -291
  27. package/esm/sparkdream/client.js +5 -2
  28. package/esm/sparkdream/collect/v1/tx.amino.js +15 -239
  29. package/esm/sparkdream/commons/v1/tx.amino.js +12 -226
  30. package/esm/sparkdream/commons/v1/tx.js +25 -1
  31. package/esm/sparkdream/ecosystem/v1/tx.amino.js +15 -26
  32. package/esm/sparkdream/federation/v1/tx.amino.js +16 -128
  33. package/esm/sparkdream/forum/v1/tx.amino.js +15 -211
  34. package/esm/sparkdream/futarchy/v1/tx.amino.js +16 -38
  35. package/esm/sparkdream/guardian/v1/tx.amino.js +17 -8
  36. package/esm/sparkdream/lcd.js +5 -0
  37. package/esm/sparkdream/name/v1/tx.amino.js +16 -63
  38. package/esm/sparkdream/rep/v1/genesis.js +74 -1
  39. package/esm/sparkdream/rep/v1/member.js +110 -1
  40. package/esm/sparkdream/rep/v1/migration.js +957 -0
  41. package/esm/sparkdream/rep/v1/params.js +181 -1
  42. package/esm/sparkdream/rep/v1/query.js +1060 -0
  43. package/esm/sparkdream/rep/v1/query.lcd.js +48 -0
  44. package/esm/sparkdream/rep/v1/query.rpc.Query.js +65 -1
  45. package/esm/sparkdream/rep/v1/tx.amino.js +12 -414
  46. package/esm/sparkdream/rep/v1/tx.js +1741 -1
  47. package/esm/sparkdream/rep/v1/tx.registry.js +200 -2
  48. package/esm/sparkdream/rep/v1/tx.rpc.msg.js +67 -1
  49. package/esm/sparkdream/reveal/v1/tx.amino.js +15 -73
  50. package/esm/sparkdream/rpc.query.js +3 -0
  51. package/esm/sparkdream/rpc.tx.js +3 -0
  52. package/esm/sparkdream/season/v1/tx.amino.js +16 -218
  53. package/esm/sparkdream/service/v1/tx.amino.js +16 -78
  54. package/esm/sparkdream/session/v1/tx.amino.js +16 -271
  55. package/esm/sparkdream/session/v1/tx.js +38 -2
  56. package/esm/sparkdream/shield/v1/tx.amino.js +15 -80
  57. package/esm/sparkdream/sparkdream/v1/tx.amino.js +16 -8
  58. package/esm/sparkdream/split/v1/tx.amino.js +16 -8
  59. package/esm/sparkdream/vault/module/v1/module.js +71 -0
  60. package/esm/sparkdream/vault/v1/genesis.js +104 -0
  61. package/esm/sparkdream/vault/v1/params.js +90 -0
  62. package/esm/sparkdream/vault/v1/query.js +1535 -0
  63. package/esm/sparkdream/vault/v1/query.lcd.js +100 -0
  64. package/esm/sparkdream/vault/v1/query.rpc.Query.js +111 -0
  65. package/esm/sparkdream/vault/v1/tx.amino.js +18 -0
  66. package/esm/sparkdream/vault/v1/tx.js +1393 -0
  67. package/esm/sparkdream/vault/v1/tx.registry.js +159 -0
  68. package/esm/sparkdream/vault/v1/tx.rpc.msg.js +60 -0
  69. package/esm/sparkdream/vault/v1/vault.js +163 -0
  70. package/esm/sparkdream/vault/v1/vault_proposal.js +277 -0
  71. package/esm/sparkdream/vault/v1/vault_signer.js +85 -0
  72. package/esm/tendermint/bundle.js +20 -20
  73. package/ibc/bundle.d.ts +99 -99
  74. package/ibc/bundle.js +116 -116
  75. package/nested-amino.d.ts +7 -2
  76. package/nested-amino.js +13 -4
  77. package/package.json +1 -13
  78. package/sparkdream/artifact/v1/genesis.d.ts +37 -4
  79. package/sparkdream/artifact/v1/genesis.js +216 -2
  80. package/sparkdream/artifact/v1/params.d.ts +92 -0
  81. package/sparkdream/artifact/v1/params.js +146 -2
  82. package/sparkdream/artifact/v1/query.d.ts +2373 -168
  83. package/sparkdream/artifact/v1/query.js +3768 -5
  84. package/sparkdream/artifact/v1/query.lcd.d.ts +22 -1
  85. package/sparkdream/artifact/v1/query.lcd.js +173 -0
  86. package/sparkdream/artifact/v1/query.rpc.Query.d.ts +98 -1
  87. package/sparkdream/artifact/v1/query.rpc.Query.js +194 -0
  88. package/sparkdream/artifact/v1/tx.amino.d.ts +1 -158
  89. package/sparkdream/artifact/v1/tx.amino.js +49 -158
  90. package/sparkdream/artifact/v1/tx.d.ts +5188 -930
  91. package/sparkdream/artifact/v1/tx.js +7499 -5
  92. package/sparkdream/artifact/v1/tx.registry.d.ts +469 -1
  93. package/sparkdream/artifact/v1/tx.registry.js +703 -1
  94. package/sparkdream/artifact/v1/tx.rpc.msg.d.ts +136 -1
  95. package/sparkdream/artifact/v1/tx.rpc.msg.js +240 -0
  96. package/sparkdream/artifact/v1/types.d.ts +1797 -25
  97. package/sparkdream/artifact/v1/types.js +4322 -1121
  98. package/sparkdream/blog/v1/tx.amino.d.ts +1 -83
  99. package/sparkdream/blog/v1/tx.amino.js +50 -117
  100. package/sparkdream/bundle.d.ts +12983 -10912
  101. package/sparkdream/bundle.js +329 -291
  102. package/sparkdream/client.d.ts +1 -1629
  103. package/sparkdream/client.js +5 -2
  104. package/sparkdream/collect/v1/tx.amino.d.ts +1 -138
  105. package/sparkdream/collect/v1/tx.amino.js +50 -241
  106. package/sparkdream/commons/v1/tx.amino.d.ts +1 -103
  107. package/sparkdream/commons/v1/tx.amino.js +49 -230
  108. package/sparkdream/commons/v1/tx.d.ts +18 -0
  109. package/sparkdream/commons/v1/tx.js +25 -1
  110. package/sparkdream/ecosystem/v1/tx.amino.d.ts +1 -13
  111. package/sparkdream/ecosystem/v1/tx.amino.js +50 -28
  112. package/sparkdream/federation/v1/tx.amino.d.ts +1 -128
  113. package/sparkdream/federation/v1/tx.amino.js +49 -128
  114. package/sparkdream/forum/v1/tx.amino.d.ts +1 -183
  115. package/sparkdream/forum/v1/tx.amino.js +50 -213
  116. package/sparkdream/futarchy/v1/tx.amino.d.ts +1 -38
  117. package/sparkdream/futarchy/v1/tx.amino.js +49 -38
  118. package/sparkdream/guardian/v1/tx.amino.d.ts +2 -8
  119. package/sparkdream/guardian/v1/tx.amino.js +52 -9
  120. package/sparkdream/lcd.d.ts +3 -0
  121. package/sparkdream/lcd.js +5 -0
  122. package/sparkdream/name/v1/tx.amino.d.ts +1 -63
  123. package/sparkdream/name/v1/tx.amino.js +49 -63
  124. package/sparkdream/rep/v1/genesis.d.ts +19 -0
  125. package/sparkdream/rep/v1/genesis.js +74 -1
  126. package/sparkdream/rep/v1/member.d.ts +92 -0
  127. package/sparkdream/rep/v1/member.js +110 -1
  128. package/sparkdream/rep/v1/migration.d.ts +587 -0
  129. package/sparkdream/rep/v1/migration.js +964 -0
  130. package/sparkdream/rep/v1/params.d.ts +174 -0
  131. package/sparkdream/rep/v1/params.js +181 -1
  132. package/sparkdream/rep/v1/query.d.ts +679 -0
  133. package/sparkdream/rep/v1/query.js +1061 -1
  134. package/sparkdream/rep/v1/query.lcd.d.ts +8 -1
  135. package/sparkdream/rep/v1/query.lcd.js +48 -0
  136. package/sparkdream/rep/v1/query.rpc.Query.d.ts +32 -1
  137. package/sparkdream/rep/v1/query.rpc.Query.js +64 -0
  138. package/sparkdream/rep/v1/tx.amino.d.ts +1 -283
  139. package/sparkdream/rep/v1/tx.amino.js +47 -416
  140. package/sparkdream/rep/v1/tx.d.ts +1185 -0
  141. package/sparkdream/rep/v1/tx.js +1742 -2
  142. package/sparkdream/rep/v1/tx.registry.d.ts +133 -1
  143. package/sparkdream/rep/v1/tx.registry.js +199 -1
  144. package/sparkdream/rep/v1/tx.rpc.msg.d.ts +34 -1
  145. package/sparkdream/rep/v1/tx.rpc.msg.js +66 -0
  146. package/sparkdream/reveal/v1/tx.amino.d.ts +1 -53
  147. package/sparkdream/reveal/v1/tx.amino.js +50 -75
  148. package/sparkdream/rpc.query.d.ts +42 -0
  149. package/sparkdream/rpc.query.js +3 -0
  150. package/sparkdream/rpc.tx.d.ts +3 -0
  151. package/sparkdream/rpc.tx.js +3 -0
  152. package/sparkdream/season/v1/tx.amino.d.ts +1 -218
  153. package/sparkdream/season/v1/tx.amino.js +49 -218
  154. package/sparkdream/service/v1/tx.amino.d.ts +1 -78
  155. package/sparkdream/service/v1/tx.amino.js +49 -78
  156. package/sparkdream/session/v1/tx.amino.d.ts +1 -93
  157. package/sparkdream/session/v1/tx.amino.js +48 -270
  158. package/sparkdream/session/v1/tx.d.ts +30 -0
  159. package/sparkdream/session/v1/tx.js +38 -2
  160. package/sparkdream/shield/v1/tx.amino.d.ts +1 -28
  161. package/sparkdream/shield/v1/tx.amino.js +50 -82
  162. package/sparkdream/sparkdream/v1/tx.amino.d.ts +1 -8
  163. package/sparkdream/sparkdream/v1/tx.amino.js +49 -8
  164. package/sparkdream/split/v1/tx.amino.d.ts +1 -8
  165. package/sparkdream/split/v1/tx.amino.js +49 -8
  166. package/sparkdream/vault/module/v1/module.d.ts +54 -0
  167. package/sparkdream/vault/module/v1/module.js +74 -0
  168. package/sparkdream/vault/v1/genesis.d.ts +59 -0
  169. package/sparkdream/vault/v1/genesis.js +107 -0
  170. package/sparkdream/vault/v1/params.d.ts +68 -0
  171. package/sparkdream/vault/v1/params.js +93 -0
  172. package/sparkdream/vault/v1/query.d.ts +935 -0
  173. package/sparkdream/vault/v1/query.js +1538 -0
  174. package/sparkdream/vault/v1/query.lcd.d.ts +18 -0
  175. package/sparkdream/vault/v1/query.lcd.js +104 -0
  176. package/sparkdream/vault/v1/query.rpc.Query.d.ts +56 -0
  177. package/sparkdream/vault/v1/query.rpc.Query.js +116 -0
  178. package/sparkdream/vault/v1/tx.amino.d.ts +2 -0
  179. package/sparkdream/vault/v1/tx.amino.js +55 -0
  180. package/sparkdream/vault/v1/tx.d.ts +826 -0
  181. package/sparkdream/vault/v1/tx.js +1399 -0
  182. package/sparkdream/vault/v1/tx.registry.d.ts +109 -0
  183. package/sparkdream/vault/v1/tx.registry.js +163 -0
  184. package/sparkdream/vault/v1/tx.rpc.msg.d.ts +37 -0
  185. package/sparkdream/vault/v1/tx.rpc.msg.js +65 -0
  186. package/sparkdream/vault/v1/vault.d.ts +117 -0
  187. package/sparkdream/vault/v1/vault.js +166 -0
  188. package/sparkdream/vault/v1/vault_proposal.d.ts +158 -0
  189. package/sparkdream/vault/v1/vault_proposal.js +285 -0
  190. package/sparkdream/vault/v1/vault_signer.d.ts +54 -0
  191. package/sparkdream/vault/v1/vault_signer.js +88 -0
  192. package/tendermint/bundle.d.ts +844 -844
  193. package/tendermint/bundle.js +20 -20
  194. package/varint.d.ts +1 -1
@@ -1,275 +1,53 @@
1
1
  "use strict";
2
- //@ts-nocheck
3
- // HAND-WRITTEN OVERRIDE — overlaid by scripts/codegen.ts after telescope.
4
- // See ../../commons/v1/tx.amino.ts for rationale.
5
- //
6
- // Because this file replaces the generated one wholesale, EVERY Msg in
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
- else if (p.exec) {
114
- action = {
115
- type: "sparkdream/session/OneshotExec",
116
- value: {
117
- exec: {
118
- msg: p.exec.msg ? (0, nested_amino_1.anyToAmino)(p.exec.msg) : undefined,
119
- gas_limit: int64(p.exec.gasLimit),
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
- const scheduledOneshotFromAmino = (o) => {
132
- const v = o.Action?.value ?? {};
133
- return {
134
- transfer: v.transfer
135
- ? { recipient: v.transfer.recipient ?? "", amount: fromCoin(v.transfer.amount) }
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
- const signInToAmino = (p) => ({ service: str(p.service) });
145
- const signInFromAmino = (o) => ({ service: o.service ?? "" });
146
- const PAYLOADS = [
147
- ["sessionKey", "session_key", "sparkdream/session/SessionKeyPayload", sessionKeyToAmino, sessionKeyFromAmino],
148
- ["recurringPull", "recurring_pull", "sparkdream/session/RecurringPullPayload", recurringPullToAmino, recurringPullFromAmino],
149
- ["spendingAllowance", "spending_allowance", "sparkdream/session/SpendingAllowancePayload", spendingAllowanceToAmino, spendingAllowanceFromAmino],
150
- ["scheduledOneshot", "scheduled_oneshot", "sparkdream/session/ScheduledOneshotPayload", scheduledOneshotToAmino, scheduledOneshotFromAmino],
151
- ["signIn", "sign_in", "sparkdream/session/SignInPayload", signInToAmino, signInFromAmino],
152
- ];
153
- // ── Messages ────────────────────────────────────────────────────────────
154
- // {<signer>, grant_id} messages; each signer field name is a single word, so
155
- // the proto and amino spellings coincide.
156
- const grantIdMsg = (signer) => ({
157
- toAmino: (m) => ({ [signer]: str(m[signer]), grant_id: int64(m.grantId) }),
158
- fromAmino: (o) => ({ [signer]: o[signer] ?? "", grantId: toBig(o.grant_id) }),
159
- });
160
- exports.AminoConverter = {
161
- "/sparkdream.session.v1.MsgUpdateParams": {
162
- aminoType: "sparkdream/x/session/MsgUpdateParams",
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
- import { MsgUpdateParams, MsgTriggerDkg, MsgRegisterShieldedOp, MsgDeregisterShieldedOp } from "./tx";
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>;