Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
/modules/sdk-coin-hbar/ @BitGo/ethalt-team
/modules/sdk-coin-icp/ @BitGo/ethalt-team
/modules/sdk-coin-initia/ @BitGo/ethalt-team
/modules/sdk-coin-kas/ @BitGo/ethalt-team
/modules/sdk-coin-iota/ @BitGo/ethalt-team
/modules/sdk-coin-mon/ @BitGo/ethalt-team
/modules/sdk-coin-mantra/ @BitGo/ethalt-team
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ COPY --from=builder /tmp/bitgo/modules/sdk-coin-icp /var/modules/sdk-coin-icp/
COPY --from=builder /tmp/bitgo/modules/sdk-coin-initia /var/modules/sdk-coin-initia/
COPY --from=builder /tmp/bitgo/modules/sdk-coin-injective /var/modules/sdk-coin-injective/
COPY --from=builder /tmp/bitgo/modules/sdk-coin-islm /var/modules/sdk-coin-islm/
COPY --from=builder /tmp/bitgo/modules/sdk-coin-kas /var/modules/sdk-coin-kas/
COPY --from=builder /tmp/bitgo/modules/sdk-coin-mon /var/modules/sdk-coin-mon/
COPY --from=builder /tmp/bitgo/modules/sdk-coin-near /var/modules/sdk-coin-near/
COPY --from=builder /tmp/bitgo/modules/sdk-coin-oas /var/modules/sdk-coin-oas/
Expand Down Expand Up @@ -195,6 +196,7 @@ cd /var/modules/sdk-coin-icp && yarn link && \
cd /var/modules/sdk-coin-initia && yarn link && \
cd /var/modules/sdk-coin-injective && yarn link && \
cd /var/modules/sdk-coin-islm && yarn link && \
cd /var/modules/sdk-coin-kas && yarn link && \
cd /var/modules/sdk-coin-mon && yarn link && \
cd /var/modules/sdk-coin-near && yarn link && \
cd /var/modules/sdk-coin-oas && yarn link && \
Expand Down Expand Up @@ -298,6 +300,7 @@ RUN cd /var/bitgo-express && \
yarn link @bitgo/sdk-coin-initia && \
yarn link @bitgo/sdk-coin-injective && \
yarn link @bitgo/sdk-coin-islm && \
yarn link @bitgo/sdk-coin-kas && \
yarn link @bitgo/sdk-coin-mon && \
yarn link @bitgo/sdk-coin-near && \
yarn link @bitgo/sdk-coin-oas && \
Expand Down
1 change: 1 addition & 0 deletions modules/account-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@bitgo/sdk-coin-evm": "^1.14.9",
"@bitgo/sdk-coin-flr": "^1.10.0",
"@bitgo/sdk-coin-flrp": "^1.11.0",
"@bitgo/sdk-coin-kas": "^1.0.0",
"@bitgo/sdk-coin-hash": "^3.9.0",
"@bitgo/sdk-coin-hbar": "^2.7.0",
"@bitgo/sdk-coin-icp": "^1.22.0",
Expand Down
5 changes: 5 additions & 0 deletions modules/account-lib/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ export { Canton };
import { FlrPLib as FlrP } from '@bitgo/sdk-coin-flrp';
export { FlrP };

import * as Kas from '@bitgo/sdk-coin-kas';
export { Kas };

import { MIDNIGHT_TNC_HASH } from './utils';
export { MIDNIGHT_TNC_HASH };

Expand Down Expand Up @@ -330,6 +333,8 @@ const coinBuilderMap = {
tcanton: Canton.TransactionBuilderFactory,
flrp: FlrP.TransactionBuilderFactory,
tflrp: FlrP.TransactionBuilderFactory,
kas: Kas.TransactionBuilderFactory,
tkas: Kas.TransactionBuilderFactory,
};

const coinMessageBuilderFactoryMap = {
Expand Down
3 changes: 3 additions & 0 deletions modules/account-lib/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@
{
"path": "../sdk-coin-injective"
},
{
"path": "../sdk-coin-kas"
},
{
"path": "../sdk-coin-islm"
},
Expand Down
1 change: 1 addition & 0 deletions modules/bitgo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"@bitgo/sdk-coin-evm": "^1.14.9",
"@bitgo/sdk-coin-flr": "^1.10.0",
"@bitgo/sdk-coin-flrp": "^1.11.0",
"@bitgo/sdk-coin-kas": "^1.0.0",
"@bitgo/sdk-coin-hash": "^3.9.0",
"@bitgo/sdk-coin-hbar": "^2.7.0",
"@bitgo/sdk-coin-icp": "^1.22.0",
Expand Down
8 changes: 8 additions & 0 deletions modules/bitgo/src/v2/coinFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ import {
EvmCoin,
Flr,
Flrp,
Kas,
TKas,
FlrToken,
HashToken,
MonToken,
Expand Down Expand Up @@ -282,6 +284,7 @@ export function registerCoinConstructors(coinFactory: CoinFactory, coinMap: Coin
coinFactory.register('fiatusd', FiatUsd.createInstance);
coinFactory.register('flr', Flr.createInstance);
coinFactory.register('flrp', Flrp.createInstance);
coinFactory.register('kas', Kas.createInstance);
coinFactory.register('gteth', Gteth.createInstance);
coinFactory.register('hash', Hash.createInstance);
coinFactory.register('hbar', Hbar.createInstance);
Expand Down Expand Up @@ -354,6 +357,7 @@ export function registerCoinConstructors(coinFactory: CoinFactory, coinMap: Coin
coinFactory.register('tfiatusd', TfiatUsd.createInstance);
coinFactory.register('tflr', Tflr.createInstance);
coinFactory.register('tflrp', Flrp.createInstance);
coinFactory.register('tkas', TKas.createInstance);
coinFactory.register('tmon', Tmon.createInstance);
coinFactory.register('thash', Thash.createInstance);
coinFactory.register('thbar', Thbar.createInstance);
Expand Down Expand Up @@ -709,6 +713,8 @@ export function getCoinConstructor(coinName: string): CoinConstructor | undefine
return Flr.createInstance;
case 'flrp':
return Flrp.createInstance;
case 'kas':
return Kas.createInstance;
case 'gteth':
return Gteth.createInstance;
case 'hash':
Expand Down Expand Up @@ -853,6 +859,8 @@ export function getCoinConstructor(coinName: string): CoinConstructor | undefine
return Tflr.createInstance;
case 'tflrp':
return Flrp.createInstance;
case 'tkas':
return TKas.createInstance;
case 'tmon':
return Tmon.createInstance;
case 'thash':
Expand Down
2 changes: 2 additions & 0 deletions modules/bitgo/src/v2/coins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { Erc20Token, Erc721Token, Eth, Gteth, Hteth, Teth } from '@bitgo/sdk-coi
import { EvmCoin, EthLikeErc20Token, EthLikeErc721Token } from '@bitgo/sdk-coin-evm';
import { Flr, Tflr, FlrToken } from '@bitgo/sdk-coin-flr';
import { Flrp } from '@bitgo/sdk-coin-flrp';
import { Kas, TKas } from '@bitgo/sdk-coin-kas';
import { Ethw } from '@bitgo/sdk-coin-ethw';
import { EthLikeCoin, TethLikeCoin } from '@bitgo/sdk-coin-ethlike';
import { Hash, Thash, HashToken } from '@bitgo/sdk-coin-hash';
Expand Down Expand Up @@ -113,6 +114,7 @@ export { Etc, Tetc };
export { EvmCoin, EthLikeErc20Token, EthLikeErc721Token };
export { Flr, Tflr, FlrToken };
export { Flrp };
export { Kas, TKas };
export { Hash, Thash, HashToken };
export { Hbar, Thbar };
export { Icp, Ticp };
Expand Down
3 changes: 3 additions & 0 deletions modules/bitgo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@
{
"path": "../sdk-coin-injective"
},
{
"path": "../sdk-coin-kas"
},
{
"path": "../sdk-coin-iota"
},
Expand Down
4 changes: 4 additions & 0 deletions modules/sdk-coin-kas/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.idea
public
dist
8 changes: 8 additions & 0 deletions modules/sdk-coin-kas/.mocharc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require: 'tsx'
timeout: 120000
reporter: 'min'
reporter-option:
- 'cdn=true'
- 'json=false'
exit: true
spec: ['test/unit/**/*.ts']
55 changes: 55 additions & 0 deletions modules/sdk-coin-kas/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "@bitgo/sdk-coin-kas",
"version": "1.0.0",
"description": "BitGo's SDK coin library for Kaspa (KAS)",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"scripts": {
"build": "yarn tsc --build --incremental --verbose .",
"fmt": "prettier --write .",
"check-fmt": "prettier --check '**/*.{ts,js,json}'",
"clean": "rm -r ./dist",
"lint": "eslint --quiet .",
"prepare": "npm run build",
"test": "npm run coverage",
"coverage": "nyc -- npm run unit-test",
"unit-test": "mocha"
},
"repository": {
"type": "git",
"url": "https://github.com/BitGo/BitGoJS.git",
"directory": "modules/sdk-coin-kas"
},
"author": "BitGo SDK Team <sdkteam@bitgo.com>",
"license": "MIT",
"engines": {
"node": ">=20"
},
"lint-staged": {
"*.{js,ts}": [
"yarn prettier --write",
"yarn eslint --fix"
]
},
"publishConfig": {
"access": "public"
},
"nyc": {
"extension": [
".ts"
]
},
"devDependencies": {},
"dependencies": {
"@bitgo/sdk-core": "^36.37.0",
"@bitgo/secp256k1": "^1.11.0",
"@bitgo/statics": "^58.32.0",
"@noble/curves": "1.8.1",
"@noble/hashes": "^1.7.1",
"bignumber.js": "9.0.0"
},
"gitHead": "18e460ddf02de2dbf13c2aa243478188fb539f0c",
"files": [
"dist"
]
}
4 changes: 4 additions & 0 deletions modules/sdk-coin-kas/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { Kas } from './kas';
export { TKas } from './tkas';
export * from './lib';
export { register } from './register';
Loading
Loading