@agoric/cosmic-proto 0.4.1-dev-76b8d53.0 → 0.4.1-dev-b78d824.0

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 (188) hide show
  1. package/dist/codegen/cosmos/auth/v1beta1/query.d.ts +238 -61
  2. package/dist/codegen/cosmos/auth/v1beta1/query.js +311 -69
  3. package/dist/codegen/cosmos/auth/v1beta1/query.js.map +1 -1
  4. package/dist/codegen/cosmos/authz/v1beta1/authz.d.ts +6 -5
  5. package/dist/codegen/cosmos/authz/v1beta1/authz.js +6 -3
  6. package/dist/codegen/cosmos/authz/v1beta1/authz.js.map +1 -1
  7. package/dist/codegen/cosmos/authz/v1beta1/tx.d.ts +2 -4
  8. package/dist/codegen/cosmos/authz/v1beta1/tx.js +2 -10
  9. package/dist/codegen/cosmos/authz/v1beta1/tx.js.map +1 -1
  10. package/dist/codegen/cosmos/bank/v1beta1/query.d.ts +22 -2
  11. package/dist/codegen/cosmos/bank/v1beta1/query.js.map +1 -1
  12. package/dist/codegen/cosmos/base/abci/v1beta1/abci.d.ts +1 -1
  13. package/dist/codegen/cosmos/base/node/v1beta1/query.d.ts +45 -0
  14. package/dist/codegen/cosmos/base/node/v1beta1/query.js +111 -0
  15. package/dist/codegen/cosmos/base/node/v1beta1/query.js.map +1 -0
  16. package/dist/codegen/cosmos/bundle.d.ts +3421 -3221
  17. package/dist/codegen/cosmos/bundle.js +76 -69
  18. package/dist/codegen/cosmos/bundle.js.map +1 -1
  19. package/dist/codegen/cosmos/crypto/keyring/v1/record.d.ts +4 -6
  20. package/dist/codegen/cosmos/crypto/keyring/v1/record.js +0 -11
  21. package/dist/codegen/cosmos/crypto/keyring/v1/record.js.map +1 -1
  22. package/dist/codegen/cosmos/distribution/v1beta1/tx.d.ts +2 -0
  23. package/dist/codegen/cosmos/distribution/v1beta1/tx.js.map +1 -1
  24. package/dist/codegen/cosmos/feegrant/v1beta1/feegrant.d.ts +5 -5
  25. package/dist/codegen/cosmos/feegrant/v1beta1/feegrant.js +3 -3
  26. package/dist/codegen/cosmos/feegrant/v1beta1/feegrant.js.map +1 -1
  27. package/dist/codegen/cosmos/feegrant/v1beta1/query.d.ts +20 -4
  28. package/dist/codegen/cosmos/feegrant/v1beta1/query.js.map +1 -1
  29. package/dist/codegen/cosmos/feegrant/v1beta1/tx.d.ts +1 -1
  30. package/dist/codegen/cosmos/feegrant/v1beta1/tx.js +2 -2
  31. package/dist/codegen/cosmos/feegrant/v1beta1/tx.js.map +1 -1
  32. package/dist/codegen/cosmos/gov/v1/gov.d.ts +1 -1
  33. package/dist/codegen/cosmos/gov/v1/gov.js +1 -1
  34. package/dist/codegen/cosmos/gov/v1/gov.js.map +1 -1
  35. package/dist/codegen/cosmos/gov/v1/query.d.ts +1 -1
  36. package/dist/codegen/cosmos/gov/v1/tx.d.ts +3 -7
  37. package/dist/codegen/cosmos/gov/v1/tx.js +2 -20
  38. package/dist/codegen/cosmos/gov/v1/tx.js.map +1 -1
  39. package/dist/codegen/cosmos/gov/v1beta1/gov.d.ts +4 -8
  40. package/dist/codegen/cosmos/gov/v1beta1/gov.js +3 -21
  41. package/dist/codegen/cosmos/gov/v1beta1/gov.js.map +1 -1
  42. package/dist/codegen/cosmos/gov/v1beta1/query.d.ts +1 -1
  43. package/dist/codegen/cosmos/gov/v1beta1/tx.d.ts +3 -7
  44. package/dist/codegen/cosmos/gov/v1beta1/tx.js +2 -20
  45. package/dist/codegen/cosmos/gov/v1beta1/tx.js.map +1 -1
  46. package/dist/codegen/cosmos/group/v1/events.d.ts +34 -1
  47. package/dist/codegen/cosmos/group/v1/events.js +104 -1
  48. package/dist/codegen/cosmos/group/v1/events.js.map +1 -1
  49. package/dist/codegen/cosmos/group/v1/query.d.ts +67 -0
  50. package/dist/codegen/cosmos/group/v1/query.js +149 -0
  51. package/dist/codegen/cosmos/group/v1/query.js.map +1 -1
  52. package/dist/codegen/cosmos/group/v1/tx.d.ts +40 -34
  53. package/dist/codegen/cosmos/group/v1/tx.js +93 -65
  54. package/dist/codegen/cosmos/group/v1/tx.js.map +1 -1
  55. package/dist/codegen/cosmos/group/v1/types.d.ts +118 -75
  56. package/dist/codegen/cosmos/group/v1/types.js +89 -117
  57. package/dist/codegen/cosmos/group/v1/types.js.map +1 -1
  58. package/dist/codegen/cosmos/params/v1beta1/query.d.ts +12 -0
  59. package/dist/codegen/cosmos/params/v1beta1/query.js.map +1 -1
  60. package/dist/codegen/cosmos/staking/v1beta1/query.d.ts +3 -3
  61. package/dist/codegen/cosmos/staking/v1beta1/staking.d.ts +5 -1
  62. package/dist/codegen/cosmos/staking/v1beta1/staking.js.map +1 -1
  63. package/dist/codegen/cosmos/staking/v1beta1/tx.d.ts +68 -0
  64. package/dist/codegen/cosmos/staking/v1beta1/tx.js +150 -0
  65. package/dist/codegen/cosmos/staking/v1beta1/tx.js.map +1 -1
  66. package/dist/codegen/cosmos/tx/signing/v1beta1/signing.d.ts +13 -0
  67. package/dist/codegen/cosmos/tx/signing/v1beta1/signing.js +18 -0
  68. package/dist/codegen/cosmos/tx/signing/v1beta1/signing.js.map +1 -1
  69. package/dist/codegen/cosmos/tx/v1beta1/service.d.ts +24 -2
  70. package/dist/codegen/cosmos/tx/v1beta1/service.js +42 -0
  71. package/dist/codegen/cosmos/tx/v1beta1/service.js.map +1 -1
  72. package/dist/codegen/cosmos/tx/v1beta1/tx.d.ts +12 -5
  73. package/dist/codegen/cosmos/tx/v1beta1/tx.js.map +1 -1
  74. package/dist/codegen/cosmos/vesting/v1beta1/tx.d.ts +206 -2
  75. package/dist/codegen/cosmos/vesting/v1beta1/tx.js +419 -0
  76. package/dist/codegen/cosmos/vesting/v1beta1/tx.js.map +1 -1
  77. package/dist/codegen/cosmos/vesting/v1beta1/vesting.d.ts +59 -2
  78. package/dist/codegen/cosmos/vesting/v1beta1/vesting.js +132 -0
  79. package/dist/codegen/cosmos/vesting/v1beta1/vesting.js.map +1 -1
  80. package/dist/codegen/gogoproto/bundle.js +2 -2
  81. package/dist/codegen/google/bundle.d.ts +277 -277
  82. package/dist/codegen/google/bundle.js +6 -6
  83. package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/controller.d.ts +31 -0
  84. package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/controller.js +65 -0
  85. package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/controller.js.map +1 -0
  86. package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/query.d.ts +95 -0
  87. package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/query.js +242 -0
  88. package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/query.js.map +1 -0
  89. package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +108 -0
  90. package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/tx.js +313 -0
  91. package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/tx.js.map +1 -0
  92. package/dist/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +150 -0
  93. package/dist/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.js +500 -0
  94. package/dist/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.js.map +1 -0
  95. package/dist/codegen/ibc/applications/interchain_accounts/host/v1/host.d.ts +34 -0
  96. package/dist/codegen/ibc/applications/interchain_accounts/host/v1/host.js +82 -0
  97. package/dist/codegen/ibc/applications/interchain_accounts/host/v1/host.js.map +1 -0
  98. package/dist/codegen/ibc/applications/interchain_accounts/host/v1/query.d.ts +47 -0
  99. package/dist/codegen/ibc/applications/interchain_accounts/host/v1/query.js +113 -0
  100. package/dist/codegen/ibc/applications/interchain_accounts/host/v1/query.js.map +1 -0
  101. package/dist/codegen/ibc/applications/interchain_accounts/v1/account.d.ts +29 -0
  102. package/dist/codegen/ibc/applications/interchain_accounts/v1/account.js +85 -0
  103. package/dist/codegen/ibc/applications/interchain_accounts/v1/account.js.map +1 -0
  104. package/dist/codegen/ibc/applications/interchain_accounts/v1/metadata.d.ts +49 -0
  105. package/dist/codegen/ibc/applications/interchain_accounts/v1/metadata.js +118 -0
  106. package/dist/codegen/ibc/applications/interchain_accounts/v1/metadata.js.map +1 -0
  107. package/dist/codegen/ibc/applications/interchain_accounts/v1/packet.d.ts +66 -0
  108. package/dist/codegen/ibc/applications/interchain_accounts/v1/packet.js +189 -0
  109. package/dist/codegen/ibc/applications/interchain_accounts/v1/packet.js.map +1 -0
  110. package/dist/codegen/ibc/applications/transfer/v1/authz.d.ts +67 -0
  111. package/dist/codegen/ibc/applications/transfer/v1/authz.js +177 -0
  112. package/dist/codegen/ibc/applications/transfer/v1/authz.js.map +1 -0
  113. package/dist/codegen/ibc/applications/transfer/v1/genesis.d.ts +29 -0
  114. package/dist/codegen/ibc/applications/transfer/v1/genesis.js +95 -0
  115. package/dist/codegen/ibc/applications/transfer/v1/genesis.js.map +1 -0
  116. package/dist/codegen/ibc/applications/transfer/v1/query.d.ts +282 -0
  117. package/dist/codegen/ibc/applications/transfer/v1/query.js +633 -0
  118. package/dist/codegen/ibc/applications/transfer/v1/query.js.map +1 -0
  119. package/dist/codegen/ibc/applications/transfer/v1/transfer.d.ts +80 -0
  120. package/dist/codegen/ibc/applications/transfer/v1/transfer.js +146 -0
  121. package/dist/codegen/ibc/applications/transfer/v1/transfer.js.map +1 -0
  122. package/dist/codegen/ibc/applications/transfer/v1/tx.d.ts +86 -0
  123. package/dist/codegen/ibc/applications/transfer/v1/tx.js +219 -0
  124. package/dist/codegen/ibc/applications/transfer/v1/tx.js.map +1 -0
  125. package/dist/codegen/ibc/applications/transfer/v2/packet.d.ts +45 -0
  126. package/dist/codegen/ibc/applications/transfer/v2/packet.js +102 -0
  127. package/dist/codegen/ibc/applications/transfer/v2/packet.js.map +1 -0
  128. package/dist/codegen/ibc/bundle.d.ts +2266 -122
  129. package/dist/codegen/ibc/bundle.js +124 -4
  130. package/dist/codegen/ibc/bundle.js.map +1 -1
  131. package/dist/codegen/ibc/core/channel/v1/genesis.d.ts +73 -0
  132. package/dist/codegen/ibc/core/channel/v1/genesis.js +280 -0
  133. package/dist/codegen/ibc/core/channel/v1/genesis.js.map +1 -0
  134. package/dist/codegen/ibc/core/channel/v1/query.d.ts +914 -0
  135. package/dist/codegen/ibc/core/channel/v1/query.js +2343 -0
  136. package/dist/codegen/ibc/core/channel/v1/query.js.map +1 -0
  137. package/dist/codegen/ibc/core/channel/v1/tx.d.ts +604 -0
  138. package/dist/codegen/ibc/core/channel/v1/tx.js +1744 -0
  139. package/dist/codegen/ibc/core/channel/v1/tx.js.map +1 -0
  140. package/dist/codegen/ibc/core/client/v1/genesis.d.ts +104 -0
  141. package/dist/codegen/ibc/core/client/v1/genesis.js +300 -0
  142. package/dist/codegen/ibc/core/client/v1/genesis.js.map +1 -0
  143. package/dist/codegen/ibc/core/client/v1/query.d.ts +577 -0
  144. package/dist/codegen/ibc/core/client/v1/query.js +1282 -0
  145. package/dist/codegen/ibc/core/client/v1/query.js.map +1 -0
  146. package/dist/codegen/ibc/core/client/v1/tx.d.ts +245 -0
  147. package/dist/codegen/ibc/core/client/v1/tx.js +586 -0
  148. package/dist/codegen/ibc/core/client/v1/tx.js.map +1 -0
  149. package/dist/codegen/ibc/core/commitment/v1/commitment.d.ts +128 -0
  150. package/dist/codegen/ibc/core/commitment/v1/commitment.js +258 -0
  151. package/dist/codegen/ibc/core/commitment/v1/commitment.js.map +1 -0
  152. package/dist/codegen/ibc/core/connection/v1/connection.d.ts +272 -0
  153. package/dist/codegen/ibc/core/connection/v1/connection.js +677 -0
  154. package/dist/codegen/ibc/core/connection/v1/connection.js.map +1 -0
  155. package/dist/codegen/ibc/core/connection/v1/genesis.d.ts +32 -0
  156. package/dist/codegen/ibc/core/connection/v1/genesis.js +121 -0
  157. package/dist/codegen/ibc/core/connection/v1/genesis.js.map +1 -0
  158. package/dist/codegen/ibc/core/connection/v1/query.d.ts +388 -0
  159. package/dist/codegen/ibc/core/connection/v1/query.js +951 -0
  160. package/dist/codegen/ibc/core/connection/v1/query.js.map +1 -0
  161. package/dist/codegen/ibc/core/connection/v1/tx.d.ts +286 -0
  162. package/dist/codegen/ibc/core/connection/v1/tx.js +842 -0
  163. package/dist/codegen/ibc/core/connection/v1/tx.js.map +1 -0
  164. package/dist/codegen/ibc/lightclients/localhost/v1/localhost.d.ts +35 -0
  165. package/dist/codegen/ibc/lightclients/localhost/v1/localhost.js +77 -0
  166. package/dist/codegen/ibc/lightclients/localhost/v1/localhost.js.map +1 -0
  167. package/dist/codegen/ibc/lightclients/solomachine/v1/solomachine.d.ts +549 -0
  168. package/dist/codegen/ibc/lightclients/solomachine/v1/solomachine.js +1519 -0
  169. package/dist/codegen/ibc/lightclients/solomachine/v1/solomachine.js.map +1 -0
  170. package/dist/codegen/ibc/lightclients/solomachine/v2/solomachine.d.ts +549 -0
  171. package/dist/codegen/ibc/lightclients/solomachine/v2/solomachine.js +1513 -0
  172. package/dist/codegen/ibc/lightclients/solomachine/v2/solomachine.js.map +1 -0
  173. package/dist/codegen/ibc/lightclients/tendermint/v1/tendermint.d.ts +231 -0
  174. package/dist/codegen/ibc/lightclients/tendermint/v1/tendermint.js +624 -0
  175. package/dist/codegen/ibc/lightclients/tendermint/v1/tendermint.js.map +1 -0
  176. package/dist/codegen/ics23/bundle.d.ts +154 -0
  177. package/dist/codegen/ics23/bundle.js +6 -0
  178. package/dist/codegen/ics23/bundle.js.map +1 -0
  179. package/dist/codegen/index.d.ts +1 -0
  180. package/dist/codegen/index.js +1 -0
  181. package/dist/codegen/index.js.map +1 -1
  182. package/dist/codegen/proofs.d.ts +569 -0
  183. package/dist/codegen/proofs.js +1435 -0
  184. package/dist/codegen/proofs.js.map +1 -0
  185. package/dist/codegen/tendermint/bundle.d.ts +716 -716
  186. package/dist/codegen/tendermint/bundle.js +22 -22
  187. package/dist/codegen/tendermint/bundle.js.map +1 -1
  188. package/package.json +8 -5
@@ -0,0 +1,569 @@
1
+ import { BinaryReader, BinaryWriter } from './binary.js';
2
+ export declare enum HashOp {
3
+ /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */
4
+ NO_HASH = 0,
5
+ SHA256 = 1,
6
+ SHA512 = 2,
7
+ KECCAK = 3,
8
+ RIPEMD160 = 4,
9
+ /** BITCOIN - ripemd160(sha256(x)) */
10
+ BITCOIN = 5,
11
+ SHA512_256 = 6,
12
+ UNRECOGNIZED = -1
13
+ }
14
+ export declare const HashOpSDKType: typeof HashOp;
15
+ export declare function hashOpFromJSON(object: any): HashOp;
16
+ export declare function hashOpToJSON(object: HashOp): string;
17
+ /**
18
+ * LengthOp defines how to process the key and value of the LeafOp
19
+ * to include length information. After encoding the length with the given
20
+ * algorithm, the length will be prepended to the key and value bytes.
21
+ * (Each one with it's own encoded length)
22
+ */
23
+ export declare enum LengthOp {
24
+ /** NO_PREFIX - NO_PREFIX don't include any length info */
25
+ NO_PREFIX = 0,
26
+ /** VAR_PROTO - VAR_PROTO uses protobuf (and go-amino) varint encoding of the length */
27
+ VAR_PROTO = 1,
28
+ /** VAR_RLP - VAR_RLP uses rlp int encoding of the length */
29
+ VAR_RLP = 2,
30
+ /** FIXED32_BIG - FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer */
31
+ FIXED32_BIG = 3,
32
+ /** FIXED32_LITTLE - FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer */
33
+ FIXED32_LITTLE = 4,
34
+ /** FIXED64_BIG - FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer */
35
+ FIXED64_BIG = 5,
36
+ /** FIXED64_LITTLE - FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer */
37
+ FIXED64_LITTLE = 6,
38
+ /** REQUIRE_32_BYTES - REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) */
39
+ REQUIRE_32_BYTES = 7,
40
+ /** REQUIRE_64_BYTES - REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) */
41
+ REQUIRE_64_BYTES = 8,
42
+ UNRECOGNIZED = -1
43
+ }
44
+ export declare const LengthOpSDKType: typeof LengthOp;
45
+ export declare function lengthOpFromJSON(object: any): LengthOp;
46
+ export declare function lengthOpToJSON(object: LengthOp): string;
47
+ /**
48
+ * ExistenceProof takes a key and a value and a set of steps to perform on it.
49
+ * The result of peforming all these steps will provide a "root hash", which can
50
+ * be compared to the value in a header.
51
+ *
52
+ * Since it is computationally infeasible to produce a hash collission for any of the used
53
+ * cryptographic hash functions, if someone can provide a series of operations to transform
54
+ * a given key and value into a root hash that matches some trusted root, these key and values
55
+ * must be in the referenced merkle tree.
56
+ *
57
+ * The only possible issue is maliablity in LeafOp, such as providing extra prefix data,
58
+ * which should be controlled by a spec. Eg. with lengthOp as NONE,
59
+ * prefix = FOO, key = BAR, value = CHOICE
60
+ * and
61
+ * prefix = F, key = OOBAR, value = CHOICE
62
+ * would produce the same value.
63
+ *
64
+ * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field
65
+ * in the ProofSpec is valuable to prevent this mutability. And why all trees should
66
+ * length-prefix the data before hashing it.
67
+ */
68
+ export interface ExistenceProof {
69
+ key: Uint8Array;
70
+ value: Uint8Array;
71
+ leaf?: LeafOp;
72
+ path: InnerOp[];
73
+ }
74
+ export interface ExistenceProofProtoMsg {
75
+ typeUrl: '/ics23.ExistenceProof';
76
+ value: Uint8Array;
77
+ }
78
+ /**
79
+ * ExistenceProof takes a key and a value and a set of steps to perform on it.
80
+ * The result of peforming all these steps will provide a "root hash", which can
81
+ * be compared to the value in a header.
82
+ *
83
+ * Since it is computationally infeasible to produce a hash collission for any of the used
84
+ * cryptographic hash functions, if someone can provide a series of operations to transform
85
+ * a given key and value into a root hash that matches some trusted root, these key and values
86
+ * must be in the referenced merkle tree.
87
+ *
88
+ * The only possible issue is maliablity in LeafOp, such as providing extra prefix data,
89
+ * which should be controlled by a spec. Eg. with lengthOp as NONE,
90
+ * prefix = FOO, key = BAR, value = CHOICE
91
+ * and
92
+ * prefix = F, key = OOBAR, value = CHOICE
93
+ * would produce the same value.
94
+ *
95
+ * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field
96
+ * in the ProofSpec is valuable to prevent this mutability. And why all trees should
97
+ * length-prefix the data before hashing it.
98
+ */
99
+ export interface ExistenceProofSDKType {
100
+ key: Uint8Array;
101
+ value: Uint8Array;
102
+ leaf?: LeafOpSDKType;
103
+ path: InnerOpSDKType[];
104
+ }
105
+ /**
106
+ * NonExistenceProof takes a proof of two neighbors, one left of the desired key,
107
+ * one right of the desired key. If both proofs are valid AND they are neighbors,
108
+ * then there is no valid proof for the given key.
109
+ */
110
+ export interface NonExistenceProof {
111
+ /** TODO: remove this as unnecessary??? we prove a range */
112
+ key: Uint8Array;
113
+ left?: ExistenceProof;
114
+ right?: ExistenceProof;
115
+ }
116
+ export interface NonExistenceProofProtoMsg {
117
+ typeUrl: '/ics23.NonExistenceProof';
118
+ value: Uint8Array;
119
+ }
120
+ /**
121
+ * NonExistenceProof takes a proof of two neighbors, one left of the desired key,
122
+ * one right of the desired key. If both proofs are valid AND they are neighbors,
123
+ * then there is no valid proof for the given key.
124
+ */
125
+ export interface NonExistenceProofSDKType {
126
+ key: Uint8Array;
127
+ left?: ExistenceProofSDKType;
128
+ right?: ExistenceProofSDKType;
129
+ }
130
+ /** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */
131
+ export interface CommitmentProof {
132
+ exist?: ExistenceProof;
133
+ nonexist?: NonExistenceProof;
134
+ batch?: BatchProof;
135
+ compressed?: CompressedBatchProof;
136
+ }
137
+ export interface CommitmentProofProtoMsg {
138
+ typeUrl: '/ics23.CommitmentProof';
139
+ value: Uint8Array;
140
+ }
141
+ /** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */
142
+ export interface CommitmentProofSDKType {
143
+ exist?: ExistenceProofSDKType;
144
+ nonexist?: NonExistenceProofSDKType;
145
+ batch?: BatchProofSDKType;
146
+ compressed?: CompressedBatchProofSDKType;
147
+ }
148
+ /**
149
+ * LeafOp represents the raw key-value data we wish to prove, and
150
+ * must be flexible to represent the internal transformation from
151
+ * the original key-value pairs into the basis hash, for many existing
152
+ * merkle trees.
153
+ *
154
+ * key and value are passed in. So that the signature of this operation is:
155
+ * leafOp(key, value) -> output
156
+ *
157
+ * To process this, first prehash the keys and values if needed (ANY means no hash in this case):
158
+ * hkey = prehashKey(key)
159
+ * hvalue = prehashValue(value)
160
+ *
161
+ * Then combine the bytes, and hash it
162
+ * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue)
163
+ */
164
+ export interface LeafOp {
165
+ hash: HashOp;
166
+ prehashKey: HashOp;
167
+ prehashValue: HashOp;
168
+ length: LengthOp;
169
+ /**
170
+ * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
171
+ * a leaf node from an inner node.
172
+ */
173
+ prefix: Uint8Array;
174
+ }
175
+ export interface LeafOpProtoMsg {
176
+ typeUrl: '/ics23.LeafOp';
177
+ value: Uint8Array;
178
+ }
179
+ /**
180
+ * LeafOp represents the raw key-value data we wish to prove, and
181
+ * must be flexible to represent the internal transformation from
182
+ * the original key-value pairs into the basis hash, for many existing
183
+ * merkle trees.
184
+ *
185
+ * key and value are passed in. So that the signature of this operation is:
186
+ * leafOp(key, value) -> output
187
+ *
188
+ * To process this, first prehash the keys and values if needed (ANY means no hash in this case):
189
+ * hkey = prehashKey(key)
190
+ * hvalue = prehashValue(value)
191
+ *
192
+ * Then combine the bytes, and hash it
193
+ * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue)
194
+ */
195
+ export interface LeafOpSDKType {
196
+ hash: HashOp;
197
+ prehash_key: HashOp;
198
+ prehash_value: HashOp;
199
+ length: LengthOp;
200
+ prefix: Uint8Array;
201
+ }
202
+ /**
203
+ * InnerOp represents a merkle-proof step that is not a leaf.
204
+ * It represents concatenating two children and hashing them to provide the next result.
205
+ *
206
+ * The result of the previous step is passed in, so the signature of this op is:
207
+ * innerOp(child) -> output
208
+ *
209
+ * The result of applying InnerOp should be:
210
+ * output = op.hash(op.prefix || child || op.suffix)
211
+ *
212
+ * where the || operator is concatenation of binary data,
213
+ * and child is the result of hashing all the tree below this step.
214
+ *
215
+ * Any special data, like prepending child with the length, or prepending the entire operation with
216
+ * some value to differentiate from leaf nodes, should be included in prefix and suffix.
217
+ * If either of prefix or suffix is empty, we just treat it as an empty string
218
+ */
219
+ export interface InnerOp {
220
+ hash: HashOp;
221
+ prefix: Uint8Array;
222
+ suffix: Uint8Array;
223
+ }
224
+ export interface InnerOpProtoMsg {
225
+ typeUrl: '/ics23.InnerOp';
226
+ value: Uint8Array;
227
+ }
228
+ /**
229
+ * InnerOp represents a merkle-proof step that is not a leaf.
230
+ * It represents concatenating two children and hashing them to provide the next result.
231
+ *
232
+ * The result of the previous step is passed in, so the signature of this op is:
233
+ * innerOp(child) -> output
234
+ *
235
+ * The result of applying InnerOp should be:
236
+ * output = op.hash(op.prefix || child || op.suffix)
237
+ *
238
+ * where the || operator is concatenation of binary data,
239
+ * and child is the result of hashing all the tree below this step.
240
+ *
241
+ * Any special data, like prepending child with the length, or prepending the entire operation with
242
+ * some value to differentiate from leaf nodes, should be included in prefix and suffix.
243
+ * If either of prefix or suffix is empty, we just treat it as an empty string
244
+ */
245
+ export interface InnerOpSDKType {
246
+ hash: HashOp;
247
+ prefix: Uint8Array;
248
+ suffix: Uint8Array;
249
+ }
250
+ /**
251
+ * ProofSpec defines what the expected parameters are for a given proof type.
252
+ * This can be stored in the client and used to validate any incoming proofs.
253
+ *
254
+ * verify(ProofSpec, Proof) -> Proof | Error
255
+ *
256
+ * As demonstrated in tests, if we don't fix the algorithm used to calculate the
257
+ * LeafHash for a given tree, there are many possible key-value pairs that can
258
+ * generate a given hash (by interpretting the preimage differently).
259
+ * We need this for proper security, requires client knows a priori what
260
+ * tree format server uses. But not in code, rather a configuration object.
261
+ */
262
+ export interface ProofSpec {
263
+ /**
264
+ * any field in the ExistenceProof must be the same as in this spec.
265
+ * except Prefix, which is just the first bytes of prefix (spec can be longer)
266
+ */
267
+ leafSpec?: LeafOp;
268
+ innerSpec?: InnerSpec;
269
+ /** max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) */
270
+ maxDepth: number;
271
+ /** min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) */
272
+ minDepth: number;
273
+ }
274
+ export interface ProofSpecProtoMsg {
275
+ typeUrl: '/ics23.ProofSpec';
276
+ value: Uint8Array;
277
+ }
278
+ /**
279
+ * ProofSpec defines what the expected parameters are for a given proof type.
280
+ * This can be stored in the client and used to validate any incoming proofs.
281
+ *
282
+ * verify(ProofSpec, Proof) -> Proof | Error
283
+ *
284
+ * As demonstrated in tests, if we don't fix the algorithm used to calculate the
285
+ * LeafHash for a given tree, there are many possible key-value pairs that can
286
+ * generate a given hash (by interpretting the preimage differently).
287
+ * We need this for proper security, requires client knows a priori what
288
+ * tree format server uses. But not in code, rather a configuration object.
289
+ */
290
+ export interface ProofSpecSDKType {
291
+ leaf_spec?: LeafOpSDKType;
292
+ inner_spec?: InnerSpecSDKType;
293
+ max_depth: number;
294
+ min_depth: number;
295
+ }
296
+ /**
297
+ * InnerSpec contains all store-specific structure info to determine if two proofs from a
298
+ * given store are neighbors.
299
+ *
300
+ * This enables:
301
+ *
302
+ * isLeftMost(spec: InnerSpec, op: InnerOp)
303
+ * isRightMost(spec: InnerSpec, op: InnerOp)
304
+ * isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp)
305
+ */
306
+ export interface InnerSpec {
307
+ /**
308
+ * Child order is the ordering of the children node, must count from 0
309
+ * iavl tree is [0, 1] (left then right)
310
+ * merk is [0, 2, 1] (left, right, here)
311
+ */
312
+ childOrder: number[];
313
+ childSize: number;
314
+ minPrefixLength: number;
315
+ maxPrefixLength: number;
316
+ /** empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) */
317
+ emptyChild: Uint8Array;
318
+ /** hash is the algorithm that must be used for each InnerOp */
319
+ hash: HashOp;
320
+ }
321
+ export interface InnerSpecProtoMsg {
322
+ typeUrl: '/ics23.InnerSpec';
323
+ value: Uint8Array;
324
+ }
325
+ /**
326
+ * InnerSpec contains all store-specific structure info to determine if two proofs from a
327
+ * given store are neighbors.
328
+ *
329
+ * This enables:
330
+ *
331
+ * isLeftMost(spec: InnerSpec, op: InnerOp)
332
+ * isRightMost(spec: InnerSpec, op: InnerOp)
333
+ * isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp)
334
+ */
335
+ export interface InnerSpecSDKType {
336
+ child_order: number[];
337
+ child_size: number;
338
+ min_prefix_length: number;
339
+ max_prefix_length: number;
340
+ empty_child: Uint8Array;
341
+ hash: HashOp;
342
+ }
343
+ /** BatchProof is a group of multiple proof types than can be compressed */
344
+ export interface BatchProof {
345
+ entries: BatchEntry[];
346
+ }
347
+ export interface BatchProofProtoMsg {
348
+ typeUrl: '/ics23.BatchProof';
349
+ value: Uint8Array;
350
+ }
351
+ /** BatchProof is a group of multiple proof types than can be compressed */
352
+ export interface BatchProofSDKType {
353
+ entries: BatchEntrySDKType[];
354
+ }
355
+ /** Use BatchEntry not CommitmentProof, to avoid recursion */
356
+ export interface BatchEntry {
357
+ exist?: ExistenceProof;
358
+ nonexist?: NonExistenceProof;
359
+ }
360
+ export interface BatchEntryProtoMsg {
361
+ typeUrl: '/ics23.BatchEntry';
362
+ value: Uint8Array;
363
+ }
364
+ /** Use BatchEntry not CommitmentProof, to avoid recursion */
365
+ export interface BatchEntrySDKType {
366
+ exist?: ExistenceProofSDKType;
367
+ nonexist?: NonExistenceProofSDKType;
368
+ }
369
+ export interface CompressedBatchProof {
370
+ entries: CompressedBatchEntry[];
371
+ lookupInners: InnerOp[];
372
+ }
373
+ export interface CompressedBatchProofProtoMsg {
374
+ typeUrl: '/ics23.CompressedBatchProof';
375
+ value: Uint8Array;
376
+ }
377
+ export interface CompressedBatchProofSDKType {
378
+ entries: CompressedBatchEntrySDKType[];
379
+ lookup_inners: InnerOpSDKType[];
380
+ }
381
+ /** Use BatchEntry not CommitmentProof, to avoid recursion */
382
+ export interface CompressedBatchEntry {
383
+ exist?: CompressedExistenceProof;
384
+ nonexist?: CompressedNonExistenceProof;
385
+ }
386
+ export interface CompressedBatchEntryProtoMsg {
387
+ typeUrl: '/ics23.CompressedBatchEntry';
388
+ value: Uint8Array;
389
+ }
390
+ /** Use BatchEntry not CommitmentProof, to avoid recursion */
391
+ export interface CompressedBatchEntrySDKType {
392
+ exist?: CompressedExistenceProofSDKType;
393
+ nonexist?: CompressedNonExistenceProofSDKType;
394
+ }
395
+ export interface CompressedExistenceProof {
396
+ key: Uint8Array;
397
+ value: Uint8Array;
398
+ leaf?: LeafOp;
399
+ /** these are indexes into the lookup_inners table in CompressedBatchProof */
400
+ path: number[];
401
+ }
402
+ export interface CompressedExistenceProofProtoMsg {
403
+ typeUrl: '/ics23.CompressedExistenceProof';
404
+ value: Uint8Array;
405
+ }
406
+ export interface CompressedExistenceProofSDKType {
407
+ key: Uint8Array;
408
+ value: Uint8Array;
409
+ leaf?: LeafOpSDKType;
410
+ path: number[];
411
+ }
412
+ export interface CompressedNonExistenceProof {
413
+ /** TODO: remove this as unnecessary??? we prove a range */
414
+ key: Uint8Array;
415
+ left?: CompressedExistenceProof;
416
+ right?: CompressedExistenceProof;
417
+ }
418
+ export interface CompressedNonExistenceProofProtoMsg {
419
+ typeUrl: '/ics23.CompressedNonExistenceProof';
420
+ value: Uint8Array;
421
+ }
422
+ export interface CompressedNonExistenceProofSDKType {
423
+ key: Uint8Array;
424
+ left?: CompressedExistenceProofSDKType;
425
+ right?: CompressedExistenceProofSDKType;
426
+ }
427
+ export declare const ExistenceProof: {
428
+ typeUrl: string;
429
+ encode(message: ExistenceProof, writer?: BinaryWriter): BinaryWriter;
430
+ decode(input: BinaryReader | Uint8Array, length?: number): ExistenceProof;
431
+ fromJSON(object: any): ExistenceProof;
432
+ toJSON(message: ExistenceProof): unknown;
433
+ fromPartial(object: Partial<ExistenceProof>): ExistenceProof;
434
+ fromProtoMsg(message: ExistenceProofProtoMsg): ExistenceProof;
435
+ toProto(message: ExistenceProof): Uint8Array;
436
+ toProtoMsg(message: ExistenceProof): ExistenceProofProtoMsg;
437
+ };
438
+ export declare const NonExistenceProof: {
439
+ typeUrl: string;
440
+ encode(message: NonExistenceProof, writer?: BinaryWriter): BinaryWriter;
441
+ decode(input: BinaryReader | Uint8Array, length?: number): NonExistenceProof;
442
+ fromJSON(object: any): NonExistenceProof;
443
+ toJSON(message: NonExistenceProof): unknown;
444
+ fromPartial(object: Partial<NonExistenceProof>): NonExistenceProof;
445
+ fromProtoMsg(message: NonExistenceProofProtoMsg): NonExistenceProof;
446
+ toProto(message: NonExistenceProof): Uint8Array;
447
+ toProtoMsg(message: NonExistenceProof): NonExistenceProofProtoMsg;
448
+ };
449
+ export declare const CommitmentProof: {
450
+ typeUrl: string;
451
+ encode(message: CommitmentProof, writer?: BinaryWriter): BinaryWriter;
452
+ decode(input: BinaryReader | Uint8Array, length?: number): CommitmentProof;
453
+ fromJSON(object: any): CommitmentProof;
454
+ toJSON(message: CommitmentProof): unknown;
455
+ fromPartial(object: Partial<CommitmentProof>): CommitmentProof;
456
+ fromProtoMsg(message: CommitmentProofProtoMsg): CommitmentProof;
457
+ toProto(message: CommitmentProof): Uint8Array;
458
+ toProtoMsg(message: CommitmentProof): CommitmentProofProtoMsg;
459
+ };
460
+ export declare const LeafOp: {
461
+ typeUrl: string;
462
+ encode(message: LeafOp, writer?: BinaryWriter): BinaryWriter;
463
+ decode(input: BinaryReader | Uint8Array, length?: number): LeafOp;
464
+ fromJSON(object: any): LeafOp;
465
+ toJSON(message: LeafOp): unknown;
466
+ fromPartial(object: Partial<LeafOp>): LeafOp;
467
+ fromProtoMsg(message: LeafOpProtoMsg): LeafOp;
468
+ toProto(message: LeafOp): Uint8Array;
469
+ toProtoMsg(message: LeafOp): LeafOpProtoMsg;
470
+ };
471
+ export declare const InnerOp: {
472
+ typeUrl: string;
473
+ encode(message: InnerOp, writer?: BinaryWriter): BinaryWriter;
474
+ decode(input: BinaryReader | Uint8Array, length?: number): InnerOp;
475
+ fromJSON(object: any): InnerOp;
476
+ toJSON(message: InnerOp): unknown;
477
+ fromPartial(object: Partial<InnerOp>): InnerOp;
478
+ fromProtoMsg(message: InnerOpProtoMsg): InnerOp;
479
+ toProto(message: InnerOp): Uint8Array;
480
+ toProtoMsg(message: InnerOp): InnerOpProtoMsg;
481
+ };
482
+ export declare const ProofSpec: {
483
+ typeUrl: string;
484
+ encode(message: ProofSpec, writer?: BinaryWriter): BinaryWriter;
485
+ decode(input: BinaryReader | Uint8Array, length?: number): ProofSpec;
486
+ fromJSON(object: any): ProofSpec;
487
+ toJSON(message: ProofSpec): unknown;
488
+ fromPartial(object: Partial<ProofSpec>): ProofSpec;
489
+ fromProtoMsg(message: ProofSpecProtoMsg): ProofSpec;
490
+ toProto(message: ProofSpec): Uint8Array;
491
+ toProtoMsg(message: ProofSpec): ProofSpecProtoMsg;
492
+ };
493
+ export declare const InnerSpec: {
494
+ typeUrl: string;
495
+ encode(message: InnerSpec, writer?: BinaryWriter): BinaryWriter;
496
+ decode(input: BinaryReader | Uint8Array, length?: number): InnerSpec;
497
+ fromJSON(object: any): InnerSpec;
498
+ toJSON(message: InnerSpec): unknown;
499
+ fromPartial(object: Partial<InnerSpec>): InnerSpec;
500
+ fromProtoMsg(message: InnerSpecProtoMsg): InnerSpec;
501
+ toProto(message: InnerSpec): Uint8Array;
502
+ toProtoMsg(message: InnerSpec): InnerSpecProtoMsg;
503
+ };
504
+ export declare const BatchProof: {
505
+ typeUrl: string;
506
+ encode(message: BatchProof, writer?: BinaryWriter): BinaryWriter;
507
+ decode(input: BinaryReader | Uint8Array, length?: number): BatchProof;
508
+ fromJSON(object: any): BatchProof;
509
+ toJSON(message: BatchProof): unknown;
510
+ fromPartial(object: Partial<BatchProof>): BatchProof;
511
+ fromProtoMsg(message: BatchProofProtoMsg): BatchProof;
512
+ toProto(message: BatchProof): Uint8Array;
513
+ toProtoMsg(message: BatchProof): BatchProofProtoMsg;
514
+ };
515
+ export declare const BatchEntry: {
516
+ typeUrl: string;
517
+ encode(message: BatchEntry, writer?: BinaryWriter): BinaryWriter;
518
+ decode(input: BinaryReader | Uint8Array, length?: number): BatchEntry;
519
+ fromJSON(object: any): BatchEntry;
520
+ toJSON(message: BatchEntry): unknown;
521
+ fromPartial(object: Partial<BatchEntry>): BatchEntry;
522
+ fromProtoMsg(message: BatchEntryProtoMsg): BatchEntry;
523
+ toProto(message: BatchEntry): Uint8Array;
524
+ toProtoMsg(message: BatchEntry): BatchEntryProtoMsg;
525
+ };
526
+ export declare const CompressedBatchProof: {
527
+ typeUrl: string;
528
+ encode(message: CompressedBatchProof, writer?: BinaryWriter): BinaryWriter;
529
+ decode(input: BinaryReader | Uint8Array, length?: number): CompressedBatchProof;
530
+ fromJSON(object: any): CompressedBatchProof;
531
+ toJSON(message: CompressedBatchProof): unknown;
532
+ fromPartial(object: Partial<CompressedBatchProof>): CompressedBatchProof;
533
+ fromProtoMsg(message: CompressedBatchProofProtoMsg): CompressedBatchProof;
534
+ toProto(message: CompressedBatchProof): Uint8Array;
535
+ toProtoMsg(message: CompressedBatchProof): CompressedBatchProofProtoMsg;
536
+ };
537
+ export declare const CompressedBatchEntry: {
538
+ typeUrl: string;
539
+ encode(message: CompressedBatchEntry, writer?: BinaryWriter): BinaryWriter;
540
+ decode(input: BinaryReader | Uint8Array, length?: number): CompressedBatchEntry;
541
+ fromJSON(object: any): CompressedBatchEntry;
542
+ toJSON(message: CompressedBatchEntry): unknown;
543
+ fromPartial(object: Partial<CompressedBatchEntry>): CompressedBatchEntry;
544
+ fromProtoMsg(message: CompressedBatchEntryProtoMsg): CompressedBatchEntry;
545
+ toProto(message: CompressedBatchEntry): Uint8Array;
546
+ toProtoMsg(message: CompressedBatchEntry): CompressedBatchEntryProtoMsg;
547
+ };
548
+ export declare const CompressedExistenceProof: {
549
+ typeUrl: string;
550
+ encode(message: CompressedExistenceProof, writer?: BinaryWriter): BinaryWriter;
551
+ decode(input: BinaryReader | Uint8Array, length?: number): CompressedExistenceProof;
552
+ fromJSON(object: any): CompressedExistenceProof;
553
+ toJSON(message: CompressedExistenceProof): unknown;
554
+ fromPartial(object: Partial<CompressedExistenceProof>): CompressedExistenceProof;
555
+ fromProtoMsg(message: CompressedExistenceProofProtoMsg): CompressedExistenceProof;
556
+ toProto(message: CompressedExistenceProof): Uint8Array;
557
+ toProtoMsg(message: CompressedExistenceProof): CompressedExistenceProofProtoMsg;
558
+ };
559
+ export declare const CompressedNonExistenceProof: {
560
+ typeUrl: string;
561
+ encode(message: CompressedNonExistenceProof, writer?: BinaryWriter): BinaryWriter;
562
+ decode(input: BinaryReader | Uint8Array, length?: number): CompressedNonExistenceProof;
563
+ fromJSON(object: any): CompressedNonExistenceProof;
564
+ toJSON(message: CompressedNonExistenceProof): unknown;
565
+ fromPartial(object: Partial<CompressedNonExistenceProof>): CompressedNonExistenceProof;
566
+ fromProtoMsg(message: CompressedNonExistenceProofProtoMsg): CompressedNonExistenceProof;
567
+ toProto(message: CompressedNonExistenceProof): Uint8Array;
568
+ toProtoMsg(message: CompressedNonExistenceProof): CompressedNonExistenceProofProtoMsg;
569
+ };