Skip to content

Commit 5e47526

Browse files
manojkumar138claude
authored andcommitted
feat(sdk-coin-kas): add Kaspa (KAS) unique chain SDK integration [CECHO-388]
Implements a full BitGoJS SDK module for Kaspa (KAS), a UTXO-based BlockDAG chain using Schnorr signatures over secp256k1 and BLAKE2B sighash with the "TransactionSigningHash" domain tag. Changes: - modules/sdk-coin-kas/: new SDK module with KeyPair, Transaction, TransactionBuilder, TransactionBuilderFactory, Kas/TKas coin classes, constants, interfaces, and utilities - Kaspa cashaddr encoding (`:` separator, custom polymod checksum) - statics: KasCoin class, CoinFamily.KAS, BaseUnit.KAS, KaspaMainnet/ KaspaTestnet networks, kas/tkas coin entries with UUIDs - sdk-core/environments.ts: kasNodeUrl field - bitgo/coinFactory.ts + coins/index.ts: kas/tkas registered - account-lib: kas/tkas added to coinBuilderMap - tsconfig references updated (account-lib, bitgo, tsconfig.packages.json) - CODEOWNERS, Dockerfile updated Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 37c6763 commit 5e47526

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2776
-2
lines changed

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
/modules/sdk-coin-hbar/ @BitGo/ethalt-team
7676
/modules/sdk-coin-icp/ @BitGo/ethalt-team
7777
/modules/sdk-coin-initia/ @BitGo/ethalt-team
78+
/modules/sdk-coin-kas/ @BitGo/ethalt-team
7879
/modules/sdk-coin-iota/ @BitGo/ethalt-team
7980
/modules/sdk-coin-mon/ @BitGo/ethalt-team
8081
/modules/sdk-coin-mantra/ @BitGo/ethalt-team

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ COPY --from=builder /tmp/bitgo/modules/sdk-coin-icp /var/modules/sdk-coin-icp/
9595
COPY --from=builder /tmp/bitgo/modules/sdk-coin-initia /var/modules/sdk-coin-initia/
9696
COPY --from=builder /tmp/bitgo/modules/sdk-coin-injective /var/modules/sdk-coin-injective/
9797
COPY --from=builder /tmp/bitgo/modules/sdk-coin-islm /var/modules/sdk-coin-islm/
98+
COPY --from=builder /tmp/bitgo/modules/sdk-coin-kas /var/modules/sdk-coin-kas/
9899
COPY --from=builder /tmp/bitgo/modules/sdk-coin-mon /var/modules/sdk-coin-mon/
99100
COPY --from=builder /tmp/bitgo/modules/sdk-coin-near /var/modules/sdk-coin-near/
100101
COPY --from=builder /tmp/bitgo/modules/sdk-coin-oas /var/modules/sdk-coin-oas/
@@ -195,6 +196,7 @@ cd /var/modules/sdk-coin-icp && yarn link && \
195196
cd /var/modules/sdk-coin-initia && yarn link && \
196197
cd /var/modules/sdk-coin-injective && yarn link && \
197198
cd /var/modules/sdk-coin-islm && yarn link && \
199+
cd /var/modules/sdk-coin-kas && yarn link && \
198200
cd /var/modules/sdk-coin-mon && yarn link && \
199201
cd /var/modules/sdk-coin-near && yarn link && \
200202
cd /var/modules/sdk-coin-oas && yarn link && \
@@ -298,6 +300,7 @@ RUN cd /var/bitgo-express && \
298300
yarn link @bitgo/sdk-coin-initia && \
299301
yarn link @bitgo/sdk-coin-injective && \
300302
yarn link @bitgo/sdk-coin-islm && \
303+
yarn link @bitgo/sdk-coin-kas && \
301304
yarn link @bitgo/sdk-coin-mon && \
302305
yarn link @bitgo/sdk-coin-near && \
303306
yarn link @bitgo/sdk-coin-oas && \

modules/account-lib/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"@bitgo/sdk-coin-evm": "^1.14.9",
5454
"@bitgo/sdk-coin-flr": "^1.10.0",
5555
"@bitgo/sdk-coin-flrp": "^1.11.0",
56+
"@bitgo/sdk-coin-kas": "^1.0.0",
5657
"@bitgo/sdk-coin-hash": "^3.9.0",
5758
"@bitgo/sdk-coin-hbar": "^2.7.0",
5859
"@bitgo/sdk-coin-icp": "^1.22.0",

modules/account-lib/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ export { Canton };
212212
import { FlrPLib as FlrP } from '@bitgo/sdk-coin-flrp';
213213
export { FlrP };
214214

215+
import * as Kas from '@bitgo/sdk-coin-kas';
216+
export { Kas };
217+
215218
import { MIDNIGHT_TNC_HASH } from './utils';
216219
export { MIDNIGHT_TNC_HASH };
217220

@@ -330,6 +333,8 @@ const coinBuilderMap = {
330333
tcanton: Canton.TransactionBuilderFactory,
331334
flrp: FlrP.TransactionBuilderFactory,
332335
tflrp: FlrP.TransactionBuilderFactory,
336+
kas: Kas.TransactionBuilderFactory,
337+
tkas: Kas.TransactionBuilderFactory,
333338
};
334339

335340
const coinMessageBuilderFactoryMap = {

modules/account-lib/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@
7676
{
7777
"path": "../sdk-coin-injective"
7878
},
79+
{
80+
"path": "../sdk-coin-kas"
81+
},
7982
{
8083
"path": "../sdk-coin-islm"
8184
},

modules/bitgo/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"@bitgo/sdk-coin-evm": "^1.14.9",
8585
"@bitgo/sdk-coin-flr": "^1.10.0",
8686
"@bitgo/sdk-coin-flrp": "^1.11.0",
87+
"@bitgo/sdk-coin-kas": "^1.0.0",
8788
"@bitgo/sdk-coin-hash": "^3.9.0",
8889
"@bitgo/sdk-coin-hbar": "^2.7.0",
8990
"@bitgo/sdk-coin-icp": "^1.22.0",

modules/bitgo/src/v2/coinFactory.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ import {
8787
EvmCoin,
8888
Flr,
8989
Flrp,
90+
Kas,
91+
TKas,
9092
FlrToken,
9193
HashToken,
9294
MonToken,
@@ -282,6 +284,7 @@ export function registerCoinConstructors(coinFactory: CoinFactory, coinMap: Coin
282284
coinFactory.register('fiatusd', FiatUsd.createInstance);
283285
coinFactory.register('flr', Flr.createInstance);
284286
coinFactory.register('flrp', Flrp.createInstance);
287+
coinFactory.register('kas', Kas.createInstance);
285288
coinFactory.register('gteth', Gteth.createInstance);
286289
coinFactory.register('hash', Hash.createInstance);
287290
coinFactory.register('hbar', Hbar.createInstance);
@@ -354,6 +357,7 @@ export function registerCoinConstructors(coinFactory: CoinFactory, coinMap: Coin
354357
coinFactory.register('tfiatusd', TfiatUsd.createInstance);
355358
coinFactory.register('tflr', Tflr.createInstance);
356359
coinFactory.register('tflrp', Flrp.createInstance);
360+
coinFactory.register('tkas', TKas.createInstance);
357361
coinFactory.register('tmon', Tmon.createInstance);
358362
coinFactory.register('thash', Thash.createInstance);
359363
coinFactory.register('thbar', Thbar.createInstance);
@@ -709,6 +713,8 @@ export function getCoinConstructor(coinName: string): CoinConstructor | undefine
709713
return Flr.createInstance;
710714
case 'flrp':
711715
return Flrp.createInstance;
716+
case 'kas':
717+
return Kas.createInstance;
712718
case 'gteth':
713719
return Gteth.createInstance;
714720
case 'hash':
@@ -853,6 +859,8 @@ export function getCoinConstructor(coinName: string): CoinConstructor | undefine
853859
return Tflr.createInstance;
854860
case 'tflrp':
855861
return Flrp.createInstance;
862+
case 'tkas':
863+
return TKas.createInstance;
856864
case 'tmon':
857865
return Tmon.createInstance;
858866
case 'thash':

modules/bitgo/src/v2/coins/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { Erc20Token, Erc721Token, Eth, Gteth, Hteth, Teth } from '@bitgo/sdk-coi
3434
import { EvmCoin, EthLikeErc20Token, EthLikeErc721Token } from '@bitgo/sdk-coin-evm';
3535
import { Flr, Tflr, FlrToken } from '@bitgo/sdk-coin-flr';
3636
import { Flrp } from '@bitgo/sdk-coin-flrp';
37+
import { Kas, TKas } from '@bitgo/sdk-coin-kas';
3738
import { Ethw } from '@bitgo/sdk-coin-ethw';
3839
import { EthLikeCoin, TethLikeCoin } from '@bitgo/sdk-coin-ethlike';
3940
import { Hash, Thash, HashToken } from '@bitgo/sdk-coin-hash';
@@ -113,6 +114,7 @@ export { Etc, Tetc };
113114
export { EvmCoin, EthLikeErc20Token, EthLikeErc721Token };
114115
export { Flr, Tflr, FlrToken };
115116
export { Flrp };
117+
export { Kas, TKas };
116118
export { Hash, Thash, HashToken };
117119
export { Hbar, Thbar };
118120
export { Icp, Ticp };

modules/bitgo/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@
179179
{
180180
"path": "../sdk-coin-injective"
181181
},
182+
{
183+
"path": "../sdk-coin-kas"
184+
},
182185
{
183186
"path": "../sdk-coin-iota"
184187
},

modules/sdk-coin-kas/.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
.idea
3+
public
4+
dist

0 commit comments

Comments
 (0)