@kimafinance/kima-transaction-api 1.0.5-beta.1 → 1.0.6-beta.1

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.
package/build/index.d.ts CHANGED
@@ -1,18 +1,24 @@
1
- export declare enum SupportNetworks {
2
- Ethereum = "ETH",
3
- Polygon = "POL",
4
- Avalanche = "AVX",
5
- Solana = "SOL"
1
+ export declare enum SupportedNetworks {
2
+ ETHEREUM = "ETH",
3
+ POLYGON = "POL",
4
+ AVALANCHE = "AVX",
5
+ SOLANA = "SOL",
6
+ FUSE = "FUS",
7
+ CELO = "CEL",
8
+ BSC = "BSC",
9
+ ARBITRIUM = "ARB",
10
+ OPTIMISM = "OPT",
11
+ POLYGON_ZKEVM = "ZKE"
6
12
  }
7
13
  export declare enum CurrencyOptions {
8
- USDK = "USDK",
9
14
  USDT = "USDT",
10
- USDC = "USDC"
15
+ USDC = "USDC",
16
+ USDK = "USDK"
11
17
  }
12
18
  interface Props {
13
- originChain: SupportNetworks;
19
+ originChain: SupportedNetworks;
14
20
  originAddress: string;
15
- targetChain: SupportNetworks;
21
+ targetChain: SupportedNetworks;
16
22
  targetAddress: string;
17
23
  symbol: CurrencyOptions;
18
24
  amount: number;
package/build/index.js CHANGED
@@ -1,20 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.submitKimaTransaction = exports.CurrencyOptions = exports.SupportNetworks = void 0;
3
+ exports.submitKimaTransaction = exports.CurrencyOptions = exports.SupportedNetworks = void 0;
4
4
  const proto_signing_1 = require("@cosmjs/proto-signing");
5
5
  const common_1 = require("./kima/common");
6
- var SupportNetworks;
7
- (function (SupportNetworks) {
8
- SupportNetworks["Ethereum"] = "ETH";
9
- SupportNetworks["Polygon"] = "POL";
10
- SupportNetworks["Avalanche"] = "AVX";
11
- SupportNetworks["Solana"] = "SOL";
12
- })(SupportNetworks = exports.SupportNetworks || (exports.SupportNetworks = {}));
6
+ var SupportedNetworks;
7
+ (function (SupportedNetworks) {
8
+ SupportedNetworks["ETHEREUM"] = "ETH";
9
+ SupportedNetworks["POLYGON"] = "POL";
10
+ SupportedNetworks["AVALANCHE"] = "AVX";
11
+ SupportedNetworks["SOLANA"] = "SOL";
12
+ SupportedNetworks["FUSE"] = "FUS";
13
+ SupportedNetworks["CELO"] = "CEL";
14
+ SupportedNetworks["BSC"] = "BSC";
15
+ SupportedNetworks["ARBITRIUM"] = "ARB";
16
+ SupportedNetworks["OPTIMISM"] = "OPT";
17
+ SupportedNetworks["POLYGON_ZKEVM"] = "ZKE";
18
+ })(SupportedNetworks = exports.SupportedNetworks || (exports.SupportedNetworks = {}));
13
19
  var CurrencyOptions;
14
20
  (function (CurrencyOptions) {
15
- CurrencyOptions["USDK"] = "USDK";
16
21
  CurrencyOptions["USDT"] = "USDT";
17
22
  CurrencyOptions["USDC"] = "USDC";
23
+ CurrencyOptions["USDK"] = "USDK";
18
24
  })(CurrencyOptions = exports.CurrencyOptions || (exports.CurrencyOptions = {}));
19
25
  async function submitKimaTransaction({ originChain, originAddress, targetChain, targetAddress, symbol, amount, fee, }) {
20
26
  const wallet = await proto_signing_1.DirectSecp256k1HdWallet.fromMnemonic(process.env.KIMA_BACKEND_MNEMONIC, { prefix: "kima" });
@@ -47,8 +53,7 @@ async function submitKimaTransaction({ originChain, originAddress, targetChain,
47
53
  txId,
48
54
  txHash: result.transactionHash,
49
55
  });
50
- const temp = await client.signAndBroadcast([msg]);
51
- console.log(temp);
56
+ await client.signAndBroadcast([msg]);
52
57
  return result;
53
58
  }
54
59
  exports.submitKimaTransaction = submitKimaTransaction;
@@ -14,8 +14,8 @@ const defaultFee = {
14
14
  gas: "200000",
15
15
  };
16
16
  const types = [
17
- ["/KimaFinance.kima.kima.MsgRequestTransaction", tx_1.MsgRequestTransaction],
18
- ["/KimaFinance.kima.kima.MsgSetTxHash", tx_1.MsgSetTxHash],
17
+ ["/KimaFinance.kima.MsgRequestTransaction", tx_1.MsgRequestTransaction],
18
+ ["/KimaFinance.kima.MsgSetTxHash", tx_1.MsgSetTxHash],
19
19
  ];
20
20
  exports.registry = new proto_signing_1.Registry(types);
21
21
  const TxClient = async (wallet) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kimafinance/kima-transaction-api",
3
- "version": "1.0.5-beta.1",
3
+ "version": "1.0.6-beta.1",
4
4
  "description": "A wrapper around Kima's API, enabling sending and monitoring transactions (Beta version)",
5
5
  "author": "",
6
6
  "license": "MIT",
@@ -16,8 +16,8 @@ interface SignAndBroadcastOptions {
16
16
  }
17
17
 
18
18
  const types = [
19
- ["/KimaFinance.kima.kima.MsgRequestTransaction", MsgRequestTransaction],
20
- ["/KimaFinance.kima.kima.MsgSetTxHash", MsgSetTxHash],
19
+ ["/KimaFinance.kima.MsgRequestTransaction", MsgRequestTransaction],
20
+ ["/KimaFinance.kima.MsgSetTxHash", MsgSetTxHash],
21
21
  ];
22
22
 
23
23
  export const registry = new Registry(<any>types);