-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathapi-client-descriptors.json
45 lines (44 loc) · 2.25 KB
/
api-client-descriptors.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[
{
"name": "curl",
"repository_url": null,
"setup_instructions": null,
"template": "curl -v -XPOST https://nchain.provide.services/api/v1/contracts/{{ contractId }}/execution \\n-H 'content-type: application/json' \\-H 'authorization: bearer {{ apiToken }}' \\\n-d '{\"account_id\": \"{{ walletId }}\", \"method\": \"{{ method }}\", \"params\": {{ params }}, \"value\": {{ value }}}'"
},
{
"name": "golang",
"repository_url": "https://github.com/provideplatform/provide-go",
"setup_instructions": "go get github.com/provideplatform/provide-go",
"template": "import \"github.com/provideplatform/provide-go\"\n\nparams := map[string]interface{}{\\n\\t\"account_id\": \"{{ walletId }}\",\\n\\t\"method\": \"{{ method }}\",\\n\\t\"params\": {{ params }},\\n\\t\"value\": {{ value }}\\n,}\\nstatus, resp, err := provide.ExecuteContract(\"{{ apiToken }}\", \"{{ contractId }}\", params)"
},
{
"name": "groovy",
"repository_url": "https://github.com/provideservices/provide-groovy",
"setup_instructions": null,
"template": null
},
{
"name": "js",
"repository_url": "https://github.com/provideservices/provide-js",
"setup_instructions": "npm install provide-js",
"template": null
},
{
"name": "python",
"repository_url": "https://github.com/provideservices/provide-python",
"setup_instructions": "pip install prvd",
"template": "from prvd.nchain import NChain\\n\\nclient = NChain('{{ apiToken }}')\\nparams = { 'account_id': '{{ identityId }}', 'method': '{{ method }}', 'value': {{ value }}, 'params': {{ params }} }\\nclient.execute_contract('{{ contractId }}', params)"
},
{
"name": "ruby",
"repository_url": "https://github.com/provideservices/provide-ruby",
"setup_instructions": "gem install provide-ruby",
"template": "require 'provide-ruby'\n\nBlockchainService.execute_contract('{{ apiToken }}', '{{ contractId }}', { account_id: '{{ identityId }}', method: '{{ method }}', value: {{ value }}, params: {{ params }} })"
},
{
"name": "swift",
"repository_url": "https://github.com/provideservices/provide-swift",
"setup_instructions": "pod install provide",
"template": null
}
]