@firmachain/firma-js 0.2.36 → 0.2.37

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 (181) hide show
  1. package/package.json +5 -1
  2. package/dist/index.d.ts +0 -4
  3. package/dist/index.js +0 -20
  4. package/dist/sdk/FirmaAuthzService.d.ts +0 -41
  5. package/dist/sdk/FirmaAuthzService.js +0 -633
  6. package/dist/sdk/FirmaBankService.d.ts +0 -17
  7. package/dist/sdk/FirmaBankService.js +0 -236
  8. package/dist/sdk/FirmaChainService.d.ts +0 -8
  9. package/dist/sdk/FirmaChainService.js +0 -86
  10. package/dist/sdk/FirmaConfig.d.ts +0 -18
  11. package/dist/sdk/FirmaConfig.js +0 -63
  12. package/dist/sdk/FirmaContractService.d.ts +0 -32
  13. package/dist/sdk/FirmaContractService.js +0 -434
  14. package/dist/sdk/FirmaCosmWasmService.d.ts +0 -38
  15. package/dist/sdk/FirmaCosmWasmService.js +0 -667
  16. package/dist/sdk/FirmaDistributionService.d.ts +0 -32
  17. package/dist/sdk/FirmaDistributionService.js +0 -527
  18. package/dist/sdk/FirmaFeeGrantService.d.ts +0 -21
  19. package/dist/sdk/FirmaFeeGrantService.js +0 -341
  20. package/dist/sdk/FirmaGovService.d.ts +0 -35
  21. package/dist/sdk/FirmaGovService.js +0 -775
  22. package/dist/sdk/FirmaIbcService.d.ts +0 -15
  23. package/dist/sdk/FirmaIbcService.js +0 -144
  24. package/dist/sdk/FirmaIpfsService.d.ts +0 -12
  25. package/dist/sdk/FirmaIpfsService.js +0 -185
  26. package/dist/sdk/FirmaMobileSDK.d.ts +0 -29
  27. package/dist/sdk/FirmaMobileSDK.js +0 -48
  28. package/dist/sdk/FirmaNftService.d.ts +0 -31
  29. package/dist/sdk/FirmaNftService.js +0 -372
  30. package/dist/sdk/FirmaSDK.d.ts +0 -35
  31. package/dist/sdk/FirmaSDK.js +0 -57
  32. package/dist/sdk/FirmaSlashingService.d.ts +0 -9
  33. package/dist/sdk/FirmaSlashingService.js +0 -105
  34. package/dist/sdk/FirmaStakingService.d.ts +0 -47
  35. package/dist/sdk/FirmaStakingService.js +0 -611
  36. package/dist/sdk/FirmaTokenService.d.ts +0 -26
  37. package/dist/sdk/FirmaTokenService.js +0 -416
  38. package/dist/sdk/FirmaUtil.d.ts +0 -56
  39. package/dist/sdk/FirmaUtil.js +0 -430
  40. package/dist/sdk/FirmaWalletService.d.ts +0 -39
  41. package/dist/sdk/FirmaWalletService.js +0 -317
  42. package/dist/sdk/firmachain/amino/addresses.d.ts +0 -5
  43. package/dist/sdk/firmachain/amino/addresses.js +0 -46
  44. package/dist/sdk/firmachain/amino/aminomsgs.d.ts +0 -281
  45. package/dist/sdk/firmachain/amino/aminomsgs.js +0 -77
  46. package/dist/sdk/firmachain/amino/aminotypes.d.ts +0 -22
  47. package/dist/sdk/firmachain/amino/aminotypes.js +0 -525
  48. package/dist/sdk/firmachain/amino/coins.d.ts +0 -30
  49. package/dist/sdk/firmachain/amino/coins.js +0 -69
  50. package/dist/sdk/firmachain/amino/encoding.d.ts +0 -24
  51. package/dist/sdk/firmachain/amino/encoding.js +0 -238
  52. package/dist/sdk/firmachain/amino/multisig.d.ts +0 -10
  53. package/dist/sdk/firmachain/amino/multisig.js +0 -42
  54. package/dist/sdk/firmachain/amino/paths.d.ts +0 -6
  55. package/dist/sdk/firmachain/amino/paths.js +0 -18
  56. package/dist/sdk/firmachain/amino/pubkeys.d.ts +0 -47
  57. package/dist/sdk/firmachain/amino/pubkeys.js +0 -29
  58. package/dist/sdk/firmachain/amino/signature.d.ts +0 -16
  59. package/dist/sdk/firmachain/amino/signature.js +0 -36
  60. package/dist/sdk/firmachain/amino/signdoc.d.ts +0 -26
  61. package/dist/sdk/firmachain/amino/signdoc.js +0 -42
  62. package/dist/sdk/firmachain/amino/signer.d.ts +0 -32
  63. package/dist/sdk/firmachain/amino/signer.js +0 -2
  64. package/dist/sdk/firmachain/amino/stdtx.d.ts +0 -15
  65. package/dist/sdk/firmachain/amino/stdtx.js +0 -17
  66. package/dist/sdk/firmachain/amino/wallet.d.ts +0 -32
  67. package/dist/sdk/firmachain/amino/wallet.js +0 -136
  68. package/dist/sdk/firmachain/authz/AuthzQueryClient.d.ts +0 -48
  69. package/dist/sdk/firmachain/authz/AuthzQueryClient.js +0 -142
  70. package/dist/sdk/firmachain/authz/AuthzTxClient.d.ts +0 -23
  71. package/dist/sdk/firmachain/authz/AuthzTxClient.js +0 -47
  72. package/dist/sdk/firmachain/authz/AuthzTxTypes.d.ts +0 -147
  73. package/dist/sdk/firmachain/authz/AuthzTxTypes.js +0 -358
  74. package/dist/sdk/firmachain/authz/index.d.ts +0 -3
  75. package/dist/sdk/firmachain/authz/index.js +0 -19
  76. package/dist/sdk/firmachain/bank/BankQueryClient.d.ts +0 -12
  77. package/dist/sdk/firmachain/bank/BankQueryClient.js +0 -116
  78. package/dist/sdk/firmachain/bank/BankTxClient.d.ts +0 -18
  79. package/dist/sdk/firmachain/bank/BankTxClient.js +0 -43
  80. package/dist/sdk/firmachain/bank/index.d.ts +0 -3
  81. package/dist/sdk/firmachain/bank/index.js +0 -19
  82. package/dist/sdk/firmachain/common/CommonTxClient.d.ts +0 -7
  83. package/dist/sdk/firmachain/common/CommonTxClient.js +0 -79
  84. package/dist/sdk/firmachain/common/ITxClient.d.ts +0 -18
  85. package/dist/sdk/firmachain/common/ITxClient.js +0 -117
  86. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.d.ts +0 -27
  87. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.js +0 -165
  88. package/dist/sdk/firmachain/common/LedgerWallet.d.ts +0 -14
  89. package/dist/sdk/firmachain/common/LedgerWallet.js +0 -151
  90. package/dist/sdk/firmachain/common/QueryCommon.d.ts +0 -4
  91. package/dist/sdk/firmachain/common/QueryCommon.js +0 -2
  92. package/dist/sdk/firmachain/common/TendermintQueryClient.d.ts +0 -42
  93. package/dist/sdk/firmachain/common/TendermintQueryClient.js +0 -111
  94. package/dist/sdk/firmachain/common/TxCommon.d.ts +0 -87
  95. package/dist/sdk/firmachain/common/TxCommon.js +0 -18
  96. package/dist/sdk/firmachain/common/accounts.d.ts +0 -16
  97. package/dist/sdk/firmachain/common/accounts.js +0 -64
  98. package/dist/sdk/firmachain/common/index.d.ts +0 -2
  99. package/dist/sdk/firmachain/common/index.js +0 -18
  100. package/dist/sdk/firmachain/common/signing.d.ts +0 -10
  101. package/dist/sdk/firmachain/common/signing.js +0 -79
  102. package/dist/sdk/firmachain/common/signingaminostargateclient.d.ts +0 -50
  103. package/dist/sdk/firmachain/common/signingaminostargateclient.js +0 -267
  104. package/dist/sdk/firmachain/common/signingstargateclient.d.ts +0 -44
  105. package/dist/sdk/firmachain/common/signingstargateclient.js +0 -361
  106. package/dist/sdk/firmachain/common/stargateclient.d.ts +0 -46
  107. package/dist/sdk/firmachain/common/stargateclient.js +0 -211
  108. package/dist/sdk/firmachain/contract/ContractQueryClient.d.ts +0 -32
  109. package/dist/sdk/firmachain/contract/ContractQueryClient.js +0 -156
  110. package/dist/sdk/firmachain/contract/ContractTxClient.d.ts +0 -18
  111. package/dist/sdk/firmachain/contract/ContractTxClient.js +0 -43
  112. package/dist/sdk/firmachain/contract/ContractTxTypes.d.ts +0 -69
  113. package/dist/sdk/firmachain/contract/ContractTxTypes.js +0 -483
  114. package/dist/sdk/firmachain/contract/index.d.ts +0 -3
  115. package/dist/sdk/firmachain/contract/index.js +0 -19
  116. package/dist/sdk/firmachain/cosmwasm/CosmWasmQueryClient.d.ts +0 -52
  117. package/dist/sdk/firmachain/cosmwasm/CosmWasmQueryClient.js +0 -193
  118. package/dist/sdk/firmachain/cosmwasm/CosmWasmTxClient.d.ts +0 -38
  119. package/dist/sdk/firmachain/cosmwasm/CosmWasmTxClient.js +0 -59
  120. package/dist/sdk/firmachain/cosmwasm/index.d.ts +0 -3
  121. package/dist/sdk/firmachain/cosmwasm/index.js +0 -19
  122. package/dist/sdk/firmachain/distribution/DistributionQueryClient.d.ts +0 -18
  123. package/dist/sdk/firmachain/distribution/DistributionQueryClient.js +0 -167
  124. package/dist/sdk/firmachain/distribution/DistributionTxClient.d.ts +0 -28
  125. package/dist/sdk/firmachain/distribution/DistributionTxClient.js +0 -51
  126. package/dist/sdk/firmachain/distribution/index.d.ts +0 -3
  127. package/dist/sdk/firmachain/distribution/index.js +0 -19
  128. package/dist/sdk/firmachain/feegrant/FeeGrantQueryClient.d.ts +0 -17
  129. package/dist/sdk/firmachain/feegrant/FeeGrantQueryClient.js +0 -86
  130. package/dist/sdk/firmachain/feegrant/FeeGrantTxClient.d.ts +0 -18
  131. package/dist/sdk/firmachain/feegrant/FeeGrantTxClient.js +0 -43
  132. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.d.ts +0 -76
  133. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.js +0 -194
  134. package/dist/sdk/firmachain/feegrant/index.d.ts +0 -2
  135. package/dist/sdk/firmachain/feegrant/index.js +0 -19
  136. package/dist/sdk/firmachain/google/protobuf/any.d.ts +0 -128
  137. package/dist/sdk/firmachain/google/protobuf/any.js +0 -106
  138. package/dist/sdk/firmachain/google/protobuf/descriptor.d.ts +0 -996
  139. package/dist/sdk/firmachain/google/protobuf/descriptor.js +0 -5329
  140. package/dist/sdk/firmachain/google/protobuf/duration.d.ts +0 -91
  141. package/dist/sdk/firmachain/google/protobuf/duration.js +0 -107
  142. package/dist/sdk/firmachain/google/protobuf/timestamp.d.ts +0 -109
  143. package/dist/sdk/firmachain/google/protobuf/timestamp.js +0 -107
  144. package/dist/sdk/firmachain/gov/GovQueryClient.d.ts +0 -61
  145. package/dist/sdk/firmachain/gov/GovQueryClient.js +0 -152
  146. package/dist/sdk/firmachain/gov/GovTxClient.d.ts +0 -23
  147. package/dist/sdk/firmachain/gov/GovTxClient.js +0 -47
  148. package/dist/sdk/firmachain/gov/index.d.ts +0 -3
  149. package/dist/sdk/firmachain/gov/index.js +0 -19
  150. package/dist/sdk/firmachain/ibc/IbcQueryClient.d.ts +0 -34
  151. package/dist/sdk/firmachain/ibc/IbcQueryClient.js +0 -71
  152. package/dist/sdk/firmachain/ibc/IbcTxClient.d.ts +0 -13
  153. package/dist/sdk/firmachain/ibc/IbcTxClient.js +0 -39
  154. package/dist/sdk/firmachain/ibc/index.d.ts +0 -3
  155. package/dist/sdk/firmachain/ibc/index.js +0 -19
  156. package/dist/sdk/firmachain/nft/NftQueryClient.d.ts +0 -20
  157. package/dist/sdk/firmachain/nft/NftQueryClient.js +0 -125
  158. package/dist/sdk/firmachain/nft/NftTxClient.d.ts +0 -23
  159. package/dist/sdk/firmachain/nft/NftTxClient.js +0 -47
  160. package/dist/sdk/firmachain/nft/NftTxTypes.d.ts +0 -86
  161. package/dist/sdk/firmachain/nft/NftTxTypes.js +0 -424
  162. package/dist/sdk/firmachain/nft/index.d.ts +0 -3
  163. package/dist/sdk/firmachain/nft/index.js +0 -19
  164. package/dist/sdk/firmachain/slashing/SlashingQueryClient.d.ts +0 -22
  165. package/dist/sdk/firmachain/slashing/SlashingQueryClient.js +0 -101
  166. package/dist/sdk/firmachain/slashing/index.d.ts +0 -2
  167. package/dist/sdk/firmachain/slashing/index.js +0 -18
  168. package/dist/sdk/firmachain/staking/StakingQueryClient.d.ts +0 -106
  169. package/dist/sdk/firmachain/staking/StakingQueryClient.js +0 -243
  170. package/dist/sdk/firmachain/staking/StakingTxClient.d.ts +0 -33
  171. package/dist/sdk/firmachain/staking/StakingTxClient.js +0 -55
  172. package/dist/sdk/firmachain/staking/index.d.ts +0 -3
  173. package/dist/sdk/firmachain/staking/index.js +0 -19
  174. package/dist/sdk/firmachain/token/TokenQueryClient.d.ts +0 -24
  175. package/dist/sdk/firmachain/token/TokenQueryClient.js +0 -106
  176. package/dist/sdk/firmachain/token/TokenTxClient.d.ts +0 -28
  177. package/dist/sdk/firmachain/token/TokenTxClient.js +0 -51
  178. package/dist/sdk/firmachain/token/TokenTxTypes.d.ts +0 -116
  179. package/dist/sdk/firmachain/token/TokenTxTypes.js +0 -685
  180. package/dist/sdk/firmachain/token/index.d.ts +0 -3
  181. package/dist/sdk/firmachain/token/index.js +0 -19
@@ -1,91 +0,0 @@
1
- import { Writer, Reader } from "protobufjs/minimal";
2
- export declare const protobufPackage = "google.protobuf";
3
- /**
4
- * A Duration represents a signed, fixed-length span of time represented
5
- * as a count of seconds and fractions of seconds at nanosecond
6
- * resolution. It is independent of any calendar and concepts like "day"
7
- * or "month". It is related to Timestamp in that the difference between
8
- * two Timestamp values is a Duration and it can be added or subtracted
9
- * from a Timestamp. Range is approximately +-10,000 years.
10
- *
11
- * # Examples
12
- *
13
- * Example 1: Compute Duration from two Timestamps in pseudo code.
14
- *
15
- * Timestamp start = ...;
16
- * Timestamp end = ...;
17
- * Duration duration = ...;
18
- *
19
- * duration.seconds = end.seconds - start.seconds;
20
- * duration.nanos = end.nanos - start.nanos;
21
- *
22
- * if (duration.seconds < 0 && duration.nanos > 0) {
23
- * duration.seconds += 1;
24
- * duration.nanos -= 1000000000;
25
- * } else if (durations.seconds > 0 && duration.nanos < 0) {
26
- * duration.seconds -= 1;
27
- * duration.nanos += 1000000000;
28
- * }
29
- *
30
- * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
31
- *
32
- * Timestamp start = ...;
33
- * Duration duration = ...;
34
- * Timestamp end = ...;
35
- *
36
- * end.seconds = start.seconds + duration.seconds;
37
- * end.nanos = start.nanos + duration.nanos;
38
- *
39
- * if (end.nanos < 0) {
40
- * end.seconds -= 1;
41
- * end.nanos += 1000000000;
42
- * } else if (end.nanos >= 1000000000) {
43
- * end.seconds += 1;
44
- * end.nanos -= 1000000000;
45
- * }
46
- *
47
- * Example 3: Compute Duration from datetime.timedelta in Python.
48
- *
49
- * td = datetime.timedelta(days=3, minutes=10)
50
- * duration = Duration()
51
- * duration.FromTimedelta(td)
52
- *
53
- * # JSON Mapping
54
- *
55
- * In JSON format, the Duration type is encoded as a string rather than an
56
- * object, where the string ends in the suffix "s" (indicating seconds) and
57
- * is preceded by the number of seconds, with nanoseconds expressed as
58
- * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
59
- * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
60
- * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
61
- * microsecond should be expressed in JSON format as "3.000001s".
62
- */
63
- export interface Duration {
64
- /**
65
- * Signed seconds of the span of time. Must be from -315,576,000,000
66
- * to +315,576,000,000 inclusive. Note: these bounds are computed from:
67
- * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
68
- */
69
- seconds: number;
70
- /**
71
- * Signed fractions of a second at nanosecond resolution of the span
72
- * of time. Durations less than one second are represented with a 0
73
- * `seconds` field and a positive or negative `nanos` field. For durations
74
- * of one second or more, a non-zero value for the `nanos` field must be
75
- * of the same sign as the `seconds` field. Must be from -999,999,999
76
- * to +999,999,999 inclusive.
77
- */
78
- nanos: number;
79
- }
80
- export declare const Duration: {
81
- encode(message: Duration, writer?: Writer): Writer;
82
- decode(input: Reader | Uint8Array, length?: number): Duration;
83
- fromJSON(object: any): Duration;
84
- toJSON(message: Duration): unknown;
85
- fromPartial(object: DeepPartial<Duration>): Duration;
86
- };
87
- declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
88
- export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
89
- [K in keyof T]?: DeepPartial<T[K]>;
90
- } : Partial<T>;
91
- export {};
@@ -1,107 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.Duration = exports.protobufPackage = void 0;
15
- /* eslint-disable */
16
- var minimal_1 = require("protobufjs/minimal");
17
- exports.protobufPackage = "google.protobuf";
18
- var baseDuration = { seconds: 0, nanos: 0 };
19
- exports.Duration = {
20
- encode: function (message, writer) {
21
- if (writer === void 0) { writer = minimal_1.Writer.create(); }
22
- if (message.seconds !== 0) {
23
- writer.uint32(8).int64(message.seconds);
24
- }
25
- if (message.nanos !== 0) {
26
- writer.uint32(16).int32(message.nanos);
27
- }
28
- return writer;
29
- },
30
- decode: function (input, length) {
31
- var reader = input instanceof minimal_1.Reader ? input : new minimal_1.Reader(input);
32
- var end = length === undefined ? reader.len : reader.pos + length;
33
- var message = __assign({}, baseDuration);
34
- while (reader.pos < end) {
35
- var tag = reader.uint32();
36
- switch (tag >>> 3) {
37
- case 1:
38
- message.seconds = longToNumber(reader.int64());
39
- break;
40
- case 2:
41
- message.nanos = reader.int32();
42
- break;
43
- default:
44
- reader.skipType(tag & 7);
45
- break;
46
- }
47
- }
48
- return message;
49
- },
50
- fromJSON: function (object) {
51
- var message = __assign({}, baseDuration);
52
- if (object.seconds !== undefined && object.seconds !== null) {
53
- message.seconds = Number(object.seconds);
54
- }
55
- else {
56
- message.seconds = 0;
57
- }
58
- if (object.nanos !== undefined && object.nanos !== null) {
59
- message.nanos = Number(object.nanos);
60
- }
61
- else {
62
- message.nanos = 0;
63
- }
64
- return message;
65
- },
66
- toJSON: function (message) {
67
- var obj = {};
68
- message.seconds !== undefined && (obj.seconds = message.seconds);
69
- message.nanos !== undefined && (obj.nanos = message.nanos);
70
- return obj;
71
- },
72
- fromPartial: function (object) {
73
- var message = __assign({}, baseDuration);
74
- if (object.seconds !== undefined && object.seconds !== null) {
75
- message.seconds = object.seconds;
76
- }
77
- else {
78
- message.seconds = 0;
79
- }
80
- if (object.nanos !== undefined && object.nanos !== null) {
81
- message.nanos = object.nanos;
82
- }
83
- else {
84
- message.nanos = 0;
85
- }
86
- return message;
87
- },
88
- };
89
- var globalThis = (function () {
90
- if (typeof globalThis !== "undefined")
91
- return globalThis;
92
- if (typeof self !== "undefined")
93
- return self;
94
- if (typeof window !== "undefined")
95
- return window;
96
- if (typeof global !== "undefined")
97
- return global;
98
- throw "Unable to locate global object";
99
- })();
100
- function longToNumber(long) {
101
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
102
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
103
- }
104
- return long.toNumber();
105
- }
106
- // If you get a compile-error about 'Constructor<Long> and ... have no overlap',
107
- // add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
@@ -1,109 +0,0 @@
1
- import { Writer, Reader } from "protobufjs/minimal";
2
- export declare const protobufPackage = "google.protobuf";
3
- /**
4
- * A Timestamp represents a point in time independent of any time zone
5
- * or calendar, represented as seconds and fractions of seconds at
6
- * nanosecond resolution in UTC Epoch time. It is encoded using the
7
- * Proleptic Gregorian Calendar which extends the Gregorian calendar
8
- * backwards to year one. It is encoded assuming all minutes are 60
9
- * seconds long, i.e. leap seconds are "smeared" so that no leap second
10
- * table is needed for interpretation. Range is from
11
- * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
12
- * By restricting to that range, we ensure that we can convert to
13
- * and from RFC 3339 date strings.
14
- * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
15
- *
16
- * # Examples
17
- *
18
- * Example 1: Compute Timestamp from POSIX `time()`.
19
- *
20
- * Timestamp timestamp;
21
- * timestamp.set_seconds(time(NULL));
22
- * timestamp.set_nanos(0);
23
- *
24
- * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
25
- *
26
- * struct timeval tv;
27
- * gettimeofday(&tv, NULL);
28
- *
29
- * Timestamp timestamp;
30
- * timestamp.set_seconds(tv.tv_sec);
31
- * timestamp.set_nanos(tv.tv_usec * 1000);
32
- *
33
- * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
34
- *
35
- * FILETIME ft;
36
- * GetSystemTimeAsFileTime(&ft);
37
- * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
38
- *
39
- * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
40
- * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
41
- * Timestamp timestamp;
42
- * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
43
- * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
44
- *
45
- * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
46
- *
47
- * long millis = System.currentTimeMillis();
48
- *
49
- * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
50
- * .setNanos((int) ((millis % 1000) * 1000000)).build();
51
- *
52
- *
53
- * Example 5: Compute Timestamp from current time in Python.
54
- *
55
- * timestamp = Timestamp()
56
- * timestamp.GetCurrentTime()
57
- *
58
- * # JSON Mapping
59
- *
60
- * In JSON format, the Timestamp type is encoded as a string in the
61
- * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
62
- * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
63
- * where {year} is always expressed using four digits while {month}, {day},
64
- * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
65
- * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
66
- * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
67
- * is required. A proto3 JSON serializer should always use UTC (as indicated by
68
- * "Z") when printing the Timestamp type and a proto3 JSON parser should be
69
- * able to accept both UTC and other timezones (as indicated by an offset).
70
- *
71
- * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
72
- * 01:30 UTC on January 15, 2017.
73
- *
74
- * In JavaScript, one can convert a Date object to this format using the
75
- * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
76
- * method. In Python, a standard `datetime.datetime` object can be converted
77
- * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
78
- * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
79
- * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
80
- * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
81
- * ) to obtain a formatter capable of generating timestamps in this format.
82
- */
83
- export interface Timestamp {
84
- /**
85
- * Represents seconds of UTC time since Unix epoch
86
- * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
87
- * 9999-12-31T23:59:59Z inclusive.
88
- */
89
- seconds: number;
90
- /**
91
- * Non-negative fractions of a second at nanosecond resolution. Negative
92
- * second values with fractions must still have non-negative nanos values
93
- * that count forward in time. Must be from 0 to 999,999,999
94
- * inclusive.
95
- */
96
- nanos: number;
97
- }
98
- export declare const Timestamp: {
99
- encode(message: Timestamp, writer?: Writer): Writer;
100
- decode(input: Reader | Uint8Array, length?: number): Timestamp;
101
- fromJSON(object: any): Timestamp;
102
- toJSON(message: Timestamp): unknown;
103
- fromPartial(object: DeepPartial<Timestamp>): Timestamp;
104
- };
105
- declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
106
- export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
107
- [K in keyof T]?: DeepPartial<T[K]>;
108
- } : Partial<T>;
109
- export {};
@@ -1,107 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.Timestamp = exports.protobufPackage = void 0;
15
- /* eslint-disable */
16
- var minimal_1 = require("protobufjs/minimal");
17
- exports.protobufPackage = "google.protobuf";
18
- var baseTimestamp = { seconds: 0, nanos: 0 };
19
- exports.Timestamp = {
20
- encode: function (message, writer) {
21
- if (writer === void 0) { writer = minimal_1.Writer.create(); }
22
- if (message.seconds !== 0) {
23
- writer.uint32(8).int64(message.seconds);
24
- }
25
- if (message.nanos !== 0) {
26
- writer.uint32(16).int32(message.nanos);
27
- }
28
- return writer;
29
- },
30
- decode: function (input, length) {
31
- var reader = input instanceof minimal_1.Reader ? input : new minimal_1.Reader(input);
32
- var end = length === undefined ? reader.len : reader.pos + length;
33
- var message = __assign({}, baseTimestamp);
34
- while (reader.pos < end) {
35
- var tag = reader.uint32();
36
- switch (tag >>> 3) {
37
- case 1:
38
- message.seconds = longToNumber(reader.int64());
39
- break;
40
- case 2:
41
- message.nanos = reader.int32();
42
- break;
43
- default:
44
- reader.skipType(tag & 7);
45
- break;
46
- }
47
- }
48
- return message;
49
- },
50
- fromJSON: function (object) {
51
- var message = __assign({}, baseTimestamp);
52
- if (object.seconds !== undefined && object.seconds !== null) {
53
- message.seconds = Number(object.seconds);
54
- }
55
- else {
56
- message.seconds = 0;
57
- }
58
- if (object.nanos !== undefined && object.nanos !== null) {
59
- message.nanos = Number(object.nanos);
60
- }
61
- else {
62
- message.nanos = 0;
63
- }
64
- return message;
65
- },
66
- toJSON: function (message) {
67
- var obj = {};
68
- message.seconds !== undefined && (obj.seconds = message.seconds);
69
- message.nanos !== undefined && (obj.nanos = message.nanos);
70
- return obj;
71
- },
72
- fromPartial: function (object) {
73
- var message = __assign({}, baseTimestamp);
74
- if (object.seconds !== undefined && object.seconds !== null) {
75
- message.seconds = object.seconds;
76
- }
77
- else {
78
- message.seconds = 0;
79
- }
80
- if (object.nanos !== undefined && object.nanos !== null) {
81
- message.nanos = object.nanos;
82
- }
83
- else {
84
- message.nanos = 0;
85
- }
86
- return message;
87
- },
88
- };
89
- var globalThis = (function () {
90
- if (typeof globalThis !== "undefined")
91
- return globalThis;
92
- if (typeof self !== "undefined")
93
- return self;
94
- if (typeof window !== "undefined")
95
- return window;
96
- if (typeof global !== "undefined")
97
- return global;
98
- throw "Unable to locate global object";
99
- })();
100
- function longToNumber(long) {
101
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
102
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
103
- }
104
- return long.toNumber();
105
- }
106
- // If you get a compile-error about 'Constructor<Long> and ... have no overlap',
107
- // add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
@@ -1,61 +0,0 @@
1
- export declare enum ProposalStatus {
2
- PROPOSAL_STATUS_UNSPECIFIED = 0,
3
- PROPOSAL_STATUS_DEPOSIT_PERIOD = 1,
4
- PROPOSAL_STATUS_VOTING_PERIOD = 2,
5
- PROPOSAL_STATUS_PASSED = 3,
6
- PROPOSAL_STATUS_REJECTED = 4,
7
- PROPOSAL_STATUS_FAILED = 5
8
- }
9
- export interface ProposalParam {
10
- voting_period: string;
11
- deposit_params: {
12
- min_deposit: {
13
- denom: string;
14
- amount: string;
15
- }[];
16
- max_deposit_period: string;
17
- };
18
- tally_params: {
19
- quorum: string;
20
- threshold: string;
21
- veto_threshold: string;
22
- };
23
- }
24
- export interface CurrentVoteInfo {
25
- yes: string;
26
- abstain: string;
27
- no: string;
28
- no_with_veto: string;
29
- }
30
- export interface ProposalInfo {
31
- proposal_id: string;
32
- content: {
33
- "@type": string;
34
- title: string;
35
- description: string;
36
- };
37
- status: string;
38
- final_tally_result: {
39
- yes: string;
40
- abstain: string;
41
- no: string;
42
- no_with_veto: string;
43
- };
44
- submit_time: string;
45
- deposit_end_time: string;
46
- total_deposit: {
47
- denom: string;
48
- amount: string;
49
- }[];
50
- voting_start_time: string;
51
- voting_end_time: string;
52
- }
53
- export declare class GovQueryClient {
54
- private readonly axios;
55
- constructor(baseUrl: string);
56
- queryGetCurrentVoteInfo(id: string): Promise<CurrentVoteInfo>;
57
- queryGetParam(): Promise<ProposalParam>;
58
- queryGetProposal(id: string): Promise<ProposalInfo>;
59
- queryGetProposalListByStatus(status: ProposalStatus): Promise<ProposalInfo[]>;
60
- queryGetProposalList(): Promise<ProposalInfo[]>;
61
- }
@@ -1,152 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- var __importDefault = (this && this.__importDefault) || function (mod) {
39
- return (mod && mod.__esModule) ? mod : { "default": mod };
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.GovQueryClient = exports.ProposalStatus = void 0;
43
- var axios_1 = __importDefault(require("axios"));
44
- var ProposalStatus;
45
- (function (ProposalStatus) {
46
- ProposalStatus[ProposalStatus["PROPOSAL_STATUS_UNSPECIFIED"] = 0] = "PROPOSAL_STATUS_UNSPECIFIED";
47
- ProposalStatus[ProposalStatus["PROPOSAL_STATUS_DEPOSIT_PERIOD"] = 1] = "PROPOSAL_STATUS_DEPOSIT_PERIOD";
48
- ProposalStatus[ProposalStatus["PROPOSAL_STATUS_VOTING_PERIOD"] = 2] = "PROPOSAL_STATUS_VOTING_PERIOD";
49
- ProposalStatus[ProposalStatus["PROPOSAL_STATUS_PASSED"] = 3] = "PROPOSAL_STATUS_PASSED";
50
- ProposalStatus[ProposalStatus["PROPOSAL_STATUS_REJECTED"] = 4] = "PROPOSAL_STATUS_REJECTED";
51
- ProposalStatus[ProposalStatus["PROPOSAL_STATUS_FAILED"] = 5] = "PROPOSAL_STATUS_FAILED";
52
- })(ProposalStatus = exports.ProposalStatus || (exports.ProposalStatus = {}));
53
- var GovQueryClient = /** @class */ (function () {
54
- function GovQueryClient(baseUrl) {
55
- this.axios = axios_1.default.create({
56
- baseURL: baseUrl,
57
- headers: {
58
- Accept: "application/json",
59
- },
60
- timeout: 15000,
61
- });
62
- }
63
- GovQueryClient.prototype.queryGetCurrentVoteInfo = function (id) {
64
- return __awaiter(this, void 0, void 0, function () {
65
- var path, result;
66
- return __generator(this, function (_a) {
67
- switch (_a.label) {
68
- case 0:
69
- path = "/cosmos/gov/v1beta1/proposals/".concat(id, "/tally");
70
- return [4 /*yield*/, this.axios.get(path)];
71
- case 1:
72
- result = _a.sent();
73
- return [2 /*return*/, result.data.tally];
74
- }
75
- });
76
- });
77
- };
78
- GovQueryClient.prototype.queryGetParam = function () {
79
- return __awaiter(this, void 0, void 0, function () {
80
- var path, votingResult, depositResult, tallyingResult;
81
- return __generator(this, function (_a) {
82
- switch (_a.label) {
83
- case 0:
84
- path = "/cosmos/gov/v1beta1/params/voting";
85
- return [4 /*yield*/, this.axios.get(path)];
86
- case 1:
87
- votingResult = _a.sent();
88
- path = "/cosmos/gov/v1beta1/params/deposit";
89
- return [4 /*yield*/, this.axios.get(path)];
90
- case 2:
91
- depositResult = _a.sent();
92
- path = "/cosmos/gov/v1beta1/params/tallying";
93
- return [4 /*yield*/, this.axios.get(path)];
94
- case 3:
95
- tallyingResult = _a.sent();
96
- return [2 /*return*/, {
97
- voting_period: votingResult.data.voting_params.voting_period,
98
- deposit_params: depositResult.data.deposit_params,
99
- tally_params: tallyingResult.data.tally_params
100
- }];
101
- }
102
- });
103
- });
104
- };
105
- GovQueryClient.prototype.queryGetProposal = function (id) {
106
- return __awaiter(this, void 0, void 0, function () {
107
- var path, result;
108
- return __generator(this, function (_a) {
109
- switch (_a.label) {
110
- case 0:
111
- path = "/cosmos/gov/v1beta1/proposals/".concat(id);
112
- return [4 /*yield*/, this.axios.get(path)];
113
- case 1:
114
- result = _a.sent();
115
- return [2 /*return*/, result.data.proposal];
116
- }
117
- });
118
- });
119
- };
120
- GovQueryClient.prototype.queryGetProposalListByStatus = function (status) {
121
- return __awaiter(this, void 0, void 0, function () {
122
- var path, result;
123
- return __generator(this, function (_a) {
124
- switch (_a.label) {
125
- case 0:
126
- path = "/cosmos/gov/v1beta1/proposals";
127
- return [4 /*yield*/, this.axios.get(path, { params: { proposalStatus: status } })];
128
- case 1:
129
- result = _a.sent();
130
- return [2 /*return*/, result.data.proposals];
131
- }
132
- });
133
- });
134
- };
135
- GovQueryClient.prototype.queryGetProposalList = function () {
136
- return __awaiter(this, void 0, void 0, function () {
137
- var path, result;
138
- return __generator(this, function (_a) {
139
- switch (_a.label) {
140
- case 0:
141
- path = "/cosmos/gov/v1beta1/proposals";
142
- return [4 /*yield*/, this.axios.get(path)];
143
- case 1:
144
- result = _a.sent();
145
- return [2 /*return*/, result.data.proposals];
146
- }
147
- });
148
- });
149
- };
150
- return GovQueryClient;
151
- }());
152
- exports.GovQueryClient = GovQueryClient;
@@ -1,23 +0,0 @@
1
- import { Registry, EncodeObject } from "@cosmjs/proto-signing";
2
- import { MsgDeposit, MsgSubmitProposal, MsgVote } from "cosmjs-types/cosmos/gov/v1beta1/tx";
3
- import { FirmaWalletService } from "../../FirmaWalletService";
4
- import { ITxClient } from "../common/ITxClient";
5
- export interface MsgDepositEncodeObject extends EncodeObject {
6
- readonly typeUrl: "/cosmos.gov.v1beta1.MsgDeposit";
7
- readonly value: Partial<MsgDeposit>;
8
- }
9
- export interface MsgSubmitProposalEncodeObject extends EncodeObject {
10
- readonly typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal";
11
- readonly value: Partial<MsgSubmitProposal>;
12
- }
13
- export interface MsgVoteEncodeObject extends EncodeObject {
14
- readonly typeUrl: "/cosmos.gov.v1beta1.MsgVote";
15
- readonly value: Partial<MsgVote>;
16
- }
17
- export declare class GovTxClient extends ITxClient {
18
- constructor(wallet: FirmaWalletService, serverUrl: string);
19
- static getRegistry(): Registry;
20
- static msgDeposit(data: MsgDeposit): MsgDepositEncodeObject;
21
- static msgSubmitProposal(data: MsgSubmitProposal): MsgSubmitProposalEncodeObject;
22
- static msgVote(data: MsgVote): MsgVoteEncodeObject;
23
- }