# Bluerprints

### Get Connection Url

**Output values:**

* *Return Value:* `{ "url": string, "connectionToken": string }`

### Get Authentication

**Input values:**

* *ConnectionToken:* `string` - a connection token that is received after the Get Connection URL request.

**Output values:**

* *Return Value:* `{ "address": string }`

![](https://1203396926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5TI0ZUNjvj5T3ezKUKs6%2Fuploads%2FFeaQoGfFA3WnS5mnPFLb%2Ftelegram-cloud-document-2-5269434189358308127.jpg?alt=media\&token=d46c1cb6-dec8-4aa9-b5d5-4288a24f5337)

### Get ERC20Balance by Owner

![](https://1203396926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5TI0ZUNjvj5T3ezKUKs6%2Fuploads%2Fhqoxdbe4t462QP5T0X8s%2FScreenshot_2.png?alt=media\&token=32de535c-bcd6-4a03-ad3c-b170533d9d28)

**Input values:**

* *Game Id:* `string`  - This is an id of your game. You can get your game ID in the dashboard on in the contract.
* *Owner Address String:* `string` - This is an address of an entity you'd like to know the balance in ERC20 Tokens.

**Output values:**

* *Return Value:* `{ "ERC20Balances" :[{"ERC20": string, "amount": int}] }` - The balance in ERC20 tokens for the given address.

### Get ERC721Token by Owner

![](https://1203396926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5TI0ZUNjvj5T3ezKUKs6%2Fuploads%2Fm5yTE9BLZmXbTl9nyFmH%2FScreenshot_3.png?alt=media\&token=038b22a7-b6cc-4619-8699-848adf96a3f7)

**Input values:**

* *Game Id:* `string` - This is an id of your game. You can get your game ID in the tryangle dashboard on in the tryangle contract.
* *Owner Address String:* `string` - This is an address of an entity you'd like to know the balance in ERC721 Tokens.

**Output values:**

* *Return Value:*  `{ "ERC721Balance": [{"ERC721": string, "balance": int}] }` - The balance in ERC721 tokens for the given address.

### Transfer ERC20 From User

![](https://1203396926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5TI0ZUNjvj5T3ezKUKs6%2Fuploads%2FTDviegoLLw32VwVR6PqY%2FScreenshot_39.png?alt=media\&token=bf2230aa-e5c1-47d5-8376-54b8a10651ef)

#### Action:

User will be redirected in browser for transfering tokens using browser wallet.

**Input values:**

* *Game Id:* `string`  - This is an id of your game. You can get your game ID in the dashboard on in the contract.
* *ERC20Token:* `string` - The address of the ERC20 token you'd like to transfer.
* *Amount:* `int` - The amount of ERC20 tokens to transfer in minimal units.
* *Owner Address String:* `string` - This is an address of an entity which would like to transfer tokens.
* *Recipient Address String:* `string` - This is an address of an entity that will receive ERC20 tokens.

**Output values:**

* *Return Value:* `{ "result": string }` - the transaction address.

##

### Transfer ERC721 From User

![](https://1203396926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5TI0ZUNjvj5T3ezKUKs6%2Fuploads%2FWyzftLfulh72XT74MB4E%2FScreenshot_38.png?alt=media\&token=fcdf73c3-4844-468a-bf29-047f39ad2b40)

#### Action:

User will be redirected in browser for transfering tokens using browser wallet.

**Input values:**

* *Game Id:* `string`  - This is an id of your game. You can get your game ID in the dashboard on in the contract.
* *ERC721Token:* `string` - The address of the ERC721 token you'd like to transfer.
* *TokenId:* `string` - The token amount of ERC721 you'd like to transfer.
* *Owner Address String:* `string` - This is an address of an entity which would like to transfer tokens.
* *Recipient Address String:* `string` - This is an address of an entity that will receive ERC20 tokens.

**Output values:**

* *Return Value:* `{ "result": string }` - the transaction address.

### Transfer ERC20 QR From User

![](https://1203396926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5TI0ZUNjvj5T3ezKUKs6%2Fuploads%2F3JnIQgetC6EuTKSSDVcu%2FScreenshot_40.png?alt=media\&token=2a5237ea-cdf9-4cbe-921e-37c2448d0a69)

#### Action:

The transaction will be sent to the device of the user used for authorization

**Input values:**

* *Game Id:* `string`  - This is an id of your game. You can get your game ID in the dashboard on in the contract.
* *ERC20Token:* `string` - The address of the ERC20 token you'd like to transfer.
* *Amount:* `int` - The amount of ERC20 tokens to transfer in minimal units.
* *Owner Address String:* `string` - This is an address of an entity which would like to transfer tokens.
* *Recipient Address String:* `string` - This is an address of an entity that will receive ERC20 tokens.

**Output values:**

* *Return Value:* `{ "result": string }` - the transaction address.

### Transfer ERC721 QR From User

![](https://1203396926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5TI0ZUNjvj5T3ezKUKs6%2Fuploads%2FEm8hOUC5TNfRj5hqIOBF%2FScreenshot_41.png?alt=media\&token=00b82399-1622-44ca-85c9-07780cd38eea)

#### Action:

The transaction will be sent to the device of the user used for authorization

**Input values:**

* *Game Id:* `string`  - This is an id of your game. You can get your game ID in the dashboard on in the contract.
* *ERC721Token:* `string` - The address of the ERC721 token you'd like to transfer.
* *TokenId:* `string` - The token amount of ERC721 you'd like to transfer.
* *Owner Address String:* `string` - This is an address of an entity which would like to transfer tokens.
* *Recipient Address String:* `string` - This is an address of an entity that will receive ERC20 tokens.

**Output values:**

* *Return Value:* `{ "result": string }` - the transaction address.

### Transfer ERC20 To User

![](https://1203396926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5TI0ZUNjvj5T3ezKUKs6%2Fuploads%2FcZItjK45VgBWofXyJF7E%2FScreenshot_26.png?alt=media\&token=74e1940a-5455-4794-a9d2-6c8fbec855fb)

#### Action:

This blueprint transfer approved **ERC20** token from owner and **spend deposited gas**.

**Input values:**

* *Game Id:* `int` - This is an id of your game. You can get your game ID in the dashboard on in the contract.
* *ERC20Token:* `string` - The address of the ERC20 token you'd like to transfer.
* *Token Amount:* `int` - The token amount of ERC20 you'd like to transfer.
* *Owner Address String:* `string` - This is an address of an entity which would like to transfer tokens.
* *Recipient Address String:* `string` - This is an address of an entity that will receive ERC721 tokens.

**Output values:**

* *Return Value:* `{ "result": string }` - the transaction address.

### Transfer ERC721 To User

![](https://1203396926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5TI0ZUNjvj5T3ezKUKs6%2Fuploads%2FyZCgCRqqy3LL5FyL8h1y%2FScreenshot_37.png?alt=media\&token=668ec577-cb4b-4ded-9025-9abab6736fee)

#### Action:

This blueprint transfer approved **ERC721** token from owner and **spend deposited gas**.

**Input values:**

* *Game Id:* `int` - This is an id of your game. You can get your game ID in the dashboard on in the contract.
* *ERC721Token:* `string` - The address of the ERC721 token you'd like to transfer.
* *TokenId:* `string` - The token amount of ERC721 you'd like to transfer.
* *Owner Address String:* `string` - This is an address of an entity which would like to transfer tokens.
* *Recipient Address String:* `string` - This is an address of an entity that will receive ERC721 tokens.

**Output values:**

* *Return Value:* `{ "result": string }` - the transaction address.
