minter 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ffi/sign/go.mod +5 -0
- data/lib/ffi/sign/go.sum +185 -0
- data/lib/ffi/sign/sign-darwin-10.6-amd64.dylib +0 -0
- data/lib/ffi/sign/sign-darwin-10.6-amd64.h +78 -0
- data/lib/ffi/sign/sign-linux-amd64.h +78 -0
- data/lib/ffi/sign/sign-linux-amd64.so +0 -0
- data/lib/ffi/sign/sign.go +84 -0
- data/lib/ffi/tx_hash/go.mod +5 -0
- data/lib/ffi/tx_hash/go.sum +185 -0
- data/lib/ffi/tx_hash/tx-hash-darwin-10.6-amd64.dylib +0 -0
- data/lib/ffi/tx_hash/tx-hash-darwin-10.6-amd64.h +104 -0
- data/lib/ffi/tx_hash/tx-hash-linux-amd64.h +104 -0
- data/lib/ffi/tx_hash/tx-hash-linux-amd64.so +0 -0
- data/lib/ffi/tx_hash/tx_hash.go +616 -0
- data/lib/ffi/wallet/go.mod +5 -0
- data/lib/ffi/wallet/go.sum +185 -0
- data/lib/ffi/wallet/wallet-darwin-10.6-amd64.dylib +0 -0
- data/lib/ffi/wallet/wallet-darwin-10.6-amd64.h +86 -0
- data/lib/ffi/wallet/wallet-linux-amd64.h +86 -0
- data/lib/ffi/wallet/wallet-linux-amd64.so +0 -0
- data/lib/ffi/wallet/wallet.go +49 -0
- data/lib/minter/version.rb +1 -1
- metadata +23 -2
@@ -0,0 +1,185 @@
|
|
1
|
+
github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4=
|
2
|
+
github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc=
|
3
|
+
github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4=
|
4
|
+
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
|
5
|
+
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
|
6
|
+
github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
|
7
|
+
github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
|
8
|
+
github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
|
9
|
+
github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
|
10
|
+
github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
|
11
|
+
github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
|
12
|
+
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
|
13
|
+
github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
|
14
|
+
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
15
|
+
github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e h1:ahyvB3q25YnZWly5Gq1ekg6jcmWaGj/vG/MhF4aisoc=
|
16
|
+
github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:kGUqhHd//musdITWjFvNTHn90WG9bMLBEPQZ17Cmlpw=
|
17
|
+
github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec h1:1Qb69mGp/UtRPn422BH4/Y4Q3SLUrD9KHuDkm8iodFc=
|
18
|
+
github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec/go.mod h1:CD8UlnlLDiqb36L110uqiP2iSflVjx9g/3U9hCI4q2U=
|
19
|
+
github.com/MinterTeam/minter-go-sdk v1.0.8 h1:DLGldS4zOQKWAqXtgZqo7q1pkAuHNyDAF+4bQrXG3GY=
|
20
|
+
github.com/MinterTeam/minter-go-sdk v1.0.8/go.mod h1:IVoupdNnGyzfdprQ32x2ZI9MaA6XpXDirH16H6GqBTY=
|
21
|
+
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
22
|
+
github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q=
|
23
|
+
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
|
24
|
+
github.com/VictoriaMetrics/fastcache v1.5.3/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE=
|
25
|
+
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
|
26
|
+
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
27
|
+
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
28
|
+
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
|
29
|
+
github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ=
|
30
|
+
github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
31
|
+
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
32
|
+
github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ=
|
33
|
+
github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3 h1:A/EVblehb75cUgXA5njHPn0kLAsykn6mJGz7rnmW5W0=
|
34
|
+
github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI=
|
35
|
+
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
|
36
|
+
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
|
37
|
+
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=
|
38
|
+
github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY=
|
39
|
+
github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
|
40
|
+
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
|
41
|
+
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
|
42
|
+
github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s=
|
43
|
+
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
44
|
+
github.com/cespare/xxhash/v2 v2.0.1-0.20190104013014-3767db7a7e18/go.mod h1:HD5P3vAIAh+Y2GAxg0PrPN1P8WkepXGpjbUPDHJqqKM=
|
45
|
+
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
46
|
+
github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U=
|
47
|
+
github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e h1:0XBUw73chJ1VYSsfvcPvVT7auykAJce9FpRr10L6Qhw=
|
48
|
+
github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:P13beTBKr5Q18lJe1rIoLUqjM+CB1zYrRg44ZqGuQSA=
|
49
|
+
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
50
|
+
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
51
|
+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
52
|
+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
53
|
+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
54
|
+
github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ=
|
55
|
+
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
56
|
+
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
57
|
+
github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
58
|
+
github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
|
59
|
+
github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs=
|
60
|
+
github.com/ethereum/go-ethereum v1.9.10 h1:jooX7tWcscpC7ytufk73t9JMCeJQ7aJF2YmZJQEuvFo=
|
61
|
+
github.com/ethereum/go-ethereum v1.9.10/go.mod h1:lXHkVo/MTvsEXfYsmNzelZ8R1e0DTvdk/wMZJIRpaRw=
|
62
|
+
github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
63
|
+
github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
|
64
|
+
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
65
|
+
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=
|
66
|
+
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
67
|
+
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
68
|
+
github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=
|
69
|
+
github.com/go-resty/resty/v2 v2.0.0 h1:9Nq/U+V4xsoDnDa/iTrABDWUCuk3Ne92XFHPe6dKWUc=
|
70
|
+
github.com/go-resty/resty/v2 v2.0.0/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8=
|
71
|
+
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
72
|
+
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
73
|
+
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
74
|
+
github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
75
|
+
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
76
|
+
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
77
|
+
github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
78
|
+
github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc=
|
79
|
+
github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
80
|
+
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
81
|
+
github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag=
|
82
|
+
github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY=
|
83
|
+
github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
|
84
|
+
github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
85
|
+
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
86
|
+
github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=
|
87
|
+
github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
88
|
+
github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU=
|
89
|
+
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
|
90
|
+
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
91
|
+
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
92
|
+
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
93
|
+
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
94
|
+
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
95
|
+
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
96
|
+
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
97
|
+
github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
98
|
+
github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
|
99
|
+
github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
|
100
|
+
github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
101
|
+
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
102
|
+
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
103
|
+
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
104
|
+
github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0=
|
105
|
+
github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E=
|
106
|
+
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
107
|
+
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
108
|
+
github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
109
|
+
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
110
|
+
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
111
|
+
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
112
|
+
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
113
|
+
github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34=
|
114
|
+
github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
|
115
|
+
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
116
|
+
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
117
|
+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
118
|
+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
119
|
+
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
120
|
+
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
121
|
+
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
122
|
+
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
123
|
+
github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
124
|
+
github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho=
|
125
|
+
github.com/robertkrimen/otto v0.0.0-20170205013659-6a77b7cbc37d/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY=
|
126
|
+
github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
127
|
+
github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ=
|
128
|
+
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
129
|
+
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
130
|
+
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
131
|
+
github.com/spaolacci/murmur3 v1.0.1-0.20190317074736-539464a789e9/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
132
|
+
github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q=
|
133
|
+
github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw=
|
134
|
+
github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU=
|
135
|
+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
136
|
+
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
137
|
+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
138
|
+
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
139
|
+
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
140
|
+
github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA=
|
141
|
+
github.com/tyler-smith/go-bip32 v0.0.0-20170922074101-2c9cfd177564 h1:NXXyQVeRVLK8Xu27/hkkjwVOZLk5v4ZBEvvMtqMqznM=
|
142
|
+
github.com/tyler-smith/go-bip32 v0.0.0-20170922074101-2c9cfd177564/go.mod h1:0/YuQQF676+d4CMNclTqGUam1EDwz0B8o03K9pQqA3c=
|
143
|
+
github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs=
|
144
|
+
github.com/tyler-smith/go-bip39 v1.0.2 h1:+t3w+KwLXO6154GNJY+qUtIxLTmFjfUmpguQT1OlOT8=
|
145
|
+
github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs=
|
146
|
+
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
147
|
+
github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees=
|
148
|
+
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
149
|
+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
150
|
+
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 h1:0hQKqeLdqlt5iIwVOBErRisrHJAN57yOiPRQItI20fU=
|
151
|
+
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
152
|
+
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
153
|
+
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
154
|
+
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
155
|
+
golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2 h1:4dVFTC832rPn4pomLSz1vA+are2+dU19w1H8OngV7nc=
|
156
|
+
golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
157
|
+
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
158
|
+
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
159
|
+
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
160
|
+
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
161
|
+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
162
|
+
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
163
|
+
golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
164
|
+
golang.org/x/sys v0.0.0-20190912141932-bc967efca4b8 h1:41hwlulw1prEMBxLQSlMSux1zxJf07B3WPsdjJlKZxE=
|
165
|
+
golang.org/x/sys v0.0.0-20190912141932-bc967efca4b8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
166
|
+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
167
|
+
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
168
|
+
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
169
|
+
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
170
|
+
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
171
|
+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
172
|
+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
173
|
+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
174
|
+
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
175
|
+
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c=
|
176
|
+
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns=
|
177
|
+
gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78=
|
178
|
+
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
179
|
+
gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0=
|
180
|
+
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
181
|
+
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
182
|
+
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
183
|
+
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
184
|
+
launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54=
|
185
|
+
launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM=
|
Binary file
|
@@ -0,0 +1,104 @@
|
|
1
|
+
/* Code generated by cmd/cgo; DO NOT EDIT. */
|
2
|
+
|
3
|
+
/* package mod */
|
4
|
+
|
5
|
+
|
6
|
+
#line 1 "cgo-builtin-export-prolog"
|
7
|
+
|
8
|
+
#include <stddef.h> /* for ptrdiff_t below */
|
9
|
+
|
10
|
+
#ifndef GO_CGO_EXPORT_PROLOGUE_H
|
11
|
+
#define GO_CGO_EXPORT_PROLOGUE_H
|
12
|
+
|
13
|
+
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
14
|
+
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
|
15
|
+
#endif
|
16
|
+
|
17
|
+
#endif
|
18
|
+
|
19
|
+
/* Start of preamble from import "C" comments. */
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
/* End of preamble from import "C" comments. */
|
25
|
+
|
26
|
+
|
27
|
+
/* Start of boilerplate cgo prologue. */
|
28
|
+
#line 1 "cgo-gcc-export-header-prolog"
|
29
|
+
|
30
|
+
#ifndef GO_CGO_PROLOGUE_H
|
31
|
+
#define GO_CGO_PROLOGUE_H
|
32
|
+
|
33
|
+
typedef signed char GoInt8;
|
34
|
+
typedef unsigned char GoUint8;
|
35
|
+
typedef short GoInt16;
|
36
|
+
typedef unsigned short GoUint16;
|
37
|
+
typedef int GoInt32;
|
38
|
+
typedef unsigned int GoUint32;
|
39
|
+
typedef long long GoInt64;
|
40
|
+
typedef unsigned long long GoUint64;
|
41
|
+
typedef GoInt64 GoInt;
|
42
|
+
typedef GoUint64 GoUint;
|
43
|
+
typedef __SIZE_TYPE__ GoUintptr;
|
44
|
+
typedef float GoFloat32;
|
45
|
+
typedef double GoFloat64;
|
46
|
+
typedef float _Complex GoComplex64;
|
47
|
+
typedef double _Complex GoComplex128;
|
48
|
+
|
49
|
+
/*
|
50
|
+
static assertion to make sure the file is being used on architecture
|
51
|
+
at least with matching size of GoInt.
|
52
|
+
*/
|
53
|
+
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
|
54
|
+
|
55
|
+
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
56
|
+
typedef _GoString_ GoString;
|
57
|
+
#endif
|
58
|
+
typedef void *GoMap;
|
59
|
+
typedef void *GoChan;
|
60
|
+
typedef struct { void *t; void *v; } GoInterface;
|
61
|
+
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
|
62
|
+
|
63
|
+
#endif
|
64
|
+
|
65
|
+
/* End of boilerplate cgo prologue. */
|
66
|
+
|
67
|
+
#ifdef __cplusplus
|
68
|
+
extern "C" {
|
69
|
+
#endif
|
70
|
+
|
71
|
+
|
72
|
+
extern char* BuyCoinTx(char* p0);
|
73
|
+
|
74
|
+
extern char* CreateCoinTx(char* p0);
|
75
|
+
|
76
|
+
extern char* SendCoinTx(char* p0);
|
77
|
+
|
78
|
+
extern char* SellCoinTx(char* p0);
|
79
|
+
|
80
|
+
extern char* SellAllCoinTx(char* p0);
|
81
|
+
|
82
|
+
extern char* DeclareCandidacyTx(char* p0);
|
83
|
+
|
84
|
+
extern char* DelegateTx(char* p0);
|
85
|
+
|
86
|
+
extern char* UnbondTx(char* p0);
|
87
|
+
|
88
|
+
extern char* SetCandidateOffTx(char* p0);
|
89
|
+
|
90
|
+
extern char* SetCandidateOnTx(char* p0);
|
91
|
+
|
92
|
+
extern char* RedeemCheckTx(char* p0);
|
93
|
+
|
94
|
+
extern char* EditCandidateTx(char* p0);
|
95
|
+
|
96
|
+
extern char* MultiSendTx(char* p0);
|
97
|
+
|
98
|
+
extern char* CreateMultisigAddressTx(char* p0);
|
99
|
+
|
100
|
+
extern char* GetMultisigAddress(char* p0);
|
101
|
+
|
102
|
+
#ifdef __cplusplus
|
103
|
+
}
|
104
|
+
#endif
|
@@ -0,0 +1,104 @@
|
|
1
|
+
/* Code generated by cmd/cgo; DO NOT EDIT. */
|
2
|
+
|
3
|
+
/* package mod */
|
4
|
+
|
5
|
+
|
6
|
+
#line 1 "cgo-builtin-export-prolog"
|
7
|
+
|
8
|
+
#include <stddef.h> /* for ptrdiff_t below */
|
9
|
+
|
10
|
+
#ifndef GO_CGO_EXPORT_PROLOGUE_H
|
11
|
+
#define GO_CGO_EXPORT_PROLOGUE_H
|
12
|
+
|
13
|
+
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
14
|
+
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
|
15
|
+
#endif
|
16
|
+
|
17
|
+
#endif
|
18
|
+
|
19
|
+
/* Start of preamble from import "C" comments. */
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
/* End of preamble from import "C" comments. */
|
25
|
+
|
26
|
+
|
27
|
+
/* Start of boilerplate cgo prologue. */
|
28
|
+
#line 1 "cgo-gcc-export-header-prolog"
|
29
|
+
|
30
|
+
#ifndef GO_CGO_PROLOGUE_H
|
31
|
+
#define GO_CGO_PROLOGUE_H
|
32
|
+
|
33
|
+
typedef signed char GoInt8;
|
34
|
+
typedef unsigned char GoUint8;
|
35
|
+
typedef short GoInt16;
|
36
|
+
typedef unsigned short GoUint16;
|
37
|
+
typedef int GoInt32;
|
38
|
+
typedef unsigned int GoUint32;
|
39
|
+
typedef long long GoInt64;
|
40
|
+
typedef unsigned long long GoUint64;
|
41
|
+
typedef GoInt64 GoInt;
|
42
|
+
typedef GoUint64 GoUint;
|
43
|
+
typedef __SIZE_TYPE__ GoUintptr;
|
44
|
+
typedef float GoFloat32;
|
45
|
+
typedef double GoFloat64;
|
46
|
+
typedef float _Complex GoComplex64;
|
47
|
+
typedef double _Complex GoComplex128;
|
48
|
+
|
49
|
+
/*
|
50
|
+
static assertion to make sure the file is being used on architecture
|
51
|
+
at least with matching size of GoInt.
|
52
|
+
*/
|
53
|
+
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
|
54
|
+
|
55
|
+
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
56
|
+
typedef _GoString_ GoString;
|
57
|
+
#endif
|
58
|
+
typedef void *GoMap;
|
59
|
+
typedef void *GoChan;
|
60
|
+
typedef struct { void *t; void *v; } GoInterface;
|
61
|
+
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
|
62
|
+
|
63
|
+
#endif
|
64
|
+
|
65
|
+
/* End of boilerplate cgo prologue. */
|
66
|
+
|
67
|
+
#ifdef __cplusplus
|
68
|
+
extern "C" {
|
69
|
+
#endif
|
70
|
+
|
71
|
+
|
72
|
+
extern char* BuyCoinTx(char* p0);
|
73
|
+
|
74
|
+
extern char* CreateCoinTx(char* p0);
|
75
|
+
|
76
|
+
extern char* SendCoinTx(char* p0);
|
77
|
+
|
78
|
+
extern char* SellCoinTx(char* p0);
|
79
|
+
|
80
|
+
extern char* SellAllCoinTx(char* p0);
|
81
|
+
|
82
|
+
extern char* DeclareCandidacyTx(char* p0);
|
83
|
+
|
84
|
+
extern char* DelegateTx(char* p0);
|
85
|
+
|
86
|
+
extern char* UnbondTx(char* p0);
|
87
|
+
|
88
|
+
extern char* SetCandidateOffTx(char* p0);
|
89
|
+
|
90
|
+
extern char* SetCandidateOnTx(char* p0);
|
91
|
+
|
92
|
+
extern char* RedeemCheckTx(char* p0);
|
93
|
+
|
94
|
+
extern char* EditCandidateTx(char* p0);
|
95
|
+
|
96
|
+
extern char* MultiSendTx(char* p0);
|
97
|
+
|
98
|
+
extern char* CreateMultisigAddressTx(char* p0);
|
99
|
+
|
100
|
+
extern char* GetMultisigAddress(char* p0);
|
101
|
+
|
102
|
+
#ifdef __cplusplus
|
103
|
+
}
|
104
|
+
#endif
|
Binary file
|
@@ -0,0 +1,616 @@
|
|
1
|
+
package main
|
2
|
+
|
3
|
+
import (
|
4
|
+
"C"
|
5
|
+
"encoding/json"
|
6
|
+
"github.com/MinterTeam/minter-go-sdk/transaction"
|
7
|
+
"math/big"
|
8
|
+
)
|
9
|
+
|
10
|
+
type CommonParams struct {
|
11
|
+
SignatureType transaction.SignatureType
|
12
|
+
ChainId byte
|
13
|
+
Nonce uint64
|
14
|
+
GasPrice uint8
|
15
|
+
GasCoin string
|
16
|
+
}
|
17
|
+
|
18
|
+
//BuyCoinTx
|
19
|
+
type BuyCoinParams struct {
|
20
|
+
CoinToBuy string
|
21
|
+
ValueToBuy *big.Int
|
22
|
+
CoinToSell string
|
23
|
+
MaximumValueToSell *big.Int
|
24
|
+
CommonParams
|
25
|
+
}
|
26
|
+
|
27
|
+
//export BuyCoinTx
|
28
|
+
func BuyCoinTx(paramsJson *C.char) *C.char {
|
29
|
+
var params BuyCoinParams
|
30
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
31
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
32
|
+
if err != nil {
|
33
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
34
|
+
return C.CString(string(resultJson))
|
35
|
+
}
|
36
|
+
|
37
|
+
data := transaction.NewBuyCoinData().
|
38
|
+
SetCoinToBuy(params.CoinToBuy).
|
39
|
+
SetValueToBuy(params.ValueToBuy).
|
40
|
+
SetCoinToSell(params.CoinToSell).
|
41
|
+
SetMaximumValueToSell(params.MaximumValueToSell)
|
42
|
+
|
43
|
+
tx, err := transaction.NewBuilder(transaction.ChainID(params.ChainId)).NewTransaction(data)
|
44
|
+
if err != nil {
|
45
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
46
|
+
return C.CString(string(resultJson))
|
47
|
+
}
|
48
|
+
|
49
|
+
tx.SetNonce(params.Nonce).SetGasPrice(params.GasPrice).SetGasCoin(params.GasCoin).SetSignatureType(params.SignatureType)
|
50
|
+
|
51
|
+
encode, err := tx.Encode()
|
52
|
+
if err != nil {
|
53
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
54
|
+
return C.CString(string(resultJson))
|
55
|
+
}
|
56
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "true", "tx_hash": encode})
|
57
|
+
return C.CString(string(resultJson))
|
58
|
+
}
|
59
|
+
|
60
|
+
// CreateCoinTX
|
61
|
+
type CreateCoinParams struct {
|
62
|
+
Name string
|
63
|
+
Symbol string
|
64
|
+
InitialAmount *big.Int
|
65
|
+
InitialReserve *big.Int
|
66
|
+
ReserveRation uint
|
67
|
+
MaxSupply *big.Int
|
68
|
+
CommonParams
|
69
|
+
}
|
70
|
+
|
71
|
+
//export CreateCoinTx
|
72
|
+
func CreateCoinTx(paramsJson *C.char) *C.char {
|
73
|
+
var params CreateCoinParams
|
74
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
75
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
76
|
+
if err != nil {
|
77
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
78
|
+
return C.CString(string(resultJson))
|
79
|
+
}
|
80
|
+
|
81
|
+
data := transaction.NewCreateCoinData().
|
82
|
+
SetName(params.Name).
|
83
|
+
SetSymbol(params.Symbol).
|
84
|
+
SetInitialAmount(params.InitialAmount).
|
85
|
+
SetInitialReserve(params.InitialReserve).
|
86
|
+
SetConstantReserveRatio(params.ReserveRation).
|
87
|
+
SetMaxSupply(params.MaxSupply)
|
88
|
+
|
89
|
+
tx, err := transaction.NewBuilder(transaction.ChainID(params.ChainId)).NewTransaction(data)
|
90
|
+
if err != nil {
|
91
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
92
|
+
return C.CString(string(resultJson))
|
93
|
+
}
|
94
|
+
|
95
|
+
tx.SetNonce(params.Nonce).SetGasPrice(params.GasPrice).SetGasCoin(params.GasCoin).SetSignatureType(params.SignatureType)
|
96
|
+
|
97
|
+
encode, err := tx.Encode()
|
98
|
+
if err != nil {
|
99
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
100
|
+
return C.CString(string(resultJson))
|
101
|
+
}
|
102
|
+
|
103
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "true", "tx_hash": encode})
|
104
|
+
return C.CString(string(resultJson))
|
105
|
+
}
|
106
|
+
|
107
|
+
// SendCoinTx
|
108
|
+
type SendCoinParams struct {
|
109
|
+
AddressTo string
|
110
|
+
Value *big.Int
|
111
|
+
Coin string
|
112
|
+
CommonParams
|
113
|
+
}
|
114
|
+
|
115
|
+
//export SendCoinTx
|
116
|
+
func SendCoinTx(paramsJson *C.char) *C.char {
|
117
|
+
var params SendCoinParams
|
118
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
119
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
120
|
+
if err != nil {
|
121
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
122
|
+
return C.CString(string(resultJson))
|
123
|
+
}
|
124
|
+
|
125
|
+
data, err := transaction.NewSendData().SetCoin(params.Coin).SetValue(params.Value).SetTo(params.AddressTo)
|
126
|
+
if err != nil {
|
127
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
128
|
+
return C.CString(string(resultJson))
|
129
|
+
}
|
130
|
+
|
131
|
+
tx, err := transaction.NewBuilder(transaction.ChainID(params.ChainId)).NewTransaction(data)
|
132
|
+
if err != nil {
|
133
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
134
|
+
return C.CString(string(resultJson))
|
135
|
+
}
|
136
|
+
|
137
|
+
tx.SetNonce(params.Nonce).SetGasPrice(params.GasPrice).SetGasCoin(params.GasCoin).SetSignatureType(params.SignatureType)
|
138
|
+
|
139
|
+
encode, err := tx.Encode()
|
140
|
+
if err != nil {
|
141
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
142
|
+
return C.CString(string(resultJson))
|
143
|
+
}
|
144
|
+
|
145
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "true", "tx_hash": encode})
|
146
|
+
return C.CString(string(resultJson))
|
147
|
+
}
|
148
|
+
|
149
|
+
type SellCoinParams struct {
|
150
|
+
CoinToSell string
|
151
|
+
ValueToSell *big.Int
|
152
|
+
CoinToBuy string
|
153
|
+
MinimumValueToBuy *big.Int
|
154
|
+
CommonParams
|
155
|
+
}
|
156
|
+
|
157
|
+
//export SellCoinTx
|
158
|
+
func SellCoinTx(paramsJson *C.char) *C.char {
|
159
|
+
var params SellCoinParams
|
160
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
161
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
162
|
+
if err != nil {
|
163
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
164
|
+
return C.CString(string(resultJson))
|
165
|
+
}
|
166
|
+
|
167
|
+
data := transaction.NewSellCoinData().
|
168
|
+
SetCoinToSell(params.CoinToSell).
|
169
|
+
SetValueToSell(params.ValueToSell).
|
170
|
+
SetCoinToBuy(params.CoinToBuy).
|
171
|
+
SetMinimumValueToBuy(params.MinimumValueToBuy)
|
172
|
+
|
173
|
+
tx, err := transaction.NewBuilder(transaction.ChainID(params.ChainId)).NewTransaction(data)
|
174
|
+
if err != nil {
|
175
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
176
|
+
return C.CString(string(resultJson))
|
177
|
+
}
|
178
|
+
|
179
|
+
tx.SetNonce(params.Nonce).SetGasPrice(params.GasPrice).SetGasCoin(params.GasCoin).SetSignatureType(params.SignatureType)
|
180
|
+
|
181
|
+
encode, err := tx.Encode()
|
182
|
+
if err != nil {
|
183
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
184
|
+
return C.CString(string(resultJson))
|
185
|
+
}
|
186
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "true", "tx_hash": encode})
|
187
|
+
return C.CString(string(resultJson))
|
188
|
+
}
|
189
|
+
|
190
|
+
type SellAllCoinParams struct {
|
191
|
+
CoinToSell string
|
192
|
+
CoinToBuy string
|
193
|
+
ValueToBuy *big.Int
|
194
|
+
MinimumValueToBuy *big.Int
|
195
|
+
CommonParams
|
196
|
+
}
|
197
|
+
|
198
|
+
//export SellAllCoinTx
|
199
|
+
func SellAllCoinTx(paramsJson *C.char) *C.char {
|
200
|
+
var params SellAllCoinParams
|
201
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
202
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
203
|
+
if err != nil {
|
204
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
205
|
+
return C.CString(string(resultJson))
|
206
|
+
}
|
207
|
+
|
208
|
+
data := transaction.NewSellAllCoinData().
|
209
|
+
SetCoinToSell(params.CoinToSell).
|
210
|
+
SetCoinToBuy(params.CoinToBuy).
|
211
|
+
SetMinimumValueToBuy(params.MinimumValueToBuy)
|
212
|
+
|
213
|
+
tx, err := transaction.NewBuilder(transaction.ChainID(params.ChainId)).NewTransaction(data)
|
214
|
+
if err != nil {
|
215
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
216
|
+
return C.CString(string(resultJson))
|
217
|
+
}
|
218
|
+
|
219
|
+
tx.SetNonce(params.Nonce).SetGasPrice(params.GasPrice).SetGasCoin(params.GasCoin).SetSignatureType(params.SignatureType)
|
220
|
+
|
221
|
+
encode, err := tx.Encode()
|
222
|
+
if err != nil {
|
223
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
224
|
+
return C.CString(string(resultJson))
|
225
|
+
}
|
226
|
+
|
227
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "true", "tx_hash": encode})
|
228
|
+
return C.CString(string(resultJson))
|
229
|
+
}
|
230
|
+
|
231
|
+
type DeclareCandidacyParams struct {
|
232
|
+
Address string
|
233
|
+
PubKey string
|
234
|
+
Commission uint
|
235
|
+
Coin string
|
236
|
+
Stake *big.Int
|
237
|
+
CommonParams
|
238
|
+
}
|
239
|
+
|
240
|
+
//export DeclareCandidacyTx
|
241
|
+
func DeclareCandidacyTx(paramsJson *C.char) *C.char {
|
242
|
+
var params DeclareCandidacyParams
|
243
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
244
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
245
|
+
|
246
|
+
data, err := transaction.NewDeclareCandidacyData().
|
247
|
+
MustSetPubKey(params.PubKey).
|
248
|
+
SetCommission(params.Commission).
|
249
|
+
SetCoin(params.Coin).
|
250
|
+
SetStake(params.Stake).
|
251
|
+
SetAddress(params.Address)
|
252
|
+
if err != nil {
|
253
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
254
|
+
return C.CString(string(resultJson))
|
255
|
+
}
|
256
|
+
|
257
|
+
tx, err := transaction.NewBuilder(transaction.ChainID(params.ChainId)).NewTransaction(data)
|
258
|
+
if err != nil {
|
259
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
260
|
+
return C.CString(string(resultJson))
|
261
|
+
}
|
262
|
+
|
263
|
+
tx.SetNonce(params.Nonce).SetGasPrice(params.GasPrice).SetGasCoin(params.GasCoin).SetSignatureType(params.SignatureType)
|
264
|
+
|
265
|
+
encode, err := tx.Encode()
|
266
|
+
if err != nil {
|
267
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
268
|
+
return C.CString(string(resultJson))
|
269
|
+
}
|
270
|
+
|
271
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "true", "tx_hash": encode})
|
272
|
+
return C.CString(string(resultJson))
|
273
|
+
}
|
274
|
+
|
275
|
+
type DelegateParams struct {
|
276
|
+
PubKey string
|
277
|
+
Coin string
|
278
|
+
Value *big.Int
|
279
|
+
CommonParams
|
280
|
+
}
|
281
|
+
|
282
|
+
//export DelegateTx
|
283
|
+
func DelegateTx(paramsJson *C.char) *C.char {
|
284
|
+
var params DelegateParams
|
285
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
286
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
287
|
+
if err != nil {
|
288
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
289
|
+
return C.CString(string(resultJson))
|
290
|
+
}
|
291
|
+
|
292
|
+
data := transaction.NewDelegateData().
|
293
|
+
MustSetPubKey(params.PubKey).
|
294
|
+
SetCoin(params.Coin).
|
295
|
+
SetValue(params.Value)
|
296
|
+
|
297
|
+
tx, err := transaction.NewBuilder(transaction.ChainID(params.ChainId)).NewTransaction(data)
|
298
|
+
if err != nil {
|
299
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
300
|
+
return C.CString(string(resultJson))
|
301
|
+
}
|
302
|
+
|
303
|
+
tx.SetNonce(params.Nonce).SetGasPrice(params.GasPrice).SetGasCoin(params.GasCoin).SetSignatureType(params.SignatureType)
|
304
|
+
|
305
|
+
encode, err := tx.Encode()
|
306
|
+
if err != nil {
|
307
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
308
|
+
return C.CString(string(resultJson))
|
309
|
+
}
|
310
|
+
|
311
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "true", "tx_hash": encode})
|
312
|
+
return C.CString(string(resultJson))
|
313
|
+
}
|
314
|
+
|
315
|
+
type UnbondParams struct {
|
316
|
+
PubKey string
|
317
|
+
Coin string
|
318
|
+
Value *big.Int
|
319
|
+
CommonParams
|
320
|
+
}
|
321
|
+
|
322
|
+
//export UnbondTx
|
323
|
+
func UnbondTx(paramsJson *C.char) *C.char {
|
324
|
+
var params UnbondParams
|
325
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
326
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
327
|
+
if err != nil {
|
328
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
329
|
+
return C.CString(string(resultJson))
|
330
|
+
}
|
331
|
+
|
332
|
+
data := transaction.NewUnbondData().
|
333
|
+
MustSetPubKey(params.PubKey).
|
334
|
+
SetCoin(params.Coin).
|
335
|
+
SetValue(params.Value)
|
336
|
+
|
337
|
+
tx, err := transaction.NewBuilder(transaction.ChainID(params.ChainId)).NewTransaction(data)
|
338
|
+
if err != nil {
|
339
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
340
|
+
return C.CString(string(resultJson))
|
341
|
+
}
|
342
|
+
|
343
|
+
tx.SetNonce(params.Nonce).SetGasPrice(params.GasPrice).SetGasCoin(params.GasCoin).SetSignatureType(params.SignatureType)
|
344
|
+
|
345
|
+
encode, err := tx.Encode()
|
346
|
+
if err != nil {
|
347
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
348
|
+
return C.CString(string(resultJson))
|
349
|
+
}
|
350
|
+
|
351
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "true", "tx_hash": encode})
|
352
|
+
return C.CString(string(resultJson))
|
353
|
+
}
|
354
|
+
|
355
|
+
type SetCandidateParams struct {
|
356
|
+
PubKey string
|
357
|
+
CommonParams
|
358
|
+
}
|
359
|
+
|
360
|
+
//export SetCandidateOffTx
|
361
|
+
func SetCandidateOffTx(paramsJson *C.char) *C.char {
|
362
|
+
var params SetCandidateParams
|
363
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
364
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
365
|
+
if err != nil {
|
366
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
367
|
+
return C.CString(string(resultJson))
|
368
|
+
}
|
369
|
+
|
370
|
+
data := transaction.NewSetCandidateOffData().
|
371
|
+
MustSetPubKey(params.PubKey)
|
372
|
+
|
373
|
+
tx, err := transaction.NewBuilder(transaction.ChainID(params.ChainId)).NewTransaction(data)
|
374
|
+
if err != nil {
|
375
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
376
|
+
return C.CString(string(resultJson))
|
377
|
+
}
|
378
|
+
|
379
|
+
tx.SetNonce(params.Nonce).SetGasPrice(params.GasPrice).SetGasCoin(params.GasCoin).SetSignatureType(params.SignatureType)
|
380
|
+
|
381
|
+
encode, err := tx.Encode()
|
382
|
+
if err != nil {
|
383
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
384
|
+
return C.CString(string(resultJson))
|
385
|
+
}
|
386
|
+
|
387
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "true", "tx_hash": encode})
|
388
|
+
return C.CString(string(resultJson))
|
389
|
+
}
|
390
|
+
|
391
|
+
//export SetCandidateOnTx
|
392
|
+
func SetCandidateOnTx(paramsJson *C.char) *C.char {
|
393
|
+
var params SetCandidateParams
|
394
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
395
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
396
|
+
if err != nil {
|
397
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
398
|
+
return C.CString(string(resultJson))
|
399
|
+
}
|
400
|
+
|
401
|
+
data := transaction.NewSetCandidateOnData().
|
402
|
+
MustSetPubKey(params.PubKey)
|
403
|
+
|
404
|
+
tx, err := transaction.NewBuilder(transaction.ChainID(params.ChainId)).NewTransaction(data)
|
405
|
+
if err != nil {
|
406
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
407
|
+
return C.CString(string(resultJson))
|
408
|
+
}
|
409
|
+
|
410
|
+
tx.SetNonce(params.Nonce).SetGasPrice(params.GasPrice).SetGasCoin(params.GasCoin).SetSignatureType(params.SignatureType)
|
411
|
+
|
412
|
+
encode, err := tx.Encode()
|
413
|
+
if err != nil {
|
414
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
415
|
+
return C.CString(string(resultJson))
|
416
|
+
}
|
417
|
+
|
418
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "true", "tx_hash": encode})
|
419
|
+
return C.CString(string(resultJson))
|
420
|
+
}
|
421
|
+
|
422
|
+
type RedeemCheckParams struct {
|
423
|
+
Check string
|
424
|
+
Proof string
|
425
|
+
CommonParams
|
426
|
+
}
|
427
|
+
|
428
|
+
//export RedeemCheckTx
|
429
|
+
func RedeemCheckTx(paramsJson *C.char) *C.char {
|
430
|
+
var params RedeemCheckParams
|
431
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
432
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
433
|
+
if err != nil {
|
434
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
435
|
+
return C.CString(string(resultJson))
|
436
|
+
}
|
437
|
+
|
438
|
+
data := transaction.NewRedeemCheckData().
|
439
|
+
MustSetProof(params.Proof).
|
440
|
+
MustSetRawCheck(params.Check)
|
441
|
+
|
442
|
+
tx, err := transaction.NewBuilder(transaction.ChainID(params.ChainId)).NewTransaction(data)
|
443
|
+
if err != nil {
|
444
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
445
|
+
return C.CString(string(resultJson))
|
446
|
+
}
|
447
|
+
|
448
|
+
tx.SetNonce(params.Nonce).SetGasPrice(params.GasPrice).SetGasCoin(params.GasCoin).SetSignatureType(params.SignatureType)
|
449
|
+
|
450
|
+
encode, err := tx.Encode()
|
451
|
+
if err != nil {
|
452
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
453
|
+
return C.CString(string(resultJson))
|
454
|
+
}
|
455
|
+
|
456
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "true", "tx_hash": encode})
|
457
|
+
return C.CString(string(resultJson))
|
458
|
+
}
|
459
|
+
|
460
|
+
type EditCandidateParams struct {
|
461
|
+
PubKey string
|
462
|
+
RewardAddress string
|
463
|
+
OwnerAddress string
|
464
|
+
CommonParams
|
465
|
+
}
|
466
|
+
|
467
|
+
//export EditCandidateTx
|
468
|
+
func EditCandidateTx(paramsJson *C.char) *C.char {
|
469
|
+
var params EditCandidateParams
|
470
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
471
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
472
|
+
if err != nil {
|
473
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
474
|
+
return C.CString(string(resultJson))
|
475
|
+
}
|
476
|
+
|
477
|
+
data := transaction.NewEditCandidateData().
|
478
|
+
MustSetPubKey(params.PubKey).
|
479
|
+
MustSetOwnerAddress(params.OwnerAddress).
|
480
|
+
MustSetRewardAddress(params.RewardAddress)
|
481
|
+
|
482
|
+
tx, err := transaction.NewBuilder(transaction.ChainID(params.ChainId)).NewTransaction(data)
|
483
|
+
if err != nil {
|
484
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
485
|
+
return C.CString(string(resultJson))
|
486
|
+
}
|
487
|
+
|
488
|
+
tx.SetNonce(params.Nonce).SetGasPrice(params.GasPrice).SetGasCoin(params.GasCoin).SetSignatureType(params.SignatureType)
|
489
|
+
|
490
|
+
encode, err := tx.Encode()
|
491
|
+
if err != nil {
|
492
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
493
|
+
return C.CString(string(resultJson))
|
494
|
+
}
|
495
|
+
|
496
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "true", "tx_hash": encode})
|
497
|
+
return C.CString(string(resultJson))
|
498
|
+
}
|
499
|
+
|
500
|
+
type MultiSendItem struct {
|
501
|
+
AddressTo string
|
502
|
+
Symbol string
|
503
|
+
Value *big.Int
|
504
|
+
}
|
505
|
+
|
506
|
+
type MultiSendParams struct {
|
507
|
+
Items []MultiSendItem
|
508
|
+
CommonParams
|
509
|
+
}
|
510
|
+
|
511
|
+
//export MultiSendTx
|
512
|
+
func MultiSendTx(paramsJson *C.char) *C.char {
|
513
|
+
var params MultiSendParams
|
514
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
515
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
516
|
+
if err != nil {
|
517
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
518
|
+
return C.CString(string(resultJson))
|
519
|
+
}
|
520
|
+
|
521
|
+
data := transaction.NewMultisendData()
|
522
|
+
|
523
|
+
for _, item := range params.Items {
|
524
|
+
data.AddItem(
|
525
|
+
*transaction.NewMultisendDataItem().
|
526
|
+
SetCoin(item.Symbol).
|
527
|
+
SetValue(item.Value).
|
528
|
+
MustSetTo(item.AddressTo),
|
529
|
+
)
|
530
|
+
}
|
531
|
+
tx, err := transaction.NewBuilder(transaction.ChainID(params.ChainId)).NewTransaction(data)
|
532
|
+
if err != nil {
|
533
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
534
|
+
return C.CString(string(resultJson))
|
535
|
+
}
|
536
|
+
tx.SetNonce(params.Nonce).SetGasPrice(params.GasPrice).SetGasCoin(params.GasCoin).SetSignatureType(params.SignatureType)
|
537
|
+
|
538
|
+
encode, err := tx.Encode()
|
539
|
+
if err != nil {
|
540
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
541
|
+
return C.CString(string(resultJson))
|
542
|
+
}
|
543
|
+
|
544
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "true", "tx_hash": encode})
|
545
|
+
return C.CString(string(resultJson))
|
546
|
+
}
|
547
|
+
|
548
|
+
type MultisigAddressItem struct {
|
549
|
+
Address string
|
550
|
+
Weight uint
|
551
|
+
}
|
552
|
+
|
553
|
+
type MultisigAddressParams struct {
|
554
|
+
Addresses []MultisigAddressItem
|
555
|
+
Threshold uint
|
556
|
+
CommonParams
|
557
|
+
}
|
558
|
+
|
559
|
+
//export CreateMultisigAddressTx
|
560
|
+
func CreateMultisigAddressTx(paramsJson *C.char) *C.char {
|
561
|
+
var params MultisigAddressParams
|
562
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
563
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
564
|
+
if err != nil {
|
565
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
566
|
+
return C.CString(string(resultJson))
|
567
|
+
}
|
568
|
+
|
569
|
+
data := transaction.NewCreateMultisigData()
|
570
|
+
|
571
|
+
for _, address := range params.Addresses {
|
572
|
+
data.MustAddSigData(address.Address, address.Weight)
|
573
|
+
}
|
574
|
+
tx, err := transaction.NewBuilder(transaction.ChainID(params.ChainId)).NewTransaction(data)
|
575
|
+
if err != nil {
|
576
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
577
|
+
return C.CString(string(resultJson))
|
578
|
+
}
|
579
|
+
tx.SetNonce(params.Nonce).SetGasPrice(params.GasPrice).SetGasCoin(params.GasCoin).SetSignatureType(params.SignatureType)
|
580
|
+
|
581
|
+
encode, err := tx.Encode()
|
582
|
+
if err != nil {
|
583
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
584
|
+
return C.CString(string(resultJson))
|
585
|
+
}
|
586
|
+
|
587
|
+
result := map[string]string{
|
588
|
+
"success": "true",
|
589
|
+
"tx_hash": encode,
|
590
|
+
"multisig_address": data.AddressString(),
|
591
|
+
}
|
592
|
+
resultJson, _ := json.Marshal(result)
|
593
|
+
return C.CString(string(resultJson))
|
594
|
+
}
|
595
|
+
|
596
|
+
//export GetMultisigAddress
|
597
|
+
func GetMultisigAddress(paramsJson *C.char) *C.char {
|
598
|
+
var params MultisigAddressParams
|
599
|
+
jsonBytes := []byte(C.GoString(paramsJson))
|
600
|
+
err := json.Unmarshal(jsonBytes, ¶ms)
|
601
|
+
if err != nil {
|
602
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "false", "error": err.Error()})
|
603
|
+
return C.CString(string(resultJson))
|
604
|
+
}
|
605
|
+
|
606
|
+
data := transaction.NewCreateMultisigData()
|
607
|
+
|
608
|
+
for _, address := range params.Addresses {
|
609
|
+
data.MustAddSigData(address.Address, address.Weight)
|
610
|
+
}
|
611
|
+
|
612
|
+
resultJson, _ := json.Marshal(map[string]string{"success": "true", "multisig_address": data.AddressString()})
|
613
|
+
return C.CString(string(resultJson))
|
614
|
+
}
|
615
|
+
|
616
|
+
func main() {}
|