Skip to content

Commit 1ce77ae

Browse files
authored
Add version export to SDK (#133)
1 parent 4b6e29f commit 1ce77ae

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/account-sdk/src/browser-entry.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* This file exposes the account interface to the global window object
44
*/
55

6+
import { PACKAGE_VERSION } from './core/constants.js';
67
import { createBaseAccountSDK } from './interface/builder/core/createBaseAccountSDK.js';
78
import { base } from './interface/payment/base.js';
89
import { CHAIN_IDS, TOKENS } from './interface/payment/constants.js';
@@ -24,6 +25,9 @@ import type {
2425
if (typeof window !== 'undefined') {
2526
(window as any).base = base;
2627
(window as any).createBaseAccountSDK = createBaseAccountSDK;
28+
(window as any).BaseAccountSDK = {
29+
VERSION: PACKAGE_VERSION,
30+
};
2731
}
2832

2933
// Export for module usage
@@ -32,6 +36,7 @@ export type {
3236
Preference,
3337
ProviderInterface,
3438
} from ':core/provider/interface.js';
39+
export { PACKAGE_VERSION as VERSION } from './core/constants.js';
3540
export { createBaseAccountSDK } from './interface/builder/core/createBaseAccountSDK.js';
3641
export { getCryptoKeyAccount, removeCryptoKey } from './kms/crypto-key/index.js';
3742
export { base, CHAIN_IDS, getPaymentStatus, pay, subscribe, TOKENS };

packages/account-sdk/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ export { createBaseAccountSDK } from './interface/builder/core/createBaseAccount
55

66
export { getCryptoKeyAccount, removeCryptoKey } from './kms/crypto-key/index.js';
77

8+
export { PACKAGE_VERSION as VERSION } from './core/constants.js';
9+
810
// Payment interface exports
911
export {
1012
CHAIN_IDS,

0 commit comments

Comments
 (0)