@kimafinance/kima-transaction-api 1.0.2 → 1.0.3
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/package.json +32 -32
- package/src/index.ts +4 -17
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@kimafinance/kima-transaction-api",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "A wrapper around Kima's API, enabling sending and monitoring transactions",
|
|
5
|
-
"author": "",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"main": "build/index.js",
|
|
8
|
-
"source": "src/index.ts",
|
|
9
|
-
"engines": {
|
|
10
|
-
"node": ">=10"
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
-
"dev": "nodemon",
|
|
15
|
-
"build": "rimraf ./build && tsc",
|
|
16
|
-
"start": "npm run build && node build/index.js"
|
|
17
|
-
},
|
|
18
|
-
"keywords": [],
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@types/node": "^18.11.9",
|
|
21
|
-
"nodemon": "^2.0.20",
|
|
22
|
-
"rimraf": "^3.0.2",
|
|
23
|
-
"ts-node": "^10.9.1",
|
|
24
|
-
"typescript": "^4.9.3"
|
|
25
|
-
},
|
|
26
|
-
"dependencies": {
|
|
27
|
-
"@cosmjs/cosmwasm-stargate": "^0.29.4",
|
|
28
|
-
"@cosmjs/proto-signing": "^0.29.4",
|
|
29
|
-
"@cosmjs/stargate": "^0.29.4",
|
|
30
|
-
"dotenv": "^16.0.3"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@kimafinance/kima-transaction-api",
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "A wrapper around Kima's API, enabling sending and monitoring transactions",
|
|
5
|
+
"author": "",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "build/index.js",
|
|
8
|
+
"source": "src/index.ts",
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=10"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
+
"dev": "nodemon",
|
|
15
|
+
"build": "rimraf ./build && tsc",
|
|
16
|
+
"start": "npm run build && node build/index.js"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [],
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/node": "^18.11.9",
|
|
21
|
+
"nodemon": "^2.0.20",
|
|
22
|
+
"rimraf": "^3.0.2",
|
|
23
|
+
"ts-node": "^10.9.1",
|
|
24
|
+
"typescript": "^4.9.3"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@cosmjs/cosmwasm-stargate": "^0.29.4",
|
|
28
|
+
"@cosmjs/proto-signing": "^0.29.4",
|
|
29
|
+
"@cosmjs/stargate": "^0.29.4",
|
|
30
|
+
"dotenv": "^16.0.3"
|
|
31
|
+
}
|
|
32
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -2,25 +2,12 @@ import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing";
|
|
|
2
2
|
import { TxClient } from "./kima/common";
|
|
3
3
|
import { MsgRequestTransaction } from "./kima/tx";
|
|
4
4
|
|
|
5
|
-
export enum SupportNetworks {
|
|
6
|
-
Ethereum = "ETH",
|
|
7
|
-
Polygon = "POL",
|
|
8
|
-
Avalanche = "AVX",
|
|
9
|
-
Solana = "SOL",
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export enum CurrencyOptions {
|
|
13
|
-
USDK = "USDK",
|
|
14
|
-
USDT = "USDT",
|
|
15
|
-
USDC = "USDC",
|
|
16
|
-
}
|
|
17
|
-
|
|
18
5
|
interface Props {
|
|
19
|
-
originChain:
|
|
6
|
+
originChain: string;
|
|
20
7
|
originAddress: string;
|
|
21
|
-
targetChain:
|
|
8
|
+
targetChain: string;
|
|
22
9
|
targetAddress: string;
|
|
23
|
-
symbol:
|
|
10
|
+
symbol: string;
|
|
24
11
|
amount: number;
|
|
25
12
|
fee: number;
|
|
26
13
|
}
|
|
@@ -72,7 +59,7 @@ export async function submitKimaTransaction({
|
|
|
72
59
|
txHash: result.transactionHash,
|
|
73
60
|
});
|
|
74
61
|
|
|
75
|
-
|
|
62
|
+
await client.signAndBroadcast([msg]);
|
|
76
63
|
|
|
77
64
|
return result;
|
|
78
65
|
}
|