@bitgo-beta/sdk-coin-islm 1.0.1-beta.182 → 1.0.1-beta.1821

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 (55) hide show
  1. package/dist/resources/types/ethSecp256k1.d.ts +8 -24
  2. package/dist/resources/types/ethSecp256k1.d.ts.map +1 -1
  3. package/dist/resources/types/ethSecp256k1.js +22 -14
  4. package/dist/src/islm.d.ts +0 -1
  5. package/dist/src/islm.d.ts.map +1 -1
  6. package/dist/src/islm.js +1 -1
  7. package/dist/src/lib/constants.d.ts +2 -1
  8. package/dist/src/lib/constants.d.ts.map +1 -1
  9. package/dist/src/lib/constants.js +8 -5
  10. package/dist/src/lib/index.js +18 -8
  11. package/dist/src/lib/keyPair.js +3 -3
  12. package/dist/src/lib/transactionBuilderFactory.js +1 -1
  13. package/dist/src/lib/utils.d.ts +0 -1
  14. package/dist/src/lib/utils.d.ts.map +1 -1
  15. package/dist/src/lib/utils.js +20 -11
  16. package/dist/src/tislm.js +1 -1
  17. package/dist/test/resources/islm.d.ts +216 -0
  18. package/dist/test/resources/islm.d.ts.map +1 -0
  19. package/dist/test/resources/islm.js +219 -0
  20. package/dist/test/unit/islm.d.ts +2 -0
  21. package/dist/test/unit/islm.d.ts.map +1 -0
  22. package/dist/test/unit/islm.js +309 -0
  23. package/dist/test/unit/keyPair.d.ts +2 -0
  24. package/dist/test/unit/keyPair.d.ts.map +1 -0
  25. package/dist/test/unit/keyPair.js +92 -0
  26. package/dist/test/unit/transaction.d.ts +2 -0
  27. package/dist/test/unit/transaction.d.ts.map +1 -0
  28. package/dist/test/unit/transaction.js +219 -0
  29. package/dist/test/unit/transactionBuilder/StakingActivateBuilder.d.ts +2 -0
  30. package/dist/test/unit/transactionBuilder/StakingActivateBuilder.d.ts.map +1 -0
  31. package/dist/test/unit/transactionBuilder/StakingActivateBuilder.js +154 -0
  32. package/dist/test/unit/transactionBuilder/StakingDeactivateBuilder.d.ts +2 -0
  33. package/dist/test/unit/transactionBuilder/StakingDeactivateBuilder.d.ts.map +1 -0
  34. package/dist/test/unit/transactionBuilder/StakingDeactivateBuilder.js +153 -0
  35. package/dist/test/unit/transactionBuilder/StakingWithdrawRewardsBuilder.d.ts +2 -0
  36. package/dist/test/unit/transactionBuilder/StakingWithdrawRewardsBuilder.d.ts.map +1 -0
  37. package/dist/test/unit/transactionBuilder/StakingWithdrawRewardsBuilder.js +154 -0
  38. package/dist/test/unit/transactionBuilder/transactionBuilder.d.ts +2 -0
  39. package/dist/test/unit/transactionBuilder/transactionBuilder.d.ts.map +1 -0
  40. package/dist/test/unit/transactionBuilder/transactionBuilder.js +112 -0
  41. package/dist/test/unit/transactionBuilder/transferBuilder.d.ts +2 -0
  42. package/dist/test/unit/transactionBuilder/transferBuilder.d.ts.map +1 -0
  43. package/dist/test/unit/transactionBuilder/transferBuilder.js +189 -0
  44. package/dist/test/unit/utils.d.ts +2 -0
  45. package/dist/test/unit/utils.d.ts.map +1 -0
  46. package/dist/test/unit/utils.js +76 -0
  47. package/dist/tsconfig.tsbuildinfo +1 -0
  48. package/package.json +14 -10
  49. package/.eslintignore +0 -5
  50. package/.mocharc.yml +0 -8
  51. package/CHANGELOG.md +0 -258
  52. package/resources/README.md +0 -15
  53. package/resources/proto/ethermint/crypto/v1/ethsecp256k1/ethSecp256k1.proto +0 -23
  54. package/resources/proto/gogoproto/gogo.proto +0 -145
  55. package/resources/types/ethSecp256k1.ts +0 -183
@@ -1,183 +0,0 @@
1
- /* eslint-disable */
2
- import * as _m0 from 'protobufjs/minimal';
3
-
4
- export const protobufPackage = 'ethermint.crypto.v1.ethsecp256k1';
5
-
6
- /**
7
- * PubKey defines a type alias for an ecdsa.PublicKey that implements
8
- * Tendermint's PubKey interface. It represents the 33-byte compressed public
9
- * key format.
10
- */
11
- export interface PubKey {
12
- /** key is the public key in byte form */
13
- key: Uint8Array;
14
- }
15
-
16
- /**
17
- * PrivKey defines a type alias for an ecdsa.PrivateKey that implements
18
- * Tendermint's PrivateKey interface.
19
- */
20
- export interface PrivKey {
21
- /** key is the private key in byte form */
22
- key: Uint8Array;
23
- }
24
-
25
- function createBasePubKey(): PubKey {
26
- return { key: new Uint8Array(0) };
27
- }
28
-
29
- export const PubKey = {
30
- encode(message: PubKey, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
31
- if (message.key.length !== 0) {
32
- writer.uint32(10).bytes(message.key);
33
- }
34
- return writer;
35
- },
36
-
37
- decode(input: _m0.Reader | Uint8Array, length?: number): PubKey {
38
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
39
- let end = length === undefined ? reader.len : reader.pos + length;
40
- const message = createBasePubKey();
41
- while (reader.pos < end) {
42
- const tag = reader.uint32();
43
- switch (tag >>> 3) {
44
- case 1:
45
- if (tag !== 10) {
46
- break;
47
- }
48
-
49
- message.key = reader.bytes();
50
- continue;
51
- }
52
- if ((tag & 7) === 4 || tag === 0) {
53
- break;
54
- }
55
- reader.skipType(tag & 7);
56
- }
57
- return message;
58
- },
59
-
60
- fromJSON(object: any): PubKey {
61
- return { key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0) };
62
- },
63
-
64
- toJSON(message: PubKey): unknown {
65
- const obj: any = {};
66
- if (message.key.length !== 0) {
67
- obj.key = base64FromBytes(message.key);
68
- }
69
- return obj;
70
- },
71
-
72
- create<I extends Exact<DeepPartial<PubKey>, I>>(base?: I): PubKey {
73
- return PubKey.fromPartial(base ?? ({} as any));
74
- },
75
- fromPartial<I extends Exact<DeepPartial<PubKey>, I>>(object: I): PubKey {
76
- const message = createBasePubKey();
77
- message.key = object.key ?? new Uint8Array(0);
78
- return message;
79
- },
80
- };
81
-
82
- function createBasePrivKey(): PrivKey {
83
- return { key: new Uint8Array(0) };
84
- }
85
-
86
- export const PrivKey = {
87
- encode(message: PrivKey, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
88
- if (message.key.length !== 0) {
89
- writer.uint32(10).bytes(message.key);
90
- }
91
- return writer;
92
- },
93
-
94
- decode(input: _m0.Reader | Uint8Array, length?: number): PrivKey {
95
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
96
- let end = length === undefined ? reader.len : reader.pos + length;
97
- const message = createBasePrivKey();
98
- while (reader.pos < end) {
99
- const tag = reader.uint32();
100
- switch (tag >>> 3) {
101
- case 1:
102
- if (tag !== 10) {
103
- break;
104
- }
105
-
106
- message.key = reader.bytes();
107
- continue;
108
- }
109
- if ((tag & 7) === 4 || tag === 0) {
110
- break;
111
- }
112
- reader.skipType(tag & 7);
113
- }
114
- return message;
115
- },
116
-
117
- fromJSON(object: any): PrivKey {
118
- return { key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0) };
119
- },
120
-
121
- toJSON(message: PrivKey): unknown {
122
- const obj: any = {};
123
- if (message.key.length !== 0) {
124
- obj.key = base64FromBytes(message.key);
125
- }
126
- return obj;
127
- },
128
-
129
- create<I extends Exact<DeepPartial<PrivKey>, I>>(base?: I): PrivKey {
130
- return PrivKey.fromPartial(base ?? ({} as any));
131
- },
132
- fromPartial<I extends Exact<DeepPartial<PrivKey>, I>>(object: I): PrivKey {
133
- const message = createBasePrivKey();
134
- message.key = object.key ?? new Uint8Array(0);
135
- return message;
136
- },
137
- };
138
-
139
- function bytesFromBase64(b64: string): Uint8Array {
140
- if (globalThis.Buffer) {
141
- return Uint8Array.from(globalThis.Buffer.from(b64, 'base64'));
142
- } else {
143
- const bin = globalThis.atob(b64);
144
- const arr = new Uint8Array(bin.length);
145
- for (let i = 0; i < bin.length; ++i) {
146
- arr[i] = bin.charCodeAt(i);
147
- }
148
- return arr;
149
- }
150
- }
151
-
152
- function base64FromBytes(arr: Uint8Array): string {
153
- if (globalThis.Buffer) {
154
- return globalThis.Buffer.from(arr).toString('base64');
155
- } else {
156
- const bin: string[] = [];
157
- arr.forEach((byte) => {
158
- bin.push(globalThis.String.fromCharCode(byte));
159
- });
160
- return globalThis.btoa(bin.join(''));
161
- }
162
- }
163
-
164
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
165
-
166
- export type DeepPartial<T> = T extends Builtin
167
- ? T
168
- : T extends globalThis.Array<infer U>
169
- ? globalThis.Array<DeepPartial<U>>
170
- : T extends ReadonlyArray<infer U>
171
- ? ReadonlyArray<DeepPartial<U>>
172
- : T extends {}
173
- ? { [K in keyof T]?: DeepPartial<T[K]> }
174
- : Partial<T>;
175
-
176
- type KeysOfUnion<T> = T extends T ? keyof T : never;
177
- export type Exact<P, I extends P> = P extends Builtin
178
- ? P
179
- : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
180
-
181
- function isSet(value: any): boolean {
182
- return value !== null && value !== undefined;
183
- }