@injectivelabs/sdk-ts 1.14.46 → 1.14.48

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.
@@ -0,0 +1,2 @@
1
+ export declare const accountEthParser: <T>(ethAccount: any, pubKeyTypeUrl: "/injective.crypto.v1beta1.ethsecp256k1.PubKey") => T;
2
+ //# sourceMappingURL=AccountParserNoCosmjs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountParserNoCosmjs.d.ts","sourceRoot":"","sources":["../../../../src/core/accounts/AccountParserNoCosmjs.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAChC,YAAY,GAAG,EACf,eAAe,+CAA+C,KAC7D,CAkBF,CAAA"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.accountEthParser = void 0;
4
+ const core_proto_ts_1 = require("@injectivelabs/core-proto-ts");
5
+ const accountEthParser = (ethAccount, pubKeyTypeUrl) => {
6
+ const account = core_proto_ts_1.InjectiveTypesV1Beta1Account.EthAccount.decode(ethAccount.value);
7
+ const baseAccount = account.baseAccount;
8
+ const pubKey = baseAccount.pubKey;
9
+ return {
10
+ address: baseAccount.address,
11
+ pubkey: pubKey
12
+ ? {
13
+ type: pubKeyTypeUrl,
14
+ value: Buffer.from(pubKey.value).toString('base64'),
15
+ }
16
+ : null,
17
+ accountNumber: parseInt(baseAccount.accountNumber, 10),
18
+ sequence: parseInt(baseAccount.sequence, 10),
19
+ };
20
+ };
21
+ exports.accountEthParser = accountEthParser;
22
+ //# sourceMappingURL=AccountParserNoCosmjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountParserNoCosmjs.js","sourceRoot":"","sources":["../../../../src/core/accounts/AccountParserNoCosmjs.ts"],"names":[],"mappings":";;;AAAA,gEAA2E;AAEpE,MAAM,gBAAgB,GAAG,CAC9B,UAAe,EACf,aAA8D,EAC3D,EAAE;IACL,MAAM,OAAO,GAAG,4CAA4B,CAAC,UAAU,CAAC,MAAM,CAC5D,UAAU,CAAC,KAAmB,CAC/B,CAAA;IACD,MAAM,WAAW,GAAG,OAAO,CAAC,WAAY,CAAA;IACxC,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAA;IAEjC,OAAO;QACL,OAAO,EAAE,WAAW,CAAC,OAAO;QAC5B,MAAM,EAAE,MAAM;YACZ,CAAC,CAAC;gBACE,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;aACpD;YACH,CAAC,CAAC,IAAI;QACR,aAAa,EAAE,QAAQ,CAAC,WAAW,CAAC,aAAa,EAAE,EAAE,CAAC;QACtD,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAE,CAAC;KACxC,CAAA;AACR,CAAC,CAAA;AArBY,QAAA,gBAAgB,oBAqB5B"}
@@ -4,5 +4,5 @@ export * from './utils/index.js';
4
4
  export * from './service/index.js';
5
5
  export * from './types/index.js';
6
6
  export * from './json/index.js';
7
- export * from './core/accounts/types.js';
7
+ export * from './core/accounts/AccountParserNoCosmjs.js';
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0CAA0C,CAAA"}
package/dist/cjs/index.js CHANGED
@@ -20,5 +20,5 @@ __exportStar(require("./utils/index.js"), exports);
20
20
  __exportStar(require("./service/index.js"), exports);
21
21
  __exportStar(require("./types/index.js"), exports);
22
22
  __exportStar(require("./json/index.js"), exports);
23
- __exportStar(require("./core/accounts/types.js"), exports);
23
+ __exportStar(require("./core/accounts/AccountParserNoCosmjs.js"), exports);
24
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,oDAAiC;AACjC,mDAAgC;AAChC,qDAAkC;AAClC,mDAAgC;AAChC,kDAA+B;AAC/B,2DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,oDAAiC;AACjC,mDAAgC;AAChC,qDAAkC;AAClC,mDAAgC;AAChC,kDAA+B;AAC/B,2EAAwD"}
@@ -0,0 +1,2 @@
1
+ export declare const accountEthParser: <T>(ethAccount: any, pubKeyTypeUrl: "/injective.crypto.v1beta1.ethsecp256k1.PubKey") => T;
2
+ //# sourceMappingURL=AccountParserNoCosmjs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountParserNoCosmjs.d.ts","sourceRoot":"","sources":["../../../../src/core/accounts/AccountParserNoCosmjs.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAChC,YAAY,GAAG,EACf,eAAe,+CAA+C,KAC7D,CAkBF,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { InjectiveTypesV1Beta1Account } from '@injectivelabs/core-proto-ts';
2
+ export const accountEthParser = (ethAccount, pubKeyTypeUrl) => {
3
+ const account = InjectiveTypesV1Beta1Account.EthAccount.decode(ethAccount.value);
4
+ const baseAccount = account.baseAccount;
5
+ const pubKey = baseAccount.pubKey;
6
+ return {
7
+ address: baseAccount.address,
8
+ pubkey: pubKey
9
+ ? {
10
+ type: pubKeyTypeUrl,
11
+ value: Buffer.from(pubKey.value).toString('base64'),
12
+ }
13
+ : null,
14
+ accountNumber: parseInt(baseAccount.accountNumber, 10),
15
+ sequence: parseInt(baseAccount.sequence, 10),
16
+ };
17
+ };
18
+ //# sourceMappingURL=AccountParserNoCosmjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountParserNoCosmjs.js","sourceRoot":"","sources":["../../../../src/core/accounts/AccountParserNoCosmjs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAA;AAE3E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,UAAe,EACf,aAA8D,EAC3D,EAAE;IACL,MAAM,OAAO,GAAG,4BAA4B,CAAC,UAAU,CAAC,MAAM,CAC5D,UAAU,CAAC,KAAmB,CAC/B,CAAA;IACD,MAAM,WAAW,GAAG,OAAO,CAAC,WAAY,CAAA;IACxC,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAA;IAEjC,OAAO;QACL,OAAO,EAAE,WAAW,CAAC,OAAO;QAC5B,MAAM,EAAE,MAAM;YACZ,CAAC,CAAC;gBACE,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;aACpD;YACH,CAAC,CAAC,IAAI;QACR,aAAa,EAAE,QAAQ,CAAC,WAAW,CAAC,aAAa,EAAE,EAAE,CAAC;QACtD,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAE,CAAC;KACxC,CAAA;AACR,CAAC,CAAA"}
@@ -4,5 +4,5 @@ export * from './utils/index.js';
4
4
  export * from './service/index.js';
5
5
  export * from './types/index.js';
6
6
  export * from './json/index.js';
7
- export * from './core/accounts/types.js';
7
+ export * from './core/accounts/AccountParserNoCosmjs.js';
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0CAA0C,CAAA"}
package/dist/esm/index.js CHANGED
@@ -4,5 +4,5 @@ export * from './utils/index.js';
4
4
  export * from './service/index.js';
5
5
  export * from './types/index.js';
6
6
  export * from './json/index.js';
7
- export * from './core/accounts/types.js';
7
+ export * from './core/accounts/AccountParserNoCosmjs.js';
8
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0CAA0C,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@injectivelabs/sdk-ts",
3
3
  "description": "SDK in TypeScript for building Injective applications in a browser, node, and react native environment.",
4
- "version": "1.14.46",
4
+ "version": "1.14.48",
5
5
  "sideEffects": false,
6
6
  "license": "Apache-2.0",
7
7
  "author": {
@@ -124,16 +124,16 @@
124
124
  "@ethersproject/bytes": "^5.8.0",
125
125
  "@injectivelabs/abacus-proto-ts": "1.14.0",
126
126
  "@injectivelabs/core-proto-ts": "1.14.3",
127
- "@injectivelabs/exceptions": "^1.14.44",
127
+ "@injectivelabs/exceptions": "^1.14.46",
128
128
  "@injectivelabs/grpc-web": "^0.0.1",
129
129
  "@injectivelabs/grpc-web-node-http-transport": "^0.0.2",
130
130
  "@injectivelabs/grpc-web-react-native-transport": "^0.0.2",
131
131
  "@injectivelabs/indexer-proto-ts": "1.13.9",
132
132
  "@injectivelabs/mito-proto-ts": "1.13.2",
133
- "@injectivelabs/networks": "^1.14.44",
133
+ "@injectivelabs/networks": "^1.14.46",
134
134
  "@injectivelabs/olp-proto-ts": "1.13.4",
135
- "@injectivelabs/ts-types": "^1.14.44",
136
- "@injectivelabs/utils": "^1.14.44",
135
+ "@injectivelabs/ts-types": "^1.14.46",
136
+ "@injectivelabs/utils": "^1.14.46",
137
137
  "@metamask/eth-sig-util": "^4.0.0",
138
138
  "@noble/curves": "^1.8.1",
139
139
  "@noble/hashes": "^1.7.1",
@@ -152,7 +152,7 @@
152
152
  "shx": "^0.3.4",
153
153
  "snakecase-keys": "^5.4.1"
154
154
  },
155
- "gitHead": "aa02756037f53ccf6bb4e16008c7b33fbd999330",
155
+ "gitHead": "bd2e37a0defc2b6e731be87f16cb0c0211f2347f",
156
156
  "typedoc": {
157
157
  "entryPoint": "./src/index.ts",
158
158
  "readmeFile": "./README.md",
@@ -1,5 +0,0 @@
1
- import { InjectiveTypesV1Beta1Account } from '@injectivelabs/core-proto-ts';
2
- import { CosmosAuthV1Beta1Auth } from '@injectivelabs/core-proto-ts';
3
- export type InjectiveEthAccount = InjectiveTypesV1Beta1Account.EthAccount;
4
- export type InjectiveEthBaseAccount = CosmosAuthV1Beta1Auth.BaseAccount;
5
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/core/accounts/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAA;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AAEpE,MAAM,MAAM,mBAAmB,GAAG,4BAA4B,CAAC,UAAU,CAAA;AACzE,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,CAAC,WAAW,CAAA"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/core/accounts/types.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import { InjectiveTypesV1Beta1Account } from '@injectivelabs/core-proto-ts';
2
- import { CosmosAuthV1Beta1Auth } from '@injectivelabs/core-proto-ts';
3
- export type InjectiveEthAccount = InjectiveTypesV1Beta1Account.EthAccount;
4
- export type InjectiveEthBaseAccount = CosmosAuthV1Beta1Auth.BaseAccount;
5
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/core/accounts/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAA;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AAEpE,MAAM,MAAM,mBAAmB,GAAG,4BAA4B,CAAC,UAAU,CAAA;AACzE,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,CAAC,WAAW,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/core/accounts/types.ts"],"names":[],"mappings":""}