@firmachain/firma-js 0.2.20 → 0.2.21

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 (157) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +136 -136
  3. package/dist/index.d.ts +4 -4
  4. package/dist/index.js +16 -16
  5. package/dist/sdk/FirmaBankService.d.ts +15 -15
  6. package/dist/sdk/FirmaBankService.js +211 -211
  7. package/dist/sdk/FirmaChainService.d.ts +8 -8
  8. package/dist/sdk/FirmaChainService.js +86 -86
  9. package/dist/sdk/FirmaConfig.d.ts +16 -16
  10. package/dist/sdk/FirmaConfig.js +55 -55
  11. package/dist/sdk/FirmaContractService.d.ts +31 -30
  12. package/dist/sdk/FirmaContractService.js +413 -394
  13. package/dist/sdk/FirmaDistributionService.d.ts +31 -31
  14. package/dist/sdk/FirmaDistributionService.js +524 -524
  15. package/dist/sdk/FirmaFeeGrantService.d.ts +21 -21
  16. package/dist/sdk/FirmaFeeGrantService.js +341 -341
  17. package/dist/sdk/FirmaGovService.d.ts +35 -35
  18. package/dist/sdk/FirmaGovService.js +775 -775
  19. package/dist/sdk/FirmaIpfsService.d.ts +12 -12
  20. package/dist/sdk/FirmaIpfsService.js +185 -185
  21. package/dist/sdk/FirmaMobileSDK.d.ts +27 -27
  22. package/dist/sdk/FirmaMobileSDK.js +45 -45
  23. package/dist/sdk/FirmaNftService.d.ts +31 -28
  24. package/dist/sdk/FirmaNftService.js +372 -390
  25. package/dist/sdk/FirmaSDK.d.ts +29 -29
  26. package/dist/sdk/FirmaSDK.js +48 -48
  27. package/dist/sdk/FirmaSlashingService.d.ts +9 -9
  28. package/dist/sdk/FirmaSlashingService.js +105 -105
  29. package/dist/sdk/FirmaStakingService.d.ts +34 -34
  30. package/dist/sdk/FirmaStakingService.js +604 -604
  31. package/dist/sdk/FirmaTokenService.d.ts +26 -26
  32. package/dist/sdk/FirmaTokenService.js +416 -416
  33. package/dist/sdk/FirmaUtil.d.ts +26 -26
  34. package/dist/sdk/FirmaUtil.js +210 -210
  35. package/dist/sdk/FirmaWalletService.d.ts +36 -36
  36. package/dist/sdk/FirmaWalletService.js +309 -309
  37. package/dist/sdk/firmachain/amino/addresses.d.ts +5 -5
  38. package/dist/sdk/firmachain/amino/addresses.js +46 -46
  39. package/dist/sdk/firmachain/amino/aminomsgs.d.ts +281 -281
  40. package/dist/sdk/firmachain/amino/aminomsgs.js +77 -77
  41. package/dist/sdk/firmachain/amino/aminotypes.d.ts +22 -22
  42. package/dist/sdk/firmachain/amino/aminotypes.js +521 -521
  43. package/dist/sdk/firmachain/amino/coins.d.ts +30 -30
  44. package/dist/sdk/firmachain/amino/coins.js +69 -69
  45. package/dist/sdk/firmachain/amino/encoding.d.ts +24 -24
  46. package/dist/sdk/firmachain/amino/encoding.js +234 -234
  47. package/dist/sdk/firmachain/amino/multisig.d.ts +10 -10
  48. package/dist/sdk/firmachain/amino/multisig.js +42 -42
  49. package/dist/sdk/firmachain/amino/paths.d.ts +6 -6
  50. package/dist/sdk/firmachain/amino/paths.js +18 -18
  51. package/dist/sdk/firmachain/amino/pubkeys.d.ts +47 -47
  52. package/dist/sdk/firmachain/amino/pubkeys.js +29 -29
  53. package/dist/sdk/firmachain/amino/secp256k1hdwallet.d.ts +94 -94
  54. package/dist/sdk/firmachain/amino/secp256k1hdwallet.js +437 -437
  55. package/dist/sdk/firmachain/amino/secp256k1wallet.d.ts +23 -23
  56. package/dist/sdk/firmachain/amino/secp256k1wallet.js +141 -141
  57. package/dist/sdk/firmachain/amino/signature.d.ts +16 -16
  58. package/dist/sdk/firmachain/amino/signature.js +36 -36
  59. package/dist/sdk/firmachain/amino/signdoc.d.ts +26 -26
  60. package/dist/sdk/firmachain/amino/signdoc.js +42 -42
  61. package/dist/sdk/firmachain/amino/signer.d.ts +33 -33
  62. package/dist/sdk/firmachain/amino/signer.js +2 -2
  63. package/dist/sdk/firmachain/amino/stdtx.d.ts +15 -15
  64. package/dist/sdk/firmachain/amino/stdtx.js +17 -17
  65. package/dist/sdk/firmachain/amino/wallet.d.ts +32 -32
  66. package/dist/sdk/firmachain/amino/wallet.js +132 -132
  67. package/dist/sdk/firmachain/bank/BankQueryClient.d.ts +12 -12
  68. package/dist/sdk/firmachain/bank/BankQueryClient.js +116 -116
  69. package/dist/sdk/firmachain/bank/BankTxClient.d.ts +17 -17
  70. package/dist/sdk/firmachain/bank/BankTxClient.js +40 -40
  71. package/dist/sdk/firmachain/bank/index.d.ts +3 -3
  72. package/dist/sdk/firmachain/bank/index.js +15 -15
  73. package/dist/sdk/firmachain/common/ITxClient.d.ts +15 -15
  74. package/dist/sdk/firmachain/common/ITxClient.js +102 -102
  75. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.d.ts +27 -27
  76. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.js +165 -165
  77. package/dist/sdk/firmachain/common/LedgerWallet.d.ts +14 -14
  78. package/dist/sdk/firmachain/common/LedgerWallet.js +147 -147
  79. package/dist/sdk/firmachain/common/QueryCommon.d.ts +4 -4
  80. package/dist/sdk/firmachain/common/QueryCommon.js +2 -2
  81. package/dist/sdk/firmachain/common/TendermintQueryClient.d.ts +42 -42
  82. package/dist/sdk/firmachain/common/TendermintQueryClient.js +108 -108
  83. package/dist/sdk/firmachain/common/TxCommon.d.ts +94 -94
  84. package/dist/sdk/firmachain/common/TxCommon.js +34 -34
  85. package/dist/sdk/firmachain/common/accounts.d.ts +16 -16
  86. package/dist/sdk/firmachain/common/accounts.js +64 -64
  87. package/dist/sdk/firmachain/common/index.d.ts +2 -2
  88. package/dist/sdk/firmachain/common/index.js +14 -14
  89. package/dist/sdk/firmachain/common/signing.d.ts +10 -10
  90. package/dist/sdk/firmachain/common/signing.js +75 -75
  91. package/dist/sdk/firmachain/common/signingstargateclient.d.ts +37 -37
  92. package/dist/sdk/firmachain/common/signingstargateclient.js +298 -298
  93. package/dist/sdk/firmachain/common/stargateclient.d.ts +46 -46
  94. package/dist/sdk/firmachain/common/stargateclient.js +211 -211
  95. package/dist/sdk/firmachain/contract/ContractQueryClient.d.ts +32 -31
  96. package/dist/sdk/firmachain/contract/ContractQueryClient.js +156 -141
  97. package/dist/sdk/firmachain/contract/ContractTxClient.d.ts +17 -17
  98. package/dist/sdk/firmachain/contract/ContractTxClient.js +40 -40
  99. package/dist/sdk/firmachain/contract/ContractTxTypes.d.ts +69 -69
  100. package/dist/sdk/firmachain/contract/ContractTxTypes.js +483 -483
  101. package/dist/sdk/firmachain/contract/index.d.ts +3 -3
  102. package/dist/sdk/firmachain/contract/index.js +15 -15
  103. package/dist/sdk/firmachain/distribution/DistributionQueryClient.d.ts +18 -18
  104. package/dist/sdk/firmachain/distribution/DistributionQueryClient.js +167 -167
  105. package/dist/sdk/firmachain/distribution/DistributionTxClient.d.ts +27 -27
  106. package/dist/sdk/firmachain/distribution/DistributionTxClient.js +48 -48
  107. package/dist/sdk/firmachain/distribution/index.d.ts +3 -3
  108. package/dist/sdk/firmachain/distribution/index.js +15 -15
  109. package/dist/sdk/firmachain/feegrant/FeeGrantQueryClient.d.ts +17 -17
  110. package/dist/sdk/firmachain/feegrant/FeeGrantQueryClient.js +86 -86
  111. package/dist/sdk/firmachain/feegrant/FeeGrantTxClient.d.ts +17 -17
  112. package/dist/sdk/firmachain/feegrant/FeeGrantTxClient.js +40 -40
  113. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.d.ts +76 -76
  114. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.js +194 -194
  115. package/dist/sdk/firmachain/feegrant/index.d.ts +2 -2
  116. package/dist/sdk/firmachain/feegrant/index.js +15 -15
  117. package/dist/sdk/firmachain/google/protobuf/any.d.ts +128 -128
  118. package/dist/sdk/firmachain/google/protobuf/any.js +106 -106
  119. package/dist/sdk/firmachain/google/protobuf/descriptor.d.ts +996 -996
  120. package/dist/sdk/firmachain/google/protobuf/descriptor.js +5329 -5329
  121. package/dist/sdk/firmachain/google/protobuf/duration.d.ts +91 -91
  122. package/dist/sdk/firmachain/google/protobuf/duration.js +107 -107
  123. package/dist/sdk/firmachain/google/protobuf/timestamp.d.ts +109 -109
  124. package/dist/sdk/firmachain/google/protobuf/timestamp.js +107 -107
  125. package/dist/sdk/firmachain/gov/GovQueryClient.d.ts +61 -61
  126. package/dist/sdk/firmachain/gov/GovQueryClient.js +152 -152
  127. package/dist/sdk/firmachain/gov/GovTxClient.d.ts +22 -22
  128. package/dist/sdk/firmachain/gov/GovTxClient.js +44 -44
  129. package/dist/sdk/firmachain/gov/index.d.ts +3 -3
  130. package/dist/sdk/firmachain/gov/index.js +15 -15
  131. package/dist/sdk/firmachain/nft/NftQueryClient.d.ts +20 -17
  132. package/dist/sdk/firmachain/nft/NftQueryClient.js +125 -121
  133. package/dist/sdk/firmachain/nft/NftTxClient.d.ts +22 -22
  134. package/dist/sdk/firmachain/nft/NftTxClient.js +44 -44
  135. package/dist/sdk/firmachain/nft/NftTxTypes.d.ts +86 -86
  136. package/dist/sdk/firmachain/nft/NftTxTypes.js +424 -424
  137. package/dist/sdk/firmachain/nft/index.d.ts +3 -3
  138. package/dist/sdk/firmachain/nft/index.js +15 -15
  139. package/dist/sdk/firmachain/slashing/SlashingQueryClient.d.ts +22 -22
  140. package/dist/sdk/firmachain/slashing/SlashingQueryClient.js +101 -101
  141. package/dist/sdk/firmachain/slashing/index.d.ts +2 -2
  142. package/dist/sdk/firmachain/slashing/index.js +14 -14
  143. package/dist/sdk/firmachain/staking/StakingQueryClient.d.ts +93 -93
  144. package/dist/sdk/firmachain/staking/StakingQueryClient.js +223 -223
  145. package/dist/sdk/firmachain/staking/StakingTxClient.d.ts +32 -32
  146. package/dist/sdk/firmachain/staking/StakingTxClient.js +52 -52
  147. package/dist/sdk/firmachain/staking/index.d.ts +3 -3
  148. package/dist/sdk/firmachain/staking/index.js +15 -15
  149. package/dist/sdk/firmachain/token/TokenQueryClient.d.ts +24 -24
  150. package/dist/sdk/firmachain/token/TokenQueryClient.js +106 -106
  151. package/dist/sdk/firmachain/token/TokenTxClient.d.ts +27 -27
  152. package/dist/sdk/firmachain/token/TokenTxClient.js +48 -48
  153. package/dist/sdk/firmachain/token/TokenTxTypes.d.ts +116 -116
  154. package/dist/sdk/firmachain/token/TokenTxTypes.js +685 -685
  155. package/dist/sdk/firmachain/token/index.d.ts +3 -3
  156. package/dist/sdk/firmachain/token/index.js +15 -15
  157. package/package.json +54 -54
@@ -1,91 +1,91 @@
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 | undefined): 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
+ 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 | undefined): 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 +1,107 @@
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
+ "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 +1,109 @@
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 | undefined): 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
+ 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 | undefined): 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 {};