Skip to content

Commit ee62527

Browse files
authored
fix build and ci (#123)
* fix build and ci * bump version * format
1 parent 794253a commit ee62527

File tree

5 files changed

+37
-29
lines changed

5 files changed

+37
-29
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/setup-node@v3
13-
with:
14-
node-version: "16.x"
15-
registry-url: "https://registry.npmjs.org"
16-
- run: npm install
17-
- run: npm run build
11+
- uses: actions/checkout@v4
12+
- name: "setup:bun"
13+
uses: oven-sh/setup-bun@v1
14+
- run: bun install
15+
- run: bun run build
1816
- run: npm publish --access public
1917
env:
2018
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/sdk.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ jobs:
2525
run: bun install
2626
- name: "lint"
2727
run: bun run lint
28+
- name: "build"
29+
run: bun run build

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kilnfi/sdk",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"autor": "Kiln <[email protected]> (https://kiln.fi)",
55
"license": "BUSL-1.1",
66
"description": "JavaScript sdk for Kiln API",

src/fireblocks.ts

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@ import { type AssetTypeResponse, FireblocksSDK, type PublicKeyResponse, SigningA
22
import type { Client } from 'openapi-fetch';
33
import { FireblocksSigner } from './fireblocks_signer';
44
import type { components, paths } from './openapi/schema';
5-
import type { FireblocksIntegration, Integration } from './types/integrations';
5+
6+
type FireblocksIntegration = {
7+
provider: 'fireblocks';
8+
fireblocksApiKey: string;
9+
fireblocksSecretKey: string;
10+
vaultId: number;
11+
name?: string;
12+
fireblocksDestinationId?: string;
13+
};
614

715
export class FireblocksService {
816
client: Client<paths>;
@@ -32,7 +40,7 @@ export class FireblocksService {
3240
* @param integration
3341
* @param assetId
3442
*/
35-
async getPubkey(integration: Integration, assetId: string): Promise<PublicKeyResponse> {
43+
async getPubkey(integration: FireblocksIntegration, assetId: string): Promise<PublicKeyResponse> {
3644
const fbSdk = this.getSdk(integration);
3745
const data = await fbSdk.getPublicKeyInfoForVaultAccount({
3846
assetId: assetId,
@@ -48,7 +56,7 @@ export class FireblocksService {
4856
* List Fireblocks supported assets
4957
* @param integration
5058
*/
51-
async getAssets(integration: Integration): Promise<AssetTypeResponse[]> {
59+
async getAssets(integration: FireblocksIntegration): Promise<AssetTypeResponse[]> {
5260
const fbSdk = this.getSdk(integration);
5361
return await fbSdk.getSupportedAssets();
5462
}
@@ -61,7 +69,7 @@ export class FireblocksService {
6169
* @param note
6270
*/
6371
async signSolTx(
64-
integration: Integration,
72+
integration: FireblocksIntegration,
6573
tx: components['schemas']['SOLStakeTx'],
6674
assetId: 'SOL_TEST' | 'SOL',
6775
note?: string,
@@ -106,7 +114,7 @@ export class FireblocksService {
106114
* @param tx
107115
* @param note
108116
*/
109-
async signAdaTx(integration: Integration, tx: components['schemas']['ADAUnsignedTx'], note?: string) {
117+
async signAdaTx(integration: FireblocksIntegration, tx: components['schemas']['ADAUnsignedTx'], note?: string) {
110118
const payload = {
111119
rawMessageData: {
112120
messages: [
@@ -159,7 +167,7 @@ export class FireblocksService {
159167
* @param note
160168
*/
161169
async signAtomTx(
162-
integration: Integration,
170+
integration: FireblocksIntegration,
163171
tx: components['schemas']['ATOMUnsignedTx'] | components['schemas']['ATOMStakeUnsignedTx'],
164172
assetId: 'ATOM_COS' | 'ATOM_COS_TEST',
165173
note?: string,
@@ -208,7 +216,7 @@ export class FireblocksService {
208216
* @param note
209217
*/
210218
async signDydxTx(
211-
integration: Integration,
219+
integration: FireblocksIntegration,
212220
tx: components['schemas']['DYDXUnsignedTx'] | components['schemas']['DYDXStakeUnsignedTx'],
213221
note?: string,
214222
) {
@@ -256,7 +264,7 @@ export class FireblocksService {
256264
* @param note
257265
*/
258266
async signFetTx(
259-
integration: Integration,
267+
integration: FireblocksIntegration,
260268
tx: components['schemas']['FETUnsignedTx'] | components['schemas']['FETStakeUnsignedTx'],
261269
note?: string,
262270
) {
@@ -306,7 +314,7 @@ export class FireblocksService {
306314
* @param note
307315
*/
308316
async signInjTx(
309-
integration: Integration,
317+
integration: FireblocksIntegration,
310318
tx: components['schemas']['INJUnsignedTx'] | components['schemas']['INJStakeUnsignedTx'],
311319
note?: string,
312320
) {
@@ -354,7 +362,7 @@ export class FireblocksService {
354362
* @param note
355363
*/
356364
async signKavaTx(
357-
integration: Integration,
365+
integration: FireblocksIntegration,
358366
tx: components['schemas']['KAVAUnsignedTx'] | components['schemas']['KAVAStakeUnsignedTx'],
359367
note?: string,
360368
) {
@@ -402,7 +410,7 @@ export class FireblocksService {
402410
* @param note
403411
*/
404412
async signOsmoTx(
405-
integration: Integration,
413+
integration: FireblocksIntegration,
406414
tx: components['schemas']['OSMOUnsignedTx'] | components['schemas']['OSMOStakeUnsignedTx'],
407415
note?: string,
408416
) {
@@ -450,7 +458,7 @@ export class FireblocksService {
450458
* @param note
451459
*/
452460
async signTiaTx(
453-
integration: Integration,
461+
integration: FireblocksIntegration,
454462
tx: components['schemas']['TIAUnsignedTx'] | components['schemas']['TIAStakeUnsignedTx'],
455463
note?: string,
456464
) {
@@ -498,7 +506,7 @@ export class FireblocksService {
498506
* @param note
499507
*/
500508
async signZetaTx(
501-
integration: Integration,
509+
integration: FireblocksIntegration,
502510
tx: components['schemas']['ZETAUnsignedTx'] | components['schemas']['ZETAStakeUnsignedTx'],
503511
note?: string,
504512
) {
@@ -547,7 +555,7 @@ export class FireblocksService {
547555
* @param tx
548556
* @param note
549557
*/
550-
async signDotTx(integration: Integration, tx: components['schemas']['DOTUnsignedTx'], note?: string) {
558+
async signDotTx(integration: FireblocksIntegration, tx: components['schemas']['DOTUnsignedTx'], note?: string) {
551559
const payload = {
552560
rawMessageData: {
553561
messages: [
@@ -582,7 +590,7 @@ export class FireblocksService {
582590
* @param tx
583591
* @param note
584592
*/
585-
async signKsmTx(integration: Integration, tx: components['schemas']['KSMUnsignedTx'], note?: string) {
593+
async signKsmTx(integration: FireblocksIntegration, tx: components['schemas']['KSMUnsignedTx'], note?: string) {
586594
const payload = {
587595
rawMessageData: {
588596
messages: [
@@ -619,7 +627,7 @@ export class FireblocksService {
619627
* @param note
620628
*/
621629
async signAndBroadcastEthTx(
622-
integration: Integration,
630+
integration: FireblocksIntegration,
623631
tx: components['schemas']['ETHUnsignedTx'],
624632
assetId: 'ETH_TEST6' | 'ETH',
625633
note?: string,
@@ -644,7 +652,7 @@ export class FireblocksService {
644652
* @param note
645653
*/
646654
async signAndBroadcastPolTx(
647-
integration: Integration,
655+
integration: FireblocksIntegration,
648656
tx: components['schemas']['POLUnsignedTx'],
649657
assetId: 'ETH_TEST5' | 'ETH',
650658
note?: string,
@@ -669,7 +677,7 @@ export class FireblocksService {
669677
* @param note
670678
*/
671679
async signTonTx(
672-
integration: Integration,
680+
integration: FireblocksIntegration,
673681
tx: components['schemas']['TONTx'],
674682
assetId: 'TON_TEST' | 'TON',
675683
note?: string,
@@ -711,7 +719,7 @@ export class FireblocksService {
711719
* @param note
712720
*/
713721
async signXtzTx(
714-
integration: Integration,
722+
integration: FireblocksIntegration,
715723
tx: components['schemas']['XTZUnsignedTx'],
716724
assetId: 'XTZ_TEST' | 'XTZ',
717725
note?: string,
@@ -756,7 +764,7 @@ export class FireblocksService {
756764
* @param note
757765
*/
758766
async signNearTx(
759-
integration: Integration,
767+
integration: FireblocksIntegration,
760768
tx: components['schemas']['NEARTx'],
761769
assetId: 'NEAR_TEST' | 'NEAR',
762770
note?: string,

src/kiln.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export * from './validators';
2-
export * from './openapi/schema.d.ts';
2+
export type * from './openapi/schema.d.ts';
33
export * from './utils';
44
import createClient, { type Client } from 'openapi-fetch';
55
import { FireblocksService } from './fireblocks';

0 commit comments

Comments
 (0)