Git Product home page Git Product logo

nmkrgodot's Introduction

NmkrGodot

A Godot plugin for accessing the NMKR Studio API

Please check our [https://cardano.ideascale.com/c/idea/119196](Catalyst Proposal) for more details.

A Godot plugin that is a wrapper of the NMKR API to create more integrated minting experiences.

The NMKR SDK for Godot addresses the need for seamless integration of Cardano's NFT capabilities in the gaming industry, particularly targeting indie game developers using Godot.

By developing a Godot plugin for NMKR's NFT minting API, we facilitate easier Cardano adoption, potentially increasing both the number of NFTs minted and the transactions within the Cardano network. With this tool, we aim to attract new developers and users to the Cardano ecosystem, broadening its user base, while facilitating the implementation of NFT technology for the game developers who are adopting different revenue models.

Before using this plugin in your projects, you need to have at least an API Key configured in the NMKR Studio console. Copy your key, then open the Project Settings and search for Nmkr (you may need to activate the Advanced Settings toggle for it to show up). Click on Config and add your key(s) in the input field(s).

Code Examples Each available method will emit a signal as soon as the request is completed. You can either await the corresponding signal for synchronous requests or connect a callback function to it. If you only need to perform consequential synchronous requests, you can also wait for the generic completed signal instead of having to specify a specific one after each call.

Example with await:

@onready var nmkr: Nmkr = $NMKR

func _ready():
	nmkr.get_ada_rates()
	await nmkr.get_ada_rates_completed # or just "await nmkr.completed"
	print(nmkr.result)

Example with a callback function:

@onready var nmkr: Nmkr = $NMKR

func _ready():
	nmkr.get_ada_rates_completed.connect(_on_get_ada_rates_completed)
	nmkr.get_ada_rates()

func _on_get_ada_rates_completed(result: Dictionary):
	print(result)

Conventions used in the NMKR SDK for Godot The NMKR custom node is a GDScript class that exposes both a public method and a custom signal for each of the available endpoints in the NMKR API, as documented in the NMKR Swagger.

Each endpoint corresponds to a method that has the same name, but is written using snake_case without the leading version number, and will emit two signals on completion: completed, and another one with the same name plus the _completed suffix. See the example above for more details.

Each required parameter, as mentioned in the NMKR Swagger, is expected to be provided to the functions with the same name. For example, if you want to access the

/v2/AddPayoutWallet/{walletaddress}

endpoint, you will the following function:

func add_payout_wallet(walletaddress)

Passing data to POST and PUT requests To pass the required data to the endpoints that are accessible with the POST or PUT methods, you can simply define a Dictionary with the necessary key/value pairs, and pass it to the desired function after the other required parameters. The name of this parameter is always "data" for all the available functions that use POST or PUT methods. Example:

check_metadata(nftuid, { "metadata": "string" })

Optional parameters Some of the endpoints accept optional parameters. In that case, when needed, you can define a Dictionary with all the optional parameters that you need, and pass it to the desired function after all the required ones. The name of this parameter is always "optional" for all the available functions that allow specifying optional parameters. Example:

get_customer_transaction(customerid, { "exportOptions": "Csv" })

nmkrgodot's People

Contributors

odiobill avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.