@injectivelabs/sdk-ts 1.0.269 → 1.0.270

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.
@@ -1,6 +1,9 @@
1
1
  import { Coin as GrpcCoin } from '@injectivelabs/chain-api/cosmos/base/v1beta1/coin_pb';
2
+ import { DirectSignResponse } from '@cosmjs/proto-signing';
3
+ import { TxRaw } from '@injectivelabs/chain-api/cosmos/tx/v1beta1/tx_pb';
2
4
  export * from './exchange';
3
5
  export * from './pagination';
6
+ export * from './provider';
4
7
  export interface Coin {
5
8
  denom: string;
6
9
  amount: string;
@@ -12,5 +15,5 @@ export declare enum StreamOperation {
12
15
  Update = "update",
13
16
  Invalidate = "invalidate"
14
17
  }
15
- export { GrpcCoin };
18
+ export { GrpcCoin, DirectSignResponse, TxRaw };
16
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,sDAAsD,CAAA;AAEvF,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAE5B,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAED,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,UAAU,eAAe;CAC1B;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,sDAAsD,CAAA;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAA;AAExE,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAE1B,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAED,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,UAAU,eAAe;CAC1B;AAED,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAA"}
@@ -14,11 +14,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.GrpcCoin = exports.StreamOperation = void 0;
17
+ exports.TxRaw = exports.GrpcCoin = exports.StreamOperation = void 0;
18
18
  const coin_pb_1 = require("@injectivelabs/chain-api/cosmos/base/v1beta1/coin_pb");
19
19
  Object.defineProperty(exports, "GrpcCoin", { enumerable: true, get: function () { return coin_pb_1.Coin; } });
20
+ const tx_pb_1 = require("@injectivelabs/chain-api/cosmos/tx/v1beta1/tx_pb");
21
+ Object.defineProperty(exports, "TxRaw", { enumerable: true, get: function () { return tx_pb_1.TxRaw; } });
20
22
  __exportStar(require("./exchange"), exports);
21
23
  __exportStar(require("./pagination"), exports);
24
+ __exportStar(require("./provider"), exports);
22
25
  var StreamOperation;
23
26
  (function (StreamOperation) {
24
27
  StreamOperation["Insert"] = "insert";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kFAAuF;AAkB9E,yFAlBQ,cAAQ,OAkBR;AAhBjB,6CAA0B;AAC1B,+CAA4B;AAO5B,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,oCAAiB,CAAA;IACjB,4CAAyB,CAAA;AAC3B,CAAC,EANW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAM1B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kFAAuF;AAqB9E,yFArBQ,cAAQ,OAqBR;AAnBjB,4EAAwE;AAmBjC,sFAnB9B,aAAK,OAmB8B;AAjB5C,6CAA0B;AAC1B,+CAA4B;AAC5B,6CAA0B;AAO1B,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,oCAAiB,CAAA;IACjB,4CAAyB,CAAA;AAC3B,CAAC,EANW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAM1B"}
@@ -0,0 +1,41 @@
1
+ import { DirectSignResponse } from '@cosmjs/proto-signing';
2
+ import { TxRaw } from '@injectivelabs/chain-api/cosmos/tx/v1beta1/tx_pb';
3
+ import { ChainId, CosmosChainId } from '@injectivelabs/ts-types';
4
+ export interface InjectiveWalletProvider {
5
+ /**
6
+ * The the accounts from the wallet (addresses)
7
+ */
8
+ getAddresses(): Promise<string[]>;
9
+ /**
10
+ * Get the PubKey from the wallet
11
+ * in base64 for Cosmos native wallets
12
+ */
13
+ getPubKey(): Promise<string>;
14
+ /**
15
+ * Sends Cosmos transaction. Returns a transaction hash
16
+ * @param transaction should implement TransactionConfig
17
+ * @param options
18
+ */
19
+ sendTransaction(transaction: DirectSignResponse | TxRaw, options: {
20
+ address: string;
21
+ chainId: ChainId;
22
+ }): Promise<string>;
23
+ isChainIdSupported(chainId?: CosmosChainId): Promise<boolean>;
24
+ signTransaction(transaction: {
25
+ txRaw: TxRaw;
26
+ chainId: string;
27
+ accountNumber: number;
28
+ }, address: string): Promise<DirectSignResponse>;
29
+ /**
30
+ * Sign a cosmos transaction using the wallet provider
31
+ *
32
+ * @param transaction
33
+ * @param address - injective address
34
+ */
35
+ signCosmosTransaction(transaction: {
36
+ txRaw: TxRaw;
37
+ accountNumber: number;
38
+ chainId: string;
39
+ }, address: string): Promise<DirectSignResponse>;
40
+ }
41
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/types/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAA;AACxE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEhE,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAEjC;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAE5B;;;;OAIG;IACH,eAAe,CACb,WAAW,EAAE,kBAAkB,GAAG,KAAK,EACvC,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,GAC7C,OAAO,CAAC,MAAM,CAAC,CAAA;IAElB,kBAAkB,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAE7D,eAAe,CACb,WAAW,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,EACrE,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,kBAAkB,CAAC,CAAA;IAE9B;;;;;OAKG;IACH,qBAAqB,CACnB,WAAW,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EACrE,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,kBAAkB,CAAC,CAAA;CAC/B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/types/provider.ts"],"names":[],"mappings":""}
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.0.269",
4
+ "version": "1.0.270",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
7
7
  "name": "Bojan Angjelkoski",
@@ -67,7 +67,7 @@
67
67
  "shx": "^0.3.2",
68
68
  "snakecase-keys": "^5.4.1"
69
69
  },
70
- "gitHead": "235b4f4404b24c7a09bcb022e2300646756c3899",
70
+ "gitHead": "453b3700ceff5dbbf8437ca3169c74ae1aed880f",
71
71
  "typedoc": {
72
72
  "entryPoint": "./src/index.ts",
73
73
  "readmeFile": "./README.md",