8000 feat: add possibility to specify custom manifestUrl by Alejandbel · Pull Request #242 · ton-org/blueprint · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add possibility to specify custom manifestUrl #242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 29, 2025
Merged
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added ton lite client network provider
- Added tolk verifier
- Wallet v4 extended support: added v4r1, v4 is treated as v4r2
- Added possibility to specify custom `manifestUrl` in blueprint configuration

## [0.34.0] - 2025-05-20

Expand Down
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,36 @@ export const config: Config = {
};
```

### Recursive wrappers

You can configure whether the `wrappers` or `compilables` directories should be searched recursively for contracts configs by setting the `recursiveWrappers` field.

```typescript
import { Config } from '@ton/blueprint';

export const config: Config = {
recursiveWrappers: true,
};
```

By default, this is set to `false`.

### TonConnect manifest URL

If you're using a TonConnect provider, you can override the default manifest URL by specifying the `manifestUrl` field.
```typescript
import { Config } from '@ton/blueprint';

export const config: Config = {
manifestUrl: 'https://yourdomain.com/custom-manifest.json',
};
```

By default, the manifest URL is set to:
```
https://raw.githubusercontent.com/ton-org/blueprint/main/tonconnect/manifest.json
```

## Contributors

Special thanks to [@qdevstudio](https://t.me/qdevstudio) for their logo for blueprint.
Expand Down
7 changes: 7 additions & 0 deletions src/config/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,11 @@ export interface Config {
* @default false
*/
recursiveWrappers?: boolean;

/**
* Manifest url passed to TonConnect provider.
*
* @default https://raw.githubusercontent.com/ton-org/blueprint/main/tonconnect/manifest.json
*/
manifestUrl?: string;
}
2 changes: 1 addition & 1 deletion src/network/createNetworkProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ class NetworkProviderBuilder {
break;
case 'tonconnect':
if (network === 'custom') throw new Error('Tonkeeper cannot work with custom network.');
provider = new TonConnectProvider(new FSStorage(storagePath), this.ui, network);
provider = new TonConnectProvider(new FSStorage(storagePath), this.ui, network, this.config?.manifestUrl);
break;
case 'mnemonic':
provider = await createMnemonicProvider(client, network, this.ui);
Expand Down
10 changes: 7 additions & 3 deletions src/network/send/TonConnectProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ export class TonConnectProvider implements SendProvider {
#ui: UIProvider;
#network: Network;

constructor(storage: Storage, ui: UIProvider, network: Network) {
constructor(
storage: Storage,
ui: UIProvider,
network: Network,
manifestUrl: string = 'https://raw.githubusercontent.com/ton-org/blueprint/main/tonconnect/manifest.json',
) {
this.#connector = new TonConnect({
storage: new TonConnectStorage(storage),
manifestUrl:
'https://raw.githubusercontent.com/ton-org/blueprint/main/tonconnect/manifest.json',
manifestUrl,
});
this.#ui = ui;
this.#network = network;
Expand Down
0