Code Monkey home page Code Monkey logo

opentonapi's Introduction

Description

Opentonapi simplifies development of TON-based applications and provides an API centered around high-level concepts like Jettons, NFTs and so on keeping a way to access low-level details.

Opentonapi is an open source version of TonAPI and is 100% compatible with it.

The main difference is that TonAPI maintains an internal index of the whole TON blockchain and provides information about any entity in the blockchain including Jettons, NFTs, accounts, transactions, traces, etc.

TonAPI SDK and API documentation

Openapi.yaml describes the API of both Opentonapi and TonAPI.

For more examples and golang SDK take a look at TonAPI SDK.

How to run opentonapi

It is possible to use the environment variables listed below to configure opentonapi:

Env variable Default value Comment
PORT 8081 A port number used to accept incoming http connections
LOG_LEVEL INFO Log level
LITE_SERVERS - A comma-separated list of TON lite servers to work with. Each server has the following format: ip:port:public-key.
Ex: "127.0.0.1:14395:6PGkPQSbyFp12esf1NqmDOaLoFA8i9+Mp5+cAx5wtTU="
METRICS_PORT 9010 A port number used to expose /metrics endpoint with prometheus metrics
ACCOUNTS - A comma-separated list of accounts to watch for

Advanced features like traces, NFTs, Jettons, etc require you to configure a set of accounts to watch for:

ACCOUNTS="comma-separated-list-of-raw-account-addresses" make run 

Docker

docker run -d -p8081:8081 tonkeeper/opentonapi

opentonapi's People

Contributors

mr-tron avatar zakhar-petukhov avatar aleksej-paschenko avatar dependabot[bot] avatar

Stargazers

Mob avatar mpksldrv avatar Hossein Mayboudi avatar Alina Smirnova avatar ₮le avatar Anatoly Piskunov avatar  avatar hlhdai avatar Tom Robiquet avatar Sai ChitThae avatar Alexander Kuznetsov avatar  avatar Alexfilus avatar lucaslokchan avatar danteGPT avatar  avatar Nikita avatar  avatar  avatar feitian124 avatar SamiQussaireen avatar MetaGear avatar  avatar kevin.xu avatar Tim avatar Igor Karmyshev avatar  avatar  avatar xx1024 avatar Alexander Babenko avatar Nicolai Struc  avatar  avatar Hosein Baseri avatar Max avatar Kay avatar hollyDanmaster01  avatar  avatar  avatar  avatar Roman Zaycev avatar Tony H Dillion avatar  avatar HTC☯️⚛️NFT avatar  avatar Max Silenkov avatar  avatar Evgeny avatar 白菜林 avatar 云风 avatar  avatar symmetricalboy avatar  avatar Ermolay avatar  avatar David Build avatar Eric T. avatar  avatar  avatar  avatar eteryko avatar aKeY85 avatar Oleksii avatar  avatar Andrey Bronin avatar Dmytro avatar  avatar zweel avatar Mehdi Baneshi avatar Matt avatar AG avatar Yehoyada avatar Ilya Mikheev avatar theGrove avatar Danila avatar Niko avatar Sevapp avatar Vadym Kravchenko avatar ddl avatar Mased avatar Pavel Shuvalov avatar Matthias Vandermaesen avatar  avatar  avatar Shon Ness avatar  avatar  avatar Emil Valeev avatar Roman Inozemtsev avatar Алексей Полуянов avatar Web Artisan avatar  avatar Dr. Awesome Doge avatar Jiege avatar  avatar Alexey avatar  avatar  avatar

Watchers

 avatar Artem Bogoslavskiy avatar  avatar  avatar The Parallel avatar

opentonapi's Issues

$GOPATH/go.mod exists but should not

I try to build Dockerfile but i get this error

 sudo docker build . 

   DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
          Install the buildx component to build images with BuildKit:
          https://docs.docker.com/go/buildx/

   Sending build context to Docker daemon  3.016MB
   Step 1/12 : FROM golang:1.20 as build
   1.20: Pulling from library/golang
   bd73737482dd: Pull complete 
   6710592d62aa: Pull complete 
   75256935197e: Pull complete 
   948a624948ba: Pull complete 
   147e02c24f40: Pull complete 
   cd56b3199c0c: Pull complete 
   Digest: sha256:690e4135bf2a4571a572bfd5ddfa806b1cb9c3dea0446ebadaf32bc2ea09d4f9
   Status: Downloaded newer image for golang:1.20
    ---> 6a90a37099af
   Step 2/12 : COPY go.mod .
    ---> 484e4f1131a9
   Step 3/12 : COPY go.sum .
    ---> 2a13553b6678
   Step 4/12 : RUN go mod download
    ---> Running in 29855834daca
   $GOPATH/go.mod exists but should not
   The command '/bin/sh -c go mod download' returned a non-zero code: 1

how to get current comfirmed block num?

my boss give me a job. to implement this interface for ton:

type ChainScan interface {
	GetChainName() (string, *cerror.CError)

	// GetBlockNum 获得当前链的区块高度
	GetBlockNum() (int64, *cerror.CError)

	// GetConfirmedBlockNum 获得当前链的已经确认的区块高度
	// 有的链官方有确认数,比如6或者21等,你可以用 GetBlockNum 的结果减去确认数来返回结果
	// 或许也会存在这种情况:有的链的已确认高度,和 GetBlockNum 的结果相同
	// 但是绝大多数情况下确认数应该是落后于最新数的
	GetConfirmedBlockNum() (int64, *cerror.CError)
}

I knew the GetChainName() is ton so:

func (t *Ton) GetChainName() (string, *cerror.CError) {
	return "TON", nil
}

then:

func (t *Ton) GetBlockNum() (int64, *cerror.CError) {
	res, err := t.client2.GetBlockchainMasterchainHead(context.Background())
	if err != nil {
		return 0, cerror.NewError(cerror.CODE_THIRD_REQ_ERROR, err.Error())
	}
	if res.Seqno <= 0 {
		return 0, cerror.NewError(cerror.CODE_NODE_RESP_ERROR, "seqno is wrong")
	}
	if res.WorkchainID != -1 {
		return 0, cerror.NewError(cerror.CODE_NODE_RESP_ERROR, "workchain_id is wrong")
	}
	if res.Shard != "8000000000000000" {
		return 0, cerror.NewError(cerror.CODE_NODE_RESP_ERROR, "shard is wrong")
	}
	return int64(res.Seqno), nil
}

while:

func (t *Ton) GetConfirmedBlockNum() (int64, *cerror.CError) {
	return t.GetBlockNum() //TODO 问了问客服也没问出来,似乎这个链没有确认数的概念
}

how to implement the GetConfirmedBlockNum?

use which api method?

please help me or my boss would fire me.

thank you.

Transactions details are not returned from `liteserver/list_block_transactions`

Hi!

I'm using TONAPI liteserver method to receive the transactions inside the block. But TONAPI server does not return requested information on transactions. No hash, account_id or lt is returned, even though they should according to the mode I'm passing.

As an example, I try to request transactions with following params:

block_id=(0,8000000000000000,43193281,929ae484e160776f4e76ad0e068d94eab779ea87b9f83c9972601ffbe076c2aa,bf22bc01ecd365f0fe849322e56c055cdbaa6522bd4cec4ac8c4fe31a4570269)
mode=39
count=5

I tried with many different libs, but below is the example curl request to eliminate any possible library issues:

curl -X 'GET' \
  'https://tonapi.io/v2/liteserver/list_block_transactions/%280%2C8000000000000000%2C43193281%2C929ae484e160776f4e76ad0e068d94eab779ea87b9f83c9972601ffbe076c2aa%2Cbf22bc01ecd365f0fe849322e56c055cdbaa6522bd4cec4ac8c4fe31a4570269%29?mode=39&count=5' \
  -H 'accept: application/json'

The answer is

{
  "id": {
    "workchain": 0,
    "shard": "8000000000000000",
    "seqno": 43193281,
    "root_hash": "929ae484e160776f4e76ad0e068d94eab779ea87b9f83c9972601ffbe076c2aa",
    "file_hash": "bf22bc01ecd365f0fe849322e56c055cdbaa6522bd4cec4ac8c4fe31a4570269"
  },
  "req_count": 5,
  "incomplete": true,
  "ids": [
    {
      "mode": 39
    },
    {
      "mode": 39
    },
    {
      "mode": 39
    },
    {
      "mode": 39
    },
    {
      "mode": 39
    }
  ],
  "proof": "b5ee9c7201022b0100060200094603929ae484e160776f4e76ad0e068d94eab779ea87b9f83c9972601ffbe076c2aa002601241011ef55aaffffff11020304052848010129bf2934715efb46d1d4c1c701081e4c0dfab6d5a8fdd0e54661d874155979de0001284801017f8877d71799609cd5bcc1c170a99b99fc1c6b7841d6a3b9e2887f7caed132aa000328480101dd91083e470b31f42d99ae90c0341a374c9b56a4ad9f4fc99ae397921aefc093002523894a33f6fd5bda5ab96c5d18cacfbe93f45fb580750837ab1b98de065d8b073d8e000c891f2a55b64aca0b8f0cbe801a926ef47fe1601905a6d58e9b5220a7f448d6a1705e4006070828480101f3cd7a685736b37b7a702ff8a34eae6ee488c3f36481067cafb7d1064307bb7e001a284801011e2e5b06c6514abce64d35b860e36a09c1b42fc6b15ab15f67e228e7b5265379001b2109a1e97d5c3209220910f4beae190a0b22091085e1d64d0c0d28480101fb684824dc3690afb8c1e62a362759293ab402eb899b9af1eb138b1b694e3b7800172209103d1b73cd0e0f284801015043b7c02193401fe936a3dad69b2cdda103d48ac0124d380c8ce650de017095001b22091024e4391d10112848010148d10c4393d5519caaad5a4b72e407e07f12a6edba6b90d1e6df2232bdef109300162209100d2ff455121328480101dd3b884ec91b9e53646e007ae6fc3a15824bd98e27d2e158e6e483e4d71ce43b001522091005c584c5141528480101805b87606b523f9483debcc6d274f4021a0e640ee1d0919e8d5f3161d1ee12d2000f22070ec59ab11617284801017946d05c1e25ce07515d127374b562003cb22c892326419af7d5d475ed04afb900122209535b532540181922070d584e1d252623a1bdc2cd3c4ce52d3c209b75ff7908bb185c2887d970f483edef2ea0e935ce261c194975114041669e2672969e104dbaffbc845d8c2e1443ecb87a41f6f79750749ae7130e27a000053e3df1e8183292ea241a1b1c220943322483401f20210964c8c88c901d2109f1830638201e0082722cda7f58bde0cc6dcc9c9ac00c944c7a6ad8c4677ecd916fda79d889777d8041cf3b668209e853e79db98db8b0960049aae841c0c919a2b053a377814432005c28480101da239b1e123e65db373e47b0cf5e56ac73d2c05783b741d810984b24a4152f670004284801016a5d723c593f47bd52d5b5851c5f8672e4be7d64e61e48c18d0ef1a710ef36f6000222a1bd79d327bd9dd6f5ced36514562d12880473e61bb6149f89caf34e32e2f22f5e66310845019ce993deceeb7ae769b28a2b1689440239f30ddb0a4fc4e579a719717917afa0000014f8f7c7a076998c42122122229dbd5ecaaa8382899a1acf6e1c28d174b5467ba3ce6afca53661ef2edc421e8d4a53882501af655541c144cd0d67b70e1468ba5aa33dd1e7357e529b30f7976e210f46a5a0000014f8f7c7a06194e20a232428480101b6efcbd76d790ce3ebc45188de4f82913c0b1ca1a1ff15a95f96ee72b3ee99d3000b0082723812ac3a0f157795519cf6178a1e05f2b1e5f56a985aa4aa5df2ca299490b30953731f9d3b4bd81b89f1be79322782a8c33089560372a5da410d20805efeedfe2848010127f36f68d4a5ba500c43e824a5006275093166191acaef04166b9a4c149143700003008272e6c4fd0af66fae14ea35080746ceb5061997e2a788e7a972b4300a929676957f555755d89092552353d2ef518667e85c0e8d239568ee8a148b0472a8a0643c4823a1be33b271dd51c7d6ef43cb69e15bef037543df9ab28e5e69d3e83929052343658ca54afca059d938eea8e3eb77a1e5b4f0adf781baa1efcd59472f34e9f41c948291a1b2d3c000029f1ef8f40c32952bf427282928480101f40d945933cf255c7a9d76f4ded04ce5c1e7ee874756be6754d643f5962417bf00072109b26468c9e82a28480101a4404c977e2746c4fe56d52fd9beded3a3c26962e8be2b15e58f4c779aeb5a7c0004008272a7a50828def754795f152d791653b1ff1a7108506eb0e4c9b9ae04584ffc8f4a595fce62a2476db6076aabe80d721df08aa862a9d6643db9e652b61b5fc4e6ef2848010115b372a130bc864bb3405f34c470a5d318cffd3272b95c60e8164bbe1c7e7cad0004"
}

If I make exactly the same request to public liteservers, e.g., using pytoniq

from pytoniq.liteclient import LiteClient

provider_client = LiteClient.from_mainnet_config()
await provider_client.connect()
await provider_client.reconnect()

data = {
    'id': {
        'workchain': 0,
        'shard': -9223372036854775808,  # equivalent to un-hexed "8000000000000000"
        'seqno': 43193281,
        'root_hash': '929ae484e160776f4e76ad0e068d94eab779ea87b9f83c9972601ffbe076c2aa',
        'file_hash': 'bf22bc01ecd365f0fe849322e56c055cdbaa6522bd4cec4ac8c4fe31a4570269',
    },
    'mode': 39,
    'count': 5,
}
res_public = await provider_client.liteserver_request('listBlockTransactions', data)
print(res_public)

Then I get the following output:

{'@type': 'liteServer.blockTransactions',
 'id': {'workchain': 0,
  'shard': -9223372036854775808,
  'seqno': 43193281,
  'root_hash': '929ae484e160776f4e76ad0e068d94eab779ea87b9f83c9972601ffbe076c2aa',
  'file_hash': 'bf22bc01ecd365f0fe849322e56c055cdbaa6522bd4cec4ac8c4fe31a4570269',
  '@type': 'tonNode.blockIdExt'},
 'req_count': 5,
 'incomplete': True,
 'ids': [{'mode': 39,
   'account': '01059a7899ca5a784136ebfef2117630b8510fb2e1e907dbde5d41d26b9c4c38',
   'lt': 46119083000001,
   'hash': 'da239b1e123e65db373e47b0cf5e56ac73d2c05783b741d810984b24a4152f67'},
  {'mode': 39,
   'account': '01059a7899ca5a784136ebfef2117630b8510fb2e1e907dbde5d41d26b9c4c38',
   'lt': 46119083000007,
   'hash': '6a5d723c593f47bd52d5b5851c5f8672e4be7d64e61e48c18d0ef1a710ef36f6'},
  {'mode': 39,
   'account': '019ce993deceeb7ae769b28a2b1689440239f30ddb0a4fc4e579a719717917af',
   'lt': 46119083000045,
   'hash': 'b6efcbd76d790ce3ebc45188de4f82913c0b1ca1a1ff15a95f96ee72b3ee99d3'},
  {'mode': 39,
   'account': '01af655541c144cd0d67b70e1468ba5aa33dd1e7357e529b30f7976e210f46a5',
   'lt': 46119083000003,
   'hash': '27f36f68d4a5ba500c43e824a5006275093166191acaef04166b9a4c14914370'},
  {'mode': 39,
   'account': '02cec9c775471f5bbd0f2da7856fbc0dd50f7e6aca3979a74fa0e4a4148d0d96',
   'lt': 46119083000001,
   'hash': '15b372a130bc864bb3405f34c470a5d318cffd3272b95c60e8164bbe1c7e7cad'}],
 'proof': b'\xb5\xee\x9cr\x01\x02+\x01\x00\x06\x02\x00\tF\x03\x92\x9a\xe4\x84\xe1`woNv\xad\x0e\x06\x8d\x94\xea\xb7y\xea\x87\xb9\xf8<\x99r`\x1f\xfb\xe0v\xc2\xaa\x00&\x01$\x10\x11\xefU\xaa\xff\xff\xff\x11\x02\x03\x04\x05(H\x01\x01)\xbf)4q^\xfbF\xd1\xd4\xc1\xc7\x01\x08\x1eL\r\xfa\xb6\xd5\xa8\xfd\xd0\xe5Fa\xd8t\x15Yy\xde\x00\x01(H\x01\x01\x7f\x88w\xd7\x17\x99`\x9c\xd5\xbc\xc1\xc1p\xa9\x9b\x99\xfc\x1ckxA\xd6\xa3\xb9\xe2\x88\x7f|\xae\xd12\xaa\x00\x03(H\x01\x01\xdd\x91\x08>G\x0b1\xf4-\x99\xae\x90\xc04\x1a7L\x9bV\xa4\xad\x9fO\xc9\x9a\xe3\x97\x92\x1a\xef\xc0\x93\x00%#\x89J3\xf6\xfd[\xdaZ\xb9l]\x18\xca\xcf\xbe\x93\xf4_\xb5\x80u\x087\xab\x1b\x98\xde\x06]\x8b\x07=\x8e\x00\x0c\x89\x1f*U\xb6J\xca\x0b\x8f\x0c\xbe\x80\x1a\x92n\xf4\x7f\xe1`\x19\x05\xa6\xd5\x8e\x9bR \xa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\xbe\xde\xd3\xa3\xc2ib\xe8\xbe+\x15\xe5\x8fLw\x9a\xebZ|\x00\x04\x00\x82r\xa7\xa5\x08(\xde\xf7Ty_\x15-y\x16S\xb1\xff\x1aq\x08Pn\xb0\xe4\xc9\xb9\xae\x04XO\xfc\x8fJY_\xceb\xa2Gm\xb6\x07j\xab\xe8\rr\x1d\xf0\x8a\xa8b\xa9\xd6d=\xb9\xe6R\xb6\x1b_\xc4\xe6\xef(H\x01\x01\x15\xb3r\xa10\xbc\x86K\xb3@_4\xc4p\xa5\xd3\x18\xcf\xfd2r\xb9\\`\xe8\x16K\xbe\x1c~|\xad\x00\x04'}

As one can see, tx hashes, accounts and lts are present. Moreover, the proofs are exactly the same between public liteservers and TONAPI. Which means that internally the data are correct on the TONAPI side.

But for some reason TONAPI call does not return necessary tx details.

I would be very grateful if someone (@zakhar-petukhov @mr-tron @aleksej-paschenko ) can help/share the experience on this issue as this is pretty critical for my use-case.

The result of calling interface is wrong

/v2/accounts/{account_id} result is wrong.
The result returned by the self-built node is missing get_methods, interfaces, and the is_wallet and last_activity values are wrong.
image

issue about api-v2 /v2/blockchain/transactions/{id} alway return not found tx

Hi I have question about api-v2 when integrate ton . details is below:

  1. request transactions by /v2/blockchain/masterchain/{seqno}/transactions

  2. request transaction detail by /v2/blockchain/transactions/{txid}, which txid was returned by above. but api return {"error":"not found tx xxxxxxxxx"}

what's the problem?

error while loading shared libraries: libemulator.so

> make run

go run cmd/api/main.go
go: downloading go.uber.org/zap v1.24.0
go: downloading github.com/json-iterator/go v1.1.12
.
.
.
/tmp/go-build361844886/b001/exe/main: error while loading shared libraries: libemulator.so: cannot open shared object file: No such file or directory
exit status 127
make: *** [Makefile:19: run] Error 1

warning: libcrypto.so.1.1, needed by /home/user0/go/pkg/mod/github.com/tonkeeper/[email protected]/lib/linux/libemulator.so, not found (try using -rpath or -rpath-link)

Ubuntu 22.04.4LTS

/opentonapi$ make run
go run cmd/api/main.go

command-line-arguments

/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: warning: libcrypto.so.1.1, needed by /home/user0/go/pkg/mod/github.com/tonkeeper/[email protected]/lib/linux/libemulator.so, not found (try using -rpath or -rpath-link)

/v2/events/{event_id} not working for the large amount of the ACCOUNTS environment variable

If i leave ACCOUNTS="comma-separated-list-of-raw-account-addresses" make run

list empty

then i get:

{
"error": "not found tx 97264395bd65a255a429b11326c84128b7d70ffed7949abae3036d506ba38621"
}

{"level":"info","ts":1714550257.265961,"caller":"api/middlewares.go:23","msg":"Handling request","operation":"GetEvent","path":"/v2/events/97264395BD65A255A429B11326C84128B7D70FFED7949ABAE3036D506BA38621"}

{"level":"error","ts":1714550257.266055,"caller":"api/middlewares.go:27","msg":"Fail","operation":"GetEvent","path":"/v2/events/97264395BD65A255A429B11326C84128B7D70FFED7949ABAE3036D506BA38621","error":"code 500: {Error:not found tx 97264395bd65a255a429b11326c84128b7d70ffed7949abae3036d506ba38621}","stacktrace":"github.com/tonkeeper/opentonapi/pkg/api.NewServer.ogenLoggingMiddleware.func1\n\t/home/user0/opentonapi/pkg/api/middlewares.go:27\ngithub.com/ogen-go/ogen/middleware.ChainMiddlewares.func2\n\t/home/user0/go/pkg/mod/github.com/ogen-go/[email protected]/middleware/middleware.go:92\ngithub.com/ogen-go/ogen/middleware.HookMiddleware[...]\n\t/home/user0/go/pkg/mod/github.com/ogen-go/[email protected]/middleware/internal.go:29\ngithub.com/tonkeeper/opentonapi/pkg/oas.(*Server).handleGetEventRequest\n\t/home/user0/opentonapi/pkg/oas/oas_handlers_gen.go:5964\ngithub.com/tonkeeper/opentonapi/pkg/oas.(*Server).ServeHTTP\n\t/home/user0/opentonapi/pkg/oas/oas_router_gen.go:1379\nnet/http.(*ServeMux).ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2683\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:3137\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:2039"}

but there is no way to supply file with accounts list, in case i need a bulk monitoring (100 000 accounts in my case)

SendV2 return hash can not query by GetBlockchainTransaction

func (w *Wallet) SendV2(
ctx context.Context,
waitingConfirmation time.Duration,
messages ...Sendable,
) (ton.Bits256, error)

after exec this I get a hash da5886713fe53229dd4f8ceced7ec62890f2c1c6629bf74085bd4e1a8c8e0b95

while the hash is not tx hash. (can not search by /v2/blockchain/transactions/)

but is bb4f07ec147756fe3c1ef57d7397f6f19e4cd12869be0e96940a6f91c703bed4

https://testnet.tonviewer.com/transaction/da5886713fe53229dd4f8ceced7ec62890f2c1c6629bf74085bd4e1a8c8e0b95

why?

how to use da5886713fe53229dd4f8ceced7ec62890f2c1c6629bf74085bd4e1a8c8e0b95 get bb4f07ec147756fe3c1ef57d7397f6f19e4cd12869be0e96940a6f91c703bed4

Failed to calculate fee

Cannot estimate transactions in Testnet with the below error:

"ERROR: column \"storage_last_transaction_lt\" does not exist (SQLSTATE 42703)"

CleanShot 2024-05-09 at 09 33 59@2x

live scammer

EQArDbPZD9zEZvom9jI7iD5zlfAQSAnRtXh0BdK53T4OyIKy

this person is a real life-scam, using "trading bot" over Tarmex..
It should be some button with option like "return crypto and report address/ person/ bot"

Screenshot_11

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.