# GoSDK for webapps

GoSDK functions can be exported to WebAssembly which allows you to compile code from languages such as C/C++/Rust to and run them in the browser as web apps.

### Exporting a gosdk function to WebAssembly

1. Build your own go method.
2. Expose it via [jsbridge.BindAsyncFuncs](https://github.com/0chain/gosdk/blob/9ea75b3c60d23eff955e307c8cc3e8d5d75b3c38/wasmsdk/proxy.go#L122). All of methods are exposed on wasm. You can check them as examples . Here is the list for convenience.\\

```
			"init":                  Init,
			"setWallet":             SetWallet,
			"setZBoxHost":           setZBoxHost,
			"getEncryptedPublicKey": GetEncryptedPublicKey,
			"hideLogs":              hideLogs,
			"showLogs":              showLogs,

			//blobber
			"delete":      Delete,
			"rename":      Rename,
			"copy":        Copy,
			"move":        Move,
			"share":       Share,
			"download":    Download,
			"upload":      Upload,
			"listObjects": listObjects,
			"createDir":   createDir,

			// zcn txn
			"commitFileMetaTxn":   CommitFileMetaTxn,
			"commitFolderMetaTxn": CommitFolderMetaTxn,

			// player
			"play":           Play,
			"stop":           Stop,
			"getNextSegment": GetNextSegment,

			// wallet
			"createWallet": createWallet,

			//allocation
			"createAllocation":      createAllocation,
			"getAllocationBlobbers": getAllocationBlobbers,
			"listAllocations":       listAllocations,

			//smartcontract
			"executeSmartContract": executeSmartContract,

			//swap
			"setSwapWallets": setSwapWallets,
			"swapToken":      swapToken,
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-old.zus.network/guides/zus-gosdk/gosdk-for-webapps.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
