From d081a6c39701834a32870236d224e262bfaf73ed Mon Sep 17 00:00:00 2001 From: Barin Britva Date: Mon, 5 Feb 2024 20:56:32 +0700 Subject: [PATCH 1/5] Implement proxy for content resolver to avoid CORS issues. --- packages/common/content-resolver.ts | 30 ++++++++++++++++ packages/common/game-fi.ts | 53 ++++++++++++++++++++++++++--- packages/common/nft-item.ts | 7 ++-- packages/phaser/src/index.ts | 1 + 4 files changed, 84 insertions(+), 7 deletions(-) create mode 100644 packages/common/content-resolver.ts diff --git a/packages/common/content-resolver.ts b/packages/common/content-resolver.ts new file mode 100644 index 0000000..08dda29 --- /dev/null +++ b/packages/common/content-resolver.ts @@ -0,0 +1,30 @@ +import {DefaultContentResolver, ContentResolver} from './content'; + +export interface IpfsGateway { + (id: string): string; +} + +export interface UrlProxy { + (url: string): string; +} + +export interface ProxyContentResolverParams { + ipfsGateway?: IpfsGateway; + urlProxy?: UrlProxy; +} + +export class ProxyContentResolver extends DefaultContentResolver { + readonly urlProxy: UrlProxy; + public static readonly replaceable: string = '%URL%'; + + constructor({ipfsGateway, urlProxy}: ProxyContentResolverParams = {}) { + super(ipfsGateway); + this.urlProxy = urlProxy == null ? (url) => url : urlProxy; + } + + public override resolve(url: string): Promise { + return super.resolve(this.urlProxy(url)); + } +} + +export {ContentResolver}; diff --git a/packages/common/game-fi.ts b/packages/common/game-fi.ts index 91fa55f..f065627 100644 --- a/packages/common/game-fi.ts +++ b/packages/common/game-fi.ts @@ -2,6 +2,13 @@ import {TonClient, getHttpEndpoint, TonClientOptions, TonConnectUI, Address} fro import {WalletConnector, WalletConnectorOptions, Wallet, Account, WalletApp} from './interfaces'; import {TonConnectSender} from './ton-connect-sender'; import {NftCollectionManager} from './nft-collection'; +import { + IpfsGateway, + ProxyContentResolver, + ProxyContentResolverParams, + UrlProxy, + ContentResolver +} from './content-resolver'; import {NftItemManager, NftTransferRequest} from './nft-item'; import {JettonManager, JettonTransferRequest} from './jetton'; import {PaymentManager, TonTransferRequest} from './payment'; @@ -14,11 +21,16 @@ export type BuyParams = export type Network = 'mainnet' | 'testnet'; -export interface MerchantInitialization { +export interface MerchantParams { tonAddress: Address | string; jettonAddress: Address | string; } +export interface ContentResolverParams { + ipfsGateway?: IpfsGateway; + urlProxy?: UrlProxy | string; +} + export interface GameFiInitializationParams { /** * @defaultValue testnet @@ -35,11 +47,19 @@ export interface GameFiInitializationParams { * TonClient instance or only its params. */ client?: TonClient | TonClientOptions; + /** + * Loading collections, NFTs, etc. information requires requests to external resources. + * Some of those resources may block direct requests from browsers by CORS policies. + * Pass function or template string which will be used to generate proxy URL. For example: + * `http://localhost:3000/cors-passthrough?url=%URL%` - %URL% will be replaced by URL + * your proxy server should follow. + */ + contentResolver?: ContentResolverParams; /** * TON wallet address and jetton wallet address of in-game shop. * In-game purchases will be send to those addresses. */ - merchant?: MerchantInitialization; + merchant?: MerchantParams; } export interface Merchant { @@ -50,6 +70,7 @@ export interface Merchant { export interface GameFiConstructorParams { walletConnector: WalletConnector; tonClient: TonClient; + contentResolver: ContentResolver; merchant?: Merchant; } @@ -61,6 +82,7 @@ export interface GameFiConstructorParams { export abstract class GameFiBase { public readonly walletConnector: WalletConnector; public readonly tonClient: TonClient; + public readonly contentResolver: ContentResolver; public readonly merchant?: Merchant; private readonly nftCollectionManager: NftCollectionManager; @@ -71,13 +93,18 @@ export abstract class GameFiBase { constructor(params: GameFiConstructorParams) { this.walletConnector = params.walletConnector; this.tonClient = params.tonClient; + this.contentResolver = params.contentResolver; if (params.merchant != null) { this.merchant = params.merchant; } const transactionSender = new TonConnectSender(this.walletConnector); this.nftCollectionManager = new NftCollectionManager(this.tonClient); - this.nftItemManager = new NftItemManager(this.tonClient, transactionSender); + this.nftItemManager = new NftItemManager( + this.tonClient, + transactionSender, + this.contentResolver + ); this.jettonManager = new JettonManager(this.tonClient, transactionSender); this.paymentManager = new PaymentManager(this.jettonManager, transactionSender); } @@ -147,7 +174,25 @@ export abstract class GameFiBase { tonClient = new TonClient(clientOptions); } - return {walletConnector, tonClient}; + const contentResolverParams: ProxyContentResolverParams = {}; + if (params.contentResolver != null) { + const {ipfsGateway, urlProxy} = params.contentResolver; + if (ipfsGateway != null) { + contentResolverParams.ipfsGateway = ipfsGateway; + } + if (urlProxy != null) { + if (typeof urlProxy === 'string') { + contentResolverParams.urlProxy = (url) => { + return urlProxy.replace(ProxyContentResolver.replaceable, url); + }; + } else { + contentResolverParams.urlProxy = urlProxy; + } + } + } + const contentResolver = new ProxyContentResolver(contentResolverParams); + + return {walletConnector, tonClient, contentResolver}; } /** diff --git a/packages/common/nft-item.ts b/packages/common/nft-item.ts index 2eef3fd..4a0d9c0 100644 --- a/packages/common/nft-item.ts +++ b/packages/common/nft-item.ts @@ -1,4 +1,4 @@ -import {DefaultContentResolver, loadFullContent} from './content'; +import {ContentResolver, loadFullContent} from './content'; import {parseNftContent} from './content-nft'; import {TonClient, Address, Cell, beginCell, Sender} from './external'; import {NftContent} from './interfaces'; @@ -105,7 +105,8 @@ export class NftItemManager { constructor( private readonly tonClient: TonClient, - private readonly sender: Sender + private readonly sender: Sender, + private readonly contentResolver: ContentResolver ) { this.manager = new DomainNftItemManager(this.tonClient); } @@ -121,7 +122,7 @@ export class NftItemManager { content: domainData.content == null ? null - : parseNftContent(await loadFullContent(domainData.content, new DefaultContentResolver())) + : parseNftContent(await loadFullContent(domainData.content, this.contentResolver)) }; } diff --git a/packages/phaser/src/index.ts b/packages/phaser/src/index.ts index 5ff8f0e..f4d7de4 100644 --- a/packages/phaser/src/index.ts +++ b/packages/phaser/src/index.ts @@ -1,3 +1,4 @@ +export * from '../../common/content-resolver'; export * from '../../common/external'; export * from '../../common/game-fi'; export * from '../../common/interfaces'; From 60fd97ec6ef02652d73ec42e504d718e18379b8f Mon Sep 17 00:00:00 2001 From: Barin Britva Date: Mon, 5 Feb 2024 21:11:51 +0700 Subject: [PATCH 2/5] Unify params name. --- packages/common/external.ts | 2 +- packages/common/game-fi.ts | 22 ++++++++++------------ packages/common/interfaces.ts | 2 +- packages/phaser/src/game-fi.ts | 4 ++-- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/packages/common/external.ts b/packages/common/external.ts index a515ec5..07f70bf 100644 --- a/packages/common/external.ts +++ b/packages/common/external.ts @@ -5,7 +5,7 @@ export {getHttpEndpoint} from '@orbs-network/ton-access'; export {Sender, SenderArguments, SendMode, storeStateInit} from '@ton/core'; // add export of TonClientParameters to @ton/ton package -export interface TonClientOptions { +export interface TonClientParams { endpoint: string; timeout?: number; apiKey?: string; diff --git a/packages/common/game-fi.ts b/packages/common/game-fi.ts index f065627..ef672c3 100644 --- a/packages/common/game-fi.ts +++ b/packages/common/game-fi.ts @@ -1,5 +1,5 @@ -import {TonClient, getHttpEndpoint, TonClientOptions, TonConnectUI, Address} from './external'; -import {WalletConnector, WalletConnectorOptions, Wallet, Account, WalletApp} from './interfaces'; +import {TonClient, getHttpEndpoint, TonClientParams, TonConnectUI, Address} from './external'; +import {WalletConnector, WalletConnectorParams, Wallet, Account, WalletApp} from './interfaces'; import {TonConnectSender} from './ton-connect-sender'; import {NftCollectionManager} from './nft-collection'; import { @@ -42,11 +42,11 @@ export interface GameFiInitializationParams { * like Phaser `createConnectButton` or draw connect button by yourself. * @defaultValue headless mode */ - connector?: WalletConnector | WalletConnectorOptions; + connector?: WalletConnector | WalletConnectorParams; /** * TonClient instance or only its params. */ - client?: TonClient | TonClientOptions; + client?: TonClient | TonClientParams; /** * Loading collections, NFTs, etc. information requires requests to external resources. * Some of those resources may block direct requests from browsers by CORS policies. @@ -162,16 +162,16 @@ export abstract class GameFiBase { if (client instanceof TonClient) { tonClient = client; } else { - let clientOptions: TonClientOptions; + let clientParams: TonClientParams; if (client == null) { const endpoint = await getHttpEndpoint({ network }); - clientOptions = {endpoint}; + clientParams = {endpoint}; } else { - clientOptions = client; + clientParams = client; } - tonClient = new TonClient(clientOptions); + tonClient = new TonClient(clientParams); } const contentResolverParams: ProxyContentResolverParams = {}; @@ -316,9 +316,7 @@ export abstract class GameFiBase { return typeof instance === 'object' && instance != null && 'openModal' in instance; } - protected static createConnectUiWorkaround( - options: WalletConnectorOptions = {} - ): WalletConnector { + protected static createConnectUiWorkaround(params: WalletConnectorParams = {}): WalletConnector { // we need 100% TonConnectUI functionality, but without visual parts // to reuse the logic, but not to implement fork, use the workaround // todo remove this workaround @@ -340,7 +338,7 @@ export abstract class GameFiBase { document.body.appendChild(widgetRoot); return new TonConnectUI({ - ...options, + ...params, buttonRootId: buttonRoot.id, widgetRootId: widgetRoot.id }); diff --git a/packages/common/interfaces.ts b/packages/common/interfaces.ts index c7a612a..d479ece 100644 --- a/packages/common/interfaces.ts +++ b/packages/common/interfaces.ts @@ -12,7 +12,7 @@ export { type TonConnectUI as WalletConnector } from '@tonconnect/ui'; -export type WalletConnectorOptions = Pick< +export type WalletConnectorParams = Pick< TonConnectUiOptionsWithManifest, 'manifestUrl' | 'actionsConfiguration' >; diff --git a/packages/phaser/src/game-fi.ts b/packages/phaser/src/game-fi.ts index 8c8a9e6..233337c 100644 --- a/packages/phaser/src/game-fi.ts +++ b/packages/phaser/src/game-fi.ts @@ -6,7 +6,7 @@ export interface CreateConnectButtonParams { scene: Phaser.Scene; positionX?: number; positionY?: number; - buttonOptions?: ConnectWalletButtonParams; + button?: ConnectWalletButtonParams; } export class GameFi extends GameFiBase { @@ -29,7 +29,7 @@ export class GameFi extends GameFiBase { params.scene, params.positionX ?? 0, params.positionY ?? 0, - params.buttonOptions + params.button ); } } From ef14b81ea207d2632ca59ca4d46aab37ba98df7b Mon Sep 17 00:00:00 2001 From: Barin Britva Date: Tue, 6 Feb 2024 11:59:20 +0700 Subject: [PATCH 3/5] Fix BuyParams jetton type. --- packages/common/game-fi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/game-fi.ts b/packages/common/game-fi.ts index ef672c3..11efd92 100644 --- a/packages/common/game-fi.ts +++ b/packages/common/game-fi.ts @@ -17,7 +17,7 @@ export type NftTransferParams = Omit; export type SendParams = Omit | Omit; export type BuyParams = | Omit - | Omit; + | (Omit & {jetton?: true}); export type Network = 'mainnet' | 'testnet'; From b41de9346782e25550b5afaaf69683b5079b13b5 Mon Sep 17 00:00:00 2001 From: Barin Britva Date: Tue, 6 Feb 2024 12:27:12 +0700 Subject: [PATCH 4/5] Rename the repo. --- README.md | 42 ++++++++++++++++++------------------ package-lock.json | 14 ++++++------ package.json | 2 +- packages/phaser/package.json | 3 ++- 4 files changed, 31 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index c5ed6d6..8edaebe 100644 --- a/README.md +++ b/README.md @@ -44,40 +44,40 @@ This can be used for: | Method | Description | | -------- | -------- | -| [create](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#create) | creates a GameFi instance | +| [create](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#create) | creates a GameFi instance | `GameFi` instance methods: | Method | Description | | -------- | -------- | -| [createConnectButton](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#createConnectButton) | creates a button to connect a wallet. | -| [connectWallet](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#connectWallet) | connect wallet manually (without build-in UIs) | -| [onWalletChange](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#onWalletChange) | watch weather wallet was connected or disconnected | -| [disconnectWallet](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#disconnectWallet) | disconnect wallet manually (without build-in UIs) | -| [buy](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#buy) | buy from in-game shop with jetton or TON | -| [send](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#send) | transfer jetton or TON to another wallet address | -| [getNftCollection](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#getNftCollection) | get collection data | -| [getNftAddressByIndex](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#getNftAddressByIndex) | get NFT address by its index in a collection | -| [getNftItem](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#getNftItem) | get NFT data by address | -| [getNftItemByIndex](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#getNftItemByIndex) | get NFT data by its index in a collection | +| [createConnectButton](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#createConnectButton) | creates a button to connect a wallet. | +| [connectWallet](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#connectWallet) | connect wallet manually (without build-in UIs) | +| [onWalletChange](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#onWalletChange) | watch weather wallet was connected or disconnected | +| [disconnectWallet](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#disconnectWallet) | disconnect wallet manually (without build-in UIs) | +| [buy](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#buy) | buy from in-game shop with jetton or TON | +| [send](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#send) | transfer jetton or TON to another wallet address | +| [getNftCollection](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#getNftCollection) | get collection data | +| [getNftAddressByIndex](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#getNftAddressByIndex) | get NFT address by its index in a collection | +| [getNftItem](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#getNftItem) | get NFT data by address | +| [getNftItemByIndex](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#getNftItemByIndex) | get NFT data by its index in a collection | | [transferNftItem](docs/classes/GameFi.html#transferNftItem) | transfer NFT to another wallet address | -| [getJetton](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#getJetton) | get jetton data | -| [transferJetton](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#transferJetton) | transfer jetton to another wallet address | +| [getJetton](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#getJetton) | get jetton data | +| [transferJetton](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#transferJetton) | transfer jetton to another wallet address | `GameFi` instance props: | Prop | Description | | -------- | -------- | -| [tonClient](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#tonClient) | ton client instance in case you need to use it | -| [walletConnector](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#walletConnector) | wallet connector instance in case you need to use it | -| [wallet](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#wallet) | user's connected wallet | -| [walletAccount](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#walletAccount) | user's connected account | -| [walletAddress](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#walletAddress) | user's connected wallet address | -| [merchantAddress](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#merchantAddress) | in-game shop's address to receive TON | -| [merchantJettonAddress](https://barinbritva.github.io/ton-gamefi/classes/GameFi.html#merchantJettonAddress) | in-game shop's jetton used as in-game currency | +| [tonClient](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#tonClient) | ton client instance in case you need to use it | +| [walletConnector](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#walletConnector) | wallet connector instance in case you need to use it | +| [wallet](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#wallet) | user's connected wallet | +| [walletAccount](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#walletAccount) | user's connected account | +| [walletAddress](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#walletAddress) | user's connected wallet address | +| [merchantAddress](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#merchantAddress) | in-game shop's address to receive TON | +| [merchantJettonAddress](https://barinbritva.github.io/game-engines-sdk/classes/GameFi.html#merchantJettonAddress) | in-game shop's jetton used as in-game currency | # Use cases To learn complex use cases read [TON GameFi article](https://gist.github.com/barinbritva/b3db1605f2667b7562b53a23877c0e73) and check out the source code of demo [Flappy Bird game](https://github.com/ton-community/flappy-bird). # References -The full [typedoc references](https://barinbritva.github.io/ton-gamefi/index.html). +The full [typedoc references](https://barinbritva.github.io/game-engines-sdk/index.html). diff --git a/package-lock.json b/package-lock.json index 5683d13..7f86f2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,10 +1,10 @@ { - "name": "ton-gamefi", + "name": "@barinbritva/game-engines-sdk", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "ton-gamefi", + "name": "@barinbritva/game-engines-sdk", "workspaces": [ "packages/phaser" ], @@ -20,6 +20,10 @@ "npm": ">=9.0.0" } }, + "node_modules/@barinbritva/phaser-sdk": { + "resolved": "packages/phaser", + "link": true + }, "node_modules/@orbs-network/ton-access": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/@orbs-network/ton-access/-/ton-access-2.3.3.tgz", @@ -454,10 +458,6 @@ "resolved": "https://registry.npmjs.org/teslabot/-/teslabot-1.5.0.tgz", "integrity": "sha512-e2MmELhCgrgZEGo7PQu/6bmYG36IDH+YrBI1iGm6jovXkeDIGa3pZ2WSqRjzkuw2vt1EqfkZoV5GpXgqL8QJVg==" }, - "node_modules/ton-phaser": { - "resolved": "packages/phaser", - "link": true - }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -575,7 +575,7 @@ } }, "packages/phaser": { - "name": "ton-phaser", + "name": "@barinbritva/phaser-sdk", "version": "0.1.0", "dependencies": { "@orbs-network/ton-access": "^2.3.3", diff --git a/package.json b/package.json index 35a1195..cf2f401 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "ton-gamefi", + "name": "@barinbritva/game-engines-sdk", "private": true, "engines": { "node": ">=18.0.0", diff --git a/packages/phaser/package.json b/packages/phaser/package.json index c2cd123..5521b37 100644 --- a/packages/phaser/package.json +++ b/packages/phaser/package.json @@ -1,6 +1,7 @@ { - "name": "ton-phaser", + "name": "@barinbritva/phaser-sdk", "version": "0.1.0", + "files": ["./dist"], "main": "dist/phaser/src/index.js", "types": "dist/phaser/src/index.d.ts", "scripts": { From 33c565a955423835866f552f85d5e1499322af38 Mon Sep 17 00:00:00 2001 From: Barin Britva Date: Tue, 6 Feb 2024 12:28:58 +0700 Subject: [PATCH 5/5] Publication to NPM. --- .github/workflows/publish-npm.yml | 53 +++++++++++++++++++++++++++++++ README.md | 6 ++-- package.json | 1 - packages/phaser/README.md | 7 ++++ 4 files changed, 63 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/publish-npm.yml create mode 100644 packages/phaser/README.md diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..43d4e08 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,53 @@ +name: Publish to NPM + +on: + push: + tags: + # package-major.minor.patch - required + # -beta.build - optional + - '*-*.*.*' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - id: get-package + run: | + PACKAGE_NAME=$(echo ${GITHUB_REF#refs/tags/} | cut -d- -f1) + ALLOWED_PACKAGES=("phaser") # Add more package names if needed + if [[ " ${ALLOWED_PACKAGES[@]} " =~ " ${PACKAGE_NAME} " ]]; then + echo "::set-output name=package::${PACKAGE_NAME}" + else + echo "Invalid package name ${PACKAGE_NAME}." + exit 1 + fi + shell: bash + + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org' + + - name: Check version + run: | + TAG_VERSION=$(echo ${GITHUB_REF#refs/tags/${{ steps.get-package.outputs.package }}-}) + PACKAGE_VERSION=$(node -p "require('./packages/${{ steps.get-package.outputs.package }}/package.json').version") + if [[ "${TAG_VERSION}" != "${PACKAGE_VERSION}" ]]; then + echo "Tag version ${TAG_VERSION} does not match package version ${PACKAGE_VERSION}." + exit 1 + fi + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build --workspace @barinbritva/${{ steps.get-package.outputs.package }}-sdk + + - name: Publish + run: cd packages/${{ steps.get-package.outputs.package }} && npm publish --access=public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/README.md b/README.md index 8edaebe..4d62fd5 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -# gamefi-sdk +# game-engines-sdk -TON bindings and utilities for game engines: +TON blockchain bindings and utilities for game engines: * Phaser.io * Cocos2d (coming soon) # Getting started Installation: ```sh -npm install --save @ton-community/gamefi-phaser +npm install --save @barinbritva/phaser-sdk ``` Creating GameFi instance: diff --git a/package.json b/package.json index cf2f401..4e3ab40 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,5 @@ { "name": "@barinbritva/game-engines-sdk", - "private": true, "engines": { "node": ">=18.0.0", "npm": ">=9.0.0" diff --git a/packages/phaser/README.md b/packages/phaser/README.md new file mode 100644 index 0000000..0e4d20a --- /dev/null +++ b/packages/phaser/README.md @@ -0,0 +1,7 @@ +# phaser-sdk + +TON blockchain bindings and utilities for [Phaser.io](https://phaser.io/) game engine. + +# Documentation + +Please read the documentation in the official [repository](https://github.com/barinbritva/game-engines-sdk).