@ledgerhq/coin-ton 0.36.0 → 0.37.0
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/CHANGELOG.md +37 -1984
- package/lib/bridge/bridgeHelpers/txn.d.ts.map +1 -1
- package/lib/bridge/bridgeHelpers/txn.js +24 -14
- package/lib/bridge/bridgeHelpers/txn.js.map +1 -1
- package/lib/config.d.ts +5 -2
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js.map +1 -1
- package/lib-es/bridge/bridgeHelpers/txn.d.ts.map +1 -1
- package/lib-es/bridge/bridgeHelpers/txn.js +24 -14
- package/lib-es/bridge/bridgeHelpers/txn.js.map +1 -1
- package/lib-es/config.d.ts +5 -2
- package/lib-es/config.d.ts.map +1 -1
- package/lib-es/config.js.map +1 -1
- package/package.json +6 -5
- package/src/__tests__/unit/txn.unit.test.ts +169 -0
- package/src/bridge/bridgeHelpers/txn.ts +33 -15
- package/src/config.ts +7 -2
package/src/config.ts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import { CurrencyConfig } from "@ledgerhq/coin-module-framework/config";
|
|
1
|
+
import { Context, CurrencyConfig } from "@ledgerhq/coin-module-framework/config";
|
|
2
2
|
import { KnownJetton } from "./types";
|
|
3
3
|
|
|
4
|
-
export type
|
|
4
|
+
export type TonConfig = CurrencyConfig & {
|
|
5
5
|
infra: {
|
|
6
6
|
API_TON_ENDPOINT: string;
|
|
7
7
|
KNOWN_JETTONS: KnownJetton[];
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
+
/** The {@link Context} threaded through the coin-ton low layers (ADR-019). */
|
|
12
|
+
export type TonContext = Context<TonConfig>;
|
|
13
|
+
|
|
14
|
+
export type TonCoinConfig = () => TonConfig;
|
|
15
|
+
|
|
11
16
|
let coinConfig: TonCoinConfig | undefined;
|
|
12
17
|
|
|
13
18
|
export const setCoinConfig = (config: TonCoinConfig): void => {
|