Commit graph

320 commits

Author SHA1 Message Date
Leonard Lyubich
047bae63d0 [#135] sdk/object: Fix IDFromV2 nil-behavior
Remove nil if-statement from IDFromV2 function to which avoids checking the
correctness of the identifier format. From now IDFromV2 returns format error
on nil argument.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
de505ddee9 [#133] sdk: Use cid wrapper to sign container delete request
StableMarshalerWrapper is not suitable for container delete
request, because it signs marshaled structure of container id.
As for delete request, container id itself should be signed.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
acbdbd410e [#132] sdk/object: Implement useful methods and function
Implement method to get address of the object. Implement method to copy the
object w/o payload. Implement function of object deserialization.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
f18e8535c5 [#132] sdk/object: Add payload field to Object
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
c125749c6e [#132] sdk/object: Implement Address type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
9cba1e233d [#131] sdk: Add owner stringer and script hash converter
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
8c3f8268b9 [#130] sdk: Define object types
Define Object type that represents the immutable NeoFS object. Define
RawObject type that provides interface for convenient construction of NeoFS
object.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
a65db08608 [#130] sdk: Define object identifier type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
63c8d6e9ea [#128] sdk: Use owner ID instead of NEO3Wallet
Replace owner.NEO3Wallet usage with owner.ID usage. Functions that process
the wallet address convert it to the owner identifier through the public
method.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
c9d38aa2e1 [#128] sdk: Implement owner ID type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
1c3e69721b [#128] sdk: Implement Bytes method on NEO3Wallet type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
2b20230d7f [#128] sdk: Remove old container ID with the new one
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
8df69c4042 sdk: Define container identifier type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
7f4544ede0 [#126] sdk: add usage example
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
aa539cd0c4 [#126] sdk: implement container rpc for in client
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
25e6b45b57 [#126] sdk: implement accounting rpc in client
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
86e6221b76 [#126] sdk: add sdk client for all available api requests
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
8c920d75a6 [#126] sdk: add reference types
This commits adds container id and neo 3 wallet id, that
is used as owner id for object and container. Version
is set out outside of refs packages since it store global
version of SDK.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
6191903326 Implement new request signing mechanism
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:40:45 +03:00
Alex Vanin
1f143e54bd Move api-v2 files into v2 subdir
This subdir contains generated proto files
and small wrappers.
2020-09-18 10:40:17 +03:00